salix/modules/worker/front/basic-data/index.html

99 lines
3.3 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', 'country', 'code']"
show-field="country"
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-input-number
min="0"
label="Locker"
ng-model="$ctrl.worker.locker">
</vn-input-number>
</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>