Merge
This commit is contained in:
commit
ad24380043
|
@ -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.,/ :-]/);
|
||||
|
|
|
@ -11,8 +11,13 @@
|
|||
<vn-vertical pad-large>
|
||||
<vn-title>Create Route</vn-title>
|
||||
<vn-horizontal>
|
||||
<vn-date-picker vn-one label="Date" field="$ctrl.delivery.date"></vn-date-picker>
|
||||
<vn-textfield vn-one label="Agency" field="$ctrl.delivery.agency"></vn-textfield>
|
||||
<vn-date-picker vn-one label="Date" model="$ctrl.delivery.date"></vn-date-picker>
|
||||
<vn-autocomplete vn-one
|
||||
label="Agency"
|
||||
url="/route/api/Agencies"
|
||||
field="$ctrl.delivery.agency"
|
||||
>
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-one label="Driver" field="$ctrl.delivery.driver"></vn-textfield>
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
|
||||
module.exports = function(Agency) {
|
||||
require('../methods/agency/list.js')(Agency);
|
||||
};
|
|
@ -47,5 +47,9 @@
|
|||
},
|
||||
"Zone": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"Agency": {
|
||||
"dataSource": "vn",
|
||||
"public": true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = function(Self) {
|
||||
require('../methods/agency/list.js')(Self);
|
||||
};
|
|
@ -10,10 +10,6 @@
|
|||
"name": {
|
||||
"type": "String",
|
||||
"required": false
|
||||
},
|
||||
"tpv":{
|
||||
"type": "Number",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue