{"version":3,"file":"projects_vr-public-website_src_app_features_labsiteInformation_labsiteInformation_module_ts.fb63c32b6b7a54ad.js","mappings":"qaAEIA,iBACIA,iBACJA,+BADSA,sEAHbA,iBAEIA,uBAGJA,8BAH4BA,qDCctB,MAAOC,EAAP,MAKJC,YACUC,EACDC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAPCC,aACDA,iCACAA,eACAA,+BACAA,sBACAA,wBACAA,iBACAA,sBAVTA,iBAAsB,EAatB,CACAC,WAEED,KAAKE,YAAcF,KAAKL,wBAAwBQ,iBAChDH,KAAKR,MAAMY,OAAOC,UAAUC,IAC1BN,KAAKO,YAAcD,EAAYC,YAC/BP,KAAKQ,sBAAsBF,EAAYC,aACvCP,KAAKD,eAAeU,YAAYT,KAAKO,YAAaP,KAAKE,YAAW,EAEtE,CAEAM,sBAAsBD,GAChBP,KAAKE,cACPF,KAAKN,QAAQgB,MAAK,GACbV,KAAKL,wBAAwBgB,iBAgBhCX,KAAKP,0BAA0Be,sBAAsBR,KAAKL,wBAAwBQ,iBAAkBI,GAAaF,UAAWO,IACrHA,EAASC,UAKZb,KAAKJ,eAAekB,MAAMd,KAAKH,iBAAiBkB,QAAQ,4DAA4D,GACpHf,KAAKN,QAAQgB,MAAK,KALlBV,KAAKgB,mBAAqBJ,EAC1BZ,KAAKiB,QAAUjB,KAAKF,UAAUoB,wBAAwBlB,KAAKgB,mBAAmBC,SAC9EjB,KAAKN,QAAQgB,MAAK,GAAK,EAKxB,KACDV,KAAKJ,eAAekB,MAAMd,KAAKH,iBAAiBkB,QAAQ,4DAA4D,GACpHf,KAAKN,QAAQgB,MAAK,EAAK,GA1BzBV,KAAKP,0BAA0B0B,8BAA8BnB,KAAKL,wBAAwBQ,iBAAkBI,GAAaF,UAAWO,IAClI,GAAIA,EAAU,CACZ,MAAMQ,EAAkC,CAAEP,UAAU,EAAOQ,cAAc,EAAOJ,QAASL,EAASK,SAClGjB,KAAKgB,mBAAqBI,EAC1BpB,KAAKiB,QAAUjB,KAAKF,UAAUoB,wBAAwBlB,KAAKgB,mBAAmBC,SAC9EjB,KAAKN,QAAQgB,MAAK,EAAK,MAEvBV,KAAKJ,eAAekB,MAAMd,KAAKH,iBAAiBkB,QAAQ,4DAA4D,GACpHf,KAAKN,QAAQgB,MAAK,EAAK,EAExB,KACDV,KAAKJ,eAAekB,MAAMd,KAAKH,iBAAiBkB,QAAQ,4DAA4D,GACpHf,KAAKN,QAAQgB,MAAK,EAAK,GAkB/B,GA7DI,IAAOpB,EAAPgC,wCAAOhC,GAA2BiC,qHAA3BjC,EAA2BkC,8NDhBxCnC,4BAAsBA,iQEQtB,MAAMoC,EAAiB,CACrB,CACEC,KAAM,GACNC,UAAWrC,IAeFsC,EAAP,YAAOA,EAAPC,EACGA,aAAa,CAClBC,KAAMxC,yCAFGsC,EAAiC,0BAAjCA,gCAPTG,cAAsBN,GACtBO,KACAC,IACAC,IACAC","names":["i0","LabsiteInformationComponent","constructor","route","labsiteInformationService","spinner","globalRepositoryService","messageService","translateService","sanitized","loggingService","this","ngOnInit","labSiteCode","getLabsiteCode","params","subscribe","routeParams","contentType","getLabsiteInformation","logPageView","show","volunteerEmailId","response","hasError","alert","instant","labsiteInformation","content","bypassSecurityTrustHtml","getLabsiteInformationFromBlob","labsiteInfo","errorMessage","_LabsiteInformationComponent","core","selectors","routes","path","component","LabsiteInformationComponentModule","_LabsiteInformationComponentModule","lazy","RouterModule","CommonModule","MaterialModule","SharedModule","TranslateModule"],"sourceRoot":"webpack:///","sources":["./projects/vr-public-website/src/app/features/labsiteInformation/labsiteInformation.component.html","./projects/vr-public-website/src/app/features/labsiteInformation/labsiteInformation.component.ts","./projects/vr-public-website/src/app/features/labsiteInformation/labsiteInformation.module.ts"],"sourcesContent":["
\r\n\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { GlobalRepositoryService } from '../../core/repository/global-repository.service';\r\nimport { SpinnerService } from '../../core/spinner/spinner.service';\r\nimport { LoggingService } from '../../main/services/logging.service';\r\nimport { MessageService } from '../../main/services/message.service';\r\nimport { LabsiteInformation } from './labsiteInformation.model';\r\nimport { LabsiteInformationService } from './labsiteInformation.service';\r\n\r\n@Component({\r\n selector: 'anms-labsite-information',\r\n templateUrl: './labsiteInformation.component.html',\r\n styleUrls: ['./labsiteInformation.component.scss'],\r\n})\r\nexport class LabsiteInformationComponent implements OnInit {\r\n labSiteCode?: string;\r\n content : any;\r\n contentType: string = '';\r\n labsiteInformation !: LabsiteInformation;\r\n constructor(\r\n private route: ActivatedRoute,\r\n public labsiteInformationService: LabsiteInformationService,\r\n public spinner: SpinnerService,\r\n public globalRepositoryService: GlobalRepositoryService,\r\n public messageService: MessageService,\r\n public translateService: TranslateService,\r\n public sanitized: DomSanitizer,\r\n public loggingService: LoggingService\r\n ) {\r\n\r\n }\r\n ngOnInit(): void { \r\n \r\n this.labSiteCode = this.globalRepositoryService.getLabsiteCode();\r\n this.route.params.subscribe(routeParams => { \r\n this.contentType = routeParams.contentType;\r\n this.getLabsiteInformation(routeParams.contentType);\r\n this.loggingService.logPageView(this.contentType, this.labSiteCode);\r\n });\r\n }\r\n\r\n getLabsiteInformation(contentType: string) { \r\n if (this.labSiteCode) {\r\n this.spinner.show(true);\r\n if (!this.globalRepositoryService.volunteerEmailId) {\r\n this.labsiteInformationService.getLabsiteInformationFromBlob(this.globalRepositoryService.getLabsiteCode(), contentType).subscribe((response: any) => {\r\n if (response) {\r\n const labsiteInfo: LabsiteInformation = { hasError: false, errorMessage: false, content: response.content};\r\n this.labsiteInformation = labsiteInfo;\r\n this.content = this.sanitized.bypassSecurityTrustHtml(this.labsiteInformation.content);\r\n this.spinner.show(false);\r\n } else {\r\n this.messageService.alert(this.translateService.instant('LabsiteInformation.ErrorWhileFetchingLabsiteInformation'), true);\r\n this.spinner.show(false);\r\n }\r\n }, () => {\r\n this.messageService.alert(this.translateService.instant('LabsiteInformation.ErrorWhileFetchingLabsiteInformation'), true);\r\n this.spinner.show(false);\r\n });\r\n } else {\r\n this.labsiteInformationService.getLabsiteInformation(this.globalRepositoryService.getLabsiteCode(), contentType).subscribe((response: LabsiteInformation) => {\r\n if (!response.hasError) {\r\n this.labsiteInformation = response;\r\n this.content = this.sanitized.bypassSecurityTrustHtml(this.labsiteInformation.content);\r\n this.spinner.show(false);\r\n } else {\r\n this.messageService.alert(this.translateService.instant('LabsiteInformation.ErrorWhileFetchingLabsiteInformation'), true);\r\n this.spinner.show(false);\r\n }\r\n }, () => {\r\n this.messageService.alert(this.translateService.instant('LabsiteInformation.ErrorWhileFetchingLabsiteInformation'), true);\r\n this.spinner.show(false);\r\n });\r\n }\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MaterialModule } from '../../shared/material.module';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { SharedModule } from '../../shared/shared.module';\r\nimport { LabsiteInformationComponent } from './labsiteInformation.component';\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n component: LabsiteInformationComponent\r\n }\r\n];\r\n\r\n\r\n@NgModule({\r\n declarations: [LabsiteInformationComponent],\r\n imports: [\r\n RouterModule.forChild(routes),\r\n CommonModule,\r\n MaterialModule,\r\n SharedModule,\r\n TranslateModule\r\n ]\r\n})\r\nexport class LabsiteInformationComponentModule {\r\n static components = {\r\n lazy: LabsiteInformationComponent\r\n };\r\n}\r\n"],"x_google_ignoreList":[]}