Enhance MessagesDialog component and localization for overproduction notifications

- Updated MessagesDialog.vue to extract additional parameters (value, branch_id, region_id) for better handling of overproduction scenarios.
- Modified localization files (de/falukant.json and en/falukant.json) to reflect changes in the overproduction notification format, including branch information.
- Improved data formatting for clarity in notifications related to production levels.
This commit is contained in:
Torsten Schulz (local)
2026-01-12 16:48:10 +01:00
parent 9273066f61
commit b600f16ecd
6 changed files with 117 additions and 9 deletions

View File

@@ -151,6 +151,19 @@ export default {
// Extrahiere Parameter aus value und effects
params = this.extractParamsFromValue(value, n);
// Wenn value eine einfache Zahl ist (z.B. für overproduction), als value-Parameter verwenden
if (typeof parsed.value === 'number') {
params.value = parsed.value;
}
// Weitere Parameter aus parsed extrahieren (z.B. branch_id)
if (parsed.branch_id !== undefined) {
params.branch_id = parsed.branch_id;
}
if (parsed.region_id !== undefined) {
params.region_id = parsed.region_id;
}
}
} catch (e) {
// Bei Parse-Fehler: Alte Struktur unterstützen
@@ -250,6 +263,18 @@ export default {
formatted.percent = `${params.percent > 0 ? '+' : ''}${params.percent.toFixed(1)}%`;
}
// Einfache Werte (z.B. für overproduction)
if (params.value !== undefined && params.value !== null) {
formatted.value = Number(params.value);
}
// Filiale-Information
if (params.branch_id !== undefined && params.branch_id !== null) {
formatted.branch_info = ` (Filiale #${params.branch_id})`;
} else {
formatted.branch_info = '';
}
// Gesundheit formatieren
if (params.change !== undefined && params.change !== null) {
formatted.healthChange = params.change > 0 ? `+${params.change}` : `${params.change}`;