77 lines
2.4 KiB
HTML
77 lines
2.4 KiB
HTML
<mg-ajax path="/api/Routes/{{patch.params.id}}" options="vnPatch"></mg-ajax>
|
|
<vn-watcher
|
|
vn-id="watcher"
|
|
data="$ctrl.route"
|
|
form="form"
|
|
save="patch">
|
|
</vn-watcher>
|
|
<form name="form" ng-submit="watcher.submit()" compact>
|
|
<vn-card pad-large>
|
|
<vn-horizontal>
|
|
<vn-autocomplete
|
|
vn-one
|
|
field="$ctrl.route.workerFk"
|
|
url="/api/Clients/activeWorkersWithRole"
|
|
show-field="nickname"
|
|
search-function="{firstName: $search}"
|
|
value-field="id"
|
|
where="{role: 'employee'}"
|
|
label="Worker">
|
|
</vn-autocomplete>
|
|
<vn-autocomplete
|
|
vn-one
|
|
field="$ctrl.route.vehicleFk"
|
|
url="/api/Vehicles"
|
|
show-field="numberPlate"
|
|
value-field="id"
|
|
label="Vehicle">
|
|
</vn-autocomplete>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-date-picker
|
|
vn-one
|
|
label="Created"
|
|
model="$ctrl.route.created"
|
|
ini-options="{dateFormat: 'd-m-Y'}">
|
|
</vn-date-picker>
|
|
<vn-autocomplete
|
|
vn-one
|
|
field="$ctrl.route.agencyModeFk"
|
|
url="/api/AgencyModes"
|
|
show-field="name"
|
|
value-field="id"
|
|
label="Agency">
|
|
</vn-autocomplete>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-input-number
|
|
vn-one
|
|
label="Km start"
|
|
field="$ctrl.route.kmStart">
|
|
</vn-input-number>
|
|
<vn-input-number
|
|
vn-one
|
|
label="Km end"
|
|
model="$ctrl.route.kmEnd">
|
|
</vn-input-number>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-date-picker
|
|
vn-one
|
|
label="Date started"
|
|
model="$ctrl.route.started"
|
|
ini-options="{dateFormat: 'd-m-Y'}">
|
|
</vn-date-picker>
|
|
<vn-date-picker
|
|
vn-one
|
|
label="Date finished"
|
|
model="$ctrl.route.finished"
|
|
ini-options="{dateFormat: 'd-m-Y'}">
|
|
</vn-date-picker>
|
|
</vn-horizontal>
|
|
</vn-card>
|
|
<vn-button-bar>
|
|
<vn-submit label="Save"></vn-submit>
|
|
</vn-button-bar>
|
|
</form>
|