This commit is contained in:
parent
a98a8831ed
commit
e380e4466c
|
@ -652,8 +652,8 @@ export default {
|
|||
kmStartInput: 'vn-route-basic-data vn-input-number[field="$ctrl.route.kmStart"] input',
|
||||
kmEndInput: 'vn-route-basic-data vn-input-number[model="$ctrl.route.kmEnd"] input',
|
||||
createdDateInput: 'vn-route-basic-data vn-date-picker[model="$ctrl.route.created"] > div > input',
|
||||
startedDateInput: 'vn-route-basic-data vn-date-picker[model="$ctrl.route.started"] > div > input',
|
||||
finishedDateInput: 'vn-route-basic-data vn-date-picker[model="$ctrl.route.finished"] > div > input',
|
||||
startedHourInput: 'vn-route-basic-data vn-input-time[model="$ctrl.route.started"] input',
|
||||
finishedHourInput: 'vn-route-basic-data vn-input-time[model="$ctrl.route.finished"] input',
|
||||
saveButton: 'vn-route-basic-data vn-submit[label="Save"] input'
|
||||
},
|
||||
routeTickets: {
|
||||
|
|
|
@ -20,8 +20,8 @@ describe('Route basic Data path', () => {
|
|||
.write(selectors.routeBasicData.kmStartInput, 1)
|
||||
.clearInput(selectors.routeBasicData.kmEndInput)
|
||||
.write(selectors.routeBasicData.kmEndInput, 2)
|
||||
.datePicker(selectors.routeBasicData.startedDateInput, 1, null)
|
||||
.datePicker(selectors.routeBasicData.finishedDateInput, 1, null)
|
||||
.write(selectors.routeBasicData.startedHourInput, '0800')
|
||||
.write(selectors.routeBasicData.finishedHourInput, '1230')
|
||||
.waitToClick(selectors.routeBasicData.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
form="form"
|
||||
save="patch">
|
||||
</vn-watcher>
|
||||
<form name="form" ng-submit="watcher.submit()" compact>
|
||||
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
|
||||
<vn-card pad-large>
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete
|
||||
|
@ -56,18 +56,21 @@
|
|||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-date-picker
|
||||
<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
|
||||
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>
|
||||
label="Description"
|
||||
field="$ctrl.route.description" vn-focus>
|
||||
</vn-textfield>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
<vn-button-bar>
|
||||
|
|
|
@ -1,8 +1,24 @@
|
|||
import ngModule from '../module';
|
||||
|
||||
class Controller {
|
||||
constructor($scope, $state) {
|
||||
this.$scope = $scope;
|
||||
this.$state = $state;
|
||||
}
|
||||
|
||||
onSubmit() {
|
||||
this.$scope.watcher.submit().then(() => {
|
||||
this.card.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
ngModule.component('vnRouteBasicData', {
|
||||
template: require('./index.html'),
|
||||
controller: Controller,
|
||||
bindings: {
|
||||
route: '<'
|
||||
},
|
||||
require: {
|
||||
card: '^vnRouteCard'
|
||||
}
|
||||
});
|
||||
|
|
|
@ -2,3 +2,4 @@ Date finished: Fecha fin
|
|||
Date started: Fecha inicio
|
||||
Km start: Km de inicio
|
||||
Km end: Km de fin
|
||||
Description: Descripción
|
|
@ -40,7 +40,7 @@
|
|||
<vn-icon
|
||||
vn-tooltip="Volume exceded"
|
||||
icon="icon-volume"
|
||||
ng-class="{bright: $ctrl.route.m3 > $ctrl.route.vehicle.m3}">
|
||||
ng-class="{bright: $ctrl.route.m3 > $ctrl.route.vehicle.m3 && $ctrl.route.vehicle.m3 != NULL}">
|
||||
</vn-icon>
|
||||
</div>
|
||||
<div class="quicklinks">
|
||||
|
@ -74,5 +74,5 @@
|
|||
<vn-confirm
|
||||
vn-id="updateVolumeConfirmation"
|
||||
on-response="$ctrl.updateVolume(response)"
|
||||
question="Are you sure you want to book this invoice?">
|
||||
question="Are you sure you want to update the volume?">
|
||||
</vn-confirm>
|
|
@ -1,5 +1,4 @@
|
|||
import ngModule from '../module';
|
||||
import {createDecipher} from 'crypto';
|
||||
|
||||
class Controller {
|
||||
constructor($, $http, vnApp, $translate, aclService) {
|
||||
|
|
|
@ -4,3 +4,4 @@ Send route report: Enviar informe de ruta
|
|||
Show route report: Ver informe de ruta
|
||||
Update volume: Actualizar volumen
|
||||
Volume updated: Volumen actualizado
|
||||
Are you sure you want to update the volume?: Estas seguro que quieres actualizar el volumen?
|
|
@ -6,8 +6,8 @@
|
|||
"dependencies": ["client", "worker", "ticket"],
|
||||
"menu": [
|
||||
{"state": "route.card.basicData", "icon": "settings"},
|
||||
{"state": "route.card.log", "icon": "history"},
|
||||
{"state": "route.card.tickets", "icon": "icon-ticket"}],
|
||||
{"state": "route.card.tickets", "icon": "icon-ticket"},
|
||||
{"state": "route.card.log", "icon": "history"}],
|
||||
"routes": [
|
||||
{
|
||||
"url": "/route",
|
||||
|
|
Loading…
Reference in New Issue