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">
|
2020-07-15 09:35:34 +00:00
|
|
|
<vn-card class="vn-pa-sm calendars">
|
|
|
|
<vn-icon ng-if="::$ctrl.isSubordinate" icon="info" color-marginal
|
2020-07-11 16:30:27 +00:00
|
|
|
vn-tooltip="To start adding absences, click an absence type from the right menu and then on the day you want to add an absence">
|
|
|
|
</vn-icon>
|
|
|
|
<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"
|
|
|
|
hide-year="true"
|
|
|
|
on-selection="$ctrl.onSelection($event, $days)">
|
|
|
|
</vn-calendar>
|
2019-11-10 10:08:44 +00:00
|
|
|
</vn-card>
|
2019-10-23 15:38:35 +00:00
|
|
|
</div>
|
|
|
|
<vn-side-menu side="right">
|
|
|
|
<div class="vn-pa-md">
|
2021-06-03 09:00:40 +00:00
|
|
|
<div class="totalBox vn-mb-sm" style="text-align: center;">
|
2021-06-17 13:09:04 +00:00
|
|
|
<h6>{{'Contract' | translate}} #{{$ctrl.businessId}}</h6>
|
2021-06-03 09:00:40 +00:00
|
|
|
<div>
|
2021-06-04 13:49:48 +00:00
|
|
|
{{'Used' | translate}} {{$ctrl.contractHolidays.holidaysEnjoyed}}
|
|
|
|
{{'of' | translate}} {{$ctrl.contractHolidays.totalHolidays || 0}} {{'days' | translate}}
|
2021-06-03 09:00:40 +00:00
|
|
|
</div>
|
2021-12-23 12:11:17 +00:00
|
|
|
<br>
|
|
|
|
<div>
|
|
|
|
{{'Paid holidays' | translate}} {{$ctrl.contractHolidays.holidaysEnjoyed}} {{'days' | translate}}
|
|
|
|
</div>
|
2021-06-03 09:00:40 +00:00
|
|
|
</div>
|
|
|
|
|
2019-10-23 15:38:35 +00:00
|
|
|
<div class="totalBox" style="text-align: center;">
|
2021-06-03 09:00:40 +00:00
|
|
|
<h6>{{'Year' | translate}} {{$ctrl.year}}</h6>
|
2019-10-18 19:36:30 +00:00
|
|
|
<div>
|
2021-06-04 13:49:48 +00:00
|
|
|
{{'Used' | translate}} {{$ctrl.yearHolidays.holidaysEnjoyed}}
|
|
|
|
{{'of' | translate}} {{$ctrl.yearHolidays.totalHolidays || 0}} {{'days' | translate}}
|
2019-10-18 19:36:30 +00:00
|
|
|
</div>
|
2019-10-23 15:38:35 +00:00
|
|
|
</div>
|
2021-06-03 09:00:40 +00:00
|
|
|
|
2020-08-10 12:44:57 +00:00
|
|
|
<div class="vn-pt-md">
|
|
|
|
<vn-autocomplete label="Year"
|
|
|
|
data="$ctrl.yearFilter"
|
|
|
|
ng-model="$ctrl.year"
|
|
|
|
show-field="year"
|
|
|
|
value-field="year"
|
|
|
|
order="DESC">
|
|
|
|
</vn-autocomplete>
|
2021-06-03 09:00:40 +00:00
|
|
|
<vn-autocomplete label="Contract"
|
|
|
|
url="Workers/{{$ctrl.$params.id}}/contracts"
|
|
|
|
fields="['started', 'ended']"
|
|
|
|
ng-model="$ctrl.businessId"
|
|
|
|
search-function="{businessFk: $search}"
|
|
|
|
value-field="businessFk"
|
|
|
|
order="businessFk DESC"
|
|
|
|
limit="5">
|
|
|
|
<tpl-item>
|
2021-06-17 13:09:04 +00:00
|
|
|
<div>#{{businessFk}}</div>
|
2021-06-03 09:00:40 +00:00
|
|
|
<div class="text-caption text-secondary">
|
|
|
|
{{started | date: 'dd/MM/yyyy'}} - {{ended ? (ended | date: 'dd/MM/yyyy') : 'Indef.'}}
|
|
|
|
</div>
|
|
|
|
</tpl-item>
|
|
|
|
</vn-autocomplete>
|
2020-08-10 12:44:57 +00:00
|
|
|
</div>
|
2021-06-11 08:58:00 +00:00
|
|
|
<div name="absenceTypes" class="input vn-py-md" style="overflow: hidden;">
|
2020-07-15 09:35:34 +00:00
|
|
|
<vn-chip ng-repeat="absenceType in absenceTypes" ng-class="::{'selectable': $ctrl.isSubordinate}"
|
2020-07-07 12:29:57 +00:00
|
|
|
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>
|
2020-09-24 08:14:53 +00:00
|
|
|
<div class="vn-py-md">
|
|
|
|
<vn-chip>
|
2020-09-24 08:44:12 +00:00
|
|
|
<vn-avatar class="festive">
|
2020-09-24 08:14:53 +00:00
|
|
|
</vn-avatar>
|
|
|
|
<span translate>Festive</span>
|
|
|
|
</vn-chip>
|
2021-09-16 10:13:20 +00:00
|
|
|
<vn-chip>
|
|
|
|
<vn-avatar class="today">
|
|
|
|
</vn-avatar>
|
|
|
|
<span translate>Current day</span>
|
|
|
|
</vn-chip>
|
2020-09-24 08:14:53 +00:00
|
|
|
</div>
|
2019-10-23 15:38:35 +00:00
|
|
|
</div>
|
2020-07-07 12:29:57 +00:00
|
|
|
</vn-side-menu>
|
|
|
|
<vn-confirm
|
|
|
|
vn-id="confirm"
|
|
|
|
message="This item will be deleted"
|
|
|
|
question="Are you sure you want to continue?">
|
|
|
|
</vn-confirm>
|