2019-05-10 11:16:37 +00:00
|
|
|
<vn-crud-model
|
2019-10-24 22:53:53 +00:00
|
|
|
url="AbsenceTypes"
|
2019-10-23 15:38:35 +00:00
|
|
|
data="absenceTypes"
|
|
|
|
auto-load="true">
|
2019-05-10 11:16:37 +00:00
|
|
|
</vn-crud-model>
|
2019-11-10 10:08:44 +00:00
|
|
|
<div class="vn-w-lg">
|
|
|
|
<vn-card class="vn-pa-sm calendars">
|
|
|
|
<vn-calendar
|
|
|
|
ng-repeat="month in $ctrl.months"
|
|
|
|
data="$ctrl.events"
|
|
|
|
default-date="month"
|
|
|
|
format-day="$ctrl.formatDay($day, $element)"
|
|
|
|
display-controls="false"
|
|
|
|
hide-contiguous="true"
|
2020-07-07 12:29:57 +00:00
|
|
|
hide-year="true"
|
|
|
|
on-selection="$ctrl.onSelection($days, $type, $weekday)">
|
2019-11-10 10:08:44 +00:00
|
|
|
</vn-calendar>
|
|
|
|
</vn-card>
|
2019-10-23 15:38:35 +00:00
|
|
|
</div>
|
|
|
|
<vn-side-menu side="right">
|
|
|
|
<div class="vn-pa-md">
|
|
|
|
<div class="totalBox" style="text-align: center;">
|
|
|
|
<h6 translate>Holidays</h6>
|
2019-10-18 19:36:30 +00:00
|
|
|
<div>
|
2019-10-23 15:38:35 +00:00
|
|
|
{{'Used' | translate}} {{$ctrl.calendar.holidaysEnjoyed}}
|
|
|
|
{{'of' | translate}} {{$ctrl.calendar.totalHolidays}} {{'days' | translate}}
|
2019-10-18 19:36:30 +00:00
|
|
|
</div>
|
2019-10-23 15:38:35 +00:00
|
|
|
</div>
|
2019-10-30 15:57:14 +00:00
|
|
|
<div class="vn-pt-md" style="overflow: hidden;">
|
2020-07-07 12:29:57 +00:00
|
|
|
<vn-chip ng-repeat="absenceType in absenceTypes" class="selectable"
|
|
|
|
ng-click="$ctrl.pick(absenceType)">
|
2019-10-23 15:38:35 +00:00
|
|
|
<vn-avatar
|
|
|
|
ng-style="{backgroundColor: absenceType.rgb}">
|
2020-07-07 12:29:57 +00:00
|
|
|
<vn-icon icon="check" ng-if="absenceType.id == $ctrl.absenceType.id"></vn-icon>
|
2019-10-23 15:38:35 +00:00
|
|
|
</vn-avatar>
|
|
|
|
{{absenceType.name}}
|
|
|
|
</vn-chip>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-07-07 12:29:57 +00:00
|
|
|
</vn-side-menu>
|
|
|
|
|
|
|
|
<vn-dialog
|
|
|
|
vn-id="dialog"
|
|
|
|
on-response="$ctrl.onAbsenceResponse($response)"
|
|
|
|
message="{{$ctrl.isNew ? 'Add absence' : 'Edit absence'}}">
|
|
|
|
<tpl-body>
|
|
|
|
<vn-vertical>
|
|
|
|
<vn-vertical class="vn-pb-md">
|
|
|
|
<vn-radio
|
|
|
|
ng-model="$ctrl.selected.type"
|
|
|
|
label="One day"
|
|
|
|
val="day">
|
|
|
|
</vn-radio>
|
|
|
|
<vn-radio
|
|
|
|
ng-model="$ctrl.selected.type"
|
|
|
|
label="Range of dates"
|
|
|
|
val="range">
|
|
|
|
</vn-radio>
|
|
|
|
</vn-vertical>
|
|
|
|
<vn-date-picker
|
|
|
|
ng-if="$ctrl.selected.type == 'day'"
|
|
|
|
label="Day"
|
|
|
|
ng-model="$ctrl.selected.dated">
|
|
|
|
</vn-date-picker>
|
|
|
|
<vn-horizontal
|
|
|
|
ng-if="$ctrl.selected.type == 'range'">
|
|
|
|
<vn-date-picker
|
|
|
|
label="From"
|
|
|
|
ng-model="$ctrl.selected.started">
|
|
|
|
</vn-date-picker>
|
|
|
|
<vn-date-picker
|
|
|
|
label="To"
|
|
|
|
ng-model="$ctrl.selected.ended">
|
|
|
|
</vn-date-picker>
|
|
|
|
</vn-horizontal>
|
|
|
|
</vn-vertical>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
|
|
|
<input
|
|
|
|
type="button"
|
|
|
|
response="cancel"
|
|
|
|
translate-attr="{value: 'Cancel'}">
|
|
|
|
</input>
|
|
|
|
<input
|
|
|
|
type="button"
|
|
|
|
ng-if="!$ctrl.isNew"
|
|
|
|
response="delete"
|
|
|
|
translate-attr="{value: 'Delete'}">
|
|
|
|
</input>
|
|
|
|
<button response="accept">
|
|
|
|
<span ng-if="$ctrl.isNew" translate>Add</span>
|
|
|
|
<span ng-if="!$ctrl.isNew" translate>Save</span>
|
|
|
|
</button>
|
|
|
|
</tpl-buttons>
|
|
|
|
</vn-dialog>
|
|
|
|
<vn-confirm
|
|
|
|
vn-id="confirm"
|
|
|
|
message="This item will be deleted"
|
|
|
|
question="Are you sure you want to continue?">
|
|
|
|
</vn-confirm>
|