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

81 lines
2.6 KiB
HTML
Raw Normal View History

2019-03-23 15:16:47 +00:00
<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="$ctrl.onSubmit()" compact>
<vn-card class="vn-pa-lg">
2019-03-23 15:16:47 +00:00
<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>
2019-04-04 09:53:13 +00:00
<vn-input-number
2019-03-23 15:16:47 +00:00
vn-one
label="Km start"
field="$ctrl.route.kmStart">
2019-04-04 09:53:13 +00:00
</vn-input-number>
<vn-input-number
2019-03-23 15:16:47 +00:00
vn-one
label="Km end"
model="$ctrl.route.kmEnd">
2019-04-04 09:53:13 +00:00
</vn-input-number>
2019-03-23 15:16:47 +00:00
</vn-horizontal>
<vn-horizontal>
<vn-input-time
label="Hour started"
model="$ctrl.route.started">
</vn-input-time>
<vn-input-time
label="Hour finished"
model="$ctrl.route.finished">
</vn-input-time>
</vn-horizontal>
<vn-horizontal>
<vn-textfield
2019-03-23 15:16:47 +00:00
vn-one
label="Description"
field="$ctrl.route.description" vn-focus>
</vn-textfield>
2019-03-23 15:16:47 +00:00
</vn-horizontal>
</vn-card>
<vn-button-bar>
<vn-submit label="Save"></vn-submit>
2019-09-18 07:41:25 +00:00
<vn-button label="Undo changes" ng-if="watcher.dataChanged()" ng-click="watcher.loadOriginalData()"></vn-button>
2019-03-23 15:16:47 +00:00
</vn-button-bar>
</form>