2019-10-24 22:53:53 +00:00
|
|
|
<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">
|
2019-10-04 22:16:57 +00:00
|
|
|
<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-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.route.workerFk"
|
2021-04-13 12:08:10 +00:00
|
|
|
url="Workers/activeWithInheritedRole"
|
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'}"
|
2023-05-05 06:12:38 +00:00
|
|
|
label="Worker"
|
|
|
|
vn-name="worker">
|
2020-01-03 13:31:02 +00:00
|
|
|
<tpl-item>
|
2023-05-05 06:12:38 +00:00
|
|
|
<div>{{::nickname}}</div>
|
|
|
|
<div class="text-secondary text-caption">{{::name}}</div>
|
2020-01-03 13:31:02 +00:00
|
|
|
</tpl-item>
|
2019-03-23 15:16:47 +00:00
|
|
|
</vn-autocomplete>
|
2023-05-31 08:20:13 +00:00
|
|
|
<vn-autocomplete
|
2023-05-31 08:04:34 +00:00
|
|
|
label="Vehicle"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.route.vehicleFk"
|
2023-04-20 06:23:46 +00:00
|
|
|
data="$ctrl.vehicles"
|
2023-05-31 08:04:34 +00:00
|
|
|
show-field="numberPlate"
|
2019-03-23 15:16:47 +00:00
|
|
|
value-field="id"
|
2023-06-26 05:43:36 +00:00
|
|
|
order="false"
|
|
|
|
vn-name="vehicle">
|
2023-05-31 08:04:34 +00:00
|
|
|
<tpl-item>{{::numberPlate}} - {{::name}}</tpl-item>
|
2019-03-23 15:16:47 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-date-picker
|
2022-07-26 09:45:12 +00:00
|
|
|
label="Created"
|
2023-05-05 06:12:38 +00:00
|
|
|
ng-model="$ctrl.route.created"
|
2023-05-29 10:42:27 +00:00
|
|
|
vn-name="created">
|
2019-03-23 15:16:47 +00:00
|
|
|
</vn-date-picker>
|
|
|
|
<vn-autocomplete
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.route.agencyModeFk"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="AgencyModes"
|
2019-03-23 15:16:47 +00:00
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
2023-05-05 06:12:38 +00:00
|
|
|
label="Agency"
|
|
|
|
vn-name="agencyMode">
|
2019-03-23 15:16:47 +00:00
|
|
|
</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
|
|
|
label="Km start"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.route.kmStart"
|
2023-05-05 06:12:38 +00:00
|
|
|
vn-name="kmStart"
|
2019-10-08 21:57:02 +00:00
|
|
|
rule>
|
2019-04-04 09:53:13 +00:00
|
|
|
</vn-input-number>
|
|
|
|
<vn-input-number
|
2019-03-23 15:16:47 +00:00
|
|
|
label="Km end"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.route.kmEnd"
|
2023-05-05 06:12:38 +00:00
|
|
|
vn-name="kmEnd"
|
2019-10-08 21:57:02 +00:00
|
|
|
rule>
|
2019-04-04 09:53:13 +00:00
|
|
|
</vn-input-number>
|
2019-03-23 15:16:47 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2019-09-30 06:26:51 +00:00
|
|
|
<vn-input-time
|
2022-07-26 09:45:12 +00:00
|
|
|
label="Hour started"
|
2023-05-05 06:12:38 +00:00
|
|
|
ng-model="$ctrl.route.started"
|
|
|
|
vn-name="started">
|
2019-09-30 06:26:51 +00:00
|
|
|
</vn-input-time>
|
|
|
|
<vn-input-time
|
|
|
|
label="Hour finished"
|
2023-05-05 06:12:38 +00:00
|
|
|
ng-model="$ctrl.route.finished"
|
|
|
|
vn-name="finished">
|
|
|
|
</vn-input-time>
|
|
|
|
<vn-check
|
|
|
|
class="vn-mr-md"
|
|
|
|
label="Is served"
|
|
|
|
ng-model="$ctrl.route.isOk"
|
|
|
|
vn-name="isOk">
|
|
|
|
</vn-check>
|
2019-09-30 06:26:51 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2019-10-14 04:58:02 +00:00
|
|
|
<vn-textArea
|
2022-07-26 09:45:12 +00:00
|
|
|
label="Description"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.route.description"
|
2023-05-05 06:12:38 +00:00
|
|
|
vn-name="description"
|
2019-10-09 22:47:29 +00:00
|
|
|
rule
|
2019-10-08 21:57:02 +00:00
|
|
|
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>
|