feat: add new standalone components for system and organization management modules
This commit is contained in:
@@ -20,6 +20,7 @@ import { SystemService } from '../../system.service';
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
import { DateFormatPipe } from '../../../pipes/date-format.pipe';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
import { AlertService } from 'app/core/alert/alert.service';
|
||||
|
||||
/**
|
||||
* View Hook Component.
|
||||
@@ -40,6 +41,7 @@ export class ViewHookComponent {
|
||||
private systemService = inject(SystemService);
|
||||
private router = inject(Router);
|
||||
private translateService = inject(TranslateService);
|
||||
private alertService = inject(AlertService);
|
||||
|
||||
/** Hook Data. */
|
||||
hookData: any;
|
||||
@@ -67,7 +69,13 @@ export class ViewHookComponent {
|
||||
});
|
||||
deleteHookDialogRef.afterClosed().subscribe((response: any) => {
|
||||
if (response.delete) {
|
||||
this.systemService.deleteHook(this.hookData.id).subscribe(() => {
|
||||
this.systemService.deleteHook(this.hookData.id).subscribe((deleteResponse: any) => {
|
||||
if (deleteResponse?.rollbackTransaction) {
|
||||
this.alertService.alert({
|
||||
type: 'Success',
|
||||
message: 'Hook deletion has been submitted for approval.'
|
||||
});
|
||||
}
|
||||
this.router.navigate(['/system/hooks']);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user