2019-09-25 18:06:42 +00:00
|
|
|
<div class="main-with-right-menu">
|
2019-10-23 15:38:35 +00:00
|
|
|
<vn-zone-calendar
|
|
|
|
id="calendar"
|
2019-10-02 17:24:42 +00:00
|
|
|
data="data"
|
2019-10-23 15:38:35 +00:00
|
|
|
on-selection="$ctrl.onSelection($days, $type, $weekday, $data)"
|
|
|
|
class="vn-w-md">
|
|
|
|
</vn-zone-calendar>
|
|
|
|
</div>
|
|
|
|
<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"
|
|
|
|
is-loading="!data.events"
|
2019-10-02 17:24:42 +00:00
|
|
|
class="vn-w-sm">
|
|
|
|
<div class="vn-list">
|
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-09-25 18:06:42 +00:00
|
|
|
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-10-23 15:38:35 +00:00
|
|
|
{{::row.from | date:'dd/MM/yy'}}
|
2019-09-25 18:06:42 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
ng-if="::!row.from || row.to"
|
2019-10-23 15:38:35 +00:00
|
|
|
class="vn-mb-sm ellipsize">
|
2019-09-25 18:06:42 +00:00
|
|
|
<span ng-if="row.to">
|
2019-10-23 15:38:35 +00:00
|
|
|
{{::row.from | date:'dd/MM/yy'}} - {{::row.to | date:'dd/MM/yy'}}
|
2019-09-25 18:06:42 +00:00
|
|
|
</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"
|
2019-10-18 23:18:25 +00:00
|
|
|
value="{{::row.hour | date:'hh:mm'}}">
|
2019-09-25 18:06:42 +00:00
|
|
|
</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'}"
|
2019-10-23 15:38:35 +00:00
|
|
|
ng-click="$ctrl.onDeleteClick(row.id, $event)">
|
2019-09-25 18:06:42 +00:00
|
|
|
</vn-icon-button>
|
|
|
|
</vn-horizontal>
|
|
|
|
</vn-horizontal>
|
|
|
|
</a>
|
2019-10-02 17:24:42 +00:00
|
|
|
</div>
|
|
|
|
</vn-data-viewer>
|
2019-09-25 18:06:42 +00:00
|
|
|
</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
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.eventType"
|
2019-10-01 09:15:15 +00:00
|
|
|
label="One day"
|
|
|
|
val="day">
|
|
|
|
</vn-radio>
|
|
|
|
<vn-radio
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$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
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$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-10-23 15:38:35 +00:00
|
|
|
<vn-wday-picker
|
2019-09-25 18:06:42 +00:00
|
|
|
ng-if="$ctrl.eventType != 'day'"
|
2019-10-23 15:38:35 +00:00
|
|
|
ng-model="$ctrl.selected.wdays">
|
|
|
|
</vn-wday-picker>
|
2019-10-09 22:47:29 +00:00
|
|
|
<vn-date-picker
|
|
|
|
ng-if="$ctrl.eventType == 'day'"
|
|
|
|
label="Day"
|
|
|
|
ng-model="$ctrl.selected.from">
|
|
|
|
</vn-date-picker>
|
|
|
|
<vn-horizontal
|
|
|
|
ng-if="$ctrl.eventType == 'range'">
|
2019-09-25 18:06:42 +00:00
|
|
|
<vn-date-picker
|
|
|
|
label="From"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.selected.from">
|
2019-09-25 18:06:42 +00:00
|
|
|
</vn-date-picker>
|
|
|
|
<vn-date-picker
|
|
|
|
label="To"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.selected.to">
|
2019-09-25 18:06:42 +00:00
|
|
|
</vn-date-picker>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-input-time
|
|
|
|
label="Closing"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.selected.hour">
|
2019-09-25 18:06:42 +00:00
|
|
|
</vn-input-time>
|
|
|
|
<vn-input-number
|
|
|
|
label="Traveling days"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.selected.travelingDays"
|
2019-09-25 18:06:42 +00:00
|
|
|
min="0"
|
|
|
|
step="1">
|
|
|
|
</vn-input-number>
|
|
|
|
<vn-input-number
|
|
|
|
label="Price"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.selected.price"
|
2019-09-25 18:06:42 +00:00
|
|
|
min="0"
|
|
|
|
step="0.01">
|
|
|
|
</vn-input-number>
|
|
|
|
<vn-input-number
|
|
|
|
label="Bonus"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.selected.bonus"
|
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"
|
|
|
|
response="CANCEL"
|
|
|
|
translate-attr="{value: 'Cancel'}">
|
|
|
|
</input>
|
|
|
|
<button
|
|
|
|
ng-if="!$ctrl.isNew"
|
|
|
|
response="DELETE"
|
|
|
|
translate>
|
|
|
|
Delete
|
|
|
|
</button>
|
|
|
|
<button response="ACCEPT">
|
|
|
|
<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>
|
|
|
|
<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>
|