Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions src/app/loans/loans-view/loans-view.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/savings/savings-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down