feat: desaparecen los botones para las semanas que no tienen registros
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2023-02-23 14:33:38 +01:00
parent 475bc2c255
commit 9b11987d75
1 changed files with 4 additions and 1 deletions

View File

@ -376,7 +376,10 @@ class Controller extends Section {
this.$http.get('WorkerTimeControlMails', {filter}) this.$http.get('WorkerTimeControlMails', {filter})
.then(res => { .then(res => {
const [data] = res.data; const [data] = res.data;
if (!data) return; if (!data) {
if (this.weekNumber == weekNumberValue) this.state = null;
return;
}
const state = data.state; const state = data.state;
if (this.weekNumber == weekNumberValue) { if (this.weekNumber == weekNumberValue) {