diff --git a/src/app/loans/loans-view/loans-view.component.ts b/src/app/loans/loans-view/loans-view.component.ts index 8d6ab3b9d9..62fb71102a 100644 --- a/src/app/loans/loans-view/loans-view.component.ts +++ b/src/app/loans/loans-view/loans-view.component.ts @@ -240,10 +240,19 @@ export class LoansViewComponent implements OnInit { }); this.datatablesReady = true; }, - error: () => { - // If API fails, keep all datatables (fallback to current behavior) - this.datatablesReady = true; - } + error: (err) => { + this.datatablesReady = true; + + const errors = err.error?.errors; + + if (errors && errors.length > 0) { + const message = errors + .map(e => this.translate.instant(e.userMessageGlobalisationCode)) + .join(' '); + + alert(message); // or notification service if exists + } +} }); } diff --git a/src/app/savings/savings-routing.module.ts b/src/app/savings/savings-routing.module.ts index 9884bd14a8..8bc07eadc6 100644 --- a/src/app/savings/savings-routing.module.ts +++ b/src/app/savings/savings-routing.module.ts @@ -60,7 +60,7 @@ const routes: Routes = [ children: [ { path: 'create', - data: { title: 'Create Savings Account', breadcrumb: 'Create Savings Account' }, + data: { title: 'labels.createSavingsAccount', breadcrumb: 'labels.createSavingsAccount' }, component: CreateSavingsAccountComponent, resolve: { savingsAccountTemplate: SavingsAccountTemplateResolver