2019-09-25 18:06:42 +00:00
|
|
|
<div class="main-with-right-menu">
|
2019-10-02 17:24:42 +00:00
|
|
|
<vn-data-viewer
|
|
|
|
data="data"
|
|
|
|
is-loading="!data"
|
|
|
|
class="vn-w-sm">
|
|
|
|
<vn-card>
|
|
|
|
<div class="vn-list">
|
2019-09-25 18:06:42 +00:00
|
|
|
<a
|
|
|
|
ng-repeat="row in data"
|
|
|
|
translate-attr="{title: 'Edit'}"
|
|
|
|
ng-click="$ctrl.onEdit(row, $event)"
|
|
|
|
class="vn-list-item">
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-one>
|
|
|
|
<div
|
|
|
|
ng-if="::row.from && !row.to"
|
2019-10-04 22:16:57 +00:00
|
|
|
class="vn-mb-sm">
|
2019-09-25 18:06:42 +00:00
|
|
|
{{::row.from | dateTime:'dd/MM/yyyy'}}
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
ng-if="::!row.from || row.to"
|
2019-10-04 22:16:57 +00:00
|
|
|
class="vn-mb-sm">
|
2019-09-25 18:06:42 +00:00
|
|
|
<span ng-if="row.to">
|
|
|
|
{{::row.from | dateTime:'dd/MM/yyyy'}} - {{::row.to | dateTime:'dd/MM/yyyy'}}
|
|
|
|
</span>
|
|
|
|
<span ng-if="!row.to" translate>
|
2019-09-25 21:09:10 +00:00
|
|
|
Indefinitely
|
2019-09-25 18:06:42 +00:00
|
|
|
</span>
|
|
|
|
<span ng-if="row.weekDays">
|
|
|
|
({{::$ctrl.formatWdays(row.weekDays)}})
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<vn-label-value
|
|
|
|
label="Closing"
|
|
|
|
value="{{::row.hour | dateTime:'hh:mm'}}">
|
|
|
|
</vn-label-value>
|
|
|
|
<vn-label-value
|
|
|
|
label="Traveling days"
|
|
|
|
value="{{::row.travelingDays}}">
|
|
|
|
</vn-label-value>
|
|
|
|
<vn-label-value
|
|
|
|
label="Price"
|
|
|
|
value="{{::row.price | currency:'EUR':2}}">
|
|
|
|
</vn-label-value>
|
|
|
|
<vn-label-value
|
|
|
|
label="Bonus"
|
|
|
|
value="{{::row.bonus | currency:'EUR':2}}">
|
|
|
|
</vn-label-value>
|
|
|
|
</vn-one>
|
|
|
|
<vn-horizontal class="buttons">
|
|
|
|
<vn-icon-button
|
|
|
|
icon="delete"
|
|
|
|
translate-attr="{title: 'Delete'}"
|
|
|
|
ng-click="$ctrl.onDelete(row.id, $event)">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-horizontal>
|
|
|
|
</vn-horizontal>
|
|
|
|
</a>
|
2019-10-02 17:24:42 +00:00
|
|
|
</div>
|
2019-09-25 18:06:42 +00:00
|
|
|
</vn-card>
|
2019-10-02 17:24:42 +00:00
|
|
|
</vn-data-viewer>
|
2019-09-25 18:06:42 +00:00
|
|
|
</div>
|
|
|
|
<vn-side-menu side="right">
|
|
|
|
<vn-zone-calendar
|
|
|
|
events="data"
|
2019-10-01 11:45:43 +00:00
|
|
|
exclusions="exclusions"
|
|
|
|
on-selection="$ctrl.onCreate($days, $type, $weekday)">
|
2019-09-25 18:06:42 +00:00
|
|
|
</vn-zone-calendar>
|
|
|
|
</vn-side-menu>
|
|
|
|
<vn-dialog
|
|
|
|
vn-id="dialog"
|
|
|
|
on-response="$ctrl.onSave(response)">
|
|
|
|
<tpl-body>
|
|
|
|
<vn-vertical>
|
2019-10-04 22:16:57 +00:00
|
|
|
<vn-vertical class="vn-pb-md">
|
2019-10-01 09:15:15 +00:00
|
|
|
<vn-radio
|
|
|
|
field="$ctrl.eventType"
|
|
|
|
label="One day"
|
|
|
|
val="day">
|
|
|
|
</vn-radio>
|
|
|
|
<vn-radio
|
|
|
|
field="$ctrl.eventType"
|
2019-10-01 11:45:43 +00:00
|
|
|
label="Indefinitely"
|
|
|
|
val="indefinitely">
|
2019-10-01 09:15:15 +00:00
|
|
|
</vn-radio>
|
|
|
|
<vn-radio
|
|
|
|
field="$ctrl.eventType"
|
2019-10-01 11:45:43 +00:00
|
|
|
label="Range of dates"
|
|
|
|
val="range">
|
2019-10-01 09:15:15 +00:00
|
|
|
</vn-radio>
|
|
|
|
</vn-vertical>
|
2019-09-25 18:06:42 +00:00
|
|
|
<div
|
|
|
|
ng-if="$ctrl.eventType != 'day'"
|
|
|
|
class="week-days">
|
|
|
|
<span
|
|
|
|
ng-repeat="wday in $ctrl.wdays"
|
|
|
|
ng-class="{marked: $ctrl.selected.wdays[wday.code]}"
|
|
|
|
ng-click="$ctrl.selected.wdays[wday.code] = !$ctrl.selected.wdays[wday.code]">
|
|
|
|
{{wday.abr}}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<vn-vertical ng-if="$ctrl.eventType == 'day'">
|
|
|
|
<vn-date-picker
|
|
|
|
label="Day"
|
|
|
|
model="$ctrl.selected.from">
|
|
|
|
</vn-date-picker>
|
|
|
|
</vn-vertical>
|
|
|
|
<vn-horizontal ng-if="$ctrl.eventType == 'range'">
|
|
|
|
<vn-date-picker
|
|
|
|
label="From"
|
|
|
|
model="$ctrl.selected.from">
|
|
|
|
</vn-date-picker>
|
|
|
|
<vn-date-picker
|
|
|
|
label="To"
|
|
|
|
model="$ctrl.selected.to">
|
|
|
|
</vn-date-picker>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-input-time
|
|
|
|
label="Closing"
|
|
|
|
model="$ctrl.selected.hour">
|
|
|
|
</vn-input-time>
|
|
|
|
<vn-input-number
|
|
|
|
label="Traveling days"
|
|
|
|
model="$ctrl.selected.travelingDays"
|
|
|
|
min="0"
|
|
|
|
step="1">
|
|
|
|
</vn-input-number>
|
|
|
|
<vn-input-number
|
|
|
|
label="Price"
|
|
|
|
model="$ctrl.selected.price"
|
|
|
|
min="0"
|
|
|
|
step="0.01">
|
|
|
|
</vn-input-number>
|
|
|
|
<vn-input-number
|
|
|
|
label="Bonus"
|
|
|
|
model="$ctrl.selected.bonus"
|
|
|
|
min="0"
|
|
|
|
step="0.01">
|
|
|
|
</vn-input-number>
|
|
|
|
</vn-vertical>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
|
|
|
<input type="button" response="CANCEL" translate-attr="{value: 'Cancel'}"/>
|
|
|
|
<button response="ACCEPT" translate>Save</button>
|
|
|
|
</tpl-buttons>
|
|
|
|
</vn-dialog>
|
|
|
|
<vn-confirm
|
|
|
|
vn-id="confirm"
|
|
|
|
message="This item will be deleted"
|
|
|
|
question="Are you sure you want to continue?"
|
|
|
|
on-response="$ctrl.delete(response)">
|
|
|
|
</vn-confirm>
|