diff --git a/client/core/src/datePicker/datePicker.js b/client/core/src/datePicker/datePicker.js index 79d7d6cd9..43f34d9df 100644 --- a/client/core/src/datePicker/datePicker.js +++ b/client/core/src/datePicker/datePicker.js @@ -37,7 +37,8 @@ class DatePicker extends Component { set model(value) { this._model = value; if (value && !this.modelView) { - let format = this._formatFlat2Angular(this.iniOptions.dateFormat || 'Y-m-d'); + let initialDateFormat = (this.iniOptions && this.iniOptions.dateFormat) ? this.iniOptions.dateFormat : 'Y-m-d'; + let format = this._formatFlat2Angular(initialDateFormat); this.modelView = this.$filter('date')(value, format); } } @@ -83,7 +84,7 @@ class DatePicker extends Component { let model; if (!value) { model = undefined; - } else if (!this.iniOptions.dateFormat || (this.iniOptions.dateFormat && this.iniOptions.dateFormat.startsWith('Y-m-d'))) { + } else if (!this.iniOptions || (this.iniOptions.dateFormat && this.iniOptions.dateFormat.startsWith('Y-m-d'))) { model = value; } else { let formats = this.iniOptions.dateFormat.split(/[ZT.,/ :-]/); diff --git a/client/route/src/create/create.html b/client/route/src/create/create.html index 90430b090..d1f8d77e9 100644 --- a/client/route/src/create/create.html +++ b/client/route/src/create/create.html @@ -11,8 +11,13 @@ Create Route - - + + + diff --git a/services/production/common/models/agency.js b/services/production/common/models/agency.js deleted file mode 100644 index 88ad478d5..000000000 --- a/services/production/common/models/agency.js +++ /dev/null @@ -1,4 +0,0 @@ - -module.exports = function(Agency) { - require('../methods/agency/list.js')(Agency); -}; diff --git a/services/route/server/model-config.json b/services/route/server/model-config.json index da305afb0..837396e47 100644 --- a/services/route/server/model-config.json +++ b/services/route/server/model-config.json @@ -47,5 +47,9 @@ }, "Zone": { "dataSource": "vn" + }, + "Agency": { + "dataSource": "vn", + "public": true } } diff --git a/services/production/common/methods/agency/list.js b/services/service/methods/agency/list.js similarity index 100% rename from services/production/common/methods/agency/list.js rename to services/service/methods/agency/list.js diff --git a/services/service/models/agency.js b/services/service/models/agency.js new file mode 100644 index 000000000..0d5c3dd8c --- /dev/null +++ b/services/service/models/agency.js @@ -0,0 +1,3 @@ +module.exports = function(Self) { + require('../methods/agency/list.js')(Self); +}; diff --git a/services/production/common/models/agency.json b/services/service/models/agency.json similarity index 76% rename from services/production/common/models/agency.json rename to services/service/models/agency.json index 92d2aba60..25a1d053a 100644 --- a/services/production/common/models/agency.json +++ b/services/service/models/agency.json @@ -10,10 +10,6 @@ "name": { "type": "String", "required": false - }, - "tpv":{ - "type": "Number", - "required": false } } }