diff --git a/front/core/components/calendar/index.js b/front/core/components/calendar/index.js
index 62b28b03b..de03a70c9 100644
--- a/front/core/components/calendar/index.js
+++ b/front/core/components/calendar/index.js
@@ -93,7 +93,7 @@ export default class Calendar extends Component {
}
applyOffset(date) {
- date.setTime(date.getTime() - date.getTimezoneOffset() * 60000);
+ // date.setTime(date.getTime() - date.getTimezoneOffset() * 60000);
}
repaint() {
diff --git a/front/core/components/input-number/index.html b/front/core/components/input-number/index.html
index 894844375..3ff74a116 100644
--- a/front/core/components/input-number/index.html
+++ b/front/core/components/input-number/index.html
@@ -3,6 +3,7 @@
+ ng-if="::$ctrl.hasInfo"
+ vn-tooltip="{{::$ctrl.info}}">
info_outline
diff --git a/front/core/components/input-number/index.js b/front/core/components/input-number/index.js
index e554c2e5d..f91fac2e7 100644
--- a/front/core/components/input-number/index.js
+++ b/front/core/components/input-number/index.js
@@ -3,7 +3,6 @@ import Textfield from '../textfield/textfield';
import './style.scss';
export default class InputNumber extends Textfield {
-
constructor($element, $scope, $attrs, vnTemplate, $transclude) {
super($element, $scope, $attrs, vnTemplate, $transclude);
@@ -56,30 +55,30 @@ export default class InputNumber extends Textfield {
if ((this.validate() !== undefined && !this.validate()) ||
(this.max && this.value > this.max) ||
(this.min && this.value < this.min) ||
- (this.step && this.value % this.step != 0)) {
+ (this.step && this.value % this.step != 0))
this.$element[0].querySelector('.infix').classList.add('invalid', 'validated');
- }
+
if (this.onChange)
this.onChange();
}
add() {
- if (this.step && this.value % this.step != 0) {
+ if (this.step && this.value % this.step != 0)
this.value += (this.step - this.value % this.step);
- } else {
+ else
this.value += this.step;
- }
+
this.validateValue();
}
remove() {
- if (this.step && this.value % this.step != 0) {
+ if (this.step && this.value % this.step != 0)
this.value -= (this.step + this.value % this.step);
- } else {
+ else
this.value -= this.step;
- }
+
this.validateValue();
}
}
diff --git a/loopback/server/connectors/vn-mysql.js b/loopback/server/connectors/vn-mysql.js
index dee523be7..efe859a06 100644
--- a/loopback/server/connectors/vn-mysql.js
+++ b/loopback/server/connectors/vn-mysql.js
@@ -24,6 +24,18 @@ class VnMySQL extends MySQL {
}
}
+ fromColumnValue(prop, val) {
+ if (val == null || !prop || prop.type !== Date)
+ 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;
+ }
+
/**
* Promisified version of execute().
*
@@ -34,6 +46,16 @@ class VnMySQL extends MySQL {
* @return {Promise} The operation promise
*/
executeP(query, params, options = {}, cb) {
+ if (params) {
+ for (let param of params) {
+ if (param && typeof param.getMonth === 'function') {
+ let locale = new Date(param);
+ let offset = locale.getTimezoneOffset() * 60000;
+ param.setTime(param.getTime() - offset);
+ }
+ }
+ }
+
return new Promise((resolve, reject) => {
this.execute(query, params, options, (error, response) => {
if (cb)
@@ -230,11 +252,12 @@ exports.initialize = function initialize(dataSource, callback) {
dataSource.EnumFactory = EnumFactory;
- if (callback)
+ if (callback) {
if (dataSource.settings.lazyConnect) {
process.nextTick(function() {
callback();
});
} else
dataSource.connector.connect(callback);
+ }
};
diff --git a/modules/agency/front/calendar/index.js b/modules/agency/front/calendar/index.js
index 81b07dafe..64dd5ef84 100644
--- a/modules/agency/front/calendar/index.js
+++ b/modules/agency/front/calendar/index.js
@@ -17,7 +17,9 @@ class Controller {
this.ndMonth = this.$scope.ndMonth;
}
- get zone() {
+ // Disabled until implementation
+ // of holidays by node
+ /* get zone() {
return this._zone;
}
@@ -41,7 +43,7 @@ class Controller {
this.events = this.events.concat(events);
});
- }
+ } */
get data() {
return this._data;
diff --git a/modules/agency/front/create/index.html b/modules/agency/front/create/index.html
index 43575d179..4a4237fd9 100644
--- a/modules/agency/front/create/index.html
+++ b/modules/agency/front/create/index.html
@@ -51,14 +51,12 @@
+ min="0.00">
+ min="0.00">
diff --git a/modules/agency/front/location/index.js b/modules/agency/front/location/index.js
index 00b0159ec..9a28fd3d1 100644
--- a/modules/agency/front/location/index.js
+++ b/modules/agency/front/location/index.js
@@ -23,12 +23,13 @@ class Controller {
}
onSelection(item, isIncluded) {
- item.isIncluded = isIncluded;
- const path = '/agency/api/ZoneIncludeds/toggleIsIncluded';
- const params = {zoneFk: this.zone.id, item};
- this.$http.post(path, params).then(() => {
+ let node = Object.assign({}, item);
+ node.isIncluded = isIncluded;
+ node.childs = []; // Data too large
- });
+ const path = '/agency/api/ZoneIncludeds/toggleIsIncluded';
+ const params = {zoneFk: this.zone.id, item: node};
+ this.$http.post(path, params);
}
}
diff --git a/modules/order/front/catalog/index.html b/modules/order/front/catalog/index.html
index 2ad3af2f6..1d834a66c 100644
--- a/modules/order/front/catalog/index.html
+++ b/modules/order/front/catalog/index.html
@@ -10,7 +10,7 @@