refs #5918 fix: permite reenviar el correo si ha dado fallo
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
eb963ff993
commit
8267daef3a
|
@ -97,6 +97,8 @@
|
||||||
ng-if="$ctrl.reason && ($ctrl.isHimSelf || $ctrl.isHr)"
|
ng-if="$ctrl.reason && ($ctrl.isHimSelf || $ctrl.isHr)"
|
||||||
ng-click="reason.show()">
|
ng-click="reason.show()">
|
||||||
</vn-button>
|
</vn-button>
|
||||||
|
</vn-button-bar>
|
||||||
|
<vn-button-bar ng-show="$ctrl.canResend" class="vn-w-lg">
|
||||||
<vn-button
|
<vn-button
|
||||||
label="Resend"
|
label="Resend"
|
||||||
ng-click="sendEmailConfirmation.show()"
|
ng-click="sendEmailConfirmation.show()"
|
||||||
|
|
|
@ -89,6 +89,7 @@ class Controller extends Section {
|
||||||
|
|
||||||
this.fetchHours();
|
this.fetchHours();
|
||||||
this.getWeekData();
|
this.getWeekData();
|
||||||
|
this.isMailSended();
|
||||||
}
|
}
|
||||||
|
|
||||||
getWeekData() {
|
getWeekData() {
|
||||||
|
@ -111,6 +112,36 @@ class Controller extends Section {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isMailSended() {
|
||||||
|
const filter = {
|
||||||
|
where: {
|
||||||
|
year: this._date.getFullYear(),
|
||||||
|
week: this.getWeekNumber(this._date)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.$http.get('WorkerTimeControlMails', {filter})
|
||||||
|
.then(res => {
|
||||||
|
if (!res.data.length) {
|
||||||
|
this.canResend = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const filter = {
|
||||||
|
where: {
|
||||||
|
workerFk: this.$params.id
|
||||||
|
},
|
||||||
|
include: {
|
||||||
|
relation: 'department'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.$http.get('WorkerDepartments', {filter})
|
||||||
|
.then(res => {
|
||||||
|
const department = res.data[0].department;
|
||||||
|
if (department.isTeleworking) this.canResend = true;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Worker hours data
|
* Worker hours data
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue