2023-07-14 11:01:31 +00:00
|
|
|
<vn-crud-model
|
|
|
|
url="AbsenceTypes"
|
|
|
|
data="absenceTypes"
|
|
|
|
auto-load="true">
|
|
|
|
</vn-crud-model>
|
2023-07-14 09:51:15 +00:00
|
|
|
<div ng-if="$ctrl.card.hasWorkCenter">
|
2023-06-15 12:15:22 +00:00
|
|
|
<div class="vn-w-lg">
|
|
|
|
<vn-card class="vn-pa-sm calendars">
|
|
|
|
<vn-icon ng-if="::$ctrl.isSubordinate" icon="info" color-marginal
|
|
|
|
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>
|
|
|
|
</vn-card>
|
|
|
|
</div>
|
2023-07-14 11:01:31 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
ng-if="!$ctrl.card.hasWorkCenter"
|
|
|
|
class="bg-title"
|
|
|
|
translate>
|
|
|
|
Autonomous worker
|
|
|
|
</div>
|
|
|
|
<vn-side-menu side="right">
|
|
|
|
<div class="vn-pa-md">
|
|
|
|
<div class="totalBox vn-mb-sm" style="text-align: center;">
|
|
|
|
<h6>{{'Contract' | translate}} #{{$ctrl.businessId}}</h6>
|
|
|
|
<div>
|
|
|
|
{{'Used' | translate}} {{$ctrl.contractHolidays.holidaysEnjoyed || 0}}
|
|
|
|
{{'of' | translate}} {{$ctrl.contractHolidays.totalHolidays || 0}} {{'days' | translate}}
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
{{'Spent' | translate}} {{$ctrl.contractHolidays.hoursEnjoyed || 0}}
|
|
|
|
{{'of' | translate}} {{$ctrl.contractHolidays.totalHours || 0}} {{'hours' | translate}}
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
{{'Paid holidays' | translate}} {{$ctrl.contractHolidays.payedHolidays || 0}} {{'days' | translate}}
|
2023-06-22 12:52:42 +00:00
|
|
|
</div>
|
2023-07-14 11:01:31 +00:00
|
|
|
</div>
|
2023-06-22 12:52:42 +00:00
|
|
|
|
2023-07-14 11:01:31 +00:00
|
|
|
<div class="totalBox" style="text-align: center;">
|
|
|
|
<h6>{{'Year' | translate}} {{$ctrl.year}}</h6>
|
|
|
|
<div>
|
|
|
|
{{'Used' | translate}} {{$ctrl.yearHolidays.holidaysEnjoyed || 0}}
|
|
|
|
{{'of' | translate}} {{$ctrl.yearHolidays.totalHolidays || 0}} {{'days' | translate}}
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
{{'Spent' | translate}} {{$ctrl.yearHolidays.hoursEnjoyed || 0}}
|
|
|
|
{{'of' | translate}} {{$ctrl.yearHolidays.totalHours || 0}} {{'hours' | translate}}
|
2023-06-22 12:52:42 +00:00
|
|
|
</div>
|
2023-07-14 11:01:31 +00:00
|
|
|
</div>
|
2023-06-22 12:52:42 +00:00
|
|
|
|
2023-07-14 11:01:31 +00:00
|
|
|
<div class="vn-pt-md">
|
|
|
|
<vn-autocomplete label="Year"
|
2023-07-14 11:11:09 +00:00
|
|
|
data="$ctrl.yearFilter"
|
|
|
|
ng-model="$ctrl.year"
|
2023-07-14 11:01:31 +00:00
|
|
|
show-field="year"
|
|
|
|
value-field="year"
|
|
|
|
order="DESC">
|
2023-06-22 12:52:42 +00:00
|
|
|
</vn-autocomplete>
|
2023-07-14 11:01:31 +00:00
|
|
|
<vn-autocomplete label="Contract"
|
2023-07-14 11:11:09 +00:00
|
|
|
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">
|
2023-07-14 11:01:31 +00:00
|
|
|
<tpl-item>
|
|
|
|
<div>#{{businessFk}}</div>
|
|
|
|
<div class="text-caption text-secondary">
|
|
|
|
{{started | date: 'dd/MM/yyyy'}} - {{ended ? (ended | date: 'dd/MM/yyyy') : 'Indef.'}}
|
|
|
|
</div>
|
|
|
|
</tpl-item>
|
|
|
|
</vn-autocomplete>
|
|
|
|
</div>
|
|
|
|
<div name="absenceTypes" class="input vn-py-md" style="overflow: hidden;">
|
2023-07-14 11:11:09 +00:00
|
|
|
<vn-chip ng-repeat="absenceType in absenceTypes" ng-class="::{'selectable': $ctrl.isSubordinate}" ng-click="$ctrl.pick(absenceType)">
|
|
|
|
<vn-avatar ng-style="{backgroundColor: absenceType.rgb}">
|
2023-09-01 09:49:08 +00:00
|
|
|
<vn-icon class="check" icon="check" ng-if="absenceType.id == $ctrl.absenceType.id"></vn-icon>
|
|
|
|
|
2023-07-14 11:01:31 +00:00
|
|
|
</vn-avatar>
|
|
|
|
{{absenceType.name}}
|
|
|
|
</vn-chip>
|
|
|
|
</div>
|
|
|
|
<div class="vn-py-md">
|
|
|
|
<vn-chip>
|
|
|
|
<vn-avatar class="festive">
|
2023-07-14 09:51:15 +00:00
|
|
|
</vn-avatar>
|
2023-07-14 11:01:31 +00:00
|
|
|
<span translate>Festive</span>
|
|
|
|
</vn-chip>
|
|
|
|
<vn-chip>
|
|
|
|
<vn-avatar class="today">
|
|
|
|
</vn-avatar>
|
|
|
|
<span translate>Current day</span>
|
2023-07-14 09:51:15 +00:00
|
|
|
</vn-chip>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-07-14 11:01:31 +00:00
|
|
|
</vn-side-menu>
|
2023-06-22 12:52:42 +00:00
|
|
|
|
2023-07-14 11:01:31 +00:00
|
|
|
<vn-confirm
|
|
|
|
vn-id="confirm"
|
|
|
|
message="This item will be deleted"
|
|
|
|
question="Are you sure you want to continue?">
|
|
|
|
</vn-confirm>
|