Improve Angular project structure and code organization (#1328)

This commit is contained in:
Aditya Chandel
2025-10-12 02:01:59 -06:00
committed by GitHub
parent 54a8bacccd
commit 7c9bd56f63
405 changed files with 463 additions and 727 deletions
@@ -0,0 +1,26 @@
import {inject, Injectable} from '@angular/core';
import {MessageService} from 'primeng/api';
@Injectable({
providedIn: 'root'
})
export class ToastService {
private messageService = inject(MessageService);
showSuccess(summary: string, detail: string) {
this.messageService.add({ severity: 'success', summary, detail });
}
showError(summary: string, detail: string) {
this.messageService.add({ severity: 'error', summary, detail });
}
showInfo(summary: string, detail: string) {
this.messageService.add({ severity: 'info', summary, detail });
}
showWarning(summary: string, detail: string) {
this.messageService.add({ severity: 'warn', summary, detail });
}
}