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CAA1BA,EAA0B,EAA1BA,EAA0B,sBAA1BA,MAA0B,0BALnCC,KACAC,gBAAuBhG,EAA2BqB,GAClD4E,gBAAyB,CAACd,OAGjBW,CAA0B,KCM1BI,EAAqB,MAA5B,MAAOA,YAAqB,oCAArBA,EAAqB,EAArBA,EAAqB,sBAArBA,MAAqB,0BAP9BC,IACAJ,KACAK,KACAnB,EACAa,KAGSI,CAAqB","names":["supplierProfileFeatureKey","reducer","createReducer","questionAnswerMappings","initialState","on","loadSupplierProfileQuestionAnswerMappingsSuccess","state","addSupplierProfileFormAnswers","supplierProfileFormAnswers","map","qap","q","find","fa","questionId","model","text","questionChoiceIds","selectedQuestionChoiceIds","updateSupplierProfileFormAnswers","supplierProfileReducer","action","selectSupplierProfileState","createFeatureSelector","fromSupplierProfile","questions","company","selectSupplierProfileQuestions","createSelector","selectUrl","url","view","split","pop","Object","keys","includes","filter","i0","routes","path","component","SupplierProfileComponent","constructor","router","store","this","dispatch","loadSupplierProfileQuestionAnswerMappings","formFields$","select","pipe","qam","FormField","value","getFieldValue","controlType","questionType","key","toString","label","question","options","responseOptions","routerSubscription","events","subscribe","event","NavigationEnd","window","scrollTo","isContact","ngOnDestroy","unsubscribe","core","selectors","canActivate","ClientAccessGuard","title","children","SupplierProfileRoutingModule","RouterModule","SupplierProfileEffects","actions$","profileService","createEffect","ofType","switchMap","getSupplierProfileQuestionAnswerMappings","payload","addSupplierProfileFormAnswersSuccess","updateSupplierProfileFormAnswersSuccess","factory","SupplierProfileStoreModule","CommonModule","StoreModule","EffectsModule","SupplierProfileModule","ProfileModule","SharedModule"],"sourceRoot":"webpack:///","sources":["./src/app/profile/supplier-profile/store/reducers/supplier-profile.reducers.ts","./src/app/profile/supplier-profile/store/selectors/supplier-profile-state.selectors.ts","./src/app/profile/supplier-profile/supplier-profile/supplier-profile.component.html","./src/app/profile/supplier-profile/supplier-profile-routing.module.ts","./src/app/profile/supplier-profile/supplier-profile/supplier-profile.component.ts","./src/app/profile/supplier-profile/store/effects/supplier-profile.effects.ts","./src/app/profile/supplier-profile/store/supplier-profile-store.module.ts","./src/app/profile/supplier-profile/supplier-profile.module.ts"],"sourcesContent":["import { Action, createReducer, on } from '@ngrx/store';\r\nimport {\r\n addSupplierProfileFormAnswers,\r\n loadSupplierProfileQuestionAnswerMappingsSuccess,\r\n updateSupplierProfileFormAnswers,\r\n} from '../actions';\r\nimport { IProfileQuestionAnswerMapping } from 'src/app/profile/models/profile-question-answer-mapping.model';\r\n\r\nexport const supplierProfileFeatureKey = 'supplierProfile';\r\n\r\nexport interface SupplierProfileState {\r\n questionAnswerMappings: IProfileQuestionAnswerMapping[];\r\n}\r\n\r\n// initialize state to null indicating that profile is being loaded from the server\r\nconst initialState: SupplierProfileState = {\r\n questionAnswerMappings: []\r\n};\r\n\r\nconst reducer = createReducer(\r\n initialState,\r\n\r\n on(loadSupplierProfileQuestionAnswerMappingsSuccess, (state, { questionAnswerMappings }) => ({\r\n ...state,\r\n questionAnswerMappings,\r\n })),\r\n\r\n on(addSupplierProfileFormAnswers, (state, { supplierProfileFormAnswers }) => ({\r\n ...state,\r\n questionAnswerMappings: state.questionAnswerMappings.map((qap) => {\r\n const q = supplierProfileFormAnswers.find((fa) => fa.questionId === qap.questionId);\r\n if (!q) return {...qap};\r\n\r\n let model = {...qap};\r\n if (q?.text) model.text = q.text;\r\n if (q?.questionChoiceIds) model.selectedQuestionChoiceIds = q.questionChoiceIds;\r\n return model;\r\n }),\r\n })),\r\n\r\n on(updateSupplierProfileFormAnswers, (state, { supplierProfileFormAnswers }) => ({\r\n ...state,\r\n questionAnswerMappings: state.questionAnswerMappings.map((qap) => {\r\n const q = supplierProfileFormAnswers.find((fa) => fa.questionId === qap.questionId);\r\n if (!q) return {...qap};\r\n\r\n let model = {...qap};\r\n if (q?.text) model.text = q.text;\r\n if (q?.questionChoiceIds) model.selectedQuestionChoiceIds = q.questionChoiceIds;\r\n return model;\r\n }),\r\n })),\r\n\r\n);\r\n\r\nexport function supplierProfileReducer(state: SupplierProfileState, action: Action) {\r\n return reducer(state, action);\r\n}\r\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\r\nimport * as fromSupplierProfile from '../reducers/supplier-profile.reducers';\r\nimport { selectUrl } from '@core';\r\n\r\nconst selectSupplierProfileState = createFeatureSelector(\r\n fromSupplierProfile.supplierProfileFeatureKey\r\n);\r\n\r\nconst questions = {\r\n 'company': [33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47],\r\n 'service-delivery': [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61],\r\n 'clients-and-leads': [62, 63, 64, 65, 66],\r\n 'primary-contact-information': [195, 196, 197, 198, 199, 200, 201]\r\n}\r\nexport const selectSupplierProfileQuestions = createSelector(\r\n selectSupplierProfileState,\r\n selectUrl,\r\n (state, url) => {\r\n const view = url.split('/').pop() as 'company' | 'service-delivery' | 'clients-and-leads' | 'primary-contact-information';\r\n return Object.keys(questions).includes(view)\r\n ? state.questionAnswerMappings.filter(q => questions[view].includes(q.questionId))\r\n : [];\r\n }\r\n)\r\n","
\r\n profile\r\n

