2020-10-30 10:40:12 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
|
|
|
url="SupplierContacts"
|
|
|
|
link="{supplierFk: $ctrl.$params.id}"
|
|
|
|
data="contacts"
|
|
|
|
auto-load="true">
|
|
|
|
</vn-crud-model>
|
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
|
|
|
data="contacts"
|
|
|
|
form="form">
|
|
|
|
</vn-watcher>
|
2021-03-30 14:19:54 +00:00
|
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-lg">
|
2020-10-30 10:40:12 +00:00
|
|
|
<vn-card class="vn-pa-lg">
|
|
|
|
<div ng-repeat="contact in contacts" class="contact">
|
|
|
|
<vn-vertical>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Name"
|
|
|
|
ng-model="contact.name"
|
|
|
|
rule="SupplierContact">
|
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Phone"
|
|
|
|
ng-model="contact.phone"
|
2020-11-02 13:04:11 +00:00
|
|
|
rule="SupplierContact">
|
2020-10-30 10:40:12 +00:00
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Mobile"
|
|
|
|
ng-model="contact.mobile"
|
2020-11-02 13:04:11 +00:00
|
|
|
rule="SupplierContact">
|
2020-10-30 10:40:12 +00:00
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
2020-11-18 10:47:23 +00:00
|
|
|
vn-two
|
2020-10-30 10:40:12 +00:00
|
|
|
label="Email"
|
|
|
|
ng-model="contact.email"
|
2020-11-02 13:04:11 +00:00
|
|
|
rule="SupplierContact">
|
2020-10-30 10:40:12 +00:00
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Notes"
|
|
|
|
ng-model="contact.observation"
|
|
|
|
rule="SupplierContact"
|
2020-11-02 13:04:11 +00:00
|
|
|
title="{{contact.observation}}">
|
2020-10-30 10:40:12 +00:00
|
|
|
</vn-textfield>
|
|
|
|
<vn-none>
|
|
|
|
<vn-icon-button
|
|
|
|
vn-tooltip="Remove contact"
|
|
|
|
icon="delete"
|
|
|
|
tabindex="-1"
|
|
|
|
ng-click="model.remove($index)">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-none>
|
|
|
|
</vn-horizontal>
|
|
|
|
</vn-vertical>
|
|
|
|
</div>
|
|
|
|
<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-15 16:09:05 +00:00
|
|
|
<vn-submit
|
|
|
|
disabled="!watcher.dataChanged()"
|
|
|
|
label="Save">
|
|
|
|
</vn-submit>
|
|
|
|
<!-- # #2680 Undo changes button bugs -->
|
|
|
|
<!-- <vn-button
|
|
|
|
class="cancel"
|
|
|
|
label="Undo changes"
|
|
|
|
disabled="!watcher.dataChanged()"
|
|
|
|
ng-click="watcher.loadOriginalData()">
|
|
|
|
</vn-button> -->
|
2020-10-30 10:40:12 +00:00
|
|
|
</vn-button-bar>
|
|
|
|
</form>
|