Skip to content

Commit

Permalink
Merge pull request #170 from KB-iGOT/sbRootOrgId-param-added
Browse files Browse the repository at this point in the history
sbRootOrgId-param-added for create org
  • Loading branch information
vishnubansaltarento authored Jan 22, 2025
2 parents 8b981fd + 03a3162 commit 9f6656c
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export class CreateOrganisationComponent implements OnInit, OnDestroy {
uploadedLogoResponse!: IUploadedLogoresponse
organizationNameList: string[] = []
ORG_NAME_PATTERN = /^[a-zA-Z0-9 ().,@\-\$\/\\:\[\]!\s]*$/
rootOrgId: any

untilDestroyed$ = new Subject<void>();
isMatcompleteOpened = false
Expand All @@ -56,7 +57,7 @@ export class CreateOrganisationComponent implements OnInit, OnDestroy {
private snackBar: MatSnackBar,
private createMDOService: CreateMDOService,
private activatedRoute: ActivatedRoute,
private loaderService: LoaderService
private loaderService: LoaderService,
) {

this.addOverflowHidden()
Expand Down Expand Up @@ -217,6 +218,8 @@ export class CreateOrganisationComponent implements OnInit, OnDestroy {
}

onSubmitCreateOrganization() {
const userProfile = _.get(this.activatedRoute, 'snapshot.parent.data.configService.userProfile')
this.rootOrgId = userProfile.rootOrgId
let payload: any = {
orgName: this.controls['organisationName']?.value || "",
channel: this.controls['organisationName']?.value || "",
Expand All @@ -227,8 +230,10 @@ export class CreateOrganisationComponent implements OnInit, OnDestroy {
logo: this.uploadedLogoResponse?.qrcodepath || "",
description: this.controls['description']?.value || "",
parentMapId: "",
sbRootOrgId: this.rootOrgId

}
// if (this.heirarchyObject.sbRootOrgId) {
// if (this.heirarchyObject && this.heirarchyObject.sbRootOrgId) {
// payload['sbRootOrgId'] = this.heirarchyObject.sbRootOrgId
// }
if (this.controls['category']?.value === 'state') {
Expand Down

0 comments on commit 9f6656c

Please sign in to comment.