Skip to content

Commit

Permalink
Fix muni-code for jaljulye
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Jan 30, 2025
1 parent a75e47b commit 6bccc86
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class ItemMuniComponent implements OnChanges, AfterViewInit {
});
this.budgets.forEach((b) => {
if (b.code.length === 1) {
b.muni_code = this.ext.symbol.value;
b.muni_code = this.muni_code;
if (b.code[0] < '6') {
b.pct = (b.num_value / this.totalIncome) * 100 + '%';
} else {
Expand Down Expand Up @@ -99,7 +99,15 @@ export class ItemMuniComponent implements OnChanges, AfterViewInit {
return (this.item.details && this.item.details.extended) || ({} as any);
}

public get muni_code(): string {
let ret = this.ext.symbol.value;
if (ret?.length === 3) {
ret = '0' + ret;
}
return ret;
}

budgetHref(budget: any) {
return `/i/muni_budgets/${this.ext.symbol.value}/${budget.code}?theme=${this.globalSettings.themeId}`;
return `/i/muni_budgets/${this.muni_code}/${budget.code}?theme=${this.globalSettings.themeId}`;
}
}

0 comments on commit 6bccc86

Please sign in to comment.