From ba9ef98f3f4cad5fe6a75fbf94603664674c2330 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 16 Jul 2020 17:16:26 +0200 Subject: [PATCH 1/3] fix gant scala e blocchi --- .../processo/components/gantt/gantt-component.vue | 8 ++++---- .../processo/components/gantt/gantt-row.ts | 4 ++-- .../processo/components/gantt/gantt.css | 2 +- .../processo/components/gantt/gantt.less | 2 +- .../processo/components/gantt/gantt.vue | 4 ++-- .../processo/components/gantt/timeline.vue | 14 ++++++++------ 6 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt-component.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt-component.vue index a8edbe76..11f8d735 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt-component.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt-component.vue @@ -145,10 +145,10 @@
{{value.actualDelay | round(1)}}
@@ -163,10 +163,10 @@ class="progress-line" />
{{value.actualDuration | round(1)}}
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt-row.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt-row.ts index dc637e74..f20c3d1d 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt-row.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt-row.ts @@ -82,7 +82,7 @@ function blockEndPosition(block: server.Modblock, blocks: server.Modblock[], opt function blockDuration(block: server.Modblock, options: IGanttOptions, includeDelay: boolean) { let duration = 0; if (block.showDelay) - duration += Math.max(block.estimatedDelay, includeDelay ? options.block_delay_minDuration : 0); + duration += Math.max(block.actualDelay, block.estimatedDelay, includeDelay ? options.block_delay_minDuration : 0); // check della durata del blocco in base al tipo var minduration = 0; @@ -95,7 +95,7 @@ function blockDuration(block: server.Modblock, options: IGanttOptions, includeDe case 5: minduration = options.block_body_Cooling_minDuration; case 6: minduration = options.block_body_Extraction_minDuration; } - duration += Math.max(minduration, block.estimatedDuration); + duration += Math.max(minduration, block.estimatedDuration, block.actualDuration); if (block.idParam > 0 && includeDelay) diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.css b/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.css index bce07c97..aef3dd67 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.css +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.css @@ -17,7 +17,7 @@ justify-content: center; border-radius: 10px; height: 10px; - width: 20px; + width: 30px; font-size: 8px; background-color: rgba(0, 0, 0, 0.5); color: #fff; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.less b/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.less index 48b606eb..339649c2 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.less +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.less @@ -19,7 +19,7 @@ justify-content: center; border-radius: 10px; height: 10px; - width: 20px; + width: 30px; font-size: 8px; background-color: rgba(0, 0, 0, .5); color: #fff; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.vue index f3aac95c..a036fd90 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.vue @@ -48,9 +48,9 @@
- - - + + + + + From d7467ea92de8092869bb53be0691f58647f4eda5 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 16 Jul 2020 17:30:25 +0200 Subject: [PATCH 2/3] =?UTF-8?q?history=20duplicata=20e=20fluidit=C3=A0=20d?= =?UTF-8?q?el=20gantt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wwwroot/src/app_modules_thermo/dashboard/dashboard.ts | 3 ++- .../src/app_modules_thermo/processo/components/gantt/gantt.vue | 2 +- .../app_modules_thermo/processo/components/gantt/timeline.vue | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.ts index d1ccdbeb..3f806d21 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.ts @@ -36,7 +36,8 @@ export default class Dashboard extends Vue { @Watch("lastItem", { deep: true }) async lastitemChanged(n: Prod.IProd, o) { - this.items.splice(0, 0, ...await prodService.History(n.numDone - 1, 1)); + if (this.items.length && n.numDone - 1 != this.items[0].numDone) + this.items.splice(0, 0, ...await prodService.History(n.numDone - 1, 1)); } items: Prod.IProd[] = []; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.vue index a036fd90..d1221d7f 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/gantt.vue @@ -50,7 +50,7 @@ From db2626e861e883f6362e03c8ce0862111a0b42c1 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 16 Jul 2020 17:36:10 +0200 Subject: [PATCH 3/3] fix timeline to zero --- .../app_modules_thermo/processo/components/gantt/timeline.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/timeline.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/timeline.vue index 1bc17d2a..377e796d 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/timeline.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/processo/components/gantt/timeline.vue @@ -3,7 +3,7 @@