94 lines
3.1 KiB
HTML
94 lines
3.1 KiB
HTML
<mg-ajax path="Workers/{{patch.params.id}}" options="vnPatch"></mg-ajax>
|
|
<vn-watcher
|
|
vn-id="watcher"
|
|
data="$ctrl.worker"
|
|
form="form"
|
|
save="patch">
|
|
</vn-watcher>
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
|
|
<vn-card class="vn-pa-lg">
|
|
<vn-vertical>
|
|
<vn-horizontal>
|
|
<vn-textfield
|
|
vn-one
|
|
label="Name"
|
|
ng-model="$ctrl.worker.firstName"
|
|
rule>
|
|
</vn-textfield>
|
|
<vn-textfield
|
|
vn-one
|
|
label="Last name"
|
|
ng-model="$ctrl.worker.lastName"
|
|
rule>
|
|
</vn-textfield>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-textfield
|
|
vn-one
|
|
label="Business phone"
|
|
ng-model="$ctrl.worker.phone"
|
|
rule>
|
|
</vn-textfield>
|
|
<vn-textfield
|
|
vn-one
|
|
label="Mobile extension"
|
|
ng-model="$ctrl.worker.mobileExtension"
|
|
rule>
|
|
</vn-textfield>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-worker-autocomplete
|
|
ng-model="$ctrl.worker.bossFk"
|
|
show-field="nickname"
|
|
label="Boss">
|
|
</vn-worker-autocomplete>
|
|
<vn-autocomplete
|
|
label="Marital status"
|
|
data="$ctrl.maritalStatus"
|
|
show-field="name"
|
|
value-field="code"
|
|
ng-model="$ctrl.worker.maritalStatus">
|
|
</vn-autocomplete>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-autocomplete
|
|
ng-model="$ctrl.worker.originCountryFk"
|
|
url="Countries"
|
|
fields="['id', 'name', 'code']"
|
|
show-field="name"
|
|
value-field="id"
|
|
label="Origin country">
|
|
</vn-autocomplete>
|
|
<vn-autocomplete
|
|
ng-model="$ctrl.worker.educationLevelFk"
|
|
url="EducationLevels"
|
|
fields="['id', 'name']"
|
|
show-field="name"
|
|
value-field="id"
|
|
label="Education level">
|
|
</vn-autocomplete>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-textfield
|
|
vn-one
|
|
label="SSN"
|
|
ng-model="$ctrl.worker.SSN"
|
|
rule>
|
|
</vn-textfield>
|
|
</vn-horizontal>
|
|
</vn-vertical>
|
|
</vn-card>
|
|
<vn-button-bar>
|
|
<vn-submit
|
|
disabled="!watcher.dataChanged()"
|
|
label="Save">
|
|
</vn-submit>
|
|
<vn-button
|
|
class="cancel"
|
|
label="Undo changes"
|
|
disabled="!watcher.dataChanged()"
|
|
ng-click="watcher.loadOriginalData()">
|
|
</vn-button>
|
|
</vn-button-bar>
|
|
</form>
|