From 6d63bc737d64c93cd57c0d7089166430168ae8c6 Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 1 Oct 2026 13:05:54 +0200 Subject: [PATCH] fix(planning): show total construction cost per building row Area and revenue in a production building row cover all buildings of the row, construction cost covered only one (NPS feedback). - construction stat shows per-building cost x amount - tooltip with the single-building cost when amount > 1 - engine constructionCost stays per building (COGM, finance) - en_US key plan.components.production_building.table.construction_per_building - component test for the total and the tooltip Co-Authored-By: Claude Opus 5.5 --- .../components/PlanProductionBuilding.vue | 40 ++++++++++++++++++- src/locales/en_US/plan.json | 3 +- .../components/PlanProductionBuilding.test.ts | 37 ++++++++++++++++- 3 files changed, 75 insertions(+), 5 deletions(-) diff --git a/src/features/planning/components/PlanProductionBuilding.vue b/src/features/planning/components/PlanProductionBuilding.vue index ddcde80f7..9472ae3ff 100644 --- a/src/features/planning/components/PlanProductionBuilding.vue +++ b/src/features/planning/components/PlanProductionBuilding.vue @@ -84,6 +84,14 @@ (element) => element.efficiencyType === "COGC" ); }); + + // area and revenue are for all buildings of this row, so is construction; + // the engine's constructionCost stays per building (COGM, finance) + const constructionCostTotal: ComputedRef = computed( + () => + localBuildingData.value.constructionCost * + localBuildingData.value.amount + );