65 lines
2.3 KiB
HTML
65 lines
2.3 KiB
HTML
|
<vn-crud-model
|
||
|
vn-id="model"
|
||
|
url="Suppliers/{{$ctrl.$params.id}}/addresses"
|
||
|
filter="$ctrl.filter"
|
||
|
limit="10"
|
||
|
data="$ctrl.addresses"
|
||
|
auto-load="true">
|
||
|
</vn-crud-model>
|
||
|
<vn-portal slot="topbar">
|
||
|
<vn-searchbar
|
||
|
placeholder="Search by address"
|
||
|
info="You can search by address id or name"
|
||
|
model="model"
|
||
|
expr-builder="$ctrl.exprBuilder(param, value)"
|
||
|
auto-state="false">
|
||
|
</vn-searchbar>
|
||
|
</vn-portal>
|
||
|
<vn-data-viewer
|
||
|
model="model"
|
||
|
class="vn-w-md">
|
||
|
<vn-card class="vn-pa-md">
|
||
|
<div
|
||
|
ng-repeat="address in $ctrl.addresses"
|
||
|
class="address">
|
||
|
<a
|
||
|
ui-sref="supplier.card.address.edit({addressId: {{::address.id}}})"
|
||
|
class="vn-pa-sm border-solid border-radius"
|
||
|
translate-attr="{title: 'Edit address'}">
|
||
|
<vn-one
|
||
|
style="overflow: hidden; min-width: 14em;">
|
||
|
<div class="ellipsize"><b>{{::address.nickname}} - #{{::address.id}}</b></div>
|
||
|
<div class="ellipsize" name="street">{{::address.street}}</div>
|
||
|
<div class="ellipsize">
|
||
|
<span ng-show="::address.postalCode">{{::address.postalCode}} -</span>
|
||
|
<span ng-show="::address.city">{{::address.city}},</span>
|
||
|
{{::address.province.name}}
|
||
|
</div>
|
||
|
<div class="ellipsize">
|
||
|
{{::address.phone}}<span ng-if="::address.mobile">, </span>
|
||
|
{{::address.mobile}}
|
||
|
</div>
|
||
|
</vn-one>
|
||
|
<vn-vertical
|
||
|
vn-one
|
||
|
ng-if="address.observations.length"
|
||
|
class="vn-hide-narrow vn-px-md border-solid-left"
|
||
|
style="height: 6em; overflow: auto;">
|
||
|
<vn-one ng-repeat="observation in address.observations track by $index" ng-class="{'vn-pt-sm': $index}">
|
||
|
<b>{{::observation.observationType.description}}:</b>
|
||
|
<span>{{::observation.description}}</span>
|
||
|
</vn-one>
|
||
|
</vn-vertical>
|
||
|
</a>
|
||
|
</div>
|
||
|
</vn-card>
|
||
|
</vn-data-viewer>
|
||
|
<vn-float-button
|
||
|
vn-bind="+"
|
||
|
fixed-bottom-right
|
||
|
vn-tooltip="New address"
|
||
|
ui-sref="supplier.card.address.create"
|
||
|
icon="add"
|
||
|
label="Add">
|
||
|
</vn-float-button>
|