From 34905c616add738fdc600b4ef340d3efcd7dc26d Mon Sep 17 00:00:00 2001 From: Gerard Date: Fri, 21 Dec 2018 14:14:46 +0100 Subject: [PATCH 1/3] #921 componete datepicker --- .../core/src/components/date-picker/date-picker.html | 2 +- client/core/src/components/date-picker/date-picker.js | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/client/core/src/components/date-picker/date-picker.html b/client/core/src/components/date-picker/date-picker.html index f0519c48a..67fcd880b 100644 --- a/client/core/src/components/date-picker/date-picker.html +++ b/client/core/src/components/date-picker/date-picker.html @@ -12,7 +12,7 @@
clear diff --git a/client/core/src/components/date-picker/date-picker.js b/client/core/src/components/date-picker/date-picker.js index d4b1bf25c..63f590c04 100644 --- a/client/core/src/components/date-picker/date-picker.js +++ b/client/core/src/components/date-picker/date-picker.js @@ -29,7 +29,7 @@ class DatePicker extends Component { if (this.vp.selectedDates.length) { let date = this.vp.selectedDates[0]; - if (!this.isLocale && !this._iniOptions.enableTime) { + if (!this.isLocale && !this._iniOptions.enableTime && !this.iniOptions.onlyDate) { let now = new Date(); date.setTime(date.getTime() + now.getHours() * 60 * 60 * 1000 @@ -38,7 +38,15 @@ class DatePicker extends Component { + now.getUTCMilliseconds() ); } + console.log(this.iniOptions); + if (this.iniOptions.onlyDate) { + let now = new Date(); + let offset = now.getTimezoneOffset() * 60000; + date.setHours(0, 0, 0, 0); + date.setTime(date.getTime() - offset); + } + console.log(date); this._model = date; } else this.model = null; From f5f543136ed009fef3132b3f10a5d5d5fdc831f8 Mon Sep 17 00:00:00 2001 From: Gerard Date: Fri, 21 Dec 2018 14:19:36 +0100 Subject: [PATCH 2/3] missing model config --- services/loopback/server/model-config.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/loopback/server/model-config.json b/services/loopback/server/model-config.json index 6535f86bd..10fbb9f21 100644 --- a/services/loopback/server/model-config.json +++ b/services/loopback/server/model-config.json @@ -71,6 +71,9 @@ "AgencyMode": { "dataSource": "vn" }, + "AlertLevel": { + "dataSource": "vn" + }, "Bank": { "dataSource": "vn" }, From 5d82c6786cc6f7557f33f9ddecf9f95b37b5c83c Mon Sep 17 00:00:00 2001 From: Gerard Date: Fri, 21 Dec 2018 14:52:26 +0100 Subject: [PATCH 3/3] #881 mover input range de claim.basic-data a claim.action --- client/claim/src/action/index.html | 10 ++++++++++ client/claim/src/action/index.js | 8 ++++++++ client/claim/src/basic-data/index.html | 9 --------- client/claim/src/summary/index.html | 8 ++++---- client/core/src/components/input-range/index.js | 5 ++++- 5 files changed, 26 insertions(+), 14 deletions(-) diff --git a/client/claim/src/action/index.html b/client/claim/src/action/index.html index 6c72fae9a..538588c1d 100644 --- a/client/claim/src/action/index.html +++ b/client/claim/src/action/index.html @@ -27,6 +27,16 @@ ng-click="$ctrl.showLastTickets($event)" vn-tooltip="Imports ticket lines"> + + diff --git a/client/claim/src/action/index.js b/client/claim/src/action/index.js index d7966ed9e..07778b91d 100644 --- a/client/claim/src/action/index.js +++ b/client/claim/src/action/index.js @@ -145,6 +145,14 @@ class Controller { this.$.descriptor.parent = event.target; this.$.descriptor.show(); } + + saveResponsibility() { + let query = `/claim/api/Claims/updateClaim`; + + this.$http.post(query, {responsibility: this.claim.responsibility}).then(res => { + this.vnApp.showSuccess(this.$translate.instant('Data saved!')); + }); + } } Controller.$inject = ['$stateParams', '$scope', '$http', '$translate', 'vnApp']; diff --git a/client/claim/src/basic-data/index.html b/client/claim/src/basic-data/index.html index faf5ca31c..60ef7f677 100644 --- a/client/claim/src/basic-data/index.html +++ b/client/claim/src/basic-data/index.html @@ -52,15 +52,6 @@ field="$ctrl.claim.isChargedToMana" vn-acl="salesAssistant"> - - diff --git a/client/claim/src/summary/index.html b/client/claim/src/summary/index.html index 40ba8ed2b..18cb23d84 100644 --- a/client/claim/src/summary/index.html +++ b/client/claim/src/summary/index.html @@ -30,12 +30,12 @@ + max="5" + min="1" + step="1" + vn-acl="salesAssistant"> diff --git a/client/core/src/components/input-range/index.js b/client/core/src/components/input-range/index.js index 4b102a7e2..e24bb1a08 100644 --- a/client/core/src/components/input-range/index.js +++ b/client/core/src/components/input-range/index.js @@ -10,6 +10,8 @@ export default class inputRange extends Input { this.mdlElement.addEventListener('change', () => { this._value = this.input.value; this.$.$applyAsync(); + if (this._value && this.onChange) + this.onChange(); }); } @@ -71,6 +73,7 @@ ngModule.component('vnInputRange', { max: '