\r\n please fill out the fields below so that the information can be shared when selected for a lead!\r\n

\r\n \r\n

\r\n in order to enhance your experience with Dot to Dot and maximize your matching potential, complete your profile\r\n below!\r\n

\r\n
\r\n\r\n \r\n
\r\n","import { NgModule } from '@angular/core';\r\nimport { RouterModule, Routes } from '@angular/router';\r\n\r\nimport { SupplierProfileComponent } from './supplier-profile/supplier-profile.component';\r\nimport { ClientAccessGuard } from '@core';\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n component: SupplierProfileComponent,\r\n canActivate: [ClientAccessGuard],\r\n title: 'Supplier profile',\r\n children: [\r\n {\r\n path: 'company',\r\n children: []\r\n },\r\n\r\n {\r\n path: 'service-delivery',\r\n children: []\r\n },\r\n\r\n {\r\n path: 'clients-and-leads',\r\n children: []\r\n },\r\n\r\n {\r\n path: 'primary-contact-information',\r\n children: []\r\n }\r\n ],\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule],\r\n})\r\nexport class SupplierProfileRoutingModule {}\r\n","import { Component, OnDestroy } from '@angular/core';\r\nimport { NavigationEnd, Router } from '@angular/router';\r\nimport { SupplierProfileState } from '../store/reducers/supplier-profile.reducers';\r\nimport { Store } from '@ngrx/store';\r\nimport { Observable, map } from 'rxjs';\r\nimport { loadSupplierProfileQuestionAnswerMappings } from '../store/actions';\r\nimport { FormField } from '../../models/form-field.model';\r\nimport { selectSupplierProfileQuestions } from '../store/selectors/supplier-profile-state.selectors';\r\nimport { IProfileQuestionAnswerMapping } from '../../models/profile-question-answer-mapping.model';\r\n\r\n@Component({\r\n selector: 'maas-supplier-profile',\r\n templateUrl: './supplier-profile.component.html',\r\n styleUrls: ['./supplier-profile.component.scss'],\r\n})\r\nexport class SupplierProfileComponent implements OnDestroy {\r\n routerSubscription: any;\r\n formFields$: Observable[]>;\r\n isContact = false;\r\n\r\n constructor(\r\n private router: Router,\r\n private store: Store) {\r\n this.store.dispatch(loadSupplierProfileQuestionAnswerMappings())\r\n\r\n this.formFields$ = this.store\r\n .select(selectSupplierProfileQuestions).pipe(\r\n map((state) =>\r\n state\r\n .map((qam) => {\r\n const field = new FormField({\r\n value: this.getFieldValue(qam),\r\n controlType: qam.questionType,\r\n key: qam.questionId.toString(),\r\n label: qam.question,\r\n options: qam.responseOptions,\r\n });\r\n\r\n return field;\r\n })\r\n )\r\n );\r\n\r\n this.routerSubscription = this.router.events.subscribe((event) => {\r\n if (event instanceof NavigationEnd) {\r\n window.scrollTo(0, 0);\r\n this.isContact = event.url.split('/').pop() == 'primary-contact-information'\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.routerSubscription.unsubscribe();\r\n }\r\n\r\n private getFieldValue(qam: IProfileQuestionAnswerMapping): string | number[] | number {\r\n switch (qam.questionType) {\r\n case 'single':\r\n return qam.selectedQuestionChoiceIds !== null ? qam.selectedQuestionChoiceIds[0] : '';\r\n case 'slider':\r\n return qam.selectedQuestionChoiceIds !== null ? qam.selectedQuestionChoiceIds[0] : '';\r\n case 'text':\r\n return qam.text;\r\n case 'year':\r\n return qam.text;\r\n default:\r\n return qam.selectedQuestionChoiceIds;\r\n }\r\n }\r\n}\r\n","import { ProfileFormService } from 'src/app/profile/services/profile-form-service';\r\nimport { Injectable } from '@angular/core';\r\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\r\nimport {\r\n loadSupplierProfileQuestionAnswerMappings,\r\n addSupplierProfileFormAnswers,\r\n addSupplierProfileFormAnswersSuccess,\r\n updateSupplierProfileFormAnswers,\r\n updateSupplierProfileFormAnswersSuccess,\r\n loadSupplierProfileQuestionAnswerMappingsSuccess\r\n} from '../actions';\r\nimport { map, switchMap } from 'rxjs/operators';\r\n\r\n@Injectable()\r\nexport class SupplierProfileEffects {\r\n\r\n loadSupplierProfileQuestionChoiceMappings$ = createEffect(() =>\r\n this.actions$.pipe(\r\n ofType(loadSupplierProfileQuestionAnswerMappings),\r\n switchMap(() =>\r\n this.profileService.getSupplierProfileQuestionAnswerMappings().pipe(\r\n map(questionAnswerMappings =>\r\n loadSupplierProfileQuestionAnswerMappingsSuccess({ questionAnswerMappings })\r\n ))\r\n )\r\n ));\r\n\r\n addsupplierProfileFormAnswers$ = createEffect(() =>\r\n this.actions$.pipe(\r\n ofType(addSupplierProfileFormAnswers),\r\n switchMap((payload) =>\r\n this.profileService.addSupplierProfileFormAnswers(payload.supplierProfileFormAnswers).pipe(\r\n map((supplierProfileFormAnswers) => addSupplierProfileFormAnswersSuccess({ supplierProfileFormAnswers })))\r\n )));\r\n\r\n updateSupplierProfileFormAnswers$ = createEffect(() =>\r\n this.actions$.pipe(\r\n ofType(updateSupplierProfileFormAnswers),\r\n switchMap((payload) =>\r\n this.profileService.updateSupplierProfileFormAnswers(payload.supplierProfileFormAnswers).pipe(\r\n map((supplierProfileFormAnswers) => updateSupplierProfileFormAnswersSuccess({ supplierProfileFormAnswers })))\r\n )));\r\n\r\n constructor(\r\n private actions$: Actions,\r\n private profileService: ProfileFormService\r\n ) {}\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { StoreModule } from '@ngrx/store';\r\nimport { supplierProfileFeatureKey, supplierProfileReducer } from '../../supplier-profile/store/reducers/supplier-profile.reducers';\r\nimport { EffectsModule } from '@ngrx/effects';\r\nimport { SupplierProfileEffects } from './effects/supplier-profile.effects';\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule,\r\n StoreModule.forFeature(supplierProfileFeatureKey, supplierProfileReducer),\r\n EffectsModule.forFeature([SupplierProfileEffects])\r\n ],\r\n})\r\nexport class SupplierProfileStoreModule {}\r\n","import { ProfileModule } from './../profile.module';\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { SupplierProfileRoutingModule } from './supplier-profile-routing.module';\r\nimport { SupplierProfileComponent } from './supplier-profile/supplier-profile.component';\r\nimport { SharedModule } from '@shared';\r\nimport { SupplierProfileStoreModule } from '../supplier-profile/store/supplier-profile-store.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n SupplierProfileComponent,\r\n ],\r\n imports: [\r\n ProfileModule,\r\n CommonModule,\r\n SharedModule,\r\n SupplierProfileRoutingModule,\r\n SupplierProfileStoreModule,\r\n ]\r\n})\r\nexport class SupplierProfileModule { }\r\n"],"x_google_ignoreList":[]}