salix/client/client/src/address-edit/address-edit.html

94 lines
4.3 KiB
HTML
Raw Normal View History

2018-02-01 12:28:45 +00:00
<mg-ajax path="/client/api/Addresses/{{edit.params.addressId}}" actions="$ctrl.address=edit.model;$ctrl._setIconAdd();" options="mgEdit"></mg-ajax>
2017-02-21 15:21:55 +00:00
<vn-watcher
vn-id="watcher"
url="/client/api/Addresses"
id-field="id"
2017-06-03 11:01:47 +00:00
data="$ctrl.address"
2017-02-21 15:21:55 +00:00
form="form">
</vn-watcher>
2018-02-01 12:28:45 +00:00
<form name="form" ng-submit="$ctrl.submit()" pad-medium>
<vn-card>
<vn-vertical pad-large>
2017-06-07 06:39:40 +00:00
<vn-title>Address</vn-title>
<vn-horizontal>
2017-11-02 07:46:09 +00:00
<vn-one>
<vn-check label="Enabled" field="$ctrl.address.isActive"></vn-check>
2017-11-02 07:46:09 +00:00
</vn-one>
<vn-one>
2017-11-21 11:07:37 +00:00
<vn-check label="Is equalizated" field="$ctrl.address.isEqualizated" vn-acl="administrative"></vn-check>
2017-11-02 07:46:09 +00:00
</vn-one>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-one label="Consignee" field="$ctrl.address.nickname" vn-focus></vn-textfield>
2017-06-07 06:39:40 +00:00
<vn-textfield vn-one label="Street" field="$ctrl.address.street"></vn-textfield>
</vn-horizontal>
<vn-horizontal>
2018-02-15 10:44:03 +00:00
<vn-textfield vn-one label="Postcode" field="$ctrl.address.postalCode"></vn-textfield>
2017-06-07 06:39:40 +00:00
<vn-textfield vn-one label="City" field="$ctrl.address.city"></vn-textfield>
<vn-autocomplete vn-one
2017-09-28 09:29:01 +00:00
initial-data="$ctrl.address.province"
2017-06-03 11:01:47 +00:00
field="$ctrl.address.provinceFk"
url="/client/api/Provinces"
show-field="name"
value-field="id"
2017-06-07 06:39:40 +00:00
label="Province">
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete vn-one
initial-data="$ctrl.address.agency"
field="$ctrl.address.agencyFk"
2017-10-19 07:21:34 +00:00
url="/client/api/AgencyModes"
show-field="name"
value-field="id"
2017-06-07 06:39:40 +00:00
label="Agency">
</vn-autocomplete>
2017-06-07 06:39:40 +00:00
<vn-textfield vn-one label="Phone" field="$ctrl.address.phone"></vn-textfield>
<vn-textfield vn-one label="Mobile" field="$ctrl.address.mobile"></vn-textfield>
</vn-horizontal>
<vn-one margin-medium-top>
<vn-title>Notes</vn-title>
<mg-ajax path="/client/api/ObservationTypes" options="mgIndex as observationsTypes"></mg-ajax>
2018-02-01 12:28:45 +00:00
<vn-horizontal ng-repeat="observation in $ctrl.observations track by $index">
<vn-autocomplete
vn-one
initial-data="observation.observationType"
field="observation.observationTypeFk"
data="observationsTypes.model"
show-field="description"
label="Observation type"
order="description ASC"
2018-02-19 19:52:07 +00:00
filter-search="{where: {description: {regexp: 'search'}}}">
<tpl-item>{{$parent.$parent.item.description}}</tpl-item>
</vn-autocomplete>
<vn-textfield
vn-auto
label="Description"
model="observation.description"
rule="addressObservation.description">
</vn-textfield>
<vn-one pad-medium-top>
<vn-icon
pointer
medium-grey
icon="remove_circle_outline"
2018-02-13 08:32:07 +00:00
ng-click="$ctrl.removeObservation($index)">
</vn-icon>
<vn-icon
pointer
margin-medium-left
orange
icon="add_circle"
ng-if="observation.showAddIcon && observationsTypes.model.length > $ctrl.observations.length"
2018-02-19 19:52:07 +00:00
ng-click="$ctrl.addObservation()">
</vn-icon>
</vn-one>
</vn-horizontal>
</vn-one>
</vn-vertical>
</vn-card>
<vn-button-bar>
2017-06-07 06:39:40 +00:00
<vn-submit label="Save"></vn-submit>
</vn-button-bar>
</form>