Skip to content

Commit 6bccc86

Browse files
committed
Fix muni-code for jaljulye
1 parent a75e47b commit 6bccc86

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

projects/budgetkey/src/app/item/items/item-muni/item-muni.component.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class ItemMuniComponent implements OnChanges, AfterViewInit {
5757
});
5858
this.budgets.forEach((b) => {
5959
if (b.code.length === 1) {
60-
b.muni_code = this.ext.symbol.value;
60+
b.muni_code = this.muni_code;
6161
if (b.code[0] < '6') {
6262
b.pct = (b.num_value / this.totalIncome) * 100 + '%';
6363
} else {
@@ -99,7 +99,15 @@ export class ItemMuniComponent implements OnChanges, AfterViewInit {
9999
return (this.item.details && this.item.details.extended) || ({} as any);
100100
}
101101

102+
public get muni_code(): string {
103+
let ret = this.ext.symbol.value;
104+
if (ret?.length === 3) {
105+
ret = '0' + ret;
106+
}
107+
return ret;
108+
}
109+
102110
budgetHref(budget: any) {
103-
return `/i/muni_budgets/${this.ext.symbol.value}/${budget.code}?theme=${this.globalSettings.themeId}`;
111+
return `/i/muni_budgets/${this.muni_code}/${budget.code}?theme=${this.globalSettings.themeId}`;
104112
}
105113
}

0 commit comments

Comments
 (0)