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

53 lines
1.5 KiB
HTML
Raw Normal View History

2018-07-16 06:00:04 +00:00
<vn-crud-model
vn-id="model"
url="/client/api/ClientContacts"
fields="['id', 'name', 'phone', 'clientFk']"
2018-07-16 06:00:04 +00:00
link="{clientFk: $ctrl.$stateParams.id}"
data="contacts"
auto-load="true">
2018-07-16 06:00:04 +00:00
</vn-crud-model>
<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>
<vn-card pad-large>
<vn-title>Contacts</vn-title>
2018-07-16 06:00:04 +00:00
<vn-horizontal ng-repeat="contact in contacts">
<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>
<vn-none>
<vn-icon
pointer
medium-grey
margin-medium-v
vn-tooltip="Remove contact"
icon="delete"
ng-click="model.remove($index)">
</vn-icon>
</vn-none>
</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>