{{ editingId() ? ui.t('budget.edit') : ui.t('budget.new') }}

@if (editingId()) { }
{{ ui.t('budget.total') }}
{{ summary()?.totalBudget || 0 | currency:'PLN':'symbol':'1.2-2' }}
{{ ui.t('budget.spent') }}
{{ summary()?.totalSpent || 0 | currency:'PLN':'symbol':'1.2-2' }}
{{ ui.t('budget.alerts') }}
{{ summary()?.alerts?.length || 0 }}
@if (summary()?.alerts?.length) {
{{ ui.t('budget.alerts') }}
@for (alert of summary()!.alerts; track alert.budgetId) {
{{ alert.message }}
}
}

{{ ui.t('budget.title') }}

@for (item of items(); track item.id) { } @empty { }
{{ ui.t('budget.name') }}{{ ui.t('table.category') }}{{ ui.t('budget.usage') }}{{ ui.t('table.amount') }}
{{ item.name || item.category?.name || ui.t('budget.overall') }}
{{ item.category?.name || ui.t('budget.overall') }} {{ item.usagePercent }}%
{{ item.spent | currency:'PLN':'symbol':'1.2-2' }}
/ {{ item.amount | currency:'PLN':'symbol':'1.2-2' }}
{{ ui.t('common.noData') }}