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