2019-11-10 10:08:44 +00:00
|
|
|
<vn-zone-calendar
|
|
|
|
id="calendar"
|
2021-11-08 10:30:00 +00:00
|
|
|
vn-id="calendar"
|
2019-11-10 10:08:44 +00:00
|
|
|
data="data"
|
2022-08-10 10:13:31 +00:00
|
|
|
on-selection="$ctrl.onSelection($days, $type, $weekday, $events, $exclusions, $geoExclusions)"
|
2021-11-17 12:15:59 +00:00
|
|
|
on-step="$ctrl.refresh()"
|
2019-11-10 10:08:44 +00:00
|
|
|
class="vn-w-md">
|
|
|
|
</vn-zone-calendar>
|
2019-10-23 15:38:35 +00:00
|
|
|
<vn-side-menu side="right">
|
|
|
|
<div class="vn-pa-md">
|
|
|
|
<h6
|
|
|
|
class="text-secondary"
|
|
|
|
style="font-weight: normal;"
|
|
|
|
translate>
|
|
|
|
Edit mode
|
|
|
|
</h6>
|
|
|
|
<vn-vertical>
|
|
|
|
<vn-radio
|
|
|
|
label="Include"
|
|
|
|
val="include"
|
|
|
|
ng-model="$ctrl.editMode">
|
|
|
|
</vn-radio>
|
|
|
|
<vn-radio
|
|
|
|
label="Exclude"
|
|
|
|
val="exclude"
|
|
|
|
ng-model="$ctrl.editMode">
|
|
|
|
</vn-radio>
|
|
|
|
</vn-vertical>
|
|
|
|
</div>
|
|
|
|
<h6
|
|
|
|
class="text-secondary vn-px-md"
|
|
|
|
style="font-weight: normal;"
|
|
|
|
translate>
|
|
|
|
Events
|
|
|
|
</h6>
|
|
|
|
<vn-data-viewer
|
|
|
|
data="data.events"
|
2019-11-10 10:08:44 +00:00
|
|
|
is-loading="!data.events">
|
|
|
|
<div class="vn-list separated">
|
2019-09-25 18:06:42 +00:00
|
|
|
<a
|
2019-10-23 15:38:35 +00:00
|
|
|
ng-repeat="row in data.events"
|
2019-09-25 18:06:42 +00:00
|
|
|
translate-attr="{title: 'Edit'}"
|
2019-10-23 15:38:35 +00:00
|
|
|
ng-click="$ctrl.onEditClick(row, $event)"
|
2019-11-10 10:08:44 +00:00
|
|
|
class="vn-item">
|
|
|
|
<vn-item-section>
|
|
|
|
<div
|
2019-11-18 15:31:37 +00:00
|
|
|
ng-if="::row.type == 'day'"
|
2019-11-10 10:08:44 +00:00
|
|
|
class="vn-mb-sm">
|
2019-11-18 15:31:37 +00:00
|
|
|
{{::row.dated | date:'dd/MM/yy'}}
|
2019-11-10 10:08:44 +00:00
|
|
|
</div>
|
|
|
|
<div
|
2019-11-18 15:31:37 +00:00
|
|
|
ng-if="::row.type != 'day'"
|
2019-11-10 10:08:44 +00:00
|
|
|
class="vn-mb-sm ellipsize">
|
|
|
|
<span ng-if="row.weekDays">
|
2020-05-08 11:23:06 +00:00
|
|
|
{{::$ctrl.formatWdays(row.weekDays)}}
|
|
|
|
</span>
|
|
|
|
<span ng-if="row.type == 'range'">
|
|
|
|
({{::row.started | date:'dd/MM/yy'}} - {{::row.ended | date:'dd/MM/yy'}})
|
2019-11-10 10:08:44 +00:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<vn-label-value
|
2022-11-23 06:57:27 +00:00
|
|
|
label="Closing"
|
2019-11-14 13:40:19 +00:00
|
|
|
value="{{::row.hour | date:'HH:mm'}}">
|
2019-11-10 10:08:44 +00:00
|
|
|
</vn-label-value>
|
|
|
|
<vn-label-value
|
2022-11-23 06:57:27 +00:00
|
|
|
label="Traveling days"
|
2019-11-10 10:08:44 +00:00
|
|
|
value="{{::row.travelingDays}}">
|
|
|
|
</vn-label-value>
|
|
|
|
<vn-label-value
|
2022-11-23 06:57:27 +00:00
|
|
|
label="Price"
|
2019-11-10 10:08:44 +00:00
|
|
|
value="{{::row.price | currency:'EUR':2}}">
|
|
|
|
</vn-label-value>
|
|
|
|
<vn-label-value
|
2022-11-23 06:57:27 +00:00
|
|
|
label="Bonus"
|
2019-11-10 10:08:44 +00:00
|
|
|
value="{{::row.bonus | currency:'EUR':2}}">
|
|
|
|
</vn-label-value>
|
2020-02-25 07:08:13 +00:00
|
|
|
<vn-label-value
|
2022-11-23 06:57:27 +00:00
|
|
|
label="Max m³"
|
2020-02-25 07:08:13 +00:00
|
|
|
value="{{::row.m3Max}}">
|
|
|
|
</vn-label-value>
|
2019-11-10 10:08:44 +00:00
|
|
|
</vn-item-section>
|
|
|
|
<vn-item-section side>
|
|
|
|
<vn-icon-button
|
|
|
|
icon="delete"
|
|
|
|
translate-attr="{title: 'Delete'}"
|
|
|
|
ng-click="$ctrl.onDeleteClick(row.id, $event)">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-item-section>
|
2019-09-25 18:06:42 +00:00
|
|
|
</a>
|
2019-10-02 17:24:42 +00:00
|
|
|
</div>
|
|
|
|
</vn-data-viewer>
|
2019-09-25 18:06:42 +00:00
|
|
|
</vn-side-menu>
|
2020-05-08 17:56:39 +00:00
|
|
|
<vn-float-button
|
2022-09-13 12:42:15 +00:00
|
|
|
ng-click="$ctrl.createInclusion('weekday')"
|
2020-05-08 17:56:39 +00:00
|
|
|
icon="add"
|
|
|
|
vn-tooltip="Add event"
|
2020-05-08 11:23:06 +00:00
|
|
|
vn-bind="+"
|
|
|
|
fixed-bottom-right>
|
2020-05-08 17:56:39 +00:00
|
|
|
</vn-float-button>
|
2022-11-23 06:57:27 +00:00
|
|
|
<vn-dialog
|
2022-08-10 10:13:31 +00:00
|
|
|
vn-id="includeDialog"
|
2020-05-08 11:23:06 +00:00
|
|
|
on-response="$ctrl.onIncludeResponse($response)"
|
|
|
|
message="{{$ctrl.isNew ? 'Add event' : 'Edit event'}}">
|
2019-09-25 18:06:42 +00:00
|
|
|
<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
|
2019-11-18 15:31:37 +00:00
|
|
|
ng-model="$ctrl.selected.type"
|
2019-10-01 09:15:15 +00:00
|
|
|
label="One day"
|
|
|
|
val="day">
|
|
|
|
</vn-radio>
|
|
|
|
<vn-radio
|
2019-11-18 15:31:37 +00:00
|
|
|
ng-model="$ctrl.selected.type"
|
2019-10-01 11:45:43 +00:00
|
|
|
label="Indefinitely"
|
|
|
|
val="indefinitely">
|
2019-10-01 09:15:15 +00:00
|
|
|
</vn-radio>
|
|
|
|
<vn-radio
|
2019-11-18 15:31:37 +00:00
|
|
|
ng-model="$ctrl.selected.type"
|
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-10-23 15:38:35 +00:00
|
|
|
<vn-wday-picker
|
2019-11-18 15:31:37 +00:00
|
|
|
ng-if="$ctrl.selected.type != 'day'"
|
2019-10-24 08:17:32 +00:00
|
|
|
ng-model="$ctrl.selected.wdays"
|
|
|
|
class="vn-mt-sm vn-mb-md">
|
2019-10-23 15:38:35 +00:00
|
|
|
</vn-wday-picker>
|
2019-10-09 22:47:29 +00:00
|
|
|
<vn-date-picker
|
2019-11-18 15:31:37 +00:00
|
|
|
ng-if="$ctrl.selected.type == 'day'"
|
2019-10-09 22:47:29 +00:00
|
|
|
label="Day"
|
2019-11-18 15:31:37 +00:00
|
|
|
ng-model="$ctrl.selected.dated">
|
2019-10-09 22:47:29 +00:00
|
|
|
</vn-date-picker>
|
|
|
|
<vn-horizontal
|
2019-11-18 15:31:37 +00:00
|
|
|
ng-if="$ctrl.selected.type == 'range'">
|
2019-09-25 18:06:42 +00:00
|
|
|
<vn-date-picker
|
|
|
|
label="From"
|
2019-11-18 15:31:37 +00:00
|
|
|
ng-model="$ctrl.selected.started">
|
2019-09-25 18:06:42 +00:00
|
|
|
</vn-date-picker>
|
|
|
|
<vn-date-picker
|
|
|
|
label="To"
|
2019-11-18 15:31:37 +00:00
|
|
|
ng-model="$ctrl.selected.ended">
|
2019-09-25 18:06:42 +00:00
|
|
|
</vn-date-picker>
|
|
|
|
</vn-horizontal>
|
2020-02-25 07:08:13 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-input-time
|
|
|
|
label="Closing"
|
|
|
|
ng-model="$ctrl.selected.hour">
|
|
|
|
</vn-input-time>
|
|
|
|
<vn-input-number
|
|
|
|
label="Traveling days"
|
|
|
|
ng-model="$ctrl.selected.travelingDays"
|
|
|
|
min="0"
|
|
|
|
step="1">
|
|
|
|
</vn-input-number>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-input-number
|
|
|
|
label="Price"
|
|
|
|
ng-model="$ctrl.selected.price"
|
|
|
|
min="0"
|
|
|
|
step="0.01">
|
|
|
|
</vn-input-number>
|
|
|
|
<vn-input-number
|
|
|
|
label="Bonus"
|
|
|
|
ng-model="$ctrl.selected.bonus"
|
|
|
|
min="0"
|
|
|
|
step="0.01">
|
|
|
|
</vn-input-number>
|
|
|
|
</vn-horizontal>
|
2019-09-25 18:06:42 +00:00
|
|
|
<vn-input-number
|
2020-10-27 11:02:49 +00:00
|
|
|
label="Max m³"
|
2020-02-25 07:08:13 +00:00
|
|
|
ng-model="$ctrl.selected.m3Max"
|
2019-09-25 18:06:42 +00:00
|
|
|
min="0"
|
|
|
|
step="0.01">
|
|
|
|
</vn-input-number>
|
|
|
|
</vn-vertical>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
2019-10-23 15:38:35 +00:00
|
|
|
<input
|
|
|
|
type="button"
|
2019-10-30 15:57:14 +00:00
|
|
|
response="cancel"
|
2019-10-23 15:38:35 +00:00
|
|
|
translate-attr="{value: 'Cancel'}">
|
|
|
|
</input>
|
2019-12-30 11:36:19 +00:00
|
|
|
<input
|
|
|
|
type="button"
|
2019-10-23 15:38:35 +00:00
|
|
|
ng-if="!$ctrl.isNew"
|
2019-11-18 15:31:37 +00:00
|
|
|
response="delete"
|
2019-12-30 11:36:19 +00:00
|
|
|
translate-attr="{value: 'Delete'}">
|
|
|
|
</input>
|
2019-10-30 15:57:14 +00:00
|
|
|
<button response="accept">
|
2019-10-23 15:38:35 +00:00
|
|
|
<span ng-if="$ctrl.isNew" translate>Add</span>
|
|
|
|
<span ng-if="!$ctrl.isNew" translate>Save</span>
|
|
|
|
</button>
|
2019-09-25 18:06:42 +00:00
|
|
|
</tpl-buttons>
|
|
|
|
</vn-dialog>
|
2022-11-23 06:57:27 +00:00
|
|
|
<vn-confirm
|
2019-09-25 18:06:42 +00:00
|
|
|
vn-id="confirm"
|
|
|
|
message="This item will be deleted"
|
2019-10-30 15:57:14 +00:00
|
|
|
question="Are you sure you want to continue?">
|
2019-09-25 18:06:42 +00:00
|
|
|
</vn-confirm>
|
2022-11-23 06:57:27 +00:00
|
|
|
<vn-dialog
|
2022-08-10 10:13:31 +00:00
|
|
|
vn-id="excludeDialog"
|
|
|
|
on-response="$ctrl.onExcludeResponse($response)"
|
2022-11-23 06:57:27 +00:00
|
|
|
message="{{$ctrl.isNew ? 'Add exclusion' : 'Edit exclusion'}}"
|
2022-08-10 10:13:31 +00:00
|
|
|
on-open="$ctrl.onSearch($params)"
|
|
|
|
on-close="$ctrl.resetExclusions()">
|
|
|
|
<tpl-body>
|
|
|
|
<vn-date-picker
|
|
|
|
label="Day"
|
|
|
|
ng-model="$ctrl.excludeSelected.dated">
|
|
|
|
</vn-date-picker>
|
|
|
|
<vn-vertical class="width">
|
|
|
|
<vn-vertical class="vn-pb-md">
|
|
|
|
<vn-radio
|
|
|
|
ng-model="$ctrl.excludeSelected.type"
|
|
|
|
label="All"
|
|
|
|
on-change="$ctrl.test()"
|
|
|
|
val="all">
|
|
|
|
</vn-radio>
|
|
|
|
<vn-radio
|
|
|
|
ng-model="$ctrl.excludeSelected.type"
|
|
|
|
label="Specific locations"
|
2022-11-23 06:57:27 +00:00
|
|
|
on-change="$ctrl.onSearch($params)"
|
2022-08-10 10:13:31 +00:00
|
|
|
val="specificLocations">
|
|
|
|
</vn-radio>
|
|
|
|
</vn-vertical>
|
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
|
|
|
url="Zones/{{$ctrl.$params.id}}/getLeaves"
|
|
|
|
filter="$ctrl.filter">
|
|
|
|
</vn-crud-model>
|
|
|
|
<div ng-if="$ctrl.excludeSelected.type == 'specificLocations'">
|
|
|
|
<vn-textfield
|
|
|
|
label="Search"
|
|
|
|
ng-keydown="$ctrl.onKeyDown($event)"
|
|
|
|
ng-model="$ctrl.excludeSearch">
|
|
|
|
<prepend>
|
|
|
|
<vn-icon icon="search"></vn-icon>
|
|
|
|
</prepend>
|
|
|
|
</vn-textfield>
|
|
|
|
<div class="treeview">
|
|
|
|
<vn-treeview
|
|
|
|
vn-id="treeview"
|
|
|
|
root-label="Locations where it is not distributed"
|
|
|
|
fetch-func="$ctrl.onFetch($item)"
|
|
|
|
sort-func="$ctrl.onSort($a, $b)">
|
|
|
|
<vn-check
|
|
|
|
ng-model="item.checked"
|
|
|
|
ng-click="$event.preventDefault()"
|
|
|
|
on-change="$ctrl.onItemCheck(item.id, value)"
|
2022-11-23 06:57:27 +00:00
|
|
|
label="{{::item.name}}">
|
2022-08-10 10:13:31 +00:00
|
|
|
</vn-check>
|
|
|
|
</vn-treeview>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</vn-vertical>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
|
|
|
<input
|
|
|
|
type="button"
|
|
|
|
response="cancel"
|
|
|
|
translate-attr="{value: 'Cancel'}"
|
|
|
|
tabindex="0">
|
|
|
|
</input>
|
|
|
|
<input
|
|
|
|
type="button"
|
|
|
|
ng-if="!$ctrl.isNew"
|
|
|
|
response="delete"
|
|
|
|
translate-attr="{value: 'Delete'}"
|
|
|
|
tabindex="0">
|
|
|
|
</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>
|