fixed client observations to apply eslint rules plus bug fixed in datePicker
This commit is contained in:
parent
329b025c74
commit
c3d6a9c043
|
@ -155,8 +155,8 @@ class DatePicker extends Component {
|
|||
if (!this.iniOptions.locale)
|
||||
this.iniOptions.locale = this.$translate.use();
|
||||
|
||||
if (!this.iniOptions.dateFormat && this.iniOptions.locale === 'es')
|
||||
this.iniOptions.dateFormat = 'd-m-Y';
|
||||
if (!this.iniOptions.dateFormat)
|
||||
this.iniOptions.dateFormat = this.iniOptions.locale === 'es' ? 'd-m-Y' : 'm-d-Y';
|
||||
else if (this.iniOptions.dateFormat) {
|
||||
let format = this.iniOptions.dateFormat.split(/[ZT.,/ :-]/);
|
||||
if (format.length <= 1) {
|
||||
|
|
|
@ -8,9 +8,9 @@ module.exports = function(Self) {
|
|||
ctx.instance.created = Date();
|
||||
let token = ctx.options.accessToken;
|
||||
let userId = token && token.userId;
|
||||
let app = require('../../server/server');
|
||||
let app = require('../../server/server');
|
||||
let Employee = app.models.Employee;
|
||||
Employee.findOne({where: {userFk: userId}}, function (err, user){
|
||||
Employee.findOne({where: {userFk: userId}}, (err, user) => {
|
||||
if (user) {
|
||||
ctx.instance.employeeFk = user.id;
|
||||
next();
|
||||
|
|
Loading…
Reference in New Issue