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ACxFlO,KAAKkN,IAAIiB,gBAGJC,aAAaC,GACdrO,KAAKsO,YACPtO,KAAKuO,WAAWF,GAIpBG,iBAAiBC,GACfzO,KAAKyN,SAAWgB,EAGlBC,kBAAkBD,GAChBzO,KAAK0N,UAAYe,EAGnBF,WAAWhB,GACLA,IACFvN,KAAKuN,MAAQA,EACbvN,KAAK6N,UAAY7N,KAAKmN,eAAeW,aAAa9N,KAAK+N,IAAKR,EAAOvN,KAAKiO,MAAOjO,KAAKkO,SACpFlO,KAAKkN,IAAIiB,+DAnEFlB,GAAmBhJ,kDAAnBgJ,EAAmB0B,0KARnB,CACT,CACEC,QAASC,KACTC,aAAaC,SAAW,IAAM9B,GAC9B+B,OAAO,MAEVC,6ID3BHhL,oCAA4BA,iIC6BfgJ,GAAb","names":["InstructorStoreEffects","constructor","router","instructorApiService","actions$","store","effectHelperService","this","createEffect","pipe","ofType","fromAction","switchMap","payload","fetchInstructorById","id","includes","map","instructor","handleSuccess","handleError","instructorFeatureKey","getOwnInfo","registerInstructor","updateInstructor","silent","AlertMessageType","status","navigate","instructorId","media","uploadInstructorMedia","medias","file","tags","category","isDefault","name","deleteMedia","fileName","_","fetchCourseTemplate","courseTemplates","updateCourseTemplate","courseTemplate","mergeMap","filter","getInstructorReviews","response","dispatch","reviewCount","total","instructorReviews","items","sendInstructorReview","review","instructorFilters","instructorPagination","getAllInstructors","concatMap","instructors","totalCount","Number","concatLatestFrom","select","getInstructorPagination","getInstructorFilters","pageSize","pageIndex","Object","filters","pagination","i0","factory","initialState","adapter","instructorProfile","adapterInstructorReviews","error","InstructorFilter","INSTRUCTOR_PAGE_SIZE","reducer","createReducer","on","state","omit","template","concat","changes","action","InstructorClientModule","InstructorStoreService","InstructorResolver","InstructorsResolver","imports","StoreModule","instructorStoreReducer","EffectsModule","SharedModule","RouterModule","guideStoreService","resolve","route","guideId","paramMap","get","getInstructorById","tap","guide","InstructorIncludeType","first","instructorStoreService","pagination$","filter$","getTotalCount","withLatestFrom","fetchInstructors","InstructorActions","FetchInstructorById","createAction","FetchInstructor","props","GetInstructorReviews","FetchInstructorProfile","SaveInstructor","AddInstructor","EditInstructor","SaveInstructorReview","CompleteInstructor","SaveProfileMedia","UploadInstructorMedia","SaveInstructorMedia","RemoveInstructorMedia","FetchCourseTemplate","EditCourseTemplate","EditInstructorReviewCount","AddInstructorProfile","RemoveInstructorProfile","UpdateInstructorProfile","FetchInstructors","AddInstructors","AddInstructorTotalCount","FetchInstructorsPaginated","AddInstructorPagination","FetchInstructorsFiltered","AddInstructorFilter","RemoveAllInstructors","ResetInstructorFilter","AddInstructorReviews","AddInstructorReviewsFail","AddInstructorMedia","UpdateInstructor","DeleteInstructor","DeleteInstructorMedia","AddCourseTemplate","AddDefaultImage","UpdateCourseTemplate","AddError","RemoveInstructorReviews","createEntityAdapter","selectId","selectAll","selectTotal","selectTotalLoadedInstructorReviews","selectAllReviews","getInstructorState","createFeatureSelector","createSelector","entities","getInstructorProfile","getCourseTemplates","getInstructorReviewsState","getTotaLoadedInstructorReviews","getIsAllLoaded","A","ids","_a","length","I","completeInstructor","saveDefaultMedia","uploadMedia","fromSelector","setInstructorProfile","fetchInstructorProfile","removeInstructorMedia","removeInstructorProfile","getCourseTemplate","fetchInstructorReviews","submitInstructorReview","getTotalLoadedInstructorReviews","removeInstructorReviews","getInstructors","addTotalCount","data","fetchInstructorsPaginated","fetchInstructorsFiltered","instructorFilter","resetInstructorState","resetInstructorFilter","search","regions","templates","categories","sort","includeDraft","includeRejected","includeApprove","includeBlocked","includePending","includeReturned","InstructorFilters","TEMPLATE","CATEGORY","REGION","COURSETYPE","StarRatingComponent","cdr","raetingService","EmptyStarColor","FullStarColor","Padding","value","val","onChange","onTouched","ngOnInit","detach","lstOfIcon","getIconsData","max","rate","color","options","detectChanges","setStarValue","index","isEditable","writeValue","registerOnChange","fn","registerOnTouched","selectors","provide","NG_VALUE_ACCESSOR","useExisting","forwardRef","multi","decls"],"sources":["./src/app/modules/instructor/client/store/instructor.effects.ts","./src/app/modules/instructor/client/store/instructor.reducer.ts","./src/app/modules/instructor/client/instructor.client.module.ts","./src/app/modules/instructor/client/resolver/instructor.resolver.ts","./src/app/modules/instructor/client/resolver/instructors.resolver.ts","./src/app/modules/instructor/client/store/instructor.action.ts","./src/app/modules/instructor/client/store/instructor.entity.ts","./src/app/modules/instructor/client/store/instructor.selector.ts","./src/app/modules/instructor/client/store/instructor.state.ts","./src/app/modules/instructor/client/store/instructor.store.service.ts","./src/app/modules/instructor/enums/instructor-include-type.ts","./src/app/modules/instructor/models/instructor-filter.ts","./src/app/modules/instructor/models/instructor-pagination.ts","./src/app/modules/shared/library/star-rank/components/star-rating/star-rating.component.html","./src/app/modules/shared/library/star-rank/components/star-rating/star-rating.component.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Actions, concatLatestFrom, createEffect, ofType } from '@ngrx/effects';\nimport { Action, Store } from '@ngrx/store';\nimport { Observable } from 'rxjs';\nimport { concatMap, map, mergeMap, switchMap } from 'rxjs/operators';\nimport { InstructorApiService } from '../services/instructor.api.service';\nimport * as fromAction from './instructor.action';\nimport { getInstructorFilters, getInstructorPagination } from \"@modules/instructor/client/store/instructor.selector\";\nimport { instructorFeatureKey } from './instructor.state';\nimport { AlertMessageType } from '@modules/shared/enums/alert-message-type';\nimport { EffectHelperService } from '@modules/core/services/effect-helper.service';\n\n@Injectable()\nexport class InstructorStoreEffects {\n constructor(\n private router: Router,\n private instructorApiService: InstructorApiService,\n private actions$: Actions,\n private store: Store,\n private effectHelperService: EffectHelperService\n\n ) {}\n\n\n getByIdEffect$: Observable = createEffect(() => this.actions$.pipe(\n ofType(fromAction.FetchInstructorById),\n switchMap((payload) =>\n this.instructorApiService\n .fetchInstructorById(payload.id, payload.includes)\n .pipe(\n map((instructor) => this.effectHelperService.handleSuccess(fromAction.AddInstructorProfile({ instructor }))),\n this.effectHelperService.handleError(fromAction.AddError, true, instructorFeatureKey)\n )\n )\n ));\n\n\n fetchInstructorProfile$: Observable = createEffect(() => this.actions$.pipe(\n ofType(fromAction.FetchInstructorProfile),\n switchMap((payload) =>\n this.instructorApiService.getOwnInfo().pipe(\n map((instructor) => this.effectHelperService.handleSuccess(fromAction.AddInstructorProfile({ instructor }))),\n this.effectHelperService.handleError(fromAction.AddError, false, instructorFeatureKey)\n )\n )\n ));\n\n\n registerInstructor$: Observable = createEffect(() => this.actions$.pipe(\n ofType(fromAction.SaveInstructor),\n switchMap((payload) =>\n this.instructorApiService.registerInstructor(payload.instructor).pipe(\n map((instructor) => this.effectHelperService.handleSuccess(fromAction.AddInstructorProfile({ instructor }), true, 'Grunnleggende informasjon om instruktøren er lagret!' )),\n this.effectHelperService.handleError(fromAction.AddError, true, instructorFeatureKey)\n )\n )\n ));\n\n\n editInstructor$: Observable = createEffect(() => this.actions$.pipe(\n ofType(fromAction.EditInstructor),\n switchMap((payload) =>\n this.instructorApiService.updateInstructor(payload.id, payload.instructor).pipe(\n map((instructor) => {\n if (!payload.silent) return this.effectHelperService.handleSuccess(fromAction.UpdateInstructorProfile({ instructor }), true, `the_instructor_profile_has_been_updated`, instructorFeatureKey, AlertMessageType.SAVED)\n else return this.effectHelperService.handleSuccess(fromAction.UpdateInstructorProfile({ instructor }));\n }),\n this.effectHelperService.handleError(fromAction.AddError, true, instructorFeatureKey)\n )\n )\n ));\n\n\n completeInstructor$: Observable = createEffect(() => this.actions$.pipe(\n ofType(fromAction.CompleteInstructor),\n switchMap((payload) =>\n this.instructorApiService.updateInstructor(payload.id, payload.instructor).pipe(\n map((instructor) => {\n if (instructor.status === 'verified') {\n this.router.navigate(['/instruktor/soknad-sendt']);\n }\n return this.effectHelperService.handleSuccess(fromAction.UpdateInstructorProfile({ instructor }), true, `congratulations_your_application_has_been_submitted`, instructorFeatureKey, AlertMessageType.SENT);\n }),\n this.effectHelperService.handleError(fromAction.AddError, true, instructorFeatureKey)\n )\n )\n ));\n\n\n saveProfileMedia$: Observable = createEffect(() => this.actions$.pipe(\n ofType(fromAction.SaveProfileMedia),\n switchMap(({ instructorId, media }) =>\n this.instructorApiService\n .uploadInstructorMedia(instructorId, media, 'profile image', 'profile')\n .pipe(\n map((medias) => this.effectHelperService.handleSuccess(fromAction.AddInstructorMedia({ medias }))),\n this.effectHelperService.handleError(fromAction.AddError, true, instructorFeatureKey)\n )\n )\n ));\n\n\n uploadInstructorMedia$: Observable = createEffect(() => this.actions$.pipe(\n ofType(fromAction.UploadInstructorMedia),\n switchMap((payload) =>\n this.instructorApiService\n .uploadInstructorMedia(\n payload.instructorId,\n payload.file,\n payload.tags,\n payload.category,\n payload.isDefault\n )\n .pipe(\n map((medias) => this.effectHelperService.handleSuccess(fromAction.AddInstructorMedia({ medias }))),\n this.effectHelperService.handleError(fromAction.AddError, true, instructorFeatureKey)\n )\n )\n ));\n\n\n removeInstructorMedia$: Observable = createEffect(() => this.actions$.pipe(\n ofType(fromAction.RemoveInstructorMedia),\n switchMap(({ instructorId, name }) =>\n this.instructorApiService.deleteMedia(instructorId, name).pipe(\n map(() => this.effectHelperService.handleSuccess(fromAction.DeleteInstructorMedia({ instructorId, fileName: name }))),\n this.effectHelperService.handleError(fromAction.AddError, true, instructorFeatureKey)\n )\n )\n ));\n\n\n fetchCourseTemplate$: Observable = createEffect(() => this.actions$.pipe(\n ofType(fromAction.FetchCourseTemplate),\n switchMap((_) =>\n this.instructorApiService.fetchCourseTemplate().pipe(\n map((courseTemplates) => this.effectHelperService.handleSuccess(fromAction.AddCourseTemplate({ courseTemplates }))),\n this.effectHelperService.handleError(fromAction.AddError, true, instructorFeatureKey)\n )\n )\n ));\n\n updateInstructorCourseTemplate$: Observable = createEffect(() => this.actions$.pipe(\n ofType(fromAction.EditCourseTemplate),\n switchMap(({ instructorId, courseTemplates }) =>\n this.instructorApiService\n .updateCourseTemplate(instructorId, courseTemplates).pipe(\n map((courseTemplate) => this.effectHelperService.handleSuccess(fromAction.UpdateCourseTemplate({ courseTemplate }))),\n this.effectHelperService.handleError(fromAction.AddError, true, instructorFeatureKey)\n )\n ))\n );\n\n fetchInstructorReviews$: Observable = createEffect(() =>\n this.actions$.pipe(\n ofType(fromAction.GetInstructorReviews),\n mergeMap(({ id, filter }) =>\n this.instructorApiService.getInstructorReviews(id, filter).pipe(\n map((response) => {\n this.store.dispatch(fromAction.EditInstructorReviewCount({ instructorId: id, reviewCount: response.total }));\n return this.effectHelperService.handleSuccess(fromAction.AddInstructorReviews({ instructorReviews: response.items }))\n }),\n this.effectHelperService.handleError(fromAction.AddError, true, instructorFeatureKey)\n )\n )\n )\n );\n\n saveInstructorReview$: Observable = createEffect(() =>\n this.actions$.pipe(\n ofType(fromAction.SaveInstructorReview),\n switchMap((payload) =>\n this.instructorApiService\n .sendInstructorReview(payload.instructorId, payload.review)\n .pipe(\n map((review) => {\n return null;\n }),\n this.effectHelperService.handleError(fromAction.AddError, false, instructorFeatureKey)\n )\n )\n ),{\n dispatch: false\n }\n );\n\n fetchInstructorsEffect$: Observable = createEffect(() =>\n this.actions$.pipe(\n ofType(fromAction.FetchInstructors),\n switchMap(({instructorFilters, instructorPagination}) =>\n this.instructorApiService.getAllInstructors(instructorFilters, instructorPagination).pipe(\n concatMap(({ total, items }) => {\n return [\n this.effectHelperService.handleSuccess(fromAction.AddInstructors({ instructors: items })),\n this.effectHelperService.handleSuccess(fromAction.AddInstructorTotalCount({ totalCount: Number(total) })),\n this.effectHelperService.handleSuccess(fromAction.AddInstructorPagination({ instructorPagination })),\n ];\n }),\n this.effectHelperService.handleError(fromAction.AddError, true, instructorFeatureKey)\n )\n )\n )\n );\n\n updatePaginationEffect$: Observable = createEffect(() =>\n this.actions$.pipe(\n ofType(fromAction.FetchInstructorsPaginated),\n concatLatestFrom(() => [this.store.select(getInstructorPagination), this.store.select(getInstructorFilters)]),\n map(([_, { pageSize, pageIndex }, instructorFilters]) =>\n this.effectHelperService.handleSuccess(fromAction.FetchInstructors({ instructorFilters: { ...instructorFilters }, instructorPagination: { pageSize: pageSize, pageIndex: pageIndex + 1 }}))),\n this.effectHelperService.handleError(fromAction.AddError, true, instructorFeatureKey)\n )\n );\n\n fetchInstructorsFilteredEffect$: Observable = createEffect(() =>\n this.actions$.pipe(\n ofType(fromAction.FetchInstructorsFiltered),\n switchMap(({filters, pagination}) =>\n this.instructorApiService.getAllInstructors(filters, pagination).pipe(\n concatMap(({ total, items }) => {\n return [\n this.effectHelperService.handleSuccess(fromAction.RemoveAllInstructors()),\n this.effectHelperService.handleSuccess(fromAction.AddInstructorFilter({filters: filters})),\n this.effectHelperService.handleSuccess(fromAction.AddInstructors({ instructors: items })),\n this.effectHelperService.handleSuccess(fromAction.AddInstructorTotalCount({ totalCount: Number(total) })),\n this.effectHelperService.handleSuccess(fromAction.AddInstructorPagination({ instructorPagination: pagination }))\n ];\n }),\n this.effectHelperService.handleError(fromAction.AddError, true, instructorFeatureKey)\n )\n )\n )\n );\n\n}\n","import { InstructorState } from './instructor.state';\nimport * as fromAction from './instructor.action';\nimport { adapter, adapterInstructorReviews } from './instructor.entity';\nimport { Action, createReducer, on } from '@ngrx/store';\nimport { InstructorFilter } from \"@modules/instructor/models/instructor-filter\";\nimport { INSTRUCTOR_PAGE_SIZE } from \"@modules/instructor/models/instructor-pagination\";\nimport { omit } from 'lodash';\n\nexport const initialState: InstructorState = adapter.getInitialState({\n instructorProfile: null,\n instructorReviews: {...adapterInstructorReviews.getInitialState()},\n courseTemplates: [],\n error: null,\n totalCount: 0,\n filter: new InstructorFilter(),\n instructorPagination: {\n pageIndex: 0,\n pageSize: INSTRUCTOR_PAGE_SIZE,\n }\n});\n\nconst reducer = createReducer(\n initialState,\n on(fromAction.AddInstructorProfile, (state, { instructor }) => {\n return adapter.addOne(instructor, state);\n }),\n on(fromAction.AddInstructors, (state, { instructors }) => {\n return adapter.addMany(instructors, state);\n }),\n on(fromAction.AddInstructor, (state, {instructor}) => {\n return adapter.upsertOne(instructor,state);\n }),\n on(fromAction.AddInstructorFilter, (state, {filters}) => {\n return adapter.addMany([], { ...state, filter: filters});\n }),\n on(fromAction.AddInstructorPagination, (state, {instructorPagination}) => {\n return {...state, instructorPagination: instructorPagination};\n }),\n on(fromAction.AddInstructorTotalCount, (state, {totalCount}) => {\n return {...state, totalCount};\n }),\n on(fromAction.RemoveAllInstructors, (state) => {\n return {...initialState};\n }),\n on(fromAction.AddError, (state, { error }) => {\n return adapter.addMany([], { ...state, error: error });\n }),\n on(fromAction.AddInstructorProfile, (state, { instructor }) => {\n return adapter.addMany([], { ...state, instructorProfile: instructor });\n }),\n on(fromAction.UpdateInstructorProfile, (state, {instructor}) => {\n return { ...state, instructorProfile: { ...state.instructorProfile, ...omit(instructor, ['courseTemplates', 'medias']) } };\n }),\n on(fromAction.AddCourseTemplate, (state, { courseTemplates }) => {\n return adapter.addMany([], { ...state, courseTemplates });\n }),\n on(fromAction.UpdateCourseTemplate, (state, { courseTemplate }) => {\n return adapter.addMany([], { ...state, courseTemplates: { ...state.courseTemplates.filter(template => template.id != courseTemplate.id), courseTemplate } });\n }),\n on(fromAction.AddInstructorMedia, (state, { medias }) => {\n return { ...state,\n instructorProfile: {\n ...state.instructorProfile,\n medias: state.instructorProfile.medias.concat(medias)\n }\n };\n }),\n on(fromAction.DeleteInstructorMedia, (state, { instructorId, fileName }) => {\n return { ...state,\n instructorProfile: {\n ...state.instructorProfile,\n medias: state.instructorProfile.medias.filter(media => media.name != fileName)\n }\n };\n }),\n on(fromAction.AddInstructorReviews, (state, { instructorReviews }) => {\n return { ...state , instructorReviews: { ...adapterInstructorReviews.upsertMany(instructorReviews,state.instructorReviews) } };\n }),\n on(fromAction.AddInstructorReviewsFail, (state) => {\n return state;\n }),\n on(fromAction.RemoveInstructorReviews, (state) => {\n return { ...state , instructorReviews: { ...adapterInstructorReviews.removeAll({ ...state.instructorReviews}) } };\n }),\n on(fromAction.RemoveInstructorProfile, (state) => {\n return { ...state , instructorProfile: null };\n }),\n on(fromAction.EditInstructorReviewCount, (state, { instructorId, reviewCount }) => {\n return adapter.updateOne({ id: instructorId, changes: { reviewCount } }, state);\n }),\n on(fromAction.ResetInstructorFilter, (state) => {\n return { ...state, filter: new InstructorFilter() };\n })\n);\n\nexport function instructorStoreReducer(state: InstructorState = initialState, action: Action): InstructorState {\n return reducer(state, action);\n}\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { InstructorResolver } from './resolver/instructor.resolver';\nimport { InstructorStoreEffects } from './store/instructor.effects';\nimport { instructorStoreReducer } from './store/instructor.reducer';\nimport { InstructorStoreService } from './store/instructor.store.service';\nimport { SharedModule } from '@shared/shared.module';\nimport { InstructorsResolver } from \"@modules/instructor/client/resolver/instructors.resolver\";\nimport { instructorFeatureKey } from './store/instructor.state';\n\n@NgModule({\n declarations: [],\n exports: [StoreModule, EffectsModule],\n imports: [\n StoreModule.forFeature(instructorFeatureKey, instructorStoreReducer),\n EffectsModule.forFeature([InstructorStoreEffects]),\n SharedModule,\n RouterModule,\n ],\n providers: [\n InstructorStoreService,\n InstructorResolver,\n InstructorsResolver\n ],\n})\nexport class InstructorClientModule {}\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { first, tap } from 'rxjs/operators';\nimport { Instructor } from '../../models/instructor';\nimport { InstructorStoreService } from '../store/instructor.store.service';\nimport { InstructorIncludeType } from '@modules/instructor/enums/instructor-include-type';\n\n@Injectable()\nexport class InstructorResolver implements Resolve {\n constructor(private guideStoreService: InstructorStoreService) {}\n\n resolve(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable {\n const guideId = route.paramMap.get('id');\n return this.guideStoreService.getInstructorById(guideId).pipe(\n tap((guide) => {\n if (!guide) {\n this.guideStoreService.fetchInstructorById(guideId, [ InstructorIncludeType.BASIC, InstructorIncludeType.DEFAULTMEDIA, InstructorIncludeType.REVIEW, InstructorIncludeType.REGION, InstructorIncludeType.TEMPLATE ]);\n }\n }),\n first()\n );\n\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n ActivatedRouteSnapshot, Resolve, RouterStateSnapshot\n} from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { first, map, withLatestFrom } from 'rxjs/operators';\nimport { InstructorStoreService } from '../store/instructor.store.service';\n\n@Injectable()\nexport class InstructorsResolver implements Resolve {\n constructor(private instructorStoreService: InstructorStoreService) {}\n\n resolve(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable {\n\n const pagination$ = this.instructorStoreService.getInstructorPagination();\n const filter$ = this.instructorStoreService.getInstructorFilters();\n\n return this.instructorStoreService.getTotalCount()\n .pipe(\n withLatestFrom(pagination$, filter$),\n map(([total, pagination, filter]) => {\n if(total === 0) {\n this.instructorStoreService.fetchInstructors(filter, pagination);\n }\n return null;\n }),\n first()\n );\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { Instructor } from '../../models/instructor';\nimport { Multimedia } from 'src/app/modules/shared/models/multimedia';\nimport { CourseTemplate } from '../../models/course-template';\nimport { InstructorReviewFilter, Review, ReviewReq } from '../../models/review';\nimport { InstructorPagination } from \"@modules/instructor/models/instructor-pagination\";\nimport { InstructorFilter } from \"@modules/instructor/models/instructor-filter\";\nimport { InstructorIncludeType } from \"@modules/instructor/enums/instructor-include-type\";\n\nexport enum InstructorActions {\n FetchInstructor = '[Api] FETCH INSTRUCTOR',\n FetchInstructorProfile = '[Api] FETCH INSTRUCTOR PROFILE',\n SaveInstructor = '[Api] SAVE INSTRUCTOR',\n EditInstructor = '[Api] EDIT INSTRUCTOR',\n SaveInstructorReview = '[Api] SAVE INSTRUCTOR REVIEW',\n CompleteInstructor = '[Api] COMPLETE INSTRUCTOR',\n GetInstructorReviews= '[Api] GET INSTRUCTOR REVIEWS',\n SaveProfileMedia = '[Api] SAVE INSTRUCTOR PROFILE Media',\n SaveInstructorMedia = '[Api] SAVE INSTRUCTOR MEDIA',\n SaveInstructorKyc = '[Api] SAVE INSTRUCTOR KYC',\n UploadInstructorMedia = '[Api] UPLOAD INSTRUCTOR MEDIA',\n RemoveInstructorMedia= '[Api] REMOVE INSTRUCTOR MEDIA',\n FetchCourseTemplate = '[Api] FETCH COURSE TEMPLATES',\n EditCourseTemplate = '[Api] EDIT INSTRUCTOR COURSE TEMPLATE',\n\n AddInstructor = 'ADD INSTRUCTOR',\n AddInstructorReviews= 'ADD INSTRUCTOR REVIEWS',\n AddInstructorReviewsFail= 'ADD INSTRUCTOR REVIEWS Fail',\n AddInstructorReview = 'ADD INSTRUCTOR REVIEW',\n RemoveInstructorReviews= 'REMOVE INSTRUCTOR REVIEWS',\n AddInstructorProfile = 'ADD INSTRUCTOR PROFILE',\n UpdateInstructorProfile = 'UPDATE INSTRUCTOR PROFILE',\n RemoveInstructorProfile = 'REMOVE INSTRUCTOR PROFILE',\n UpdateInstructor = 'UPDATE INSTRUCTOR',\n DeleteInstructor = 'DELETE INSTRUCTOR',\n AddError = 'ADD INSTRUCTOR ERROR',\n AddInstructorMedia = 'ADD INSTRUCTOR MEDIA',\n DeleteInstructorMedia = 'DELETE INSTRUCTOR MEDIA',\n AddCourseTemplate = 'ADD COURSE TEMPLATES',\n UpdateCourseTemplate = 'UPDATE COURSE TEMPLATE',\n AddDefaultImage = 'ADD INSTRUCTOR DEFAULT IMAGE',\n EditInstructorReviewCount = 'EDIT INSTRUCTOR REVIEW COUNT'\n}\n\n\n// Effects Actions\n\nexport const FetchInstructorById = createAction(InstructorActions.FetchInstructor, props<{ id: string, includes: InstructorIncludeType[] }>());\nexport const GetInstructorReviews = createAction(InstructorActions.GetInstructorReviews, props<{ id: string , filter: InstructorReviewFilter}>());\nexport const FetchInstructorProfile = createAction(InstructorActions.FetchInstructorProfile);\nexport const SaveInstructor = createAction(InstructorActions.SaveInstructor, props<{ instructor: Instructor }>());\nexport const AddInstructor = createAction(InstructorActions.AddInstructor, props<{ instructor: Instructor }>());\n\nexport const EditInstructor = createAction(InstructorActions.EditInstructor, props<{ id: string, instructor: Instructor, silent: boolean }>());\nexport const SaveInstructorReview = createAction(InstructorActions.SaveInstructorReview, props<{ instructorId: string, review: ReviewReq }>());\nexport const CompleteInstructor = createAction(InstructorActions.CompleteInstructor, props<{ id: string, instructor: Instructor}>());\nexport const SaveProfileMedia = createAction(InstructorActions.SaveProfileMedia, props<{ instructorId: string, media: File }>());\nexport const SaveInstructorMedia = createAction(InstructorActions.SaveInstructorMedia, props<{ instructorId: string, files: File[] }>());\nexport const UploadInstructorMedia = createAction(InstructorActions.UploadInstructorMedia, props<{ instructorId: string, file: File, tags: string, category: string, isDefault: boolean }>());\nexport const RemoveInstructorMedia = createAction(InstructorActions.RemoveInstructorMedia, props<{ instructorId: string, name: string; }>());\nexport const FetchCourseTemplate = createAction(InstructorActions.FetchCourseTemplate);\nexport const EditCourseTemplate = createAction(InstructorActions.EditCourseTemplate, props<{ instructorId: string, courseTemplates: { courseTemplateId: string}[] }>());\nexport const EditInstructorReviewCount = createAction(InstructorActions.EditInstructorReviewCount, props<{ instructorId: string, reviewCount: number }>());\n\n\n\n// Store Action\nexport const AddInstructorProfile = createAction(InstructorActions.AddInstructorProfile, props<{ instructor: Instructor }>());\nexport const RemoveInstructorProfile = createAction(InstructorActions.RemoveInstructorProfile);\nexport const UpdateInstructorProfile = createAction(InstructorActions.UpdateInstructorProfile, props<{ instructor: Instructor }>());\nexport const FetchInstructors = createAction(\"[API] FETCH INSTRUCTORS\", props<{ instructorFilters: InstructorFilter, instructorPagination: InstructorPagination }>());\nexport const AddInstructors = createAction(\"ADD INSTRUCTORS\", props<{ instructors: Instructor[] }>());\nexport const AddInstructorTotalCount = createAction(\"ADD INSTRUCTORS TOTAL COUNT\", props<{ totalCount: number }>());\n\nexport const FetchInstructorsPaginated = createAction(\"[API] FETCH INSTRUCTOR PAGINATION\");\nexport const AddInstructorPagination = createAction(\"ADD INSTRUCTOR PAGINATION\", props<{ instructorPagination: InstructorPagination }>());\nexport const FetchInstructorsFiltered = createAction(\"[API]FETCH FILTERED INSTRUCTOR\", props<{ filters: InstructorFilter, pagination: InstructorPagination }>());\nexport const AddInstructorFilter = createAction(\"ADD INSTRUCTOR FILTER\", props<{ filters: InstructorFilter }>());\nexport const RemoveAllInstructors = createAction(\"REMOVE ALL INSTRUCTORS\");\nexport const ResetInstructorFilter = createAction(\"RESET INSTRUCTOR FILTER\");\n\nexport const AddInstructorReviews = createAction(InstructorActions.AddInstructorReviews, props<{ instructorReviews: Review[] }>());\nexport const AddInstructorReviewsFail = createAction(InstructorActions.AddInstructorReviewsFail);\nexport const AddInstructorReview = createAction(InstructorActions.AddInstructorReviews, props<{ review: Review }>());\nexport const UpdateInstructor = createAction(InstructorActions.UpdateInstructor, props<{ id: string, change: Partial }>());\nexport const DeleteInstructor = createAction(InstructorActions.DeleteInstructor, props<{ id: string }>());\nexport const AddInstructorMedia = createAction(InstructorActions.AddInstructorMedia, props<{ medias: Multimedia[] }>());\nexport const DeleteInstructorMedia = createAction(InstructorActions.DeleteInstructorMedia, props<{ instructorId: string, fileName: string }>());\nexport const AddDefaultImage = createAction(InstructorActions.AddDefaultImage, props<{ instructorId: string, media: Multimedia }>());\nexport const AddCourseTemplate = createAction(InstructorActions.AddCourseTemplate, props<{ courseTemplates: CourseTemplate[] }>());\nexport const UpdateCourseTemplate = createAction(InstructorActions.UpdateCourseTemplate, props<{ courseTemplate: CourseTemplate }>());\n\nexport const AddError = createAction(InstructorActions.AddError, props<{ error: any }>());\nexport const RemoveInstructorReviews = createAction(InstructorActions.RemoveInstructorReviews);\n","import { EntityAdapter, createEntityAdapter } from '@ngrx/entity';\nimport { Instructor } from '../../models/instructor';\nimport { Review } from '../../models/review';\n\nexport const adapter: EntityAdapter = createEntityAdapter();\n\nexport const adapterInstructorReviews: EntityAdapter = createEntityAdapter({\n selectId: (review: Review) => review.id\n});\n","import { createSelector, createFeatureSelector } from '@ngrx/store';\nimport { adapter,adapterInstructorReviews } from './instructor.entity';\nimport { InstructorState, instructorFeatureKey } from './instructor.state';\nimport { Predicate } from '@ngrx/entity';\nimport { Instructor } from '../../models/instructor';\n\nexport const {\n selectAll,\n selectEntities,\n selectIds,\n selectTotal\n } = adapter.getSelectors();\n\n export const {\n selectTotal: selectTotalLoadedInstructorReviews,\n selectAll : selectAllReviews\n } = adapterInstructorReviews.getSelectors();\n\nexport const getInstructorState = createFeatureSelector(instructorFeatureKey);\n\nexport const getAllInstructors = createSelector(getInstructorState, selectAll);\n\nexport const getInstructorById = (id: string) => createSelector(getInstructorState, state => state.entities[id]);\n\nexport const getInstructorByFilter = (predicate: Predicate) => createSelector(getAllInstructors, x => x.filter(predicate));\n\nexport const getError = createSelector(getInstructorState, state => state.error);\n\nexport const getInstructorProfile = createSelector(getInstructorState, state => state.instructorProfile);\n\nexport const getCourseTemplates = createSelector(getInstructorState, state => state.courseTemplates);\n\nexport const getInstructorReviewsState = createSelector(getInstructorState, state => state.instructorReviews);\n\nexport const getInstructorReviews = createSelector(getInstructorReviewsState, selectAllReviews);\n\nexport const getTotaLoadedInstructorReviews = createSelector(getInstructorReviewsState, selectTotalLoadedInstructorReviews);\n\nexport const getIsAllLoaded = createSelector(getInstructorState,(state) => {\n return state.ids?.length >= state.totalCount;\n});\n\nexport const getTotalCount = createSelector(getInstructorState, state => state?.totalCount);\n\nexport const getInstructorPagination = createSelector(getInstructorState, state => state.instructorPagination);\n\nexport const getInstructorFilters = createSelector(getInstructorState, state => state.filter);\n","import { EntityState } from '@ngrx/entity';\nimport { CourseTemplate } from '../../models/course-template';\n\nimport { Instructor } from '../../models/instructor';\nimport { Review } from '../../models/review';\nimport { InstructorFilter } from \"@modules/instructor/models/instructor-filter\";\nimport { InstructorPagination } from \"@modules/instructor/models/instructor-pagination\";\n\nexport const instructorFeatureKey = 'instructors';\n\nexport interface InstructorReviewState extends EntityState {}\n\nexport interface InstructorState extends EntityState {\n instructorProfile: Instructor;\n instructorReviews: InstructorReviewState;\n courseTemplates: CourseTemplate[];\n error: any;\n totalCount: number;\n filter: InstructorFilter;\n instructorPagination: InstructorPagination;\n}\n","import { Injectable } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { Observable } from 'rxjs';\nimport { CourseTemplate } from '../../models/course-template';\nimport { Instructor } from '../../models/instructor';\nimport { InstructorReviewFilter, Review, ReviewReq } from '../../models/review';\nimport * as fromAction from './instructor.action';\nimport * as fromSelector from './instructor.selector';\nimport { IdentityState } from '@modules/identity/store/identity.state';\nimport { InstructorPagination } from \"@modules/instructor/models/instructor-pagination\";\nimport { InstructorFilter } from \"@modules/instructor/models/instructor-filter\";\nimport { InstructorIncludeType } from \"@modules/instructor/enums/instructor-include-type\";\n\n@Injectable()\nexport class InstructorStoreService {\n constructor(private store: Store) {}\n\n registerInstructor(instructor: Instructor): void {\n this.store.dispatch(fromAction.SaveInstructor({ instructor }));\n }\n\n updateInstructor(id: string, instructor: Instructor, silent: boolean = false): void {\n this.store.dispatch(fromAction.EditInstructor({ id, instructor, silent }));\n }\n\n completeInstructor(id: string, instructor: Instructor): void {\n this.store.dispatch(fromAction.CompleteInstructor({ id, instructor }));\n }\n\n updateCourseTemplate(instructorId: string, courseTemplates: { courseTemplateId: string }[]): void {\n this.store.dispatch(fromAction.EditCourseTemplate({ instructorId, courseTemplates }));\n }\n\n saveDefaultMedia(instructorId: string, media: File): void {\n this.store.dispatch(fromAction.SaveProfileMedia({ instructorId, media }));\n }\n\n uploadMedia(instructorId: string, file: File, tags: string, category: string, isDefault: boolean): void {\n this.store.dispatch(\n fromAction.UploadInstructorMedia({\n instructorId,\n file,\n tags,\n category,\n isDefault,\n })\n );\n }\n\n getInstructorById(id: string): Observable {\n return this.store.select(fromSelector.getInstructorById(id));\n }\n\n setInstructorProfile(instructor: Instructor): void {\n this.store.dispatch(fromAction.AddInstructorProfile({ instructor }));\n }\n\n getInstructorProfile(): Observable {\n return this.store.select(fromSelector.getInstructorProfile);\n }\n\n fetchInstructorById(id: string, includes: InstructorIncludeType[] = null): void {\n this.store.dispatch(fromAction.FetchInstructorById({ id: id, includes: includes }));\n }\n\n fetchInstructorProfile(): void {\n this.store.dispatch(fromAction.FetchInstructorProfile());\n }\n\n removeInstructorMedia(instructorId: string, name: string): void {\n this.store.dispatch(fromAction.RemoveInstructorMedia({ instructorId, name }));\n }\n\n removeInstructorProfile(): void {\n this.store.dispatch(fromAction.RemoveInstructorProfile());\n }\n\n fetchCourseTemplate(): void {\n this.store.dispatch(fromAction.FetchCourseTemplate());\n }\n\n getCourseTemplate(): Observable {\n return this.store.select(fromSelector.getCourseTemplates);\n }\n\n fetchInstructorReviews(id: string, filter: InstructorReviewFilter): void {\n this.store.dispatch(fromAction.GetInstructorReviews({id, filter}));\n }\n\n submitInstructorReview(id: string, review: ReviewReq): void {\n this.store.dispatch( fromAction.SaveInstructorReview({ instructorId: id, review: review }));\n }\n\n getInstructorReviews(): Observable {\n return this.store.select(fromSelector.getInstructorReviews);\n }\n\n getTotalLoadedInstructorReviews(): Observable {\n return this.store.select(fromSelector.getTotaLoadedInstructorReviews);\n }\n\n removeInstructorReviews(): void {\n return this.store.dispatch(fromAction.RemoveInstructorReviews());\n }\n\n fetchInstructors(instructorFilters: InstructorFilter, instructorPagination: InstructorPagination): void {\n this.store.dispatch(fromAction.FetchInstructors({instructorFilters, instructorPagination}));\n }\n\n getInstructors(): Observable {\n return this.store.select(fromSelector.getAllInstructors);\n }\n\n getInstructorFilters(): Observable {\n return this.store.select(fromSelector.getInstructorFilters);\n }\n\n getIsAllLoaded(): Observable {\n return this.store.select(fromSelector.getIsAllLoaded);\n }\n\n getInstructorPagination(): Observable {\n return this.store.select(fromSelector.getInstructorPagination);\n }\n\n addTotalCount(data: number): void {\n this.store.dispatch(fromAction.AddInstructorTotalCount({ totalCount: data }));\n }\n\n getTotalCount(): Observable {\n return this.store.select(fromSelector.getTotalCount);\n }\n\n fetchInstructorsPaginated(): void {\n this.store.dispatch(fromAction.FetchInstructorsPaginated());\n }\n\n fetchInstructorsFiltered(instructorFilter: InstructorFilter, instructorPagination: InstructorPagination): void {\n this.store.dispatch(fromAction.FetchInstructorsFiltered({filters: instructorFilter, pagination: instructorPagination}));\n }\n\n resetInstructorState(): void {\n this.store.dispatch(fromAction.RemoveAllInstructors());\n }\n\n resetInstructorFilter(): void {\n this.store.dispatch(fromAction.ResetInstructorFilter());\n }\n}\n","export enum InstructorIncludeType {\n BASIC = 'Basic',\n FEEDBACK = 'Feedback',\n MEDIA = 'Media',\n DEFAULTMEDIA = 'DefaultMedia',\n REGION = 'Region',\n REVIEW = 'Review',\n TEMPLATE = 'Template'\n}\n","export class InstructorFilter {\n search: string;\n sort?: string;\n regions: string;\n templates: string;\n categories: string;\n includeApprove: boolean;\n includePending: boolean;\n includeBlocked: boolean;\n includeDraft: boolean;\n includeReturned: boolean;\n includeRejected: boolean;\n constructor() {\n this.search = '';\n this.regions = '';\n this.templates = '';\n this.categories = '';\n this.sort = '';\n this.includeDraft = false;\n this.includeRejected = false;\n this.includeApprove = true;\n this.includeBlocked = false;\n this.includePending = false;\n this.includeReturned = false;\n }\n}\n\nexport const InstructorFilters = {\n TEMPLATE : 'course_template',\n CATEGORY : 'category',\n REGION: 'region',\n COURSETYPE: 'course_type'\n};\n","export interface InstructorPagination {\n pageIndex: number;\n pageSize: number;\n}\n\nexport const INSTRUCTOR_PAGE_SIZE = 24;\n","\n \n","import {\n Component,\n OnInit,\n Input,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\nimport { RatingService } from '../../services/rating.service';\nimport { StarIcon } from '../../models/start-icon';\nimport { INgxRatingOptions } from '../../utility/ngx-rating.option';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n // tslint:disable-next-line: component-selector\n selector: 'ngx-rating',\n templateUrl: './star-rating.component.html',\n styleUrls: ['./star-rating.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => StarRatingComponent),\n multi: true,\n },\n ],\n})\nexport class StarRatingComponent implements OnInit, ControlValueAccessor {\n @Input() rate: number;\n\n @Input()\n public max: number;\n\n @Input()\n public color: string;\n\n @Input()\n public CssClass = '';\n\n @Input()\n public isEditable = false;\n\n @Input()\n public options: INgxRatingOptions = {\n EmptyStarColor: 'black',\n FullStarColor: 'black',\n Padding: '1px',\n };\n\n public lstOfIcon: Array = [];\n\n // tslint:disable-next-line: no-input-rename\n @Input('value')\n val: number;\n\n onChange: any = () => {};\n onTouched: any = () => {};\n\n get value() {\n return this.val;\n }\n\n set value(val) {\n this.val = val;\n this.onChange(val);\n this.onTouched();\n }\n\n constructor(private cdr: ChangeDetectorRef, private raetingService: RatingService) {}\n\n ngOnInit() {\n this.cdr.detach();\n this.lstOfIcon = this.raetingService.getIconsData(this.max, this.rate, this.color, this.options);\n this.cdr.detectChanges();\n }\n\n public setStarValue(index: number) {\n if (this.isEditable) {\n this.writeValue(index);\n }\n }\n\n registerOnChange(fn: any) {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n writeValue(value: any) {\n if (value) {\n this.value = value;\n this.lstOfIcon = this.raetingService.getIconsData(this.max, value, this.color, this.options);\n this.cdr.detectChanges();\n }\n }\n}\n"],"sourceRoot":"webpack:///","file":"178.e04c79dbb3f4ce3f0a83.js"}