From c2cd9adef80e365c75f129bec62829222e6d8ec7 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 13 Oct 2020 18:10:57 +0200 Subject: [PATCH] Fix Dashboards UI --- Thermo.Active/wwwroot/src/@types/prod.cs.d.ts | 2 +- .../app_modules_thermo/dashboard/base-components/gauge.ts | 2 +- .../app_modules_thermo/dashboard/base-components/gauge.vue | 6 +++--- .../app_modules_thermo/dashboard/base-components/item.ts | 7 +++++++ .../app_modules_thermo/dashboard/base-components/item.vue | 3 ++- .../wwwroot/src/app_modules_thermo/dashboard/dashboard.ts | 5 ++--- .../wwwroot/src/app_modules_thermo/dashboard/dashboard.vue | 2 +- .../src/app_modules_thermo/processo/components/processo.ts | 4 ++-- .../setup/avvio-produzione/avvio-produzione.ts | 2 +- Thermo.Active/wwwroot/src/store/prod.store.ts | 1 + 10 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Thermo.Active/wwwroot/src/@types/prod.cs.d.ts b/Thermo.Active/wwwroot/src/@types/prod.cs.d.ts index f9a7b79b..a89fae0f 100644 --- a/Thermo.Active/wwwroot/src/@types/prod.cs.d.ts +++ b/Thermo.Active/wwwroot/src/@types/prod.cs.d.ts @@ -3,7 +3,6 @@ declare module Prod { interface IProd { numTarget: number; numDone: number; - numPreHot: number; timeWarm: number; timeVent: number; timeVacuum: number; @@ -20,6 +19,7 @@ declare module Prod { interface IProdPanel { numTarget: number; numDone: number; + numPreHot: number; inizioProd: string; stimaDurata: number; tempAct: number; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/gauge.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/gauge.ts index 8999b1f4..7d6b66b8 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/gauge.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/gauge.ts @@ -48,7 +48,7 @@ export default class MainGauge extends Vue { }; } - get prod() { return store.state.prod.prod } + get prod() { return store.state.prod.panel } polarToCartesian(centerX, centerY, radius, angleInDegrees) { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/gauge.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/gauge.vue index acc397ae..cc8d7f34 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/gauge.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/gauge.vue @@ -5,7 +5,7 @@
- + {{prod.numDone}} -{{scrapedItems.length}} - -{{prod.numPreHot}} + -{{prod.numPreHot}}
{{prod.numTarget}} diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/item.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/item.ts index bf2df8ac..6e246259 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/item.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/item.ts @@ -9,6 +9,13 @@ export default class Item extends Vue { @Prop() value: Prod.IProd; + @Prop() + panel: Prod.IProdPanel + + get noDisplayNumber(){ + return this.panel && this.value.numDone > this.panel.numTarget; + } + showDetails: boolean = false; async setScrap(num: number) { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/item.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/item.vue index be6ae58c..4f259388 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/item.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/item.vue @@ -1,7 +1,8 @@