refs #4770 refator: change expeditionTruck.ETD to expeditionTruck.eta
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
854e07cfae
commit
c667c67f36
|
@ -11,7 +11,7 @@ module.exports = Self => {
|
|||
description: 'The routes ids to clone'
|
||||
},
|
||||
{
|
||||
arg: 'ETD',
|
||||
arg: 'etd',
|
||||
type: 'date',
|
||||
required: true,
|
||||
description: 'The estimated time of departure for all roadmaps'
|
||||
|
@ -27,7 +27,7 @@ module.exports = Self => {
|
|||
}
|
||||
});
|
||||
|
||||
Self.clone = async(ids, ETD) => {
|
||||
Self.clone = async(ids, etd) => {
|
||||
const tx = await Self.beginTransaction({});
|
||||
try {
|
||||
const models = Self.app.models;
|
||||
|
@ -47,7 +47,7 @@ module.exports = Self => {
|
|||
include: [{
|
||||
relation: 'expeditionTruck',
|
||||
scope: {
|
||||
fields: ['roadmapFk', 'warehouseFk', 'ETD', 'description']
|
||||
fields: ['roadmapFk', 'warehouseFk', 'eta', 'description']
|
||||
}
|
||||
}]
|
||||
|
||||
|
@ -58,7 +58,7 @@ module.exports = Self => {
|
|||
|
||||
for (const roadmap of originalRoadmaps) {
|
||||
roadmap.id = undefined;
|
||||
roadmap.etd = ETD;
|
||||
roadmap.etd = etd;
|
||||
|
||||
const clone = await models.Roadmap.create(roadmap, options);
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"warehouseFk": {
|
||||
"type": "number"
|
||||
},
|
||||
"ETD": {
|
||||
"eta": {
|
||||
"type": "date"
|
||||
},
|
||||
"description": {
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
<vn-horizontal>
|
||||
<vn-date-picker
|
||||
label="ETD"
|
||||
ng-model="$ctrl.ETD">
|
||||
ng-model="$ctrl.etd">
|
||||
</vn-date-picker>
|
||||
</vn-horizontal>
|
||||
</tpl-body>
|
||||
|
|
|
@ -24,19 +24,19 @@ class Controller extends Section {
|
|||
|
||||
openClonationDialog() {
|
||||
this.$.clonationDialog.show();
|
||||
this.ETD = Date.vnNew();
|
||||
this.etd = Date.vnNew();
|
||||
}
|
||||
|
||||
cloneSelectedRoadmaps() {
|
||||
try {
|
||||
if (!this.ETD)
|
||||
if (!this.etd)
|
||||
throw new Error(`The date can't be empty`);
|
||||
|
||||
const roadmapsIds = [];
|
||||
for (let roadmap of this.checked)
|
||||
roadmapsIds.push(roadmap.id);
|
||||
|
||||
return this.$http.post('Roadmaps/clone', {ids: roadmapsIds, ETD: this.ETD}).then(() => {
|
||||
return this.$http.post('Roadmaps/clone', {ids: roadmapsIds, etd: this.etd}).then(() => {
|
||||
this.$.model.refresh();
|
||||
this.vnApp.showSuccess(this.$t('Data saved!'));
|
||||
});
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
vn-id="model"
|
||||
url="ExpeditionTrucks"
|
||||
where="{roadmapFk: $ctrl.$params.id}"
|
||||
order="ETD ASC"
|
||||
order="eta ASC"
|
||||
data="$ctrl.expeditionTrucks"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
|
@ -25,13 +25,13 @@
|
|||
</vn-autocomplete>
|
||||
<vn-date-picker vn-one
|
||||
label="ETA date"
|
||||
ng-model="expeditionTruck.ETD"
|
||||
ng-model="expeditionTruck.eta"
|
||||
rule>
|
||||
</vn-date-picker>
|
||||
<vn-input-time
|
||||
vn-one
|
||||
label="ETA hour"
|
||||
ng-model="expeditionTruck.ETD">
|
||||
ng-model="expeditionTruck.eta">
|
||||
</vn-input-time>
|
||||
<vn-textArea
|
||||
vn-one
|
||||
|
|
|
@ -15,7 +15,7 @@ export default class Controller extends Section {
|
|||
|
||||
this.$.model.insert({
|
||||
roadmapFk: this.$params.id,
|
||||
ETD: eta
|
||||
eta: eta
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<vn-tbody>
|
||||
<vn-tr ng-repeat="expeditionTruck in summary.expeditionTruck">
|
||||
<vn-td>{{expeditionTruck.warehouse.name}}</vn-td>
|
||||
<vn-td expand>{{expeditionTruck.ETD | date:'dd/MM/yyyy HH:mm'}}</vn-td>
|
||||
<vn-td expand>{{expeditionTruck.eta | date:'dd/MM/yyyy HH:mm'}}</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
|
@ -89,13 +89,13 @@
|
|||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-date-picker
|
||||
label="ETD date"
|
||||
ng-model="$ctrl.expeditionTruck.ETD"
|
||||
label="ETA date"
|
||||
ng-model="$ctrl.expeditionTruck.eta"
|
||||
rule>
|
||||
</vn-date-picker>
|
||||
<vn-input-time
|
||||
label="ETD hour"
|
||||
ng-model="$ctrl.expeditionTruck.ETD">
|
||||
label="ETA hour"
|
||||
ng-model="$ctrl.expeditionTruck.eta">
|
||||
</vn-input-time>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
|
|
|
@ -36,7 +36,7 @@ class Controller extends Component {
|
|||
const eta = new Date(this.roadmap.etd);
|
||||
eta.setDate(eta.getDate() + 1);
|
||||
|
||||
this.expeditionTruck = {ETD: eta};
|
||||
this.expeditionTruck = {eta: eta};
|
||||
}
|
||||
|
||||
onAddAccept() {
|
||||
|
@ -44,7 +44,7 @@ class Controller extends Component {
|
|||
const data = {
|
||||
roadmapFk: this.roadmap.id,
|
||||
warehouseFk: this.expeditionTruck.warehouseFk,
|
||||
ETD: this.expeditionTruck.ETD,
|
||||
eta: this.expeditionTruck.eta,
|
||||
description: this.expeditionTruck.description
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue