From 548f36ccf8885ac3aeb621188405bd874744b468 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 25 Feb 2021 17:53:18 +0100 Subject: [PATCH] fix gantt --- Thermo.Active/wwwroot/src/@types/prod.cs.d.ts | 1 - .../app_modules_thermo/processo/components/gantt/gantt.ts | 7 +++++-- Thermo.Active/wwwroot/src/store/prod.store.ts | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Thermo.Active/wwwroot/src/@types/prod.cs.d.ts b/Thermo.Active/wwwroot/src/@types/prod.cs.d.ts index f97ded36..e174c3a9 100644 --- a/Thermo.Active/wwwroot/src/@types/prod.cs.d.ts +++ b/Thermo.Active/wwwroot/src/@types/prod.cs.d.ts @@ -18,7 +18,6 @@ declare module Prod { } interface IProdPanel { - fase: number; numTarget: number; numDone: number; numPreHot: number; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.ts index 51e8fb2e..7f899c79 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.ts @@ -41,13 +41,16 @@ export default class Gantt extends Vue { return (this.$store.state as AppModel).prod.panel; } + get prod() { + return (this.$store.state as AppModel).prod; + } get isSection1Active() { - return this.panel.fase <= 1; + return this.prod.fase <= 1; } get isSection2Active() { - return this.panel.fase <= 2; + return this.prod.fase <= 2; } get ganttHeight() { diff --git a/Thermo.Active/wwwroot/src/store/prod.store.ts b/Thermo.Active/wwwroot/src/store/prod.store.ts index fb1fcdfd..30ad8b5e 100644 --- a/Thermo.Active/wwwroot/src/store/prod.store.ts +++ b/Thermo.Active/wwwroot/src/store/prod.store.ts @@ -3,6 +3,7 @@ import Vue from "vue"; export interface ProdStoreModel { prod: Prod.IProd; panel: Prod.IProdPanel; + fase: number; } @@ -21,7 +22,7 @@ export const prodStore = { state: { prod: {}, - panel: {} + panel: {}, fase: 0 } as ProdStoreModel, getters: { @@ -48,7 +49,6 @@ export const prodStore = { numPreHot: 0 }; state.panel = { - fase: 0, numTarget: 0, numDone: 0, inizioProd: 0, stimaDurata: 0,