= {
+ UAH: '₴',
+ USD: '$',
+ EUR: '€',
+ GBP: '£',
+ PLN: 'zł',
+}
+
+let activeCurrency = 'UAH'
+
+export function setCurrency(currency: string): void {
+ activeCurrency = currency
+}
+
+export function currencySymbol(): string {
+ return CURRENCY_SYMBOLS[activeCurrency] ?? activeCurrency
+}
+
+// «5 000 ₴» — суммы задач; валюта берётся из глобальной настройки
+export function formatMoney(amount: number | null): string {
+ if (amount === null) return ''
+ return `${amount.toLocaleString('ru-RU')} ${currencySymbol()}`
}
\ No newline at end of file
diff --git a/frontend/src/views/ListView.vue b/frontend/src/views/ListView.vue
index 98d3cea..1fbe277 100644
--- a/frontend/src/views/ListView.vue
+++ b/frontend/src/views/ListView.vue
@@ -1,7 +1,7 @@
+
+
+
+
+
+ {{ error }}
+
+
+ Валюта бюджетов
+
+ Единица выбирается один раз и применяется во всех суммах: бюджет задачи, оценка затрат.
+
+
+
+
+ Сохранить
+
+
+ Сохранено — применяется во всех видах.
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/views/StackView.vue b/frontend/src/views/StackView.vue
index ff4e45d..61afc2f 100644
--- a/frontend/src/views/StackView.vue
+++ b/frontend/src/views/StackView.vue
@@ -329,13 +329,13 @@
diff --git a/frontend/src/views/TreeView.vue b/frontend/src/views/TreeView.vue
index 979ad7c..aa74d20 100644
--- a/frontend/src/views/TreeView.vue
+++ b/frontend/src/views/TreeView.vue
@@ -1,7 +1,7 @@
@@ -146,9 +135,9 @@
≈ {{ formatMinutes(row.task.estimated_minutes) }}
- бюджет {{ row.task.budget_money }} ₽
+ бюджет {{ formatMoney(row.task.budget_money) }}
- / оценка {{ row.task.cost_estimate_money }} ₽
+ / оценка {{ formatMoney(row.task.cost_estimate_money) }}
{{ tag.name }}
@@ -167,11 +156,6 @@
@update:model-value="(s: string) => setStatus(row.task, s)"
/>
-