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

95 lines
2.9 KiB
HTML
Raw Normal View History

<mg-ajax path="Routes/{{patch.params.id}}" options="vnPatch"></mg-ajax>
2019-03-23 15:16:47 +00:00
<vn-watcher
vn-id="watcher"
data="$ctrl.route"
form="form"
save="patch">
</vn-watcher>
2019-11-10 10:08:44 +00:00
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
<vn-card class="vn-pa-lg">
2019-03-23 15:16:47 +00:00
<vn-horizontal>
2020-01-03 13:31:02 +00:00
<vn-autocomplete
2019-03-23 15:16:47 +00:00
vn-one
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.route.workerFk"
url="Clients/activeWorkersWithRole"
2020-01-07 07:40:23 +00:00
show-field="nickname"
2019-03-23 15:16:47 +00:00
search-function="{firstName: $search}"
value-field="id"
where="{role: 'employee'}"
label="Worker">
2020-01-03 13:31:02 +00:00
<tpl-item>
<div>{{name}} - {{nickname}}</div>
</tpl-item>
2019-03-23 15:16:47 +00:00
</vn-autocomplete>
<vn-autocomplete
vn-one
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.route.vehicleFk"
url="Vehicles"
2019-03-23 15:16:47 +00:00
show-field="numberPlate"
value-field="id"
label="Vehicle">
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-date-picker
vn-one
label="Created"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.route.created">
2019-03-23 15:16:47 +00:00
</vn-date-picker>
<vn-autocomplete
vn-one
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.route.agencyModeFk"
url="AgencyModes"
2019-03-23 15:16:47 +00:00
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"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.route.kmStart"
rule>
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"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.route.kmEnd"
rule>
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"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.route.started">
</vn-input-time>
<vn-input-time
label="Hour finished"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.route.finished">
</vn-input-time>
</vn-horizontal>
<vn-horizontal>
2019-10-14 04:58:02 +00:00
<vn-textArea
2019-03-23 15:16:47 +00:00
vn-one
label="Description"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.route.description"
rule
vn-focus>
2019-10-25 11:29:05 +00:00
</vn-textArea>
2019-03-23 15:16:47 +00:00
</vn-horizontal>
</vn-card>
<vn-button-bar>
2020-12-16 09:21:35 +00:00
<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>
2019-03-23 15:16:47 +00:00
</vn-button-bar>
</form>