From 72017a64ac888fc8e403bd1de0fba027fa925f1e Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Sat, 19 Oct 2019 01:18:25 +0200 Subject: [PATCH] Date timezone offset properly handled from backend DB connector --- front/core/components/date-picker/index.js | 2 +- .../core/components/date-picker/index.spec.js | 4 +-- front/core/components/input-time/index.js | 2 +- .../core/components/input-time/index.spec.js | 2 +- front/core/filters/dateTime.js | 21 ------------- front/core/filters/index.js | 1 - loopback/server/connectors/vn-mysql.js | 31 ------------------- loopback/server/datasources.json | 2 ++ modules/agency/back/methods/zone/clone.js | 4 --- modules/agency/front/descriptor/index.html | 2 +- modules/agency/front/events/index.html | 6 ++-- modules/agency/front/exclusions/index.html | 2 +- modules/agency/front/index/index.html | 2 +- modules/agency/front/location/index.html | 5 +-- modules/agency/front/summary/index.html | 2 +- modules/claim/front/action/index.html | 6 ++-- modules/claim/front/basic-data/index.html | 2 +- modules/claim/front/descriptor/index.html | 2 +- modules/claim/front/detail/index.html | 4 +-- modules/claim/front/index/index.html | 2 +- modules/claim/front/summary/index.html | 6 ++-- modules/client/front/balance/index/index.html | 8 ++--- .../front/credit-insurance/index/index.html | 6 ++-- .../insurance/index/index.html | 2 +- modules/client/front/credit/index/index.html | 2 +- modules/client/front/dms/index/index.html | 2 +- modules/client/front/greuge/index/index.html | 2 +- modules/client/front/mandate/index.html | 4 +-- modules/client/front/note/index/index.html | 2 +- .../client/front/recovery/index/index.html | 4 +-- modules/client/front/sample/index/index.html | 2 +- modules/client/front/summary/index.html | 2 +- modules/client/front/web-payment/index.html | 2 +- .../invoiceOut/front/descriptor/index.html | 2 +- modules/invoiceOut/front/index/index.html | 6 ++-- modules/invoiceOut/front/summary/index.html | 10 +++--- modules/item/front/diary/index.html | 2 +- modules/item/front/last-entries/index.html | 2 +- modules/item/front/request/index.html | 6 ++-- modules/order/front/descriptor/index.html | 2 +- modules/order/front/index/index.html | 2 +- modules/order/front/line/index.html | 2 +- modules/order/front/summary/index.html | 4 +-- modules/route/front/descriptor/index.html | 2 +- modules/route/front/index/index.html | 2 +- modules/route/front/summary/index.html | 6 ++-- .../front/basic-data/step-one/index.html | 2 +- .../ticket/front/descriptor/addStowaway.html | 2 +- modules/ticket/front/descriptor/index.html | 2 +- .../front/descriptor/removeStowaway.html | 2 +- modules/ticket/front/dms/index/index.html | 2 +- modules/ticket/front/expedition/index.html | 2 +- modules/ticket/front/index/index.html | 6 ++-- modules/ticket/front/request/index/index.html | 2 +- modules/ticket/front/sale-tracking/index.html | 2 +- modules/ticket/front/sale/index.html | 2 +- modules/ticket/front/summary/index.html | 8 ++--- .../ticket/front/tracking/index/index.html | 2 +- modules/ticket/front/weekly/index/index.html | 2 +- modules/travel/front/index/index.html | 4 +-- .../methods/worker-time-control/addTime.js | 3 -- modules/worker/front/log/index.html | 2 +- modules/worker/front/time-control/index.html | 2 +- 63 files changed, 93 insertions(+), 150 deletions(-) delete mode 100644 front/core/filters/dateTime.js diff --git a/front/core/components/date-picker/index.js b/front/core/components/date-picker/index.js index 933123485..b667674fa 100644 --- a/front/core/components/date-picker/index.js +++ b/front/core/components/date-picker/index.js @@ -43,7 +43,7 @@ class DatePicker extends Field { set field(value) { super.field = value; - this.input.value = this.$filter('dateTime')(value, 'yyyy-MM-dd'); + this.input.value = this.$filter('date')(value, 'yyyy-MM-dd'); } } DatePicker.$inject = ['$element', '$scope', '$compile', '$translate', '$filter']; diff --git a/front/core/components/date-picker/index.spec.js b/front/core/components/date-picker/index.spec.js index b6f6fbd2f..38d344fc9 100644 --- a/front/core/components/date-picker/index.spec.js +++ b/front/core/components/date-picker/index.spec.js @@ -22,10 +22,10 @@ describe('Component vnDatePicker', () => { it(`should display the formated the date`, () => { let today; today = new Date(); - today.setUTCHours(0, 0, 0, 0); + today.setHours(0, 0, 0, 0); $ctrl.field = today; - let displayed = $filter('dateTime')(today, 'yyyy-MM-dd'); + let displayed = $filter('date')(today, 'yyyy-MM-dd'); expect($ctrl.value).toEqual(displayed); }); diff --git a/front/core/components/input-time/index.js b/front/core/components/input-time/index.js index 3dc01e0c7..d77ccbec2 100644 --- a/front/core/components/input-time/index.js +++ b/front/core/components/input-time/index.js @@ -15,7 +15,7 @@ export default class InputTime extends Field { } set field(value) { - this.input.value = this.$filter('dateTime')(value, 'HH:mm'); + this.input.value = this.$filter('date')(value, 'HH:mm'); super.field = value; } diff --git a/front/core/components/input-time/index.spec.js b/front/core/components/input-time/index.spec.js index f1ab14b50..0ab0fc762 100644 --- a/front/core/components/input-time/index.spec.js +++ b/front/core/components/input-time/index.spec.js @@ -24,7 +24,7 @@ describe('Component vnInputTime', () => { it(`should display the formated the date`, () => { let date = new Date(); $ctrl.field = date; - let displayed = $filter('dateTime')(date, 'HH:mm'); + let displayed = $filter('date')(date, 'HH:mm'); expect($ctrl.value).toEqual(displayed); }); diff --git a/front/core/filters/dateTime.js b/front/core/filters/dateTime.js deleted file mode 100644 index a4a527160..000000000 --- a/front/core/filters/dateTime.js +++ /dev/null @@ -1,21 +0,0 @@ -import ngModule from '../module'; - -/** - * Returns a formatted date based on input filter. - * - * @return {String} The string result - */ -dateTime.$inject = ['$filter']; - -export default function dateTime($filter) { - return function(input, format) { - if (typeof input === 'string' && input) { - input = new Date(input); - let offset = input.getTimezoneOffset() * 60000; - input.setTime(input.getTime() + offset); - } - - return $filter('date')(input, format); - }; -} -ngModule.filter('dateTime', dateTime); diff --git a/front/core/filters/index.js b/front/core/filters/index.js index 26c2db213..cc4dff823 100644 --- a/front/core/filters/index.js +++ b/front/core/filters/index.js @@ -1,7 +1,6 @@ import './phone'; import './ucwords'; import './dash-if-empty'; -import './dateTime'; import './percentage'; import './currency'; import './zero-fill'; diff --git a/loopback/server/connectors/vn-mysql.js b/loopback/server/connectors/vn-mysql.js index 2ea30b598..5c625be85 100644 --- a/loopback/server/connectors/vn-mysql.js +++ b/loopback/server/connectors/vn-mysql.js @@ -5,37 +5,6 @@ const EnumFactory = require('loopback-connector-mysql').EnumFactory; const fs = require('fs'); class VnMySQL extends MySQL { - toColumnValue(prop, val) { - if (val == null || !prop || prop.type !== Date) - return MySQL.prototype.toColumnValue.call(this, prop, val); - - val = new Date(val); - - return val.getFullYear() + '-' + - fillZeros(val.getMonth() + 1) + '-' + - fillZeros(val.getDate()) + ' ' + - fillZeros(val.getHours()) + ':' + - fillZeros(val.getMinutes()) + ':' + - fillZeros(val.getSeconds()); - - function fillZeros(v) { - return v < 10 ? '0' + v : v; - } - } - fromColumnValue(prop, val) { - if (val == null || !prop || prop.type !== Date) - return MySQL.prototype.fromColumnValue.call(this, prop, val); - - let date = new Date(val); - - return date; - } - - isIsoDate(dateString) { - let isoRegexp = /^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(.[0-9]+)?(Z)?$/g; - return isoRegexp.test(dateString); - } - /** * Promisified version of execute(). * diff --git a/loopback/server/datasources.json b/loopback/server/datasources.json index 4c9e407a0..bbd8ce0d5 100644 --- a/loopback/server/datasources.json +++ b/loopback/server/datasources.json @@ -12,6 +12,8 @@ "username": "root", "password": "root", "multipleStatements": true, + "legacyUtcDateProcessing": false, + "timezone": "local", "connectTimeout": 20000, "acquireTimeout": 20000 }, diff --git a/modules/agency/back/methods/zone/clone.js b/modules/agency/back/methods/zone/clone.js index 7924415ed..3d0008a27 100644 --- a/modules/agency/back/methods/zone/clone.js +++ b/modules/agency/back/methods/zone/clone.js @@ -40,10 +40,6 @@ module.exports = Self => { where: {id} }, options); - const hour = zone.hour; - const offset = hour.getTimezoneOffset() * 60000; - hour.setTime(hour.getTime() + offset); - // Find all original included geolocations const includedGeo = await models.ZoneIncluded.find({ fields: ['geoFk', 'isIncluded'], diff --git a/modules/agency/front/descriptor/index.html b/modules/agency/front/descriptor/index.html index d6de7791e..ffed14551 100644 --- a/modules/agency/front/descriptor/index.html +++ b/modules/agency/front/descriptor/index.html @@ -31,7 +31,7 @@ value="{{$ctrl.zone.agencyMode.name}}"> + value="{{$ctrl.zone.hour | date: 'HH:mm'}}"> diff --git a/modules/agency/front/events/index.html b/modules/agency/front/events/index.html index eba9a9ac0..91864dc7c 100644 --- a/modules/agency/front/events/index.html +++ b/modules/agency/front/events/index.html @@ -15,13 +15,13 @@
- {{::row.from | dateTime:'dd/MM/yyyy'}} + {{::row.from | date:'dd/MM/yyyy'}}
- {{::row.from | dateTime:'dd/MM/yyyy'}} - {{::row.to | dateTime:'dd/MM/yyyy'}} + {{::row.from | date:'dd/MM/yyyy'}} - {{::row.to | date:'dd/MM/yyyy'}} Indefinitely @@ -32,7 +32,7 @@
+ value="{{::row.hour | date:'hh:mm'}}"> - {{::row.day | dateTime:'dd/MM/yyyy'}} + {{::row.day | date:'dd/MM/yyyy'}} {{::zone.id}} {{::zone.name}} {{::zone.agencyMode.name}} - {{::zone.hour | dateTime: 'HH:mm'}} + {{::zone.hour | date: 'HH:mm'}} {{::zone.price | currency: 'EUR':2}} diff --git a/modules/agency/front/location/index.html b/modules/agency/front/location/index.html index 4931e02fd..e01f1257a 100644 --- a/modules/agency/front/location/index.html +++ b/modules/agency/front/location/index.html @@ -4,8 +4,9 @@ filter="::$ctrl.filter">
- - + diff --git a/modules/agency/front/summary/index.html b/modules/agency/front/summary/index.html index eeb4d495e..f0336f0dc 100644 --- a/modules/agency/front/summary/index.html +++ b/modules/agency/front/summary/index.html @@ -14,7 +14,7 @@ + value="{{$ctrl.summary.hour | date: 'HH:mm'}}"> diff --git a/modules/claim/front/action/index.html b/modules/claim/front/action/index.html index 72207d418..329514b37 100644 --- a/modules/claim/front/action/index.html +++ b/modules/claim/front/action/index.html @@ -92,7 +92,7 @@ on-change="$ctrl.setClaimDestination(saleClaimed.id, value)"> - {{::saleClaimed.sale.ticket.landed | dateTime: 'dd/MM/yyyy'}} + {{::saleClaimed.sale.ticket.landed | date: 'dd/MM/yyyy'}} {{::saleClaimed.sale.quantity}} {{::saleClaimed.sale.concept}} {{::saleClaimed.sale.price | currency: 'EUR':2}} @@ -145,7 +145,7 @@ class="clickable" ng-click="$ctrl.addClaimedSale(sale.saleFk)"> {{sale.saleFk}} - {{sale.landed | dateTime: 'dd/MM/yyyy'}} + {{sale.landed | date: 'dd/MM/yyyy'}} {{sale.quantity}} {{sale.concept}} {{sale.price | currency: 'EUR':2}} @@ -182,7 +182,7 @@ ng-repeat="ticket in lastTickets" ng-click="$ctrl.importTicketLines(ticket.id)"> {{::ticket.id}} - {{::ticket.shipped | dateTime: 'dd/MM/yyyy'}} + {{::ticket.shipped | date: 'dd/MM/yyyy'}} {{::ticket.agencyMode.name}} {{::ticket.warehouse.name}} diff --git a/modules/claim/front/basic-data/index.html b/modules/claim/front/basic-data/index.html index 289f8f197..1c68f6673 100644 --- a/modules/claim/front/basic-data/index.html +++ b/modules/claim/front/basic-data/index.html @@ -17,7 +17,7 @@ diff --git a/modules/claim/front/descriptor/index.html b/modules/claim/front/descriptor/index.html index 431989bbd..313cf1b94 100644 --- a/modules/claim/front/descriptor/index.html +++ b/modules/claim/front/descriptor/index.html @@ -27,7 +27,7 @@ value="{{$ctrl.claim.claimState.description}}"> + value="{{$ctrl.claim.created | date: 'dd/MM/yyyy HH:mm'}}"> diff --git a/modules/claim/front/detail/index.html b/modules/claim/front/detail/index.html index 30387ed43..ad59fadd9 100644 --- a/modules/claim/front/detail/index.html +++ b/modules/claim/front/detail/index.html @@ -34,7 +34,7 @@ - {{::saleClaimed.sale.ticket.landed | dateTime:'dd/MM/yyyy'}} + {{::saleClaimed.sale.ticket.landed | date:'dd/MM/yyyy'}} {{::saleClaimed.sale.quantity}} - {{sale.landed | dateTime: 'dd/MM/yyyy'}} + {{sale.landed | date: 'dd/MM/yyyy'}} {{sale.quantity}} - {{::claim.created | dateTime:'dd/MM/yyyy'}} + {{::claim.created | date:'dd/MM/yyyy'}} + value="{{$ctrl.summary.claim.created | date: 'dd/MM/yyyy'}}"> @@ -66,7 +66,7 @@ {{::saleClaimed.sale.itemFk | zeroFill:6}} - {{::saleClaimed.sale.ticket.landed | dateTime: 'dd/MM/yyyy'}} + {{::saleClaimed.sale.ticket.landed | date: 'dd/MM/yyyy'}} {{::saleClaimed.sale.quantity}} {{::saleClaimed.quantity}} {{::saleClaimed.sale.concept}} @@ -157,7 +157,7 @@ {{::action.claimBeggining.description}} - {{::action.sale.ticket.landed | dateTime: 'dd/MM/yyyy'}} + {{::action.sale.ticket.landed | date: 'dd/MM/yyyy'}} {{::action.sale.quantity}} {{::action.sale.concept}} {{::action.sale.price}} diff --git a/modules/client/front/balance/index/index.html b/modules/client/front/balance/index/index.html index 88dfe1222..2ae2aa2aa 100644 --- a/modules/client/front/balance/index/index.html +++ b/modules/client/front/balance/index/index.html @@ -62,13 +62,13 @@ - - {{::balance.payed | dateTime:'dd/MM/yyyy'}} + + {{::balance.payed | date:'dd/MM/yyyy'}} - - {{::balance.created | dateTime:'dd/MM/yyyy HH:mm'}} + + {{::balance.created | date:'dd/MM/yyyy HH:mm'}} diff --git a/modules/client/front/credit-insurance/index/index.html b/modules/client/front/credit-insurance/index/index.html index 83e34d62e..192af4671 100644 --- a/modules/client/front/credit-insurance/index/index.html +++ b/modules/client/front/credit-insurance/index/index.html @@ -19,8 +19,8 @@ -
Since {{::classification.started | dateTime:'dd/MM/yyyy'}}
-
To {{classification.finished | dateTime:'dd/MM/yyyy'}}
+
Since {{::classification.started | date:'dd/MM/yyyy'}}
+
To {{classification.finished | date:'dd/MM/yyyy'}}
@@ -36,7 +36,7 @@
+ value="{{::insurance.created | date:'dd/MM/yyyy' }}"> diff --git a/modules/client/front/credit-insurance/insurance/index/index.html b/modules/client/front/credit-insurance/insurance/index/index.html index ac2cdda48..06e963781 100644 --- a/modules/client/front/credit-insurance/insurance/index/index.html +++ b/modules/client/front/credit-insurance/insurance/index/index.html @@ -19,7 +19,7 @@ - {{::insurance.created | dateTime: 'dd/MM/yyyy'}} + {{::insurance.created | date: 'dd/MM/yyyy'}} {{::insurance.grade}} {{::insurance.credit | currency: 'EUR': 2}} diff --git a/modules/client/front/credit/index/index.html b/modules/client/front/credit/index/index.html index dd2a9a88c..d9cfe7dee 100644 --- a/modules/client/front/credit/index/index.html +++ b/modules/client/front/credit/index/index.html @@ -22,7 +22,7 @@ - {{::credit.created | dateTime:'dd/MM/yyyy HH:mm'}} + {{::credit.created | date:'dd/MM/yyyy HH:mm'}} {{::credit.worker.user.nickname}} {{::credit.amount | currency:'EUR':2}} diff --git a/modules/client/front/dms/index/index.html b/modules/client/front/dms/index/index.html index 0c936234c..1f306dc88 100644 --- a/modules/client/front/dms/index/index.html +++ b/modules/client/front/dms/index/index.html @@ -70,7 +70,7 @@ {{::document.dms.worker.user.nickname | dashIfEmpty}} - {{::document.dms.created | dateTime:'dd/MM/yyyy HH:mm'}} + {{::document.dms.created | date:'dd/MM/yyyy HH:mm'}} - {{::greuge.shipped | dateTime:'dd/MM/yyyy HH:mm' }} + {{::greuge.shipped | date:'dd/MM/yyyy HH:mm' }} {{::greuge.description}} {{::greuge.greugeType.name}} {{::greuge.amount | currency: 'EUR': 2}} diff --git a/modules/client/front/mandate/index.html b/modules/client/front/mandate/index.html index c5bfb058a..42d3d96bd 100644 --- a/modules/client/front/mandate/index.html +++ b/modules/client/front/mandate/index.html @@ -27,8 +27,8 @@ {{::mandate.id}} {{::mandate.company.code}} {{::mandate.mandateType.name}} - {{::mandate.created | dateTime:'dd/MM/yyyy HH:mm' }} - {{::mandate.finished | dateTime:'dd/MM/yyyy HH:mm' || '-'}} + {{::mandate.created | date:'dd/MM/yyyy HH:mm' }} + {{::mandate.finished | date:'dd/MM/yyyy HH:mm' || '-'}} diff --git a/modules/client/front/note/index/index.html b/modules/client/front/note/index/index.html index db9ba0818..04bd7d28e 100644 --- a/modules/client/front/note/index/index.html +++ b/modules/client/front/note/index/index.html @@ -15,7 +15,7 @@ class="note vn-pa-sm border-solid border-radius vn-mb-md"> {{::note.worker.user.nickname}} - {{::note.created | dateTime:'dd/MM/yyyy HH:mm'}} + {{::note.created | date:'dd/MM/yyyy HH:mm'}} {{::note.text}} diff --git a/modules/client/front/recovery/index/index.html b/modules/client/front/recovery/index/index.html index 9e4345025..755556f37 100644 --- a/modules/client/front/recovery/index/index.html +++ b/modules/client/front/recovery/index/index.html @@ -33,8 +33,8 @@ ng-click="$ctrl.setFinished(recovery)"> - {{::recovery.started | dateTime:'dd/MM/yyyy' }} - {{recovery.finished | dateTime:'dd/MM/yyyy' }} + {{::recovery.started | date:'dd/MM/yyyy' }} + {{recovery.finished | date:'dd/MM/yyyy' }} {{::recovery.amount | currency: 'EUR': 0}} {{::recovery.period}} diff --git a/modules/client/front/sample/index/index.html b/modules/client/front/sample/index/index.html index 2d7f63ba7..49be184f3 100644 --- a/modules/client/front/sample/index/index.html +++ b/modules/client/front/sample/index/index.html @@ -23,7 +23,7 @@ - {{::sample.created | dateTime:'dd/MM/yyyy HH:mm' }} + {{::sample.created | date:'dd/MM/yyyy HH:mm' }} {{::sample.type.description}} diff --git a/modules/client/front/summary/index.html b/modules/client/front/summary/index.html index 2fae69572..eccf45873 100644 --- a/modules/client/front/summary/index.html +++ b/modules/client/front/summary/index.html @@ -192,7 +192,7 @@ + value="{{$ctrl.summary.recovery.started | date:'dd/MM/yyyy'}}"> diff --git a/modules/client/front/web-payment/index.html b/modules/client/front/web-payment/index.html index 326945c21..7f6042759 100644 --- a/modules/client/front/web-payment/index.html +++ b/modules/client/front/web-payment/index.html @@ -36,7 +36,7 @@ {{::transaction.id}} - {{::transaction.created | dateTime:'dd/MM/yyyy HH:mm'}} + {{::transaction.created | date:'dd/MM/yyyy HH:mm'}} {{::transaction.amount | currency: 'EUR':2}}
{{$ctrl.invoiceOut.ref}}
+ value="{{$ctrl.invoiceOut.issued | date: 'dd/MM/yyyy'}}"> diff --git a/modules/invoiceOut/front/index/index.html b/modules/invoiceOut/front/index/index.html index e88a1986d..a847018b6 100644 --- a/modules/invoiceOut/front/index/index.html +++ b/modules/invoiceOut/front/index/index.html @@ -37,7 +37,7 @@ class="clickable vn-tr searchResult" ui-sref="invoiceOut.card.summary({id: {{::invoiceOut.id}}})"> {{::invoiceOut.ref | dashIfEmpty}} - {{::invoiceOut.issued | dateTime:'dd/MM/yyyy' | dashIfEmpty}} + {{::invoiceOut.issued | date:'dd/MM/yyyy' | dashIfEmpty}} {{::invoiceOut.amount | currency: 'EUR': 2 | dashIfEmpty}} - {{::invoiceOut.created | dateTime:'dd/MM/yyyy' | dashIfEmpty}} + {{::invoiceOut.created | date:'dd/MM/yyyy' | dashIfEmpty}} {{::invoiceOut.companyCode | dashIfEmpty}} - {{::invoiceOut.dued | dateTime:'dd/MM/yyyy' | dashIfEmpty}} + {{::invoiceOut.dued | date:'dd/MM/yyyy' | dashIfEmpty}} + value="{{$ctrl.summary.invoiceOut.issued | date: 'dd/MM/yyyy'}}"> + value="{{$ctrl.summary.invoiceOut.dued | date: 'dd/MM/yyyy'}}"> + value="{{$ctrl.summary.invoiceOut.created | date: 'dd/MM/yyyy'}}"> + value="{{$ctrl.summary.invoiceOut.booked | date: 'dd/MM/yyyy'}}"> @@ -66,7 +66,7 @@ {{ticket.nickname}} - {{ticket.shipped | dateTime: 'dd/MM/yyyy'}} + {{ticket.shipped | date: 'dd/MM/yyyy'}} {{ticket.total | currency: 'EUR': 2}}
diff --git a/modules/item/front/diary/index.html b/modules/item/front/diary/index.html index cf8de3236..29f074ee4 100644 --- a/modules/item/front/diary/index.html +++ b/modules/item/front/diary/index.html @@ -43,7 +43,7 @@ - {{::sale.date | dateTime:'dd/MM/yyyy' }} + {{::sale.date | date:'dd/MM/yyyy' }} diff --git a/modules/item/front/last-entries/index.html b/modules/item/front/last-entries/index.html index 78f10c3af..d0fff0222 100644 --- a/modules/item/front/last-entries/index.html +++ b/modules/item/front/last-entries/index.html @@ -44,7 +44,7 @@ {{entry.warehouse| dashIfEmpty}} - {{entry.landed | dateTime:'dd/MM/yyyy HH:mm'}} + {{entry.landed | date:'dd/MM/yyyy HH:mm'}} {{entry.entryFk | dashIfEmpty}} {{entry.price2 | dashIfEmpty}} {{entry.price3 | dashIfEmpty}} diff --git a/modules/item/front/request/index.html b/modules/item/front/request/index.html index 20af5653a..de2750014 100644 --- a/modules/item/front/request/index.html +++ b/modules/item/front/request/index.html @@ -8,7 +8,7 @@
- + - - {{::request.shipped | dateTime: 'dd/MM/yyyy'}} + {{::request.shipped | date: 'dd/MM/yyyy'}} {{::request.warehouse}} diff --git a/modules/order/front/descriptor/index.html b/modules/order/front/descriptor/index.html index cf2a52e1a..fd83d5c71 100644 --- a/modules/order/front/descriptor/index.html +++ b/modules/order/front/descriptor/index.html @@ -31,7 +31,7 @@ value="{{$ctrl.order.client.salesPerson.user.nickname}}"> + value="{{$ctrl.order.landed | date: 'dd/MM/yyyy' }}"> diff --git a/modules/order/front/index/index.html b/modules/order/front/index/index.html index 750130a7f..c6a817742 100644 --- a/modules/order/front/index/index.html +++ b/modules/order/front/index/index.html @@ -55,7 +55,7 @@ {{::order.sourceApp}} - {{::order.created | dateTime: 'dd/MM/yyyy HH:mm'}} + {{::order.created | date: 'dd/MM/yyyy HH:mm'}} {{::order.landed | date:'dd/MM/yyyy'}} {{::order.companyCode}} {{::order.total | currency: 'EUR': 2 | dashIfEmpty}} diff --git a/modules/order/front/line/index.html b/modules/order/front/line/index.html index cbf492dbf..cdff9b35c 100644 --- a/modules/order/front/line/index.html +++ b/modules/order/front/line/index.html @@ -48,7 +48,7 @@ {{::row.warehouse.name}} - {{::row.shipped | dateTime: 'dd/MM/yyyy'}} + {{::row.shipped | date: 'dd/MM/yyyy'}} {{::row.quantity}} {{::row.price | currency: 'EUR':2}} diff --git a/modules/order/front/summary/index.html b/modules/order/front/summary/index.html index 939a43244..c7ee5b4b6 100644 --- a/modules/order/front/summary/index.html +++ b/modules/order/front/summary/index.html @@ -14,10 +14,10 @@ + value="{{$ctrl.summary.created | date: 'dd/MM/yyyy HH:mm'}}"> + value="{{$ctrl.summary.confirmed | date: 'dd/MM/yyyy HH:mm'}}"> diff --git a/modules/route/front/descriptor/index.html b/modules/route/front/descriptor/index.html index 8ab44e9bf..312985cb4 100644 --- a/modules/route/front/descriptor/index.html +++ b/modules/route/front/descriptor/index.html @@ -24,7 +24,7 @@ value="{{$ctrl.route.id}}"> + value="{{$ctrl.route.created | date: 'dd/MM/yyyy'}}"> diff --git a/modules/route/front/index/index.html b/modules/route/front/index/index.html index e3ef4d98f..0f13c9021 100644 --- a/modules/route/front/index/index.html +++ b/modules/route/front/index/index.html @@ -47,7 +47,7 @@ {{::route.agencyName | dashIfEmpty}} {{::route.vehiclePlateNumber | dashIfEmpty}} - {{::route.created | dateTime:'dd/MM/yyyy' | dashIfEmpty}} + {{::route.created | date:'dd/MM/yyyy' | dashIfEmpty}} {{::route.m3 | dashIfEmpty}} {{::route.description | dashIfEmpty}} diff --git a/modules/route/front/summary/index.html b/modules/route/front/summary/index.html index 85a045106..0ec6c47fe 100644 --- a/modules/route/front/summary/index.html +++ b/modules/route/front/summary/index.html @@ -6,7 +6,7 @@ value="{{$ctrl.summary.route.id}}"> + value="{{$ctrl.summary.route.created | date: 'dd/MM/yyyy'}}"> @@ -23,10 +23,10 @@ + value="{{$ctrl.summary.route.time | date: 'HH:MM'}}"> + value="{{$ctrl.summary.route.finished | date: 'HH:MM'}}"> diff --git a/modules/ticket/front/basic-data/step-one/index.html b/modules/ticket/front/basic-data/step-one/index.html index 95cbcccf6..cd3ef442e 100644 --- a/modules/ticket/front/basic-data/step-one/index.html +++ b/modules/ticket/front/basic-data/step-one/index.html @@ -86,7 +86,7 @@ ng-model="$ctrl.zoneId" vn-acl="productionBoss"> - {{::name}} - {{::warehouse.name}} - Max. {{::hour | dateTime: 'HH:mm'}} h. + {{::name}} - {{::warehouse.name}} - Max. {{::hour | date: 'HH:mm'}} h. diff --git a/modules/ticket/front/descriptor/addStowaway.html b/modules/ticket/front/descriptor/addStowaway.html index 963c9b6c1..e46292714 100644 --- a/modules/ticket/front/descriptor/addStowaway.html +++ b/modules/ticket/front/descriptor/addStowaway.html @@ -25,7 +25,7 @@ {{ticket.id}} - {{ticket.landed | dateTime: 'dd/MM/yyyy'}} + {{ticket.landed | date: 'dd/MM/yyyy'}} {{ticket.agencyMode.name}} {{ticket.warehouse.name}} {{ticket.state.state.name}} diff --git a/modules/ticket/front/descriptor/index.html b/modules/ticket/front/descriptor/index.html index faa2acf5b..9b981f27a 100644 --- a/modules/ticket/front/descriptor/index.html +++ b/modules/ticket/front/descriptor/index.html @@ -33,7 +33,7 @@ value="{{$ctrl.ticket.client.salesPerson.user.nickname}}"> + value="{{$ctrl.ticket.shipped | date: 'dd/MM/yyyy HH:mm' }}"> diff --git a/modules/ticket/front/descriptor/removeStowaway.html b/modules/ticket/front/descriptor/removeStowaway.html index 78ac5cf3f..e517206b3 100644 --- a/modules/ticket/front/descriptor/removeStowaway.html +++ b/modules/ticket/front/descriptor/removeStowaway.html @@ -19,7 +19,7 @@ {{stowaway.id}} - {{stowaway.ticket.landed | dateTime: 'dd/MM/yyyy'}} + {{stowaway.ticket.landed | date: 'dd/MM/yyyy'}} {{stowaway.ticket.agencyMode.name}} {{stowaway.ticket.warehouse.name}} {{stowaway.ticket.state.state.name}} diff --git a/modules/ticket/front/dms/index/index.html b/modules/ticket/front/dms/index/index.html index 73607f246..1cc6d3b38 100644 --- a/modules/ticket/front/dms/index/index.html +++ b/modules/ticket/front/dms/index/index.html @@ -69,7 +69,7 @@ {{::document.dms.worker.user.nickname | dashIfEmpty}} - {{::document.dms.created | dateTime:'dd/MM/yyyy HH:mm'}} + {{::document.dms.created | date:'dd/MM/yyyy HH:mm'}} - {{::expedition.created | dateTime:'dd/MM/yyyy HH:mm'}} + {{::expedition.created | date:'dd/MM/yyyy HH:mm'}} diff --git a/modules/ticket/front/index/index.html b/modules/ticket/front/index/index.html index 20eaf254a..e6c27f988 100644 --- a/modules/ticket/front/index/index.html +++ b/modules/ticket/front/index/index.html @@ -101,10 +101,10 @@ - {{::ticket.shipped | dateTime: 'dd/MM/yyyy'}} + {{::ticket.shipped | date: 'dd/MM/yyyy'}} - {{::ticket.shipped | dateTime: 'HH:mm'}} + {{::ticket.shipped | date: 'HH:mm'}} {{::ticket.agencyMode}} {{::ticket.warehouse}} {{::ticket.refFk | dashIfEmpty}} - {{::ticket.zoneLanding | dateTime: 'HH:mm'}} + {{::ticket.zoneLanding | date: 'HH:mm'}} {{::ticket.total | currency: 'EUR': 2}} diff --git a/modules/ticket/front/request/index/index.html b/modules/ticket/front/request/index/index.html index 2e5d60f3d..28dd28dc0 100644 --- a/modules/ticket/front/request/index/index.html +++ b/modules/ticket/front/request/index/index.html @@ -32,7 +32,7 @@ {{::request.id}} {{::request.description}} - {{::request.created | dateTime: 'dd/MM/yyyy'}} + {{::request.created | date: 'dd/MM/yyyy'}} {{::sale.state}} - {{::sale.created | dateTime: 'dd/MM/yyyy HH:mm'}} + {{::sale.created | date: 'dd/MM/yyyy HH:mm'}} diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index 3061938a7..38ed007a0 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -320,7 +320,7 @@ ng-repeat="ticket in $ctrl.transfer.lastActiveTickets track by ticket.id" ng-click="$ctrl.transferSales(ticket.id)"> {{::ticket.id}} - {{::ticket.shipped | dateTime: 'dd/MM/yyyy'}} + {{::ticket.shipped | date: 'dd/MM/yyyy'}} {{::ticket.agencyName}} {{::ticket.warehouseName}} diff --git a/modules/ticket/front/summary/index.html b/modules/ticket/front/summary/index.html index 89cf97ca9..83cdd8e40 100644 --- a/modules/ticket/front/summary/index.html +++ b/modules/ticket/front/summary/index.html @@ -36,10 +36,10 @@ + value="{{$ctrl.summary.shipped | date: 'dd/MM/yyyy HH:mm'}}"> + value="{{$ctrl.summary.landed | date: 'dd/MM/yyyy'}}"> - {{package.created | dateTime: 'dd/MM/yyyy'}} + {{package.created | date: 'dd/MM/yyyy'}} {{package.packaging.item.name}} {{package.quantity}} @@ -180,7 +180,7 @@ {{::request.description}} - {{::request.created | dateTime: 'dd/MM/yyyy'}} + {{::request.created | date: 'dd/MM/yyyy'}} {{::request.requester.user.name}} {{::request.atender.user.name}} {{::request.quantity}} diff --git a/modules/ticket/front/tracking/index/index.html b/modules/ticket/front/tracking/index/index.html index f919a636b..a5120a064 100644 --- a/modules/ticket/front/tracking/index/index.html +++ b/modules/ticket/front/tracking/index/index.html @@ -28,7 +28,7 @@ {{::tracking.worker.user.nickname | dashIfEmpty}} - {{::tracking.created | dateTime:'dd/MM/yyyy HH:mm'}} + {{::tracking.created | date:'dd/MM/yyyy HH:mm'}} diff --git a/modules/ticket/front/weekly/index/index.html b/modules/ticket/front/weekly/index/index.html index 3a251e37a..e25d115ba 100644 --- a/modules/ticket/front/weekly/index/index.html +++ b/modules/ticket/front/weekly/index/index.html @@ -9,7 +9,7 @@ auto-load="true">
- + {{::travel.ref}} {{::travel.agency.name}} {{::travel.warehouseOut.name}} - {{::travel.shipped | dateTime:'dd/MM/yyyy'}} + {{::travel.shipped | date:'dd/MM/yyyy'}} {{::travel.warehouseIn.name}} - {{::travel.landed | dateTime:'dd/MM/yyyy'}} + {{::travel.landed | date:'dd/MM/yyyy'}} diff --git a/modules/worker/back/methods/worker-time-control/addTime.js b/modules/worker/back/methods/worker-time-control/addTime.js index 516519359..8130a16fd 100644 --- a/modules/worker/back/methods/worker-time-control/addTime.js +++ b/modules/worker/back/methods/worker-time-control/addTime.js @@ -34,9 +34,6 @@ module.exports = Self => { const subordinate = await Worker.findById(data.workerFk); const timed = new Date(data.timed); - let offset = timed.getTimezoneOffset() * 60000; - timed.setTime(timed.getTime() - offset); - return Self.rawSql('CALL vn.workerTimeControl_add(?, ?, ?, ?)', [ subordinate.userFk, null, timed, true]); }; diff --git a/modules/worker/front/log/index.html b/modules/worker/front/log/index.html index 91166f045..674e5a200 100644 --- a/modules/worker/front/log/index.html +++ b/modules/worker/front/log/index.html @@ -26,7 +26,7 @@ - {{::log.creationDate | dateTime:'dd/MM/yyyy HH:mm'}} + {{::log.creationDate | date:'dd/MM/yyyy HH:mm'}}
Changed by: diff --git a/modules/worker/front/time-control/index.html b/modules/worker/front/time-control/index.html index a00ebab45..7eaed4ec5 100644 --- a/modules/worker/front/time-control/index.html +++ b/modules/worker/front/time-control/index.html @@ -27,7 +27,7 @@ icon="arrow_{{($index % 2) == 0 ? 'forward' : 'back'}}" title="{{(($index % 2) == 0 ? 'In' : 'Out') | translate}}"> - {{hour.timed | dateTime: 'HH:mm'}} + {{hour.timed | date: 'HH:mm'}}