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

87 lines
3.1 KiB
HTML

<vn-crud-model
vn-id="model"
url="/api/Zones"
filter="::$ctrl.filter"
limit="20"
data="zones"
auto-load="false">
</vn-crud-model>
<div class="content-block">
<div class="vn-list">
<vn-card pad-medium-h>
<vn-searchbar
panel="vn-zone-search-panel"
model="model"
expr-builder="$ctrl.exprBuilder(param, value)"
info="Search zone by id or name"
vn-focus>
</vn-searchbar>
</vn-card>
</div>
<vn-card margin-medium-v margin-huge-bottom compact>
<vn-table model="model">
<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 zones"
ui-sref="zone.card.location({id: zone.id})"
class="clickable searchResult">
<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 | dateTime: 'HH:mm'}}</vn-td>
<vn-td number>{{::zone.price | currency: 'EUR':2}}</vn-td>
<vn-td shrink>
<vn-horizontal class="buttons">
<vn-icon-button
ng-click="$ctrl.clone($event, zone)"
vn-tooltip="Clone"
icon="icon-clone"
vn-acl="deliveryBoss"
vn-acl-action="remove">
</vn-icon-button>
<vn-icon-button
ng-click="$ctrl.preview($event, zone)"
vn-tooltip="Preview"
icon="desktop_windows">
</vn-icon-button>
</vn-horizontal>
</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-card>
<vn-pagination model="model"></vn-pagination>
</div>
<vn-dialog
vn-id="summary"
class="dialog-summary">
<tpl-body>
<vn-zone-summary zone="$ctrl.selectedZone"></vn-zone-summary>
</tpl-body>
</vn-dialog>
<vn-confirm
vn-id="clone"
on-response="$ctrl.onCloneAccept(response)"
question="Do you want to clone this zone?"
message="All it's properties will be copied">
</vn-confirm>
<a ui-sref="zone.create"
vn-tooltip="New zone"
vn-bind="+"
fixed-bottom-right>
<vn-float-button icon="add"
vn-acl="deliveryBoss"
vn-acl-action="remove">
</vn-float-button>
</a>
<vn-scroll-up></vn-scroll-up>