From 7030be3efa7f0df9dd0fc9f0680a7147f17820ba Mon Sep 17 00:00:00 2001 From: vicent Date: Fri, 7 Jul 2023 09:30:04 +0200 Subject: [PATCH] fix --- front/core/services/token.js | 1 - modules/worker/back/models/worker.json | 8 -------- modules/worker/front/calendar/index.html | 2 +- modules/worker/front/card/index.js | 11 ++++++----- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/front/core/services/token.js b/front/core/services/token.js index c4b644a89..c16cc3c4f 100644 --- a/front/core/services/token.js +++ b/front/core/services/token.js @@ -83,7 +83,6 @@ export default class Token { this.renewPeriod = data.renewPeriod; this.stopRenewer(); this.inservalId = setInterval(() => this.checkValidity(), data.renewInterval * 1000); - this.checkValidity(); }); } diff --git a/modules/worker/back/models/worker.json b/modules/worker/back/models/worker.json index 978d613e9..6d23c1b66 100644 --- a/modules/worker/back/models/worker.json +++ b/modules/worker/back/models/worker.json @@ -43,9 +43,6 @@ "SSN": { "type" : "string" }, - "labelerFk": { - "type" : "number" - }, "mobileExtension": { "type" : "number" }, @@ -86,11 +83,6 @@ "type": "hasMany", "model": "WorkerTeamCollegues", "foreignKey": "workerFk" - }, - "sector": { - "type": "belongsTo", - "model": "Sector", - "foreignKey": "sectorFk" } } } diff --git a/modules/worker/front/calendar/index.html b/modules/worker/front/calendar/index.html index ace2f4e27..877add57b 100644 --- a/modules/worker/front/calendar/index.html +++ b/modules/worker/front/calendar/index.html @@ -31,7 +31,7 @@
-
{{'Contract' | translate}} #{{$ctrl.card.worker.hasWorkCenter}}
+
{{'Contract' | translate}} #{{$ctrl.businessId}}
{{'Used' | translate}} {{$ctrl.contractHolidays.holidaysEnjoyed || 0}} {{'of' | translate}} {{$ctrl.contractHolidays.totalHolidays || 0}} {{'days' | translate}} diff --git a/modules/worker/front/card/index.js b/modules/worker/front/card/index.js index e1eb97327..35f331764 100644 --- a/modules/worker/front/card/index.js +++ b/modules/worker/front/card/index.js @@ -33,11 +33,12 @@ class Controller extends ModuleCard { }; this.$http.get(`Workers/${this.$params.id}`, {filter}) - .then(res => this.worker = res.data); - this.$http.get(`Workers/${this.$params.id}/activeContract`) - .then(res => { - if (res.data) this.worker.hasWorkCenter = res.data.workCenterFk; - }); + .then(res => this.worker = res.data) + .then(() => + this.$http.get(`Workers/${this.$params.id}/activeContract`) + .then(res => { + if (res.data) this.worker.hasWorkCenter = res.data.workCenterFk; + })); } }