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
@@ -30,6 +30,7 @@ import { FaIconComponent } from '@fortawesome/angular-fontawesome';
import { MatDivider } from '@angular/material/divider';
import { MatTooltip } from '@angular/material/tooltip';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
import { AlertService } from 'app/core/alert/alert.service';
/**
* Create survey component.
@@ -55,6 +56,7 @@ export class CreateSurveyComponent implements OnInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
dialog = inject(MatDialog);
private alertService = inject(AlertService);
/** Survey form. */
surveyForm: UntypedFormGroup;
@@ -244,6 +246,12 @@ export class CreateSurveyComponent implements OnInit {
countryCode: this.surveyForm.value.countryCode.toUpperCase()
});
this.systemService.createSurvey(this.surveyForm.value).subscribe((response: any) => {
if (response?.rollbackTransaction) {
this.alertService.alert({
type: 'Success',
message: 'Survey creation has been submitted for approval.'
});
}
this.router.navigate(['../'], { relativeTo: this.route });
});
}