From a3d4f674c6a1dc56c2050dec9cd7eb84bbe697c6 Mon Sep 17 00:00:00 2001 From: bernat Date: Wed, 20 Jan 2021 11:28:15 +0100 Subject: [PATCH 1/2] order index changes --- modules/order/back/methods/order/filter.js | 4 ++-- modules/order/front/index/index.html | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/order/back/methods/order/filter.js b/modules/order/back/methods/order/filter.js index 9f5977cd5..29c073552 100644 --- a/modules/order/back/methods/order/filter.js +++ b/modules/order/back/methods/order/filter.js @@ -154,8 +154,8 @@ module.exports = Self => { u.name name, co.code companyCode, zed.zoneFk, - zed.hourTheoretical, - zed.hourEffective + IF(zed.hourTheoretical, zed.hourTheoretical, zed.hourEffective) AS hour, + am.name AS agencyName FROM hedera.order o LEFT JOIN address a ON a.id = o.address_id LEFT JOIN agencyMode am ON am.id = o.agency_id diff --git a/modules/order/front/index/index.html b/modules/order/front/index/index.html index 7ad34a501..1a2ff6009 100644 --- a/modules/order/front/index/index.html +++ b/modules/order/front/index/index.html @@ -15,8 +15,8 @@ Confirmed Created Landed - T. Hour - Real hour + Hour + agency Total @@ -52,8 +52,8 @@ {{::order.landed | date:'dd/MM/yyyy'}} - {{::order.hourTheoretical | date: 'HH:mm' | dashIfEmpty}} - {{::ticket.hourEffective | date: 'HH:mm' | dashIfEmpty}} + {{::order.hour | date: 'HH:mm' | dashIfEmpty}} + {{::order.agencyName}} {{::order.total | currency: 'EUR': 2 | dashIfEmpty}} Date: Thu, 21 Jan 2021 18:42:40 +0100 Subject: [PATCH 2/2] cr changes --- modules/order/back/methods/order/filter.js | 3 ++- modules/order/front/index/index.html | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/order/back/methods/order/filter.js b/modules/order/back/methods/order/filter.js index 29c073552..ef6ea8a44 100644 --- a/modules/order/back/methods/order/filter.js +++ b/modules/order/back/methods/order/filter.js @@ -154,7 +154,8 @@ module.exports = Self => { u.name name, co.code companyCode, zed.zoneFk, - IF(zed.hourTheoretical, zed.hourTheoretical, zed.hourEffective) AS hour, + zed.hourTheoretical, + zed.hourEffective, am.name AS agencyName FROM hedera.order o LEFT JOIN address a ON a.id = o.address_id diff --git a/modules/order/front/index/index.html b/modules/order/front/index/index.html index 1a2ff6009..230916ba3 100644 --- a/modules/order/front/index/index.html +++ b/modules/order/front/index/index.html @@ -16,7 +16,7 @@ Created Landed Hour - agency + Agency Total @@ -52,7 +52,10 @@ {{::order.landed | date:'dd/MM/yyyy'}} - {{::order.hour | date: 'HH:mm' | dashIfEmpty}} + {{::(order.hourTheoretical + ? order.hourTheoretical + : order.hourEffective) | dashIfEmpty + }} {{::order.agencyName}} {{::order.total | currency: 'EUR': 2 | dashIfEmpty}}