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

54 lines
1.5 KiB
HTML
Raw Normal View History

2018-07-16 06:00:04 +00:00
<vn-crud-model
vn-id="model"
url="ClientContacts"
fields="['id', 'name', 'phone', 'clientFk']"
2020-03-17 10:17:50 +00:00
link="{clientFk: $ctrl.$params.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>
2019-11-10 10:08:44 +00:00
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
<vn-card class="vn-pa-lg">
2018-07-16 06:00:04 +00:00
<vn-horizontal ng-repeat="contact in contacts">
<vn-textfield
vn-one
label="Name"
2019-10-09 22:47:29 +00:00
ng-model="contact.name"
2019-10-11 15:38:04 +00:00
rule="ClientContact">
</vn-textfield>
<vn-textfield
vn-one
label="Phone"
2019-10-09 22:47:29 +00:00
ng-model="contact.phone"
2019-10-11 15:38:04 +00:00
rule="ClientContact"
2019-10-09 22:47:29 +00:00
vn-focus>
</vn-textfield>
<vn-none>
<vn-icon-button
vn-tooltip="Remove contact"
icon="delete"
2019-10-24 08:17:32 +00:00
tabindex="-1"
ng-click="model.remove($index)">
</vn-icon-button>
</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>
2020-12-13 13:57:42 +00:00
<vn-submit
ng-if="watcher.dataChanged()"
label="Save">
</vn-submit>
</vn-button-bar>
</form>