2019-10-18 06:36:33 +00:00
|
|
|
<vn-crud-model
|
2019-10-24 22:53:53 +00:00
|
|
|
url="UserPhoneTypes"
|
2019-10-18 06:36:33 +00:00
|
|
|
data="phoneTypes"
|
|
|
|
auto-load="true">
|
|
|
|
</vn-crud-model>
|
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="UserPhones"
|
2019-10-18 06:36:33 +00:00
|
|
|
data="$ctrl.phones">
|
|
|
|
</vn-crud-model>
|
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
|
|
|
data="$ctrl.phones">
|
|
|
|
</vn-watcher>
|
2019-11-10 10:08:44 +00:00
|
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
|
2019-10-18 06:36:33 +00:00
|
|
|
<vn-card class="vn-pa-lg">
|
|
|
|
<vn-horizontal ng-repeat="workerPhone in $ctrl.phones">
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
ng-model="workerPhone.typeFk"
|
|
|
|
initial-data="workerPhone.typeFk"
|
|
|
|
data ="phoneTypes"
|
|
|
|
show-field="code"
|
|
|
|
value-field="code"
|
|
|
|
label="Type"
|
|
|
|
vn-focus>
|
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Phone"
|
|
|
|
ng-model="workerPhone.phone">
|
|
|
|
</vn-textfield>
|
|
|
|
<vn-none>
|
|
|
|
<vn-icon-button
|
|
|
|
vn-tooltip="Remove phone"
|
|
|
|
icon="delete"
|
|
|
|
ng-click="model.remove($index)"
|
|
|
|
tabindex="-1">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-none>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-one>
|
|
|
|
<vn-icon-button
|
|
|
|
vn-bind="+"
|
|
|
|
vn-tooltip="Add phone"
|
|
|
|
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>
|