Skip to content

Commit

Permalink
Merge pull request #144 from Sohith-code/cbrelease-4.8.20-custom-regi…
Browse files Browse the repository at this point in the history
…stration-sohith

added org ids to exclude from org creation
  • Loading branch information
sureshece16 authored Dec 31, 2024
2 parents 708004d + 21d58b9 commit 6cf7c74
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export class CreateOrganisationComponent implements OnInit, OnDestroy {

untilDestroyed$ = new Subject<void>();
isMatcompleteOpened = false;
EXCLUDED_MINISRIES: string[] = []
constructor(
private formBuilder: FormBuilder,
private snackBar: MatSnackBar,
Expand All @@ -60,6 +61,9 @@ export class CreateOrganisationComponent implements OnInit, OnDestroy {

ngOnInit(): void {
this.loggedInUserId = _.get(this.activatedRoute, 'snapshot.parent.data.configService.userProfile.userId')
this.EXCLUDED_MINISRIES = this.activatedRoute.snapshot.parent ?
this.activatedRoute.snapshot.parent?.data?.pageData?.data?.excludedOrganizationsSborgId : []

this.initialization()
if (this.openMode === 'editMode') {
this.getOrganization(this.rowData.organisation, this.rowData.type.toLowerCase())
Expand All @@ -81,8 +85,11 @@ export class CreateOrganisationComponent implements OnInit, OnDestroy {
this.statesList = _.get(this.dropdownList, 'statesList', [])
this.filteredStates = [...this.statesList]

this.ministriesList = _.get(this.dropdownList, 'ministriesList', [])
this.ministriesList = _.get(this.dropdownList, 'ministriesList', []).filter(
(ministry: any) => !this.EXCLUDED_MINISRIES.includes(ministry?.sbOrgId)
)
this.filteredMinistry = [...this.ministriesList]

}

this.organisationForm = this.formBuilder.group({
Expand Down

0 comments on commit 6cf7c74

Please sign in to comment.