2018-07-16 06:00:04 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
|
|
|
url="/client/api/ClientContacts"
|
2018-08-30 06:50:03 +00:00
|
|
|
fields="['id', 'name', 'phone', 'clientFk']"
|
2018-07-16 06:00:04 +00:00
|
|
|
link="{clientFk: $ctrl.$stateParams.id}"
|
2018-12-19 14:59:35 +00:00
|
|
|
data="contacts"
|
|
|
|
auto-load="true">
|
2018-07-16 06:00:04 +00:00
|
|
|
</vn-crud-model>
|
2018-08-02 07:49:00 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
|
|
|
data="contacts"
|
|
|
|
form="form">
|
|
|
|
</vn-watcher>
|
2018-12-14 11:56:21 +00:00
|
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
|
2018-06-26 07:41:27 +00:00
|
|
|
<vn-card pad-large>
|
2018-07-16 06:00:04 +00:00
|
|
|
<vn-horizontal ng-repeat="contact in contacts">
|
2018-06-26 07:41:27 +00:00
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Name"
|
|
|
|
model="contact.name"
|
|
|
|
rule="clientContact.name">
|
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Phone"
|
|
|
|
model="contact.phone"
|
|
|
|
rule="clientContact.phone" vn-focus>
|
|
|
|
</vn-textfield>
|
2018-08-30 06:50:03 +00:00
|
|
|
<vn-none>
|
2019-02-21 10:40:27 +00:00
|
|
|
<vn-icon-button
|
2019-02-08 16:49:51 +00:00
|
|
|
pointer
|
2018-08-30 06:50:03 +00:00
|
|
|
margin-medium-v
|
2018-06-26 07:41:27 +00:00
|
|
|
vn-tooltip="Remove contact"
|
2018-12-11 07:50:54 +00:00
|
|
|
icon="delete"
|
2018-08-30 06:50:03 +00:00
|
|
|
ng-click="model.remove($index)">
|
2019-02-21 10:40:27 +00:00
|
|
|
</vn-icon-button>
|
2018-08-30 06:50:03 +00:00
|
|
|
</vn-none>
|
2018-06-26 07:41:27 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-one>
|
|
|
|
<vn-icon-button
|
|
|
|
vn-bind="+"
|
|
|
|
vn-tooltip="Add contact"
|
|
|
|
icon="add_circle"
|
|
|
|
ng-click="$ctrl.add()">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-one>
|
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
|
|
|
<vn-submit label="Save"></vn-submit>
|
|
|
|
</vn-button-bar>
|
|
|
|
</form>
|