2019-10-23 15:38:35 +00:00
|
|
|
<div class="vn-w-md">
|
|
|
|
<vn-zone-calendar
|
2020-02-26 06:02:03 +00:00
|
|
|
data="data"
|
|
|
|
on-selection="$ctrl.onSelection($event, $events)">
|
2019-10-23 15:38:35 +00:00
|
|
|
</vn-zone-calendar>
|
2019-09-25 18:06:42 +00:00
|
|
|
</div>
|
2019-11-14 13:37:18 +00:00
|
|
|
<vn-side-menu side="right">
|
|
|
|
<form ng-submit="$ctrl.onSubmit()" class="vn-pa-md">
|
2020-03-24 16:32:30 +00:00
|
|
|
<vn-radio
|
|
|
|
label="Pick up"
|
|
|
|
val="pickUp"
|
2020-03-26 16:41:40 +00:00
|
|
|
ng-model="$ctrl.deliveryMethodFk">
|
2020-03-24 16:32:30 +00:00
|
|
|
</vn-radio>
|
|
|
|
<vn-radio
|
2020-03-26 16:41:40 +00:00
|
|
|
label="Delivery"
|
|
|
|
val="delivery"
|
|
|
|
ng-model="$ctrl.deliveryMethodFk"
|
|
|
|
class="vn-mb-sm">
|
2020-03-24 16:32:30 +00:00
|
|
|
</vn-radio>
|
2020-03-26 16:41:40 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
ng-if="$ctrl.deliveryMethodFk === 'delivery'"
|
|
|
|
vn-focus
|
2020-03-24 16:32:30 +00:00
|
|
|
label="Postcode"
|
|
|
|
ng-model="params.geoFk"
|
|
|
|
url="Postcodes/location"
|
|
|
|
fields="['code','townFk']"
|
|
|
|
order="code, townFk"
|
|
|
|
value-field="geoFk"
|
2020-05-08 17:56:39 +00:00
|
|
|
show-field="code">
|
2019-11-14 13:37:18 +00:00
|
|
|
<tpl-item>
|
2020-05-08 17:56:39 +00:00
|
|
|
<div>
|
|
|
|
{{code}} {{town.name}}
|
|
|
|
</div>
|
|
|
|
<div class="text-caption text-secondary">
|
|
|
|
{{town.province.name}}, {{town.province.country.country}}
|
|
|
|
</div>
|
2019-11-14 13:37:18 +00:00
|
|
|
</tpl-item>
|
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-autocomplete
|
2020-05-08 17:56:39 +00:00
|
|
|
label="{{$ctrl.deliveryMethodFk == 'delivery' ? 'Agency' : 'Warehouse'}}"
|
2019-11-14 13:37:18 +00:00
|
|
|
ng-model="params.agencyModeFk"
|
2020-03-24 16:32:30 +00:00
|
|
|
url="AgencyModes/isActive"
|
2020-03-26 16:41:40 +00:00
|
|
|
where="$ctrl.agencyFilter"
|
|
|
|
vn-id="agencymode">
|
2019-11-14 13:37:18 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-submit label="Query" class="vn-mt-sm"></vn-submit>
|
|
|
|
</form>
|
|
|
|
</vn-side-menu>
|
2020-02-26 06:02:03 +00:00
|
|
|
|
2020-03-26 08:07:17 +00:00
|
|
|
<vn-crud-model vn-id="zoneModel"
|
|
|
|
url="Zones"
|
|
|
|
filter="::$ctrl.filter"
|
|
|
|
limit="20"
|
|
|
|
data="zones"
|
|
|
|
auto-load="false">
|
|
|
|
</vn-crud-model>
|
|
|
|
|
2020-02-26 06:02:03 +00:00
|
|
|
<!-- Zone Popover -->
|
|
|
|
<vn-popover vn-id="zoneEvents">
|
|
|
|
<div class="zoneEvents">
|
|
|
|
<div class="header vn-pa-sm" translate>Zones</div>
|
2020-03-26 08:07:17 +00:00
|
|
|
<vn-data-viewer
|
|
|
|
model="zoneModel"
|
|
|
|
class="vn-w-md vn-mb-xl">
|
|
|
|
<vn-card>
|
|
|
|
<vn-table model="zoneModel">
|
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
|
|
|
<vn-th field="id" number>Id</vn-th>
|
|
|
|
<vn-th field="name" expand>Name</vn-th>
|
|
|
|
<vn-th field="agencyModeFk">Agency</vn-th>
|
|
|
|
<vn-th field="hour" shrink>Closing</vn-th>
|
|
|
|
<vn-th field="price" number>Price</vn-th>
|
|
|
|
<vn-th shrink></vn-th>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-thead>
|
|
|
|
<vn-tbody>
|
|
|
|
<vn-tr
|
|
|
|
ng-repeat="zone in zoneModel.data"
|
|
|
|
ui-sref="zone.card.summary({id: zone.id})"
|
|
|
|
class="clickable search-result">
|
|
|
|
<vn-td number>{{::zone.id}}</vn-td>
|
|
|
|
<vn-td expand>{{::zone.name}}</vn-td>
|
|
|
|
<vn-td>{{::zone.agencyMode.name}}</vn-td>
|
|
|
|
<vn-td shrink>{{::zone.hour | date: 'HH:mm'}}</vn-td>
|
|
|
|
<vn-td number>{{::zone.price | currency: 'EUR':2}}</vn-td>
|
|
|
|
<vn-td shrink>
|
|
|
|
<vn-horizontal class="buttons">
|
|
|
|
<vn-icon-button
|
2020-04-25 09:50:04 +00:00
|
|
|
vn-click-stop="$ctrl.preview(zone)"
|
2020-03-26 08:07:17 +00:00
|
|
|
vn-tooltip="Preview"
|
|
|
|
icon="desktop_windows">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-horizontal>
|
|
|
|
</vn-td>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-tbody>
|
|
|
|
</vn-table>
|
|
|
|
</vn-card>
|
|
|
|
</vn-data-viewer>
|
2020-02-26 06:02:03 +00:00
|
|
|
</div>
|
2020-03-26 08:07:17 +00:00
|
|
|
</vn-popover>
|
|
|
|
<vn-popup vn-id="summary">
|
|
|
|
<vn-zone-summary zone="$ctrl.selectedZone"></vn-zone-summary>
|
|
|
|
</vn-popup>
|