From 43f26d1bc994a20f62287cf92510da676bef9d72 Mon Sep 17 00:00:00 2001 From: Gerard Date: Mon, 25 Feb 2019 15:56:42 +0100 Subject: [PATCH 1/3] input number now has a option to hide the controls --- front/core/components/input-number/index.html | 4 ++-- front/core/components/input-number/index.js | 3 ++- modules/agency/front/basic-data/index.html | 9 ++++++--- modules/agency/front/create/index.html | 11 ++++++++--- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/front/core/components/input-number/index.html b/front/core/components/input-number/index.html index 3ff74a116..bebeb6a31 100644 --- a/front/core/components/input-number/index.html +++ b/front/core/components/input-number/index.html @@ -3,7 +3,7 @@
{ this.validateValue(); }); @@ -94,6 +94,7 @@ ngModule.component('vnInputNumber', { min: ' + field="$ctrl.zone.travelingDays" + display-controls="false"> + step="0.20" + display-controls="false"> + step="0.20" + display-controls="false"> diff --git a/modules/agency/front/create/index.html b/modules/agency/front/create/index.html index 4a4237fd9..0a8c08207 100644 --- a/modules/agency/front/create/index.html +++ b/modules/agency/front/create/index.html @@ -39,7 +39,8 @@ value="$ctrl.zone.travelingDays" step="1" label="Traveling days" - field="$ctrl.zone.travelingDays"> + field="$ctrl.zone.travelingDays" + display-controls="false"> + min="0.00" + step="0.20" + display-controls="false"> + min="0.00" + step="0.20" + display-controls="false"> From d404fc92c8560f7a4b9300e910ddb7a44b2e7bcf Mon Sep 17 00:00:00 2001 From: Gerard Date: Tue, 26 Feb 2019 12:51:01 +0100 Subject: [PATCH 2/3] dates fixed, deleted tricks to change the hours --- front/core/components/calendar/index.html | 2 +- gulpfile.js | 3 ++- loopback/server/connectors/vn-mysql.js | 5 +---- loopback/server/datasources.json | 2 +- modules/ticket/front/data/step-one/index.js | 5 ++--- modules/ticket/front/data/step-one/index.spec.js | 3 +-- 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/front/core/components/calendar/index.html b/front/core/components/calendar/index.html index 2a5f369fb..8fdd2e7a4 100644 --- a/front/core/components/calendar/index.html +++ b/front/core/components/calendar/index.html @@ -19,7 +19,7 @@ icon="keyboard_arrow_right" class="pointer" ng-click="$ctrl.moveNext($ctrl.skip)" - ng-show="$ctrl.displayControls" + ng-show="$ctrl.displayControls"> diff --git a/gulpfile.js b/gulpfile.js index dfc91c050..ff68efaa1 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -424,7 +424,8 @@ function dockerWait() { user: dbConf.username, password: dbConf.password, host: dbConf.host, - port: dbConf.port + port: dbConf.port, + dateStrings: true }; log('Waiting for MySQL init process...'); diff --git a/loopback/server/connectors/vn-mysql.js b/loopback/server/connectors/vn-mysql.js index 03418307b..eea11a53f 100644 --- a/loopback/server/connectors/vn-mysql.js +++ b/loopback/server/connectors/vn-mysql.js @@ -28,9 +28,6 @@ class VnMySQL extends MySQL { return MySQL.prototype.fromColumnValue.call(this, prop, val); let date = new Date(val); - let locale = new Date(val); - let offset = locale.getTimezoneOffset() * 60000; - date.setTime(date.getTime() + offset); return date; } @@ -57,7 +54,6 @@ class VnMySQL extends MySQL { let locale = new Date(param); let offset = locale.getTimezoneOffset() * 60000; param.setTime(param.getTime() - offset); - console.log(param); } } } @@ -245,6 +241,7 @@ class VnMySQL extends MySQL { exports.VnMySQL = VnMySQL; exports.initialize = function initialize(dataSource, callback) { + console.log(dataSource); dataSource.driver = mysql; dataSource.connector = new VnMySQL(dataSource.settings); dataSource.connector.dataSource = dataSource; diff --git a/loopback/server/datasources.json b/loopback/server/datasources.json index cfc7bd67e..6540c0de2 100644 --- a/loopback/server/datasources.json +++ b/loopback/server/datasources.json @@ -4,7 +4,7 @@ }, "vn": { "connector": "vn-mysql", - "timezone": "CET", + "timezone": "local", "database": "vn", "debug": false, "host": "localhost", diff --git a/modules/ticket/front/data/step-one/index.js b/modules/ticket/front/data/step-one/index.js index f3e8bf300..54aac4c2f 100644 --- a/modules/ticket/front/data/step-one/index.js +++ b/modules/ticket/front/data/step-one/index.js @@ -1,5 +1,4 @@ import ngModule from '../../module'; -import {toJsonDate} from 'core/lib/date'; import './style.scss'; class Controller { @@ -66,7 +65,7 @@ class Controller { onChangeShipped(value) { let data = { - shipped: toJsonDate(value), + shipped: value, addressFk: this.ticket.addressFk, agencyModeFk: this.ticket.agencyModeFk, warehouseFk: this.ticket.warehouseFk @@ -128,7 +127,7 @@ class Controller { let query = `/ticket/api/sales/${this.ticket.id}/priceDifference`; let data = { - landed: toJsonDate(this.ticket.landed), + landed: this.ticket.landed, addressFk: this.ticket.addressFk, agencyModeFk: this.ticket.agencyModeFk, warehouseFk: this.ticket.warehouseFk diff --git a/modules/ticket/front/data/step-one/index.spec.js b/modules/ticket/front/data/step-one/index.spec.js index f72e2c43b..e7049394b 100644 --- a/modules/ticket/front/data/step-one/index.spec.js +++ b/modules/ticket/front/data/step-one/index.spec.js @@ -1,5 +1,4 @@ import './index.js'; -import {toJsonDate} from 'core/lib/date'; describe('Ticket', () => { describe('Component vnTicketDataStepOne', () => { @@ -68,7 +67,7 @@ describe('Ticket', () => { warehouseFk: 1 }; let data = { - shipped: toJsonDate(shipped), + shipped: shipped, addressFk: 121, agencyModeFk: 2, warehouseFk: 1 From 4853c8fd60d5d7145695c28c505fc329c1f960a1 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 26 Feb 2019 14:11:30 +0100 Subject: [PATCH 3/3] zone calendar date picker --- loopback/server/connectors/vn-mysql.js | 1 - modules/agency/front/calendar/index.js | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/loopback/server/connectors/vn-mysql.js b/loopback/server/connectors/vn-mysql.js index eea11a53f..7ef2f920b 100644 --- a/loopback/server/connectors/vn-mysql.js +++ b/loopback/server/connectors/vn-mysql.js @@ -241,7 +241,6 @@ class VnMySQL extends MySQL { exports.VnMySQL = VnMySQL; exports.initialize = function initialize(dataSource, callback) { - console.log(dataSource); dataSource.driver = mysql; dataSource.connector = new VnMySQL(dataSource.settings); dataSource.connector.dataSource = dataSource; diff --git a/modules/agency/front/calendar/index.js b/modules/agency/front/calendar/index.js index 133d6cdf3..4e84c73eb 100644 --- a/modules/agency/front/calendar/index.js +++ b/modules/agency/front/calendar/index.js @@ -56,8 +56,11 @@ class Controller { const events = []; value.forEach(event => { + let date = new Date(event.delivered); + date.setHours(0, 0, 0, 0); + events.push({ - date: event.delivered, + date: date, color: 'green-circle', title: 'Has delivery', isRemovable: true