feat: add new standalone components for system and organization management modules

This commit is contained in:
2026-09-28 12:55:42 +05:30
parent f451672ce7
commit 4ca08f6ee9
32 changed files with 347 additions and 32 deletions
@@ -45,6 +45,7 @@ import { MatTooltip } from '@angular/material/tooltip';
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';
/**
* Entity to Entity Mapping Component
@@ -81,6 +82,7 @@ export class EntityToEntityMappingComponent implements OnInit {
private dialog = inject(MatDialog);
private settingsService = inject(SettingsService);
private translateService = inject(TranslateService);
private alertService = inject(AlertService);
/** Stores entity to entity mapping data */
entityMappings: string[] = [];
@@ -392,6 +394,12 @@ export class EntityToEntityMappingComponent implements OnInit {
newMappingData.dateFormat = dateFormat;
newMappingData.locale = this.settingsService.language.code;
this.systemService.createMapping(this.relId, newMappingData).subscribe((response: any) => {
if (response?.rollbackTransaction) {
this.alertService.alert({
type: 'Success',
message: 'Entity to entity mapping creation has been submitted for approval.'
});
}
this.showFilteredData();
});
}
@@ -413,6 +421,12 @@ export class EntityToEntityMappingComponent implements OnInit {
newMappingData.dateFormat = dateFormat;
newMappingData.locale = this.settingsService.language.code;
this.systemService.editMapping(this.mapIdToEdit, newMappingData).subscribe((response: any) => {
if (response?.rollbackTransaction) {
this.alertService.alert({
type: 'Success',
message: 'Entity to entity mapping update has been submitted for approval.'
});
}
this.showFilteredData();
});
}
@@ -427,7 +441,13 @@ export class EntityToEntityMappingComponent implements OnInit {
});
deleteNoteDialogRef.afterClosed().subscribe((response: any) => {
if (response.delete) {
this.systemService.deleteMapping(id).subscribe(() => {
this.systemService.deleteMapping(id).subscribe((deleteResponse: any) => {
if (deleteResponse?.rollbackTransaction) {
this.alertService.alert({
type: 'Success',
message: 'Entity to entity mapping deletion has been submitted for approval.'
});
}
this.showFilteredData();
});
}