55 lines
1.5 KiB
HTML
55 lines
1.5 KiB
HTML
|
<vn-crud-model
|
||
|
url="/api/UserPhoneTypes"
|
||
|
data="phoneTypes"
|
||
|
auto-load="true">
|
||
|
</vn-crud-model>
|
||
|
<vn-crud-model
|
||
|
vn-id="model"
|
||
|
url="/api/UserPhones"
|
||
|
data="$ctrl.phones">
|
||
|
</vn-crud-model>
|
||
|
<vn-watcher
|
||
|
vn-id="watcher"
|
||
|
data="$ctrl.phones">
|
||
|
</vn-watcher>
|
||
|
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
|
||
|
<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>
|