salix/modules/agency/front/calendar/index.html

74 lines
2.4 KiB
HTML

<vn-crud-model
vn-id="model"
url="/agency/api/ZoneCalendars"
link="{zoneFk: $ctrl.$stateParams.id}"
data="$ctrl.data"
primary-key="zoneFk"
auto-load="true">
</vn-crud-model>
<vn-watcher
vn-id="watcher"
data="$ctrl.selectedDay">
</vn-watcher>
<vn-card pad-large>
<vn-horizontal pad-medium class="calendarControlsHeader">
<vn-icon-button icon="keyboard_arrow_left"
ng-click="$ctrl.onMovePrevious([stMonth, ndMonth])"
vn-tooltip="Previous">
</vn-icon-button>
<vn-icon-button icon="keyboard_arrow_right"
ng-click="$ctrl.onMoveNext([stMonth, ndMonth])"
vn-tooltip="Next">
</vn-icon-button>
</vn-horizontal>
<vn-horizontal>
<vn-calendar vn-id="stMonth" vn-one pad-medium
data="$ctrl.events"
display-controls="false"
on-selection="$ctrl.onSelection(values)"
skip="2" vn-acl="deliveryBoss">
</vn-calendar>
<vn-calendar vn-id="ndMonth" vn-one pad-medium
data="$ctrl.events"
display-controls="false"
on-selection="$ctrl.onSelection(values)"
default-date="$ctrl.ndMonthDate"
skip="2" vn-acl="deliveryBoss">
</vn-calendar>
</vn-horizontal>
</vn-card>
<!-- Edit price dialog -->
<vn-dialog class="edit"
vn-id="priceDialog"
on-close="$ctrl.onClose()"
on-response="$ctrl.onResponse(response)">
<tpl-body>
<h5 pad-small-v translate>Edit price</h5>
<vn-horizontal>
<vn-input-number vn-one
label="Price"
model="$ctrl.selectedDay.price"
min="0" step="0.01"
required="true">
</vn-input-number>
<vn-input-number vn-one
label="Bonus"
model="$ctrl.selectedDay.bonus"
min="0" step="0.01"
required="true">
</vn-input-number>
</vn-horizontal>
<vn-horizontal>
<vn-radio-group vn-one
field="$ctrl.selectedDay.option"
options="$ctrl.options">
</vn-radio-group>
</vn-horizontal>
</tpl-body>
<tpl-buttons>
<input type="button" response="CANCEL" translate-attr="{value: 'Cancel'}"/>
<button response="ACCEPT" translate>Save</button>
</tpl-buttons>
</vn-dialog>