Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
This commit is contained in:
commit
c6a078d82d
|
@ -9,7 +9,7 @@ class Controller {
|
||||||
this.$translate = $translate;
|
this.$translate = $translate;
|
||||||
|
|
||||||
this.accessToken = vnToken.token;
|
this.accessToken = vnToken.token;
|
||||||
this.companyFk = vnConfig.companyFk;
|
this.vnConfig = vnConfig;
|
||||||
this.filter = {
|
this.filter = {
|
||||||
include: {
|
include: {
|
||||||
relation: 'company',
|
relation: 'company',
|
||||||
|
@ -29,6 +29,17 @@ class Controller {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get companyFk() {
|
||||||
|
if (!this._companyFk)
|
||||||
|
return this.vnConfig.companyFk;
|
||||||
|
|
||||||
|
return this._companyFk;
|
||||||
|
}
|
||||||
|
|
||||||
|
set companyFk(id) {
|
||||||
|
this._companyFk = id;
|
||||||
|
}
|
||||||
setOrder(value) {
|
setOrder(value) {
|
||||||
this.params.params.companyFk = value;
|
this.params.params.companyFk = value;
|
||||||
this.filter.where.companyFk = value;
|
this.filter.where.companyFk = value;
|
||||||
|
|
|
@ -33,7 +33,13 @@ module.exports = Self => {
|
||||||
|
|
||||||
const subordinate = await Worker.findById(data.workerFk);
|
const subordinate = await Worker.findById(data.workerFk);
|
||||||
|
|
||||||
return Self.rawSql('CALL vn.workerTimeControl_add(?, ?, ?, ?)', [
|
return Self.create({
|
||||||
subordinate.userFk, null, data.timed, true]);
|
userFk: subordinate.userFk,
|
||||||
|
timed: data.timed,
|
||||||
|
manual: 1
|
||||||
|
});
|
||||||
|
|
||||||
|
/* return Self.rawSql('CALL vn.workerTimeControl_add(?, ?, ?, ?)', [
|
||||||
|
subordinate.userFk, null, data.timed, true]); */
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -59,8 +59,8 @@ module.exports = {
|
||||||
percent(input) {
|
percent(input) {
|
||||||
return new Intl.NumberFormat('es', {
|
return new Intl.NumberFormat('es', {
|
||||||
style: 'percent',
|
style: 'percent',
|
||||||
minimumFractionDigits: 0,
|
minimumFractionDigits: 2,
|
||||||
maximumFractionDigits: 0
|
maximumFractionDigits: 2
|
||||||
}).format(parseFloat(input));
|
}).format(parseFloat(input));
|
||||||
},
|
},
|
||||||
date(input) {
|
date(input) {
|
||||||
|
|
Loading…
Reference in New Issue