salix/modules/client/front/address/index/index.html

75 lines
3.0 KiB
HTML
Raw Normal View History

2018-07-16 06:00:04 +00:00
<vn-crud-model
vn-id="model"
2019-09-02 07:25:18 +00:00
url="/api/Clients/{{$ctrl.$stateParams.id}}/addresses"
filter="$ctrl.filter"
2019-06-18 07:34:32 +00:00
limit="10"
data="$ctrl.addresses"
2019-07-08 12:07:09 +00:00
auto-load="true">
2018-07-16 06:00:04 +00:00
</vn-crud-model>
2019-01-20 17:48:03 +00:00
<div compact>
2019-10-01 14:17:57 +00:00
<vn-card pad-medium>
2019-09-02 07:25:18 +00:00
<div
2019-07-08 12:07:09 +00:00
ng-repeat="address in $ctrl.addresses"
2019-09-02 07:25:18 +00:00
class="address">
<a
ui-sref="client.card.address.edit({addressId: {{::address.id}}})"
2019-07-08 12:07:09 +00:00
class="pad-small border-solid"
2019-10-01 14:17:57 +00:00
ng-class="{'item-disabled': !address.isActive}"
2019-09-02 07:25:18 +00:00
translate-attr="{title: 'Edit address'}"
border-radius>
<vn-none
pad-small-right
ng-click="$ctrl.onStarClick($event)">
<vn-icon-button
2019-10-01 14:17:57 +00:00
ng-if="$ctrl.isDefaultAddress(address)"
2019-09-02 07:25:18 +00:00
icon="star"
2019-10-01 14:17:57 +00:00
translate-attr="{title: 'Default address'}">
2019-09-02 07:25:18 +00:00
</vn-icon-button>
<vn-icon-button
2019-10-01 14:17:57 +00:00
ng-if="!$ctrl.isDefaultAddress(address)"
2019-09-02 07:25:18 +00:00
icon="star_border"
2019-10-01 14:17:57 +00:00
ng-click="$ctrl.setDefault(address)"
translate-attr="{title: 'Set as default'}">
2019-09-02 07:25:18 +00:00
</vn-icon-button>
</vn-none>
<vn-one
style="overflow: hidden; min-width: 14em;">
<div class="ellipsize"><b>{{::address.nickname}}</b></div>
<div class="ellipsize" name="street">{{::address.street}}</div>
<div class="ellipsize">{{::address.city}}, {{::address.province.name}}</div>
<div class="ellipsize">
{{::address.phone}}<span ng-if="::address.mobile">, </span>
{{::address.mobile}}
</div>
<vn-check
vn-one label="Is equalizated"
field="address.isEqualizated"
disabled="true">
</vn-check>
</vn-one>
<vn-vertical
vn-one
ng-if="address.observations.length"
border-solid-left
pad-medium-h
2019-10-01 14:17:57 +00:00
class="vn-hide-narrow"
2019-09-02 07:25:18 +00:00
style="height: 6em; overflow: auto;">
<vn-one ng-repeat="observation in address.observations track by $index" ng-class="{'pad-small-top': $index}">
<b>{{::observation.observationType.description}}:</b>
<span>{{::observation.description}}</span>
2019-07-08 12:07:09 +00:00
</vn-one>
2019-09-02 07:25:18 +00:00
</vn-vertical>
</a>
</div>
2019-07-08 12:07:09 +00:00
</vn-card>
<vn-float-button
vn-bind="+"
fixed-bottom-right
2018-07-25 13:14:03 +00:00
vn-tooltip="New address"
2018-05-23 12:26:51 +00:00
ui-sref="client.card.address.create"
2017-06-07 06:39:40 +00:00
icon="add"
label="Add">
</vn-float-button>
2019-06-18 07:34:32 +00:00
<vn-pagination model="model"></vn-pagination>
2019-01-20 17:48:03 +00:00
</div>