feat: add new standalone components for system and organization management modules
This commit is contained in:
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user