diff --git a/front/core/components/date-picker/date-picker.html b/front/core/components/date-picker/date-picker.html index f0519c48ad..67fcd880be 100644 --- a/front/core/components/date-picker/date-picker.html +++ b/front/core/components/date-picker/date-picker.html @@ -12,7 +12,7 @@
clear diff --git a/front/core/components/date-picker/date-picker.js b/front/core/components/date-picker/date-picker.js index aa8c028863..3c5411a657 100644 --- a/front/core/components/date-picker/date-picker.js +++ b/front/core/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; diff --git a/front/core/components/input-range/index.js b/front/core/components/input-range/index.js index 4b102a7e2c..e24bb1a086 100644 --- a/front/core/components/input-range/index.js +++ b/front/core/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: ' + + diff --git a/modules/claim/front/action/index.js b/modules/claim/front/action/index.js index d7966ed9e1..07778b91d1 100644 --- a/modules/claim/front/action/index.js +++ b/modules/claim/front/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/modules/claim/front/basic-data/index.html b/modules/claim/front/basic-data/index.html index faf5ca31c9..60ef7f677c 100644 --- a/modules/claim/front/basic-data/index.html +++ b/modules/claim/front/basic-data/index.html @@ -52,15 +52,6 @@ field="$ctrl.claim.isChargedToMana" vn-acl="salesAssistant"> - - diff --git a/modules/claim/front/summary/index.html b/modules/claim/front/summary/index.html index 40ba8ed2bf..18cb23d84e 100644 --- a/modules/claim/front/summary/index.html +++ b/modules/claim/front/summary/index.html @@ -30,12 +30,12 @@ + max="5" + min="1" + step="1" + vn-acl="salesAssistant">