Skip to content

Commit 9f6656c

Browse files
Merge pull request #170 from KB-iGOT/sbRootOrgId-param-added
sbRootOrgId-param-added for create org
2 parents 8b981fd + 03a3162 commit 9f6656c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

project/ws/app/src/lib/head/ui-admin-table/create-organisation/create-organisation.component.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export class CreateOrganisationComponent implements OnInit, OnDestroy {
4444
uploadedLogoResponse!: IUploadedLogoresponse
4545
organizationNameList: string[] = []
4646
ORG_NAME_PATTERN = /^[a-zA-Z0-9 ().,@\-\$\/\\:\[\]!\s]*$/
47+
rootOrgId: any
4748

4849
untilDestroyed$ = new Subject<void>();
4950
isMatcompleteOpened = false
@@ -56,7 +57,7 @@ export class CreateOrganisationComponent implements OnInit, OnDestroy {
5657
private snackBar: MatSnackBar,
5758
private createMDOService: CreateMDOService,
5859
private activatedRoute: ActivatedRoute,
59-
private loaderService: LoaderService
60+
private loaderService: LoaderService,
6061
) {
6162

6263
this.addOverflowHidden()
@@ -217,6 +218,8 @@ export class CreateOrganisationComponent implements OnInit, OnDestroy {
217218
}
218219

219220
onSubmitCreateOrganization() {
221+
const userProfile = _.get(this.activatedRoute, 'snapshot.parent.data.configService.userProfile')
222+
this.rootOrgId = userProfile.rootOrgId
220223
let payload: any = {
221224
orgName: this.controls['organisationName']?.value || "",
222225
channel: this.controls['organisationName']?.value || "",
@@ -227,8 +230,10 @@ export class CreateOrganisationComponent implements OnInit, OnDestroy {
227230
logo: this.uploadedLogoResponse?.qrcodepath || "",
228231
description: this.controls['description']?.value || "",
229232
parentMapId: "",
233+
sbRootOrgId: this.rootOrgId
234+
230235
}
231-
// if (this.heirarchyObject.sbRootOrgId) {
236+
// if (this.heirarchyObject && this.heirarchyObject.sbRootOrgId) {
232237
// payload['sbRootOrgId'] = this.heirarchyObject.sbRootOrgId
233238
// }
234239
if (this.controls['category']?.value === 'state') {

0 commit comments

Comments
 (0)