feat(falukant): add scandalExtraDailyPct field and update related components
All checks were successful
Deploy to production / deploy (push) Successful in 2m59s
All checks were successful
Deploy to production / deploy (push) Successful in 2m59s
- Introduced a new field `scandalExtraDailyPct` in the relationship state model to track additional scandal risk per day, with validation constraints. - Updated the FalukantService to include the new field in relevant calculations and data handling. - Enhanced the frontend components, including RevenueSection and FamilyView, to display the scandal risk information and updated price calculations. - Added localization entries for the new field in multiple languages to ensure clarity for users.
This commit is contained in:
@@ -41,10 +41,10 @@
|
||||
>, </span>
|
||||
<span
|
||||
:class="['city-price', getCityPriceClass(city.branchType)]"
|
||||
:title="`${city.regionName}: ${formatPrice(city.price)}`"
|
||||
:title="`${city.regionName}: ${formatCityPrice(city, product)}`"
|
||||
>
|
||||
<span class="city-name">{{ city.regionName }}</span>
|
||||
<span class="city-price-value">({{ formatPrice(city.price) }})</span>
|
||||
<span class="city-price-value">({{ formatCityPrice(city, product) }})</span>
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
@@ -169,6 +169,14 @@
|
||||
maximumFractionDigits: 2,
|
||||
}).format(price);
|
||||
},
|
||||
formatCityPrice(city, product) {
|
||||
const absolute = Number(city?.price || 0);
|
||||
const productionTime = Number(product?.productionTime || 0);
|
||||
const perMinute = Number.isFinite(Number(city?.grossPerMinute))
|
||||
? Number(city.grossPerMinute)
|
||||
: (productionTime > 0 ? (absolute / productionTime) : 0);
|
||||
return `${this.formatPrice(absolute)} / ${this.formatPrice(perMinute)}`;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user