refactor
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
35b47c6da2
commit
9310e92223
|
@ -372,28 +372,30 @@ class Controller extends Section {
|
|||
week: weekNumberValue
|
||||
}
|
||||
};
|
||||
// const filter = {
|
||||
// where: {
|
||||
// and: [
|
||||
// {workerFk: parseInt(this.$params.id)},
|
||||
// {year: this.date.getFullYear()},
|
||||
// {week: weekNumberValue - 1}
|
||||
// ]
|
||||
// }
|
||||
// };
|
||||
this.$http.get('WorkerTimeControlMails/findOne', {filter})
|
||||
|
||||
this.$http.get('WorkerTimeControlMails', {filter})
|
||||
.then(res => {
|
||||
const state = res.data.state;
|
||||
const [data] = res.data;
|
||||
if (!data) return;
|
||||
|
||||
const state = data.state;
|
||||
if (this.weekNumber == weekNumberValue) {
|
||||
this.state = state;
|
||||
this.reason = res.data.reason;
|
||||
this.reason = data.reason;
|
||||
}
|
||||
|
||||
if (state == 'CONFIRMED') {
|
||||
weekNumber.classList.add('confirmed');
|
||||
weekNumber.setAttribute('vn-tooltip', 'Conforme');
|
||||
weekNumber.setAttribute('title', 'Conforme');
|
||||
}
|
||||
if (state == 'REVISE') {
|
||||
weekNumber.classList.add('revise');
|
||||
weekNumber.setAttribute('title', 'No conforme');
|
||||
}
|
||||
if (state == 'SENDED') {
|
||||
weekNumber.classList.add('sended');
|
||||
weekNumber.setAttribute('title', 'Pendiente');
|
||||
}
|
||||
if (state == 'REVISE') weekNumber.style.color = '#FF4444';
|
||||
if (state == 'SENDED') weekNumber.style.color = '#E65F00';
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -35,5 +35,13 @@ vn-worker-time-control {
|
|||
}
|
||||
|
||||
.confirmed {
|
||||
color: #97B92F;
|
||||
color: #97B92F;
|
||||
}
|
||||
|
||||
.revise {
|
||||
color: #f61e1e;
|
||||
}
|
||||
|
||||
.sended {
|
||||
color: #d19b25;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue