Refactor SaleSection component: Simplify sell item and sell all logic, remove unnecessary state management, and improve UI feedback. Update translations and clean up unused code in i18n files. Optimize price loading in BranchView and remove legacy product loading in MoneyHistoryView. Streamline PoliticsView by removing own character ID handling and related logic.

This commit is contained in:
Torsten Schulz (local)
2026-01-26 16:03:48 +01:00
parent 80b639b511
commit 71748f6aa0
15 changed files with 822 additions and 3815 deletions

View File

@@ -282,7 +282,11 @@ async function initializeFalukantProducts() {
{ labelTr: 'ox', category: 5, productionTime: 5, sellCost: 60 },
];
const productsToInsert = baseProducts;
const productsToInsert = baseProducts.map(p => ({
...p,
sellCostMinNeutral: Math.ceil(p.sellCost * factorMin),
sellCostMaxNeutral: Math.ceil(p.sellCost * factorMax),
}));
await ProductType.bulkCreate(productsToInsert, {
ignoreDuplicates: true,