{"version":3,"sources":["webpack:///src/app/frontends/frontends.component.html","webpack:///src/app/frontends/frontends.component.ts","webpack:///src/app/pages/CalorieFriend/Customers/Assessments/assessment.component.html","webpack:///src/app/pages/CalorieFriend/Customers/Assessments/assessment.component.ts","webpack:///src/app/frontends/nativeapp-advert/nativeapp-advert.component.html","webpack:///src/app/frontends/nativeapp-advert/nativeapp-advert.component.ts","webpack:///src/app/frontends/patient-meal-plan-view/patient-meal-plan-view.component.html","webpack:///src/app/frontends/patient-meal-plan-view/patient-meal-plan-view.component.ts","webpack:///src/app/frontends/patient-fitness-plan-view/patient-fitness-plan-view.component.html","webpack:///src/app/frontends/patient-fitness-plan-view/patient-fitness-plan-view.component.ts","webpack:///src/app/frontends/patient-profile/patient-profile.component.ts","webpack:///src/app/frontends/patient-profile/patient-profile.component.html","webpack:///src/app/frontends/patient-goals/patient-goals.component.ts","webpack:///src/app/frontends/patient-goals/patient-goals.component.html","webpack:///src/app/frontends/patient-profile-invalid/patient-profile-invalid.component.ts","webpack:///src/app/frontends/patient-profile-invalid/patient-profile-invalid.component.html","webpack:///src/app/frontends/patient-checkin/patient-checkin.component.ts","webpack:///src/app/frontends/patient-checkin/patient-checkin.component.html","webpack:///src/app/frontends/patient-calendar-view/patient-calendar-view.component.ts","webpack:///src/app/frontends/patient-calendar-view/patient-calendar-view.component.html","webpack:///src/app/frontends/food-tracking/food-diary-container/food-diary-container.component.ts","webpack:///src/app/frontends/food-tracking/food-diary-container/food-diary-container.component.html","webpack:///src/app/frontends/patient-fitness-workout-logs-view/patient-fitness-workout-logs-view.component.html","webpack:///src/app/frontends/patient-fitness-workout-logs-view/patient-fitness-workout-logs-view.component.ts","webpack:///src/app/frontends/patient-billing/patient-invoices/patient-invoices.component.ts","webpack:///src/app/frontends/patient-billing/patient-invoices/patient-invoices.component.html","webpack:///src/app/frontends/patient-billing/patient-invoice-view/patient-invoice-view.component.ts","webpack:///src/app/frontends/patient-billing/patient-invoice-view/patient-invoice-view.component.html","webpack:///src/app/frontends/patient-billing/patient-subscriptions/patient-subscriptions.component.ts","webpack:///src/app/frontends/patient-billing/patient-subscriptions/patient-subscriptions.component.html","webpack:///src/app/frontends/patient-billing/patient-billing.component.ts","webpack:///src/app/frontends/patient-billing/patient-billing.component.html","webpack:///src/app/frontends/frontends-routing.module.ts","webpack:///src/app/frontends/patient-billing/patient-subscription-view/patient-subscription-view.component.ts","webpack:///src/app/frontends/patient-billing/patient-subscription-view/patient-subscription-view.component.html","webpack:///src/app/frontends/patient-billing/patient-subscription-meta-view/patient-subscription-meta-view.component.ts","webpack:///src/app/frontends/patient-billing/patient-subscription-meta-view/patient-subscription-meta-view.component.html","webpack:///src/app/frontends/frontends.module.ts"],"names":["PlanInfo","FrontendsComponent","tokenService","PlanViewUsersService","planService","fitnessPlanService","toasterService","router","cookieService","PlanViewPlanService","PlanViewToasterService","patientData","patientStore","nativeAppService","userStore","chatService","logo","alive","isExpanded","NotificationToken","PatientID","PlanID","isFitnessPlan","plans","showProgram","FitnessPlans","ShowEmailSubmit","HidePatientInfo","ProblemGenertingPDF","PlanListSource","unsubscribe$","Subject","FitnessPlanListSource","planIdCookieName","planTypeCookieName","indexPageUrl","ProblemSendingToPatient","SuccessSendingToPatient","threadSubject","BehaviorSubject","showChatWindow","this","tokenChange","pipe","takeWhile","subscribe","document","getElementsByClassName","style","paddingTop","route","routerState","root","firstChild","getActivatedRoute","snapshot","paramMap","get","getSettings","takeUntil","settings","setSettings","color","console","log","sendJavascriptMessageToApp","err","patient","setPatient","isArchived","navigateByUrl","mealProgramMode","fitnessProgramMode","coachUser","id","createdByUserId","name","createdByUser","firstName","lastName","uid","connect","setInterval","reconnect","chatThread","users","registerThreads","next","unSeenMessages","totalUnseenCount","url","length","path","undefined","queryParams","PlanId","listByGuid","data","items","activePlan","find","plan","active","sort","p1","p2","set","ThePlan","mealPlanInfo","Array","forEach","value","planName","planType","planUrl","push","fitnessPlanInfo","isMealPlan","findIndex","p","submitPatientNotificationByGuid","Data","success","danger","observable","SaveAsPDFFromToken","SaveAsPDF","PDFData","saveAs","window","open","toggle","PlanChanged","toggleChatWindow","AssessmentInputComponent","fb","assessmentsService","dialogService","PlanViewPatientsService","assessmentSettingService","AddAssessmentLabel","UpdateAssessmentLabel","assessmentProgressImageType","AssessmentLabel","SaveAssessmentLabel","MealPlanComplianceLabel","EnergyLevelLabel","StressLevelLabel","SleepQualityLabel","WeightLabel","BodyFatLabel","CommentLabel","StartDateLabel","EndDateLabel","PreferredUnitLabel","BackLabel","Created","Updated","ProblemCeatingAssessment","AssessmentGuid","PatientName","IsSelfCheckin","HideSaveButton","form","model","DescriptiveValues","isLoading","isImageProgressUpload","options","formState","customData","isImperial","imgHover","imgProgressItem","validateNumber","guid","notificationToken","patientAndAssessmentSettings","loadAssessmentData","ProgressImageUrl","Back","isPreferredUnitImperial","PatientId","getAssessmentSettingsByUserId","finalize","uploadProgressImages","formlyForm","JSON","parse","customQuestion","defaultFormValues","error","getByNotification","assessment","patientName","StartDate","startDateString","EndDate","endDateString","answersJson","height","weight","bodyFat","mealPlanCompliance","energyLevel","stressLevel","sleepQuality","comment","progressImageUrl","progressImageLeftUrl","progressImageRightUrl","submittedByPatient","event","type","Assessment","patientID","startDate","endDate","fileProgressImage","fileProgressImageRight","fileProgressImageLeft","stringify","submit","handleSuccessResponse","handleWrongResponse","NativeappAdvertComponent","deviceService","sanitizer","displayInstallFromStoreLink","isFromApp","isDesktop","bypassSecurityTrustUrl","location","href","os","toLowerCase","playStoreUrl","appStoreUrl","setTimeout","PatientMealPlanViewComponent","PlanViewRoute","PlanViewFormBuilder","PlanViewDialogService","PlanViewRouter","programTemplateService","super","IsMobile","TheDayLabel","$localize","PlanView","ref","ngOnInit","plansList","newId","toString","onResize","Elements","Header","parentElement","visibility","isMobile","day","order","PatientFitnessPlanViewComponent","PlanViewPatientService","WorkoutService","OriginalPatientName","IsPreferredUnitImperial","PlanIDSubject","workoutMode","Workout","index","dayId","TheDays","onDayChanged","PatientProfileComponent","PatientGoalsComponent","PatientProfileInvalidComponent","PatientCheckinComponent","PatientCalendarViewComponent","patientService","cdRef","patientGuid","loaded","detach","reattach","detectChanges","FoodDiaryContainerComponent","_patientLoaded","Date","toDateString","loadPatient","onPatientChanged","filter","patientId","userId","date","setDate","getDate","previous","PatientFitnessWorkoutLogsViewComponent","workoutService","activatedRoute","patientsService","workoutId","Number","initialize","token","toPromise","workoutDetails","getDetailsAll","workout","getWorkout","blockIndex","itemIndex","details","i","prevW","w","blockId","isCircuitSetNumber","exNo","String","fromCharCode","logDetails","startDateTime","toLocaleString","getTimeDiffDisplayString","endDateTime","Object","keys","PatientInvoicesComponent","invoiceService","PatientGuid","loadInvoices","listForPatient","sent","onView","recurrent","navigate","relativeTo","PatientInvoiceViewComponent","invoiceId","map","params","parseInt","PatientSubscriptionsComponent","subscriptionService","loadSubscriptions","PatientBillingComponent","routes","component","children","canDeactivate","PatientSubscriptionViewComponent","subscriptionId","PatientSubscriptionMetaViewComponent","subscriptionMetaId","FrontendsRoutingModule","forChild","NB_MODULES","FrontendsModule","CalorieFriendModule","forRoot","provide","useFactory","a"],"mappings":"kmBA0Cc,2C,qDAAsC,iE,2HAKtC,2C,qDAA6C,iE,kIAgG3D,0CACE,6CAKE,oIAA0B,KAE1B,yCACF,8BACA,iDACF,8B,+CADmB,wF,wBAKf,0C,iDAEE,qC,yBAHJ,0CACE,iDAOF,wC,oBANI,iE,w+BCjIC,MAAMA,GAYN,Y,MAAMC,EA4CX,YACUC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAbA,KAAAb,eACA,KAAAC,uBACA,KAAAC,cACA,KAAAC,qBACA,KAAAC,iBACA,KAAAC,SACA,KAAAC,gBACA,KAAAC,sBACA,KAAAC,yBACA,KAAAC,cACA,KAAAC,eACA,KAAAC,mBACA,KAAAC,YACA,KAAAC,cAzDV,KAAAC,KAAe,GAEf,KAAAC,OAAiB,EAEjB,KAAAC,YAAa,EA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\n
\r\n Start sending your clients Meal and Workout plans like this one today!
Save time, look professional.\r\n
\r\n\r\n \r\n SIGN UP FOR FREE\r\n \r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n
\r\n \r\n\r\n\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n","import { AfterViewInit, Component, HostListener, OnDestroy, OnInit } from '@angular/core';\r\nimport { HttpErrorResponse } from '@angular/common/http';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { takeUntil, takeWhile } from 'rxjs/operators';\r\nimport { Subject, Observable, BehaviorSubject } from 'rxjs';\r\nimport { NbTokenService } from '@nebular/auth';\r\nimport { NbToastrService } from '@nebular/theme';\r\nimport { saveAs } from 'file-saver/src/FileSaver';\r\nimport { CookieService } from 'ngx-cookie-service';\r\nimport { format } from 'support';\r\n\r\nimport { UsersService } from 'app/@core/backend/common/services/users.service';\r\nimport {\r\n FitnessPlan,\r\n FitnessPlanData,\r\n MealPlan,\r\n MealPlanData,\r\n} from 'app/@core/interfaces/common/CalorieFriend/plan';\r\nimport {\r\n Patient,\r\n PatientData,\r\n} from 'app/@core/interfaces/common/CalorieFriend/patients';\r\nimport { GridData } from 'app/@core/interfaces/common/grid-data';\r\nimport { PatientStore } from 'app/@core/stores/patient.store';\r\nimport { replaceRootStyle } from 'app/@core/utils/themes';\r\nimport { NativeAppService } from 'app/@core/backend/common/services/native-app.service';\r\nimport { UserStore } from 'app/@core/stores/user.store';\r\nimport { ChatService } from 'app/@chat/chat.service';\r\nimport { IChatThread } from 'app/@chat/domain';\r\n\r\nexport class PlanInfo {\r\n planName: string;\r\n planUrl: string;\r\n active: boolean;\r\n planType: string;\r\n}\r\n\r\n@Component({\r\n selector: 'ngx-frontends',\r\n styleUrls: ['frontends.component.scss'],\r\n templateUrl: './frontends.component.html',\r\n})\r\nexport class FrontendsComponent implements OnInit, AfterViewInit, OnDestroy {\r\n logo: string = '';\r\n\r\n alive: boolean = true;\r\n\r\n isExpanded = false;\r\n\r\n NotificationToken: string = null;\r\n PatientID = null;\r\n PlanID = null;\r\n private patient: Patient;\r\n private isFitnessPlan: boolean = false;\r\n\r\n ThePlan: any;\r\n plans: Array = null;\r\n\r\n showProgram: boolean = false;\r\n\r\n FitnessPlans: Array = null;\r\n\r\n ShowEmailSubmit: boolean = false;\r\n HidePatientInfo: boolean = false;\r\n\r\n ProblemGenertingPDF =\r\n 'Problem occurre generating PDF Report. Try again. If problem continues contact support.';\r\n\r\n PlanListSource: Observable> = null;\r\n protected readonly unsubscribe$ = new Subject();\r\n\r\n FitnessPlanListSource: Observable> = null;\r\n\r\n planIdCookieName = 'last-plan-id';\r\n planTypeCookieName = 'last-plan-type';\r\n\r\n indexPageUrl = '';\r\n\r\n ProblemSendingToPatient = 'Problem sending patient view to patient.';\r\n SuccessSendingToPatient = 'Sent email to patient.';\r\n\r\n threadSubject: BehaviorSubject =\r\n new BehaviorSubject(null);\r\n unSeenMessages: Observable;\r\n showChatWindow = false;\r\n\r\n constructor(\r\n private tokenService: NbTokenService,\r\n private PlanViewUsersService: UsersService,\r\n private planService: MealPlanData,\r\n private fitnessPlanService: FitnessPlanData,\r\n private toasterService: NbToastrService,\r\n private router: Router,\r\n private cookieService: CookieService,\r\n private PlanViewPlanService: MealPlanData,\r\n private PlanViewToasterService: NbToastrService,\r\n private patientData: PatientData,\r\n private patientStore: PatientStore,\r\n private nativeAppService: NativeAppService,\r\n private userStore: UserStore,\r\n private chatService: ChatService\r\n ) {\r\n this.tokenService\r\n .tokenChange()\r\n .pipe(takeWhile(() => this.alive))\r\n .subscribe(() => {});\r\n }\r\n\r\n convertWindowInnerHeightToLvh() {\r\n // (document.getElementsByClassName('scrollable-container')[0] as any).style.height = window.innerHeight + 'px';\r\n (document.getElementsByClassName('scrollable-container')[0] as any).style.paddingTop = '75px';\r\n\r\n }\r\n // set resize using hostlistener\r\n // @HostListener('window:resize', ['$event'])\r\n // onResize(event) {\r\n // this.convertWindowInnerHeightToLvh();\r\n // }\r\n\r\n private getActivatedRoute(): ActivatedRoute {\r\n let route = this.router.routerState.root;\r\n while (route.firstChild) {\r\n route = route.firstChild;\r\n }\r\n return route;\r\n }\r\n\r\n ngOnInit() {\r\n const route = this.getActivatedRoute();\r\n // this.convertWindowInnerHeightToLvh();\r\n if (!this.PatientID)\r\n this.PatientID = route.snapshot.paramMap.get('PatientId');\r\n\r\n if (!this.PatientID)\r\n this.NotificationToken = route.snapshot.paramMap.get('NotificationToken');\r\n\r\n if (!this.NotificationToken)\r\n this.NotificationToken = route.snapshot.paramMap.get('patientGuid');\r\n\r\n this.patientData\r\n .getSettings(this.PatientID, this.NotificationToken)\r\n .pipe(takeUntil(this.unsubscribe$))\r\n .subscribe(\r\n (settings) => {\r\n this.patientStore.setSettings(settings);\r\n this.logo = settings.logo ?? 'assets/images/logo.png';\r\n replaceRootStyle(document, settings.color);\r\n console.log(\"Applying Settings\")\r\n this.nativeAppService.sendJavascriptMessageToApp(\r\n 'Settings',\r\n settings\r\n );\r\n },\r\n (err) => {\r\n this.logo = 'assets/images/logo.png';\r\n }\r\n );\r\n\r\n this.patientData.get(null, this.NotificationToken).subscribe(\r\n (patient) => {\r\n this.patient = patient;\r\n\r\n this.patientStore.setPatient(patient);\r\n if (patient.isArchived) {\r\n this.router.navigateByUrl(\r\n `/PatientView/Invalid/${this.NotificationToken}`\r\n );\r\n }\r\n if (\r\n (patient.mealProgramMode && patient.mealProgramMode > 0) ||\r\n (patient.fitnessProgramMode && patient.fitnessProgramMode > 0)\r\n ) {\r\n this.showProgram = true;\r\n\r\n this.nativeAppService.sendJavascriptMessageToApp(\r\n 'hasProgramMode',\r\n 'true'\r\n );\r\n 1;\r\n } else {\r\n this.nativeAppService.sendJavascriptMessageToApp(\r\n 'hasProgramMode',\r\n 'false'\r\n );\r\n }\r\n\r\n /**\r\n * Chat config\r\n */\r\n const chatUser = {\r\n id: this.patient.id,\r\n name: this.patient.name,\r\n uid: `p_${this.patient.id}`,\r\n };\r\n const coachUser = {\r\n id: this.patient.createdByUserId,\r\n name: `${this.patient.createdByUser?.firstName} ${this.patient.createdByUser?.lastName}`,\r\n uid: `u_${this.patient.createdByUserId}`,\r\n };\r\n this.chatService.connect(chatUser, true);\r\n\r\n setInterval(() => {\r\n this.chatService.reconnect();\r\n }, 1000 * 5);\r\n const chatThread = {\r\n id: coachUser.id,\r\n name: coachUser.name,\r\n users: [coachUser],\r\n };\r\n this.chatService.registerThreads([chatThread]);\r\n this.threadSubject.next(chatThread);\r\n this.unSeenMessages = this.chatService.totalUnseenCount;\r\n },\r\n () => {\r\n this.router.navigateByUrl(\r\n `/PatientView/Invalid/${this.NotificationToken}`\r\n );\r\n }\r\n );\r\n\r\n // decide if this is fitness plan\r\n if (\r\n route.snapshot.url.length >= 3 &&\r\n route.snapshot.url[2].path === 'Workout'\r\n )\r\n this.isFitnessPlan = true;\r\n else this.isFitnessPlan = false;\r\n\r\n // url section\r\n if (!this.PlanID || this.PlanID === undefined)\r\n this.PlanID = route.snapshot.paramMap.get('PlanId');\r\n\r\n // url query string\r\n if (!this.PlanID || this.PlanID === undefined)\r\n this.PlanID = route.snapshot.queryParams.PlanId;\r\n\r\n // from cookie\r\n if (!this.PlanID || this.PlanID === undefined) {\r\n this.PlanID = this.cookieService.get(this.planIdCookieName);\r\n this.isFitnessPlan =\r\n this.cookieService.get(this.planTypeCookieName) === 'Workout';\r\n }\r\n\r\n this.PlanListSource = this.planService.listByGuid(this.NotificationToken);\r\n\r\n this.PlanListSource.subscribe((data) => {\r\n this.plans = data.items;\r\n\r\n // active plan id\r\n if (!this.isFitnessPlan && (!this.PlanID || this.PlanID === undefined)) {\r\n const activePlan = this.plans.find((plan) => plan.active);\r\n if (activePlan) {\r\n this.PlanID = activePlan.id;\r\n }\r\n }\r\n\r\n if (!this.isFitnessPlan && (!this.PlanID || this.PlanID === undefined)) {\r\n if (this.plans.length > 0) {\r\n this.plans.sort((p1, p2) => p2.id - p1.id);\r\n this.PlanID = this.plans[0].id;\r\n }\r\n }\r\n\r\n this.indexPageUrl = `/PatientView/Patient/${this.NotificationToken}`;\r\n\r\n if (!this.isFitnessPlan && this.PlanID) {\r\n this.cookieService.set(this.planIdCookieName, this.PlanID, 0, '/');\r\n this.cookieService.set(this.planTypeCookieName, 'Meal', 0, '/');\r\n this.indexPageUrl += `/Meal/${this.PlanID}`;\r\n }\r\n\r\n if (\r\n !this.isFitnessPlan &&\r\n route.snapshot.url.length > 0 &&\r\n route.snapshot.url[0].path === 'Patient'\r\n ) {\r\n if (\r\n this.plans !== null &&\r\n this.plans !== undefined &&\r\n this.plans.length > 0\r\n ) {\r\n if (this.PlanID !== null && this.PlanID !== undefined) {\r\n this.ThePlan = this.plans.find((plan) => plan.id === +this.PlanID);\r\n } else this.ThePlan = this.plans[0];\r\n }\r\n }\r\n\r\n const mealPlanInfo: Array = new Array();\r\n this.plans.forEach((value) => {\r\n const plan = new PlanInfo();\r\n plan.active = value.active;\r\n plan.planName = value.name;\r\n plan.planType = 'mealplan';\r\n plan.planUrl = `/PatientView/Patient/${this.NotificationToken}/Meal/${value.id}`;\r\n mealPlanInfo.push(plan);\r\n });\r\n this.nativeAppService.sendJavascriptMessageToApp(\r\n 'MealPlans',\r\n mealPlanInfo\r\n );\r\n });\r\n\r\n this.FitnessPlanListSource = this.fitnessPlanService.listByGuid(\r\n this.NotificationToken\r\n );\r\n\r\n this.FitnessPlanListSource.subscribe((data) => {\r\n this.FitnessPlans = data.items;\r\n\r\n // active plan id\r\n if (this.isFitnessPlan && (!this.PlanID || this.PlanID === undefined)) {\r\n const activePlan = this.FitnessPlans.find((plan) => plan.active);\r\n if (activePlan) {\r\n this.PlanID = activePlan.id;\r\n }\r\n }\r\n\r\n if (this.isFitnessPlan && (!this.PlanID || this.PlanID === undefined)) {\r\n if (this.FitnessPlans.length > 0) {\r\n this.FitnessPlans.sort((p1, p2) => p2.id - p1.id);\r\n this.PlanID = this.FitnessPlans[0].id;\r\n }\r\n }\r\n\r\n if (this.isFitnessPlan && this.PlanID) {\r\n this.indexPageUrl = `/PatientView/Patient/${this.NotificationToken}`;\r\n this.cookieService.set(this.planIdCookieName, this.PlanID, 0, '/');\r\n this.cookieService.set(this.planTypeCookieName, 'Workout', 0, '/');\r\n this.indexPageUrl += `/Workout/${this.PlanID}`;\r\n }\r\n\r\n if (\r\n this.isFitnessPlan &&\r\n route.snapshot.url.length > 0 &&\r\n route.snapshot.url[0].path === 'Patient'\r\n ) {\r\n if (\r\n this.FitnessPlans !== null &&\r\n this.FitnessPlans !== undefined &&\r\n this.FitnessPlans.length > 0\r\n ) {\r\n if (this.PlanID !== null && this.PlanID !== undefined) {\r\n this.ThePlan = this.FitnessPlans.find(\r\n (plan) => plan.id === +this.PlanID\r\n );\r\n } else {\r\n this.ThePlan = this.FitnessPlans[0];\r\n }\r\n }\r\n }\r\n\r\n const fitnessPlanInfo: Array = new Array();\r\n this.FitnessPlans.forEach((value) => {\r\n const plan = new PlanInfo();\r\n plan.active = value.active;\r\n plan.planName = value.name;\r\n plan.planType = 'fitnessplan';\r\n plan.planUrl = `/PatientView/Patient/${this.NotificationToken}/Workout/${value.id}`;\r\n fitnessPlanInfo.push(plan);\r\n });\r\n this.nativeAppService.sendJavascriptMessageToApp(\r\n 'FitnessPlans',\r\n fitnessPlanInfo\r\n );\r\n });\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (this.patientStore.settings())\r\n replaceRootStyle(document, this.patientStore.settings()?.color);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.alive = false;\r\n }\r\n\r\n toggle() {\r\n this.isExpanded = !this.isExpanded;\r\n }\r\n\r\n collapse() {\r\n this.isExpanded = false;\r\n }\r\n\r\n PlanChanged(plan: MealPlan) {\r\n const isMealPlan = this.plans.findIndex((p) => p.id === plan.id) >= 0;\r\n const isFitnessPlan =\r\n this.FitnessPlans.findIndex((p) => p.id === plan.id) >= 0;\r\n\r\n const url = `/PatientView/Patient/${this.NotificationToken}/${\r\n isMealPlan ? 'Meal' : isFitnessPlan ? 'Workout' : ''\r\n }/${plan.id}`;\r\n //window.open(url, '_self');\r\n this.router.navigateByUrl(url);\r\n this.ThePlan = plan;\r\n }\r\n\r\n SendPatientView() {\r\n const observable = this.PlanViewPlanService.submitPatientNotificationByGuid(\r\n this.NotificationToken,\r\n this.ThePlan.id\r\n );\r\n\r\n observable.pipe(takeUntil(this.unsubscribe$)).subscribe(\r\n (Data) => {\r\n this.PlanViewToasterService.success('', this.SuccessSendingToPatient);\r\n },\r\n (err) => {\r\n this.PlanViewToasterService.danger('', this.ProblemSendingToPatient);\r\n }\r\n );\r\n }\r\n\r\n SaveAsPDF() {\r\n let observable = null;\r\n\r\n if (this.NotificationToken != null && this.NotificationToken !== undefined)\r\n observable = this.planService.SaveAsPDFFromToken(\r\n this.NotificationToken,\r\n this.ThePlan.id\r\n );\r\n else if (this.PatientID !== null && this.PatientID !== undefined)\r\n observable = this.planService.SaveAsPDF(this.PatientID, this.ThePlan.id);\r\n\r\n if (observable != null) {\r\n observable.pipe(takeUntil(this.unsubscribe$)).subscribe(\r\n (PDFData) => {\r\n saveAs(PDFData, format('PatientPlan_{0}.pdf', this.ThePlan.name));\r\n },\r\n (err) => {\r\n this.toasterService.danger('', this.ProblemGenertingPDF);\r\n }\r\n );\r\n }\r\n }\r\n\r\n OpenProfile() {\r\n window.open(`/PatientView/GeneralInfo/${this.NotificationToken}`);\r\n }\r\n\r\n OpenWeeklyAssesment() {\r\n window.open(`/PatientView/PatientAssessment/${this.NotificationToken}`);\r\n }\r\n\r\n OpenGoals() {\r\n window.open(`/PatientView/PatientGoals/${this.NotificationToken}`);\r\n }\r\n\r\n toggleChatWindow() {\r\n this.showChatWindow = !this.showChatWindow;\r\n }\r\n}\r\n","
\r\n \r\n \r\n
\r\n Input CheckIn Data\r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n
    \r\n
  • Client
  • \r\n
  • {{PatientName}}
  • \r\n
\r\n
\r\n\r\n
\r\n
    \r\n
  • Dates
  • \r\n
  • {{StartDate}} - {{EndDate}}
  • \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n
\r\n\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n




\r\n\r\n
\r\n","import { Component, Inject } from '@angular/core';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { finalize, takeUntil } from 'rxjs/operators';\r\nimport { Subject } from 'rxjs/Subject';\r\n\r\nimport { NbTokenService } from '@nebular/auth';\r\nimport { NbToastrService, NbDialogService } from '@nebular/theme';\r\nimport { Assessment, AssessmentData } from '../../../../@core/interfaces/common/CalorieFriend/assessment';\r\nimport { Utility } from '../../../../@core/utils/utility';\r\nimport { AssessmentDescriptiveValues } from '../../PatientSheetView/Assessments/DescriptiveValues';\r\nimport { THIS_EXPR } from '@angular/compiler/src/output/output_ast';\r\nimport { PatientsService } from 'app/@core/backend/common/services/CalorieFriend/patients.service';\r\nimport { PatientData } from 'app/@core/interfaces/common/CalorieFriend/patients';\r\nimport { AssessmentSettingService } from 'app/@core/backend/common/services/CalorieFriend/assessment-settings.service';\r\nimport { AssessmentProgressImageType } from './../../PatientSheetView/Assessments/edit-assessment.component';\r\nimport { defaultFormValues } from 'app/@core/utils/defaultFormValues';\r\nimport { FormlyFormOptions } from '@ngx-formly/core';\r\n\r\n/**\r\n * The Component for front-end users (patients) to input assessment data\r\n */\r\n@Component({\r\n selector: 'app-add-assessment',\r\n templateUrl: './assessment.component.html',\r\n styleUrls: ['./assessment.component.scss'],\r\n})\r\n/** AddAssessment component*/\r\nexport class AssessmentInputComponent {\r\n\r\n AddAssessmentLabel = 'Input Assessment Data';\r\n UpdateAssessmentLabel = 'Update Assessment';\r\n assessmentProgressImageType: typeof AssessmentProgressImageType = AssessmentProgressImageType;\r\n AssessmentLabel = '';\r\n\r\n SaveAssessmentLabel = 'Save Assessment';\r\n\r\n MealPlanComplianceLabel = 'Meal Plan Compliance';\r\n EnergyLevelLabel = 'Energy Level';\r\n StressLevelLabel = 'Stress Level';\r\n SleepQualityLabel = 'Sleep Quality';\r\n\r\n WeightLabel = 'Weight';\r\n BodyFatLabel = 'Body Fat %';\r\n CommentLabel = 'Comment';\r\n StartDateLabel = 'Start Date';\r\n EndDateLabel = 'End Date';\r\n\r\n PreferredUnitLabel = 'Preferred Unit';\r\n\r\n BackLabel = 'Back';\r\n Created = 'Created';\r\n Updated = 'Updated';\r\n ProblemCeatingAssessment = 'A problem occurred submitting the assessment.';\r\n\r\n AssessmentGuid: string = null;\r\n PatientName: string = '';\r\n StartDate: any;\r\n EndDate: any;\r\n\r\n IsSelfCheckin : boolean = false;\r\n HideSaveButton = false;\r\n\r\n PatientId;\r\n formlyForm: any;\r\n form = new FormGroup({});\r\n model: any = { /* initial model */ };\r\n\r\n DescriptiveValues = AssessmentDescriptiveValues;\r\n isLoading = false;\r\n isImageProgressUpload: boolean = true;\r\n options: FormlyFormOptions = {\r\n formState: {\r\n customData: {\r\n isImperial: true,\r\n // Add more custom data as needed\r\n }\r\n }\r\n };\r\n\r\n protected readonly unsubscribe$ = new Subject();\r\n\r\n /** Assessment ctor */\r\n constructor(\r\n private fb: FormBuilder,\r\n private router: Router,\r\n private route: ActivatedRoute,\r\n private assessmentsService: AssessmentData,\r\n private tokenService: NbTokenService,\r\n private toasterService: NbToastrService,\r\n private dialogService: NbDialogService,\r\n private PlanViewPatientsService: PatientData,\r\n private assessmentSettingService: AssessmentSettingService\r\n ) {\r\n }\r\n\r\n ngOnInit(): void {\r\n\r\n const guid = this.route.snapshot.paramMap.get('guid');\r\n const notificationToken = this.route.snapshot.paramMap.get('NotificationToken');\r\n this.patientAndAssessmentSettings(notificationToken);\r\n if (guid !== null) {\r\n this.loadAssessmentData(guid, notificationToken);\r\n this.AssessmentLabel = this.UpdateAssessmentLabel;\r\n } else {\r\n this.AssessmentLabel = this.AddAssessmentLabel;\r\n this.IsSelfCheckin = true;\r\n }\r\n }\r\n\r\n /**\r\n * Function to convert the input data to the Assessment data type\r\n * @param value\r\n */\r\n ConvertToAssessment(value: any): Assessment {\r\n if (!value.ProgressImageUrl || value.ProgressImageUrl == 'null')\r\n value.ProgressImageUrl = '';\r\n\r\n const assessment: Assessment = value;\r\n\r\n return assessment;\r\n }\r\n\r\n Back() {\r\n\r\n }\r\n\r\n /**\r\n * Handler of Success event of submit\r\n */\r\n handleSuccessResponse() {\r\n if (this.AssessmentGuid === null)\r\n this.toasterService.success('', `Item ${this.Created}!`);\r\n else\r\n this.toasterService.success('', `Item ${this.Updated}!`);\r\n\r\n this.Back();\r\n }\r\n\r\n /**\r\n * Handler of Fail event of submit\r\n */\r\n handleWrongResponse() {\r\n this.toasterService.danger('', this.ProblemCeatingAssessment);\r\n }\r\n\r\n private patientAndAssessmentSettings(notificationToken): void {\r\n this.isLoading = true;\r\n this.PlanViewPatientsService.get(null, notificationToken)\r\n .pipe(takeUntil(this.unsubscribe$))\r\n .subscribe((patient) => {\r\n this.options.formState.customData.isImperial = patient.isPreferredUnitImperial;\r\n console.log(\"Is imperial\", patient.isPreferredUnitImperial);\r\n this.PatientName = patient.name;\r\n this.PatientId = patient.id;\r\n // TODO: add this patient.createdByUserId\r\n this.assessmentSettingService.getAssessmentSettingsByUserId(patient.createdByUserId)\r\n .pipe(finalize(() => {\r\n this.isLoading = false;\r\n })).subscribe((data) => {\r\n console.log(data);\r\n if(data) {\r\n this.isImageProgressUpload = data.uploadProgressImages;\r\n this.formlyForm = JSON.parse(data.customQuestion);\r\n } else {\r\n this.formlyForm = defaultFormValues;\r\n }\r\n });\r\n }, (error) => {\r\n this.isLoading = false;\r\n });\r\n }\r\n\r\n /**\r\n * Function to load the assessment data\r\n */\r\n loadAssessmentData(guid, notificationToken) {\r\n if (guid) {\r\n this.assessmentsService.getByNotification(guid, notificationToken)\r\n .pipe(takeUntil(this.unsubscribe$))\r\n .subscribe((assessment) => {\r\n\r\n this.AssessmentGuid = assessment.guid;\r\n this.PatientName = assessment.patientName;\r\n\r\n this.StartDate = assessment.startDateString;\r\n this.EndDate = assessment.endDateString;\r\n let answersJson = assessment.answersJson?JSON.parse(assessment.answersJson): {};\r\n this.model = {\r\n id: assessment.id,\r\n guid: assessment.guid,\r\n height: assessment.height,\r\n weight: assessment.weight,\r\n bodyFat: assessment.bodyFat,\r\n mealPlanCompliance: assessment.mealPlanCompliance > 0 ? assessment.mealPlanCompliance : null,\r\n energyLevel: assessment.energyLevel > 0 ? assessment.energyLevel : null,\r\n stressLevel: assessment.stressLevel > 0 ? assessment.stressLevel : null,\r\n sleepQuality: assessment.sleepQuality > 0 ? assessment.sleepQuality : null,\r\n comment: assessment.comment ?? '',\r\n ...answersJson,\r\n progressImageUrl: assessment.progressImageUrl,\r\n progressImageLeftUrl: assessment.progressImageLeftUrl,\r\n progressImageRightUrl: assessment.progressImageRightUrl,\r\n }\r\n this.HideSaveButton = assessment.submittedByPatient;\r\n\r\n this.imgProgressItem = assessment.progressImageUrl;\r\n if (!this.imgProgressItem || this.imgProgressItem == '') {\r\n this.imgProgressItem = null;\r\n }\r\n\r\n });\r\n }\r\n }\r\n\r\n imgHover: boolean = false;\r\n imgProgressItem: any = null;\r\n\r\n /**\r\n * Event handler for uploading the image\r\n * @param event Event object\r\n */\r\n OnInputImageFileChanged(event, type: AssessmentProgressImageType) {\r\n if (event) {\r\n this.model['fileProgressImage' + type] = event;\r\n this.model['progressImage' + type + 'Url'] = null;\r\n }\r\n console.log(this.model);\r\n }\r\n\r\n onResetFoodImage(type: AssessmentProgressImageType) {\r\n this.model['fileProgressImage' + type] = null;\r\n this.model['progressImage' + type + 'Url'] = null;\r\n }\r\n submit() {\r\n let Assessment: Assessment = {\r\n id: this.model.id,\r\n guid: this.model.guid,\r\n height: this.model.height,\r\n weight: this.model.weight,\r\n bodyFat: this.model.bodyFat,\r\n mealPlanCompliance: this.model.mealPlanCompliance > 0 ? this.model.mealPlanCompliance : 0,\r\n energyLevel: this.model.energyLevel > 0 ? this.model.energyLevel : 0,\r\n stressLevel: this.model.stressLevel > 0 ? this.model.stressLevel : 0,\r\n sleepQuality: this.model.sleepQuality > 0 ? this.model.sleepQuality : 0,\r\n progressImageUrl: this.model.progressImageUrl,\r\n progressImageLeftUrl: this.model.progressImageLeftUrl,\r\n progressImageRightUrl: this.model.progressImageRightUrl,\r\n comment: this.model.comment ?? '',\r\n answersJson: null,\r\n patientName: this.PatientName,\r\n patientID: this.PatientId? this.PatientId : 0,\r\n submittedByPatient: false,\r\n startDate: this.StartDate,\r\n endDate: this.EndDate,\r\n startDateString: '',\r\n endDateString: '',\r\n }\r\n\r\n if(this.model.fileProgressImage) {\r\n Assessment.fileProgressImage = this.model.fileProgressImage;\r\n delete this.model.fileProgressImage;\r\n }\r\n if(this.model.fileProgressImageRight) {\r\n Assessment.fileProgressImageRight = this.model.fileProgressImageRight;\r\n delete this.model.fileProgressImageRight;\r\n }\r\n if(this.model.fileProgressImageLeft) {\r\n Assessment.fileProgressImageLeft = this.model.fileProgressImageLeft;\r\n delete this.model.fileProgressImageLeft;\r\n }\r\n\r\n // Add the answersJson field after the Assessment object has been constructed\r\n Assessment.answersJson = JSON.stringify(this.model);\r\n\r\n Assessment.guid = this.AssessmentGuid;\r\n Assessment.submittedByPatient = true;\r\n\r\n if (this.IsSelfCheckin) {\r\n Assessment.patientID = this.PatientId;\r\n }\r\n\r\n if (!Assessment.bodyFat) Assessment.bodyFat = 0;\r\n\r\n if (!Assessment.weight) Assessment.weight = 0;\r\n\r\n const observable = this.assessmentsService.submit(Assessment);\r\n this.isLoading = true;\r\n observable\r\n .pipe(takeUntil(this.unsubscribe$),\r\n finalize(() => this.isLoading = false))\r\n .subscribe(() => {\r\n this.handleSuccessResponse();\r\n\r\n if (this.IsSelfCheckin) this.HideSaveButton = true;\r\n this.model.fileProgressImage = Assessment.fileProgressImage;\r\n this.model.fileProgressImageLeft = Assessment.fileProgressImageLeft;\r\n this.model.fileProgressImageRight = Assessment.fileProgressImageRight;\r\n },\r\n err => {\r\n this.handleWrongResponse();\r\n },\r\n );\r\n }\r\n\r\n /**\r\n * Validator that validates the number with the ##.# pattern\r\n */\r\n validateNumber = Utility.validateNumber;\r\n}\r\n","","import { Component, OnInit } from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { Router } from '@angular/router';\r\nimport { NativeAppService } from 'app/@core/backend/common/services/native-app.service';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\nimport { UserStore } from 'app/@core/stores/user.store';\r\n\r\n@Component({\r\n selector: 'ngx-nativeapp-advert',\r\n templateUrl: './nativeapp-advert.component.html',\r\n styleUrls: ['./nativeapp-advert.component.scss']\r\n})\r\nexport class NativeappAdvertComponent implements OnInit {\r\n\r\n public displayInstallFromStoreLink = false;\r\n\r\n constructor(\r\n private nativeAppService: NativeAppService,\r\n private deviceService: DeviceDetectorService,\r\n private userStore: UserStore,\r\n private router: Router,\r\n private sanitizer: DomSanitizer\r\n\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n\r\n showMobileAppAdvert() {\r\n\r\n if (this.nativeAppService.isFromApp()) return false;\r\n /*\r\n // DEBUG MODE TEMPS // Demo Client On Apple Review Account.\r\n if (this.router.url.indexOf('2740cf86-13d0-40a9-bd96-33490a80a845') > 0) {\r\n return true;\r\n }\r\n return false;\r\n // DEBUG MODE TEMPS*/\r\n\r\n if (this.deviceService.isDesktop()) return false;\r\n return true;\r\n }\r\n\r\n getMobileLink() {\r\n return this.sanitizer.bypassSecurityTrustUrl(\"trainerfriendapp://\" + window.location.href);\r\n }\r\n\r\n getStoreLink(): string {\r\n if (this.deviceService.os.toLowerCase() === \"android\") {\r\n if(this.userStore.settings().playStoreUrl && this.userStore.settings().playStoreUrl.length > 10) return this.userStore.settings().playStoreUrl;\r\n return \"https://play.google.com/store/apps/details?id=com.TrainerFriend.TrainerFriendClientApp\";\r\n } else {\r\n if(this.userStore.settings().appStoreUrl && this.userStore.settings().appStoreUrl.length > 10) return this.userStore.settings().appStoreUrl;\r\n return \"https://apps.apple.com/us/app/id1614640437\";\r\n }\r\n }\r\n\r\n\r\n displayInstallFromStore(): void {\r\n setTimeout(() => {\r\n this.displayInstallFromStoreLink = true;\r\n }, 2000);\r\n }\r\n\r\n\r\n}\r\n","\r\n\r\n\r\n
    \r\n
  • Plan Name
  • \r\n
  • {{ ThePlan.name }}
  • \r\n
  • \r\n
\r\n\r\n
    \r\n
  • \r\n Plan Description\r\n
  • \r\n\r\n
  • {{ ThePlan.description }}
  • \r\n
  • \r\n
\r\n\r\n
    \r\n
  • Plan Notes
  • \r\n\r\n
  • {{ ThePlan.notes }}
  • \r\n
  • \r\n
\r\n\r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n \r\n\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n \r\n\r\n
","import { Component, ViewChild, OnInit } from '@angular/core';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { FormBuilder } from '@angular/forms';\r\nimport { NbDialogService, NbToastrService } from '@nebular/theme';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\nimport { format } from 'support';\r\n\r\nimport { PatientData } from 'app/@core/interfaces/common/CalorieFriend/patients';\r\nimport { MealPlan, MealPlanData, ProgramTemplateData } from 'app/@core/interfaces/common/CalorieFriend/plan';\r\nimport { UsersService } from 'app/@core/backend/common/services/users.service';\r\nimport { NativeAppService } from 'app/@core/backend/common/services/native-app.service';\r\n\r\nimport { MealPlanDefComponentBase } from 'app/pages/CalorieFriend/Plans/PlanDef/plan-def-base.component';\r\n\r\n@Component({\r\n selector: 'patient-meal-plan-view',\r\n templateUrl: './patient-meal-plan-view.component.html',\r\n styleUrls: ['./patient-meal-plan-view.component.scss'],\r\n})\r\nexport class PatientMealPlanViewComponent\r\n extends MealPlanDefComponentBase\r\n implements OnInit {\r\n @ViewChild('PlanSelection') PlanSelection: any;\r\n\r\n IsMobile: boolean = false;\r\n TheDayLabel = $localize`:@@Day:Day`;\r\n\r\n constructor(\r\n private PlanViewPatientsService: PatientData,\r\n private deviceService: DeviceDetectorService,\r\n private PlanViewRoute: ActivatedRoute,\r\n PlanViewFormBuilder: FormBuilder,\r\n PlanViewDialogService: NbDialogService,\r\n private PlanViewPlanService: MealPlanData,\r\n PlanViewToasterService: NbToastrService,\r\n PlanViewUsersService: UsersService,\r\n PlanViewRouter: Router,\r\n public nativeAppService: NativeAppService,\r\n programTemplateService: ProgramTemplateData,\r\n ) {\r\n super(\r\n PlanViewRoute,\r\n PlanViewFormBuilder,\r\n PlanViewDialogService,\r\n PlanViewPlanService,\r\n PlanViewToasterService,\r\n PlanViewUsersService,\r\n PlanViewRouter,\r\n PlanViewPatientsService,\r\n programTemplateService\r\n );\r\n this.PlanView = true;\r\n this.ref = null;\r\n }\r\n\r\n ngOnInit(): void {\r\n\r\n super.ngOnInit();\r\n\r\n this.PlanViewPlanService.get(this.PlanID).subscribe((data) => {\r\n\r\n },\r\n (err) => {\r\n let plansList;\r\n plansList = this.PlanViewPlanService.listByGuid(\r\n this.NotificationToken\r\n );\r\n plansList.subscribe((data) => {\r\n let plans = data.items;\r\n let newId = '';\r\n const activePlan: MealPlan = plans.find((plan) => plan.active);\r\n\r\n if (activePlan) {\r\n newId = activePlan.id.toString();\r\n } else {\r\n if (plansList.length > 0) {\r\n plans.sort((p1, p2) => p2.id - p1.id);\r\n newId = plans[0].id;\r\n }\r\n }\r\n\r\n if (newId !== '') {\r\n window.location.href = `/PatientView/Patient/${this.NotificationToken}/Meal/${newId}`;\r\n } else {\r\n window.location.href = `/PatientView/calendar/${this.NotificationToken}`;\r\n }\r\n });\r\n });\r\n\r\n //super.ngOnInit();\r\n\r\n this.onResize();\r\n\r\n if (this.PatientID || this.NotificationToken) {\r\n console.log(\"Plandef\", this.PatientID);\r\n this.PlanViewPatientsService.get(this.PatientID, this.NotificationToken)\r\n .pipe(takeUntil(this.unsubscribe$))\r\n .subscribe((patient) => {\r\n this.PatientName = format(\r\n \"{0} {1}'s View\",\r\n patient.firstName,\r\n patient.lastName\r\n );\r\n });\r\n }\r\n\r\n if (this.NotificationToken) {\r\n const Elements = document.getElementsByClassName('header-container');\r\n if (Elements?.length > 0) {\r\n const container: any = Elements[0];\r\n const Header = container.parentElement.parentElement.parentElement;\r\n Header.style.visibility = 'hidden';\r\n Header.style.height = '0px';\r\n }\r\n }\r\n }\r\n\r\n showMobileAppAdvert() {\r\n if (this.nativeAppService.isFromApp()) return false;\r\n if (this.deviceService.isDesktop) return false;\r\n\r\n if (this.deviceService.os) return false;\r\n\r\n return true;\r\n }\r\n\r\n onResize() {\r\n // check if running mobile\r\n this.IsMobile = this.deviceService.isMobile();\r\n }\r\n\r\n DayOrderName(day) {\r\n return format('{0} {1} ({2})', this.TheDayLabel, day.order, day.name);\r\n }\r\n}\r\n","\r\n\r\n
    \r\n
  • Plan Name
  • \r\n
  • {{ ThePlan.name }}
  • \r\n
  • \r\n
\r\n\r\n
    \r\n
  • \r\n Plan Description\r\n
  • \r\n\r\n
  • {{ ThePlan.description }}
  • \r\n
  • \r\n
\r\n\r\n
    \r\n
  • Plan Notes
  • \r\n\r\n
  • {{ ThePlan.notes }}
  • \r\n
  • \r\n
\r\n\r\n\r\n
\r\n\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n \r\n \r\n\r\n
","import {\r\n WorkoutMode,\r\n WorkoutService,\r\n} from './../../@core/backend/common/services/CalorieFriend/workout.service';\r\nimport { IComponentCanDeactivate } from './../../@auth/guards/changes.guard';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { FormBuilder } from '@angular/forms';\r\nimport { NbDialogService, NbToastrService } from '@nebular/theme';\r\nimport { map, takeUntil } from 'rxjs/operators';\r\n\r\nimport { PatientData } from 'app/@core/interfaces/common/CalorieFriend/patients';\r\nimport { FitnessPlan, FitnessPlanData, ProgramTemplateData } from 'app/@core/interfaces/common/CalorieFriend/plan';\r\nimport { UsersService } from 'app/@core/backend/common/services/users.service';\r\nimport { FitnessPlanDefComponentBase } from 'app/pages/CalorieFriend/FitnessPlans/PlanDef/fitness-plan-def-base.component';\r\nimport { Observable } from 'rxjs';\r\nimport { MatTabChangeEvent } from '@angular/material/tabs';\r\n\r\n@Component({\r\n selector: 'patient-fitness-plan-view',\r\n templateUrl: './patient-fitness-plan-view.component.html',\r\n styleUrls: ['./patient-fitness-plan-view.component.scss'],\r\n})\r\nexport class PatientFitnessPlanViewComponent\r\n extends FitnessPlanDefComponentBase\r\n implements OnInit {\r\n constructor(\r\n private PlanViewPlanService: FitnessPlanData,\r\n private PlanViewPatientsService: PatientData,\r\n PlanViewRoute: ActivatedRoute,\r\n PlanViewFormBuilder: FormBuilder,\r\n PlanViewDialogService: NbDialogService,\r\n PlanViewToasterService: NbToastrService,\r\n PlanViewUsersService: UsersService,\r\n private PlanViewRouter: Router,\r\n PlanViewPatientService: PatientData,\r\n private WorkoutService: WorkoutService,\r\n programTemplateService: ProgramTemplateData,\r\n ) {\r\n super(\r\n PlanViewRoute,\r\n PlanViewFormBuilder,\r\n PlanViewDialogService,\r\n PlanViewPlanService,\r\n PlanViewToasterService,\r\n PlanViewUsersService,\r\n PlanViewRouter,\r\n PlanViewPatientService,\r\n programTemplateService\r\n );\r\n this.PlanView = true;\r\n }\r\n\r\n ngOnInit(): void {\r\n if (this.PatientID || this.NotificationToken) {\r\n this.PlanViewPatientsService.get(this.PatientID, this.NotificationToken)\r\n .pipe(takeUntil(this.unsubscribe$))\r\n .subscribe((patient) => {\r\n this.PatientName = `${patient.firstName} ${patient.lastName}'s View`;\r\n this.OriginalPatientName = patient.name;\r\n this.IsPreferredUnitImperial = patient.isPreferredUnitImperial;\r\n }\r\n\r\n\r\n );\r\n }\r\n\r\n if (this.NotificationToken) {\r\n const Elements = document.getElementsByClassName('header-container');\r\n if (Elements?.length > 0) {\r\n const container: any = Elements[0];\r\n const Header = container.parentElement.parentElement.parentElement;\r\n Header.style.visibility = 'hidden';\r\n Header.style.height = '0px';\r\n }\r\n }\r\n\r\n this.PlanIDSubject.subscribe(() => {\r\n this.PlanViewPlanService.get(this.PlanID).subscribe((data) => {\r\n this.ThePlan = data;\r\n //this.PlanID = data.id;\r\n this.PatientID = data.patientID;\r\n\r\n super.ngOnInit();\r\n },\r\n (err) => {\r\n let plansList;\r\n plansList = this.PlanViewPlanService.listByGuid(\r\n this.NotificationToken\r\n );\r\n plansList.subscribe((data) => {\r\n let plans = data.items;\r\n let newId = '';\r\n const activePlan: FitnessPlan = plans.find((plan) => plan.active);\r\n\r\n if (activePlan) {\r\n newId = activePlan.id.toString();\r\n } else {\r\n if (plansList.length > 0) {\r\n plans.sort((p1, p2) => p2.id - p1.id);\r\n newId = plans[0].id;\r\n }\r\n }\r\n\r\n if (newId !== '') {\r\n window.location.href = `/PatientView/Patient/${this.NotificationToken}/Workout/${newId}`;\r\n } else {\r\n window.location.href = `/PatientView/calendar/${this.NotificationToken}`;\r\n }\r\n });\r\n });\r\n });\r\n }\r\n\r\n canDeactivate(): boolean | Observable {\r\n return !(this.WorkoutService.workoutMode.value == WorkoutMode.Workout);\r\n }\r\n\r\n onDayChanged(event: MatTabChangeEvent) {\r\n if (event.index < 0) return;\r\n this.WorkoutService.dayId.next(this.TheDays[event.index].id);\r\n }\r\n}\r\n","import { Component, ViewEncapsulation } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'patient-profile',\r\n templateUrl: './patient-profile.component.html',\r\n styleUrls: ['./patient-profile.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class PatientProfileComponent {}\r\n","\r\n","import { Component, ViewEncapsulation } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'patient-goals',\r\n templateUrl: './patient-goals.component.html',\r\n styleUrls: ['./patient-goals.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class PatientGoalsComponent {}\r\n","\r\n","import { Component, ViewEncapsulation } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'patient-profile-invalid',\r\n templateUrl: './patient-profile-invalid.component.html',\r\n styleUrls: ['./patient-profile-invalid.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class PatientProfileInvalidComponent {}\r\n","
\r\n\r\n
\r\n  

Sorry, this Client Zone has been archived. Please contact your Coach to re-activate.

\r\n
\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n\r\n\r\n@Component({\r\n selector: 'ngx-patient-checkin',\r\n templateUrl: './patient-checkin.component.html',\r\n styleUrls: ['./patient-checkin.component.scss']\r\n})\r\nexport class PatientCheckinComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n \r\n }\r\n\r\n}\r\n","","import {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n OnInit,\r\n} from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { takeWhile } from 'rxjs/operators';\r\n\r\nimport {\r\n Patient,\r\n PatientData,\r\n} from 'app/@core/interfaces/common/CalorieFriend/patients';\r\n\r\n@Component({\r\n selector: 'ngx-patient-calendar-view',\r\n templateUrl: './patient-calendar-view.component.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class PatientCalendarViewComponent implements OnInit {\r\n patient: Patient;\r\n\r\n private patientGuid: string = null;\r\n private loaded: boolean = false;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private patientService: PatientData,\r\n private cdRef: ChangeDetectorRef\r\n ) {\r\n this.cdRef.detach();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.patientGuid = this.route.snapshot.paramMap.get('patientGuid');\r\n if (!this.patientGuid) return;\r\n\r\n this.patientService\r\n .get(null, this.patientGuid)\r\n .pipe(takeWhile(() => !this.loaded))\r\n .subscribe((patient) => {\r\n this.patient = patient;\r\n this.loaded = true;\r\n this.cdRef.reattach();\r\n this.cdRef.detectChanges();\r\n });\r\n }\r\n}\r\n","\r\n\r\n
\r\n
\r\n

{{ patient.firstName + ' ' + patient.lastName }}'s Program

\r\n
\r\n
\r\n\r\n\r\n\r\n
","import { Component, OnInit } from '@angular/core';\r\nimport { PatientStore } from 'app/@core/stores/patient.store';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { filter, takeUntil, takeWhile } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'ngx-food-diary-container',\r\n templateUrl: './food-diary-container.component.html',\r\n styleUrls: ['./food-diary-container.component.scss']\r\n})\r\nexport class FoodDiaryContainerComponent implements OnInit {\r\n\r\n private readonly unsubscribe$: Subject = new Subject();\r\n private _patientLoaded: boolean = false;\r\n\r\n constructor(private patientStore: PatientStore) { }\r\n\r\n patientId: number;\r\n userId:number;\r\n day: Date;\r\n\r\n get dayTitle():string {\r\n if (new Date().toDateString() === new Date(this.day).toDateString()) return \"Today\";\r\n return this.day.toDateString();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.day = new Date();\r\n this.loadPatient();\r\n }\r\n\r\n\r\n loadPatient() {\r\n\r\n this.patientStore\r\n .onPatientChanged()\r\n .pipe(\r\n takeWhile(() => !this._patientLoaded),\r\n takeUntil(this.unsubscribe$),\r\n filter((patient) => !!patient)\r\n )\r\n .subscribe((patient) => {\r\n this.patientId = patient.id;\r\n this.userId = patient.createdByUserId;\r\n this.day = new Date();\r\n });\r\n }\r\n\r\n\r\n previous(): void {\r\n\r\n let date = new Date(this.day);\r\n date.setDate(this.day.getDate() - 1);\r\n this.day = date;\r\n }\r\n\r\n\r\n next(): void {\r\n\r\n let date = new Date(this.day);\r\n date.setDate(this.day.getDate() + 1);\r\n this.day = date;\r\n }\r\n\r\n\r\n\r\n}\r\n\r\n","\r\n\r\n
\r\n\r\n \r\n
\r\n \r\n\r\n
{{dayTitle}}
\r\n\r\n \r\n\r\n\r\n\r\n
\r\n\r\n\r\n
\r\n\r\n\r\n\r\n","\r\n
\r\n Workout Details -\r\n {{ workoutStart }} - {{ workoutDuration }}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n","import { Workout } from 'app/@core/interfaces/common/CalorieFriend/workout';\r\nimport { WorkoutDetail } from './../../@core/interfaces/common/CalorieFriend/workout';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport {\r\n WorkoutMode,\r\n WorkoutService,\r\n} from '../../@core/backend/common/services/CalorieFriend/workout.service';\r\nimport { IComponentCanDeactivate } from '../../@auth/guards/changes.guard';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport {\r\n differenceInHours,\r\n differenceInMinutes,\r\n differenceInSeconds,\r\n} from 'date-fns';\r\nimport { Utility } from 'app/@core/utils/utility';\r\nimport { PatientsService } from 'app/@core/backend/common/services/CalorieFriend/patients.service';\r\nimport { Patient } from 'app/@core/interfaces/common/CalorieFriend/patients';\r\n\r\ntype LogDetail = {\r\n [exNo: string]: WorkoutDetail[];\r\n};\r\n\r\n@Component({\r\n selector: 'patient-fitness-workout-logs-view',\r\n templateUrl: './patient-fitness-workout-logs-view.component.html',\r\n styleUrls: ['./patient-fitness-workout-logs-view.component.scss'],\r\n})\r\nexport class PatientFitnessWorkoutLogsViewComponent implements OnInit {\r\n workoutId: number;\r\n workoutDetails: WorkoutDetail[];\r\n workout: Workout;\r\n logDetails: LogDetail;\r\n patient: Patient;\r\n\r\n constructor(\r\n private workoutService: WorkoutService,\r\n private activatedRoute: ActivatedRoute,\r\n\r\n private patientsService: PatientsService\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n this.workoutId = Number(\r\n this.activatedRoute.snapshot.paramMap.get('WorkoutId')\r\n );\r\n this.initialize();\r\n }\r\n\r\n async initialize() {\r\n const token =\r\n this.activatedRoute.snapshot.paramMap.get('NotificationToken');\r\n this.patient = await this.patientsService\r\n .get(null, token)\r\n .toPromise();\r\n\r\n this.workoutDetails = await this.workoutService.getDetailsAll(this.workoutId);\r\n this.workout = await this.workoutService.getWorkout(this.workoutId);\r\n let blockIndex = -1,\r\n itemIndex = 0;\r\n const details: LogDetail = {};\r\n for (let i = 0; i < this.workoutDetails.length; i++) {\r\n const prevW = i > 0 && this.workoutDetails[i - 1];\r\n const w = this.workoutDetails[i];\r\n if (w.blockId != prevW?.blockId) {\r\n blockIndex++;\r\n itemIndex = 0;\r\n }\r\n if (prevW?.isCircuitSetNumber != w.isCircuitSetNumber) {\r\n itemIndex = 0;\r\n }\r\n ++itemIndex;\r\n let exNo = `${String.fromCharCode(0x41 + blockIndex)}${itemIndex}`;\r\n\r\n if (w.isCircuitSetNumber == 0 || !details[exNo]) {\r\n details[exNo] = [];\r\n }\r\n details[exNo].push(w);\r\n }\r\n\r\n console.log(details);\r\n\r\n this.logDetails = details;\r\n }\r\n\r\n get workoutStart() {\r\n return new Date(this.workout?.startDateTime + 'Z').toLocaleString();\r\n }\r\n get workoutDuration() {\r\n if (!this.workout) return 0;\r\n return Utility.getTimeDiffDisplayString(\r\n this.workout?.startDateTime,\r\n this.workout?.endDateTime,\r\n true\r\n );\r\n }\r\n\r\n get logDetailKeys() {\r\n if (!this.logDetails) return [];\r\n return Object.keys(this.logDetails);\r\n }\r\n}\r\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { InvoicesService } from 'app/@core/backend/common/services/CalorieFriend/invoices.service';\r\nimport { InvoiceFilter } from 'app/@core/interfaces/common/CalorieFriend/invoices';\r\nimport { PatientStore } from 'app/@core/stores/patient.store';\r\n\r\n@Component({\r\n selector: 'app-patient-invoices',\r\n templateUrl: './patient-invoices.component.html',\r\n styleUrls: ['./patient-invoices.component.scss'],\r\n})\r\nexport class PatientInvoicesComponent implements OnInit {\r\n\r\n @Input(\"patientGuid\")\r\n PatientGuid = \"\";\r\n\r\n constructor(\r\n private invoiceService: InvoicesService,\r\n private router: Router,\r\n private route: ActivatedRoute,\r\n private patientStore: PatientStore\r\n ) {\r\n }\r\n\r\n ngOnInit() {}\r\n\r\n /**\r\n * !This function should be arrow functions\r\n * @param filter filter for querying invoices\r\n * @returns\r\n */\r\n loadInvoices = (filter: InvoiceFilter) => {\r\n //const guid = this.patientStore.patient().patientGuid;\r\n return this.invoiceService.listForPatient(this.PatientGuid, {\r\n ...filter,\r\n sent: true\r\n });\r\n };\r\n\r\n onView = ({ id = 0 }, recurrent: boolean) => {\r\n //console.log(['/', 'billing', this.PatientGuid, 'invoices', id]);\r\n this.router.navigate(['invoices', id], {relativeTo: this.route});\r\n }\r\n}\r\n","","import { Component, OnInit } from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { Observable } from 'rxjs';\r\nimport { map } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'app-patient-invoice-view',\r\n templateUrl: './patient-invoice-view.component.html',\r\n styleUrls: ['./patient-invoice-view.component.scss'],\r\n})\r\nexport class PatientInvoiceViewComponent implements OnInit {\r\n invoiceId: Observable;\r\n patientGuid: Observable;\r\n constructor(private route: ActivatedRoute) {\r\n this.invoiceId = this.route.paramMap\r\n .pipe(map(params => Number.parseInt(params.get('invoiceId'))))\r\n \r\n this.patientGuid = this.route.paramMap\r\n .pipe(map(params => params.get('patientGuid')));\r\n }\r\n\r\n ngOnInit() {}\r\n}\r\n","\r\n\r\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { PatientSubscriptionsDataService } from 'app/@core/backend/common/services/CalorieFriend/patient-subscriptions-data.service';\r\nimport { PatientSubscriptionsFilter } from 'app/@core/interfaces/common/CalorieFriend/patient-subscription';\r\n\r\n@Component({\r\n selector: 'app-patient-view-subscriptions',\r\n templateUrl: './patient-subscriptions.component.html',\r\n styleUrls: ['./patient-subscriptions.component.scss'],\r\n})\r\nexport class PatientSubscriptionsComponent implements OnInit {\r\n @Input('patientGuid')\r\n PatientGuid: string;\r\n\r\n constructor(\r\n private subscriptionService: PatientSubscriptionsDataService,\r\n private router: Router,\r\n private route: ActivatedRoute\r\n ) {}\r\n\r\n ngOnInit() {}\r\n\r\n /**\r\n * !This function should be arrow functions\r\n * @param filter filter for querying invoices\r\n * @returns\r\n */\r\n loadSubscriptions = (filter: PatientSubscriptionsFilter) => {\r\n //const guid = this.patientStore.patient().patientGuid;\r\n return this.subscriptionService.listForPatient(this.PatientGuid, {\r\n ...filter,\r\n });\r\n };\r\n\r\n onView = ({ id = 0 }) => {\r\n //console.log(['/', 'billing', this.PatientGuid, 'invoices', id]);\r\n this.router.navigate(['subscriptions',id], { relativeTo: this.route });\r\n };\r\n}\r\n","\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\n\r\n@Component({\r\n selector: 'app-patient-billing',\r\n templateUrl: './patient-billing.component.html',\r\n styleUrls: ['./patient-billing.component.scss'],\r\n})\r\nexport class PatientBillingComponent implements OnInit {\r\n PatientGuid = '';\r\n\r\n constructor(private route: ActivatedRoute) {}\r\n\r\n ngOnInit() {\r\n this.PatientGuid = this.route.snapshot.paramMap.get('patientGuid');\r\n }\r\n}\r\n","\r\n","import { WorkoutGuard } from './../@auth/guards/workout.guard';\r\nimport { RouterModule, Routes } from '@angular/router';\r\nimport { NgModule } from '@angular/core';\r\n\r\nimport { FrontendsComponent } from './frontends.component';\r\nimport { AssessmentInputComponent } from '../pages/CalorieFriend/Customers/Assessments/assessment.component';\r\nimport { PatientProgressComponent } from 'app/pages/CalorieFriend/PatientSheetView/patient-progress/patient-progress.component';\r\nimport { PatientMealPlanViewComponent } from './patient-meal-plan-view/patient-meal-plan-view.component';\r\nimport { PatientFitnessPlanViewComponent } from './patient-fitness-plan-view/patient-fitness-plan-view.component';\r\nimport { PatientProfileComponent } from './patient-profile/patient-profile.component';\r\nimport { PatientGoalsComponent } from './patient-goals/patient-goals.component';\r\nimport { PatientProfileInvalidComponent } from './patient-profile-invalid/patient-profile-invalid.component';\r\nimport { PatientCheckinComponent } from './patient-checkin/patient-checkin.component';\r\nimport { PatientCalendarViewComponent } from './patient-calendar-view/patient-calendar-view.component';\r\nimport { FoodDiaryContainerComponent } from './food-tracking/food-diary-container/food-diary-container.component';\r\nimport { PatientFitnessWorkoutLogsViewComponent } from './patient-fitness-workout-logs-view/patient-fitness-workout-logs-view.component';\r\nimport { PatientInvoicesComponent } from './patient-billing/patient-invoices/patient-invoices.component';\r\nimport { PatientInvoiceViewComponent } from './patient-billing/patient-invoice-view/patient-invoice-view.component';\r\nimport { PatientBillingComponent } from './patient-billing/patient-billing.component';\r\nimport { PatientSubscriptionViewComponent } from './patient-billing/patient-subscription-view/patient-subscription-view.component';\r\nimport { PatientSubscriptionMetaViewComponent } from './patient-billing/patient-subscription-meta-view/patient-subscription-meta-view.component';\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n component: FrontendsComponent,\r\n children: [\r\n {\r\n path: 'weekly-assessment/:NotificationToken/:guid',\r\n component: AssessmentInputComponent,\r\n },\r\n {\r\n path: 'Patient/:NotificationToken/Meal/:PlanId',\r\n component: PatientMealPlanViewComponent,\r\n },\r\n {\r\n canDeactivate: [WorkoutGuard],\r\n path: 'Patient/:NotificationToken/Workout/:PlanId',\r\n component: PatientFitnessPlanViewComponent,\r\n },\r\n {\r\n path: 'Patient/:NotificationToken/Workout/Logs/:WorkoutId',\r\n component: PatientFitnessWorkoutLogsViewComponent,\r\n },\r\n {\r\n path: 'GeneralInfo/:NotificationToken',\r\n component: PatientProfileComponent,\r\n },\r\n {\r\n path: 'Patient/:NotificationToken',\r\n component: PatientMealPlanViewComponent,\r\n },\r\n {\r\n path: 'Patient/:NotificationToken/m/:PlanId',\r\n component: PatientMealPlanViewComponent,\r\n },\r\n {\r\n path: 'Patient/:NotificationToken/w/:PlanId',\r\n component: PatientFitnessPlanViewComponent,\r\n },\r\n {\r\n path: ':NotificationToken/m/:PlanId',\r\n component: PatientMealPlanViewComponent,\r\n },\r\n {\r\n path: ':NotificationToken/w/:PlanId',\r\n component: PatientFitnessPlanViewComponent,\r\n },\r\n {\r\n path: ':NotificationToken',\r\n component: PatientProfileComponent,\r\n },\r\n {\r\n path: ':NotificationToken',\r\n component: PatientMealPlanViewComponent,\r\n },\r\n {\r\n path: 'PatientAssessment/:NotificationToken',\r\n component: PatientProgressComponent,\r\n },\r\n {\r\n path: 'PatientGoals/:NotificationToken',\r\n component: PatientGoalsComponent,\r\n },\r\n {\r\n path: 'Invalid/:NotificationToken',\r\n component: PatientProfileInvalidComponent,\r\n },\r\n {\r\n path: ':NotificationToken/Checkin',\r\n component: PatientCheckinComponent,\r\n },\r\n {\r\n path: 'calendar/:patientGuid',\r\n component: PatientCalendarViewComponent,\r\n },\r\n {\r\n path: 'food/:patientGuid',\r\n component: FoodDiaryContainerComponent,\r\n },\r\n {\r\n path: 'billing/:patientGuid',\r\n component: PatientBillingComponent,\r\n },\r\n {\r\n path: 'billing/:patientGuid/invoices',\r\n component: PatientInvoicesComponent,\r\n },\r\n {\r\n path: 'billing/:patientGuid/invoices/:invoiceId',\r\n component: PatientInvoiceViewComponent,\r\n },\r\n {\r\n path: 'billing/:patientGuid/subscriptions/:subscriptionId',\r\n component: PatientSubscriptionViewComponent,\r\n },\r\n {\r\n path: 'billing/:patientGuid/subscriptions/meta/:subscriptionMetaId',\r\n component: PatientSubscriptionMetaViewComponent,\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 FrontendsRoutingModule {}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { Observable } from 'rxjs';\r\nimport { map } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'app-patient-subscription-view',\r\n templateUrl: './patient-subscription-view.component.html',\r\n styleUrls: ['./patient-subscription-view.component.scss'],\r\n})\r\nexport class PatientSubscriptionViewComponent implements OnInit {\r\n subscriptionId: Observable;\r\n patientGuid: Observable;\r\n\r\n constructor(private route: ActivatedRoute) {\r\n this.subscriptionId = this.route.paramMap.pipe(map((params) => Number.parseInt(params.get('subscriptionId'))));\r\n\r\n this.patientGuid = this.route.paramMap.pipe(map((params) => params.get('patientGuid')));\r\n }\r\n\r\n ngOnInit() {}\r\n}\r\n","

Subscription #{{subscriptionId | async}}

\r\n
\r\n
\r\n \r\n
","import { Component, OnInit } from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { Observable } from 'rxjs';\r\nimport { map } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'app-patient-subscription-meta-view',\r\n templateUrl: './patient-subscription-meta-view.component.html',\r\n styleUrls: ['./patient-subscription-meta-view.component.scss'],\r\n})\r\nexport class PatientSubscriptionMetaViewComponent implements OnInit {\r\n subscriptionMetaId: Observable;\r\n patientGuid: Observable;\r\n\r\n constructor(private route: ActivatedRoute) {\r\n this.subscriptionMetaId = this.route.paramMap.pipe(map((params) => Number.parseInt(params.get('subscriptionMetaId'))));\r\n this.patientGuid = this.route.paramMap.pipe(map((params) => params.get('patientGuid')));\r\n }\r\n\r\n ngOnInit() {}\r\n}\r\n","
\r\n \r\n
\r\n ","import { WorkoutGuard } from './../@auth/guards/workout.guard';\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport {\r\n NbCardModule,\r\n NbDialogModule,\r\n NbLayoutModule,\r\n NbMenuModule,\r\n NbOptionModule,\r\n NbCalendarModule,\r\n NbSelectModule,\r\n NbCardComponent,\r\n NbSpinnerModule,\r\n NbIconModule,\r\n NbThemeService,\r\n NbSidebarModule,\r\n NbBadgeModule,\r\n NbButtonModule,\r\n NbToast,\r\n NbToastrModule,\r\n} from '@nebular/theme';\r\n\r\nimport { NbEvaIconsModule } from '@nebular/eva-icons';\r\n\r\nimport { CookieService } from 'ngx-cookie-service';\r\nimport { CalendarModule, DateAdapter } from 'angular-calendar';\r\nimport { adapterFactory } from 'angular-calendar/date-adapters/date-fns';\r\n\r\nimport { ComponentsModule } from 'app/@components/components.module';\r\nimport { MaterialModule } from 'app/@components/material.module';\r\nimport { CalorieFriendModule } from 'app/pages/CalorieFriend/calorie-friend.module';\r\nimport { GraphModule } from 'app/admin/public-foods/meal-metrics-graph/meal-metrics-graph.module';\r\nimport { MealItemPresentationModule } from 'app/pages/CalorieFriend/Plans/PlanMeals/Meal/MealLayout/MealItemPresentation/meal-item-presentation.module';\r\nimport { MealPresentationModule } from 'app/pages/CalorieFriend/Plans/PlanMeals/Meal/MealLayout/MealPresentation/meal-presentation.module';\r\nimport { FrontendsRoutingModule } from './frontends-routing.module';\r\n\r\nimport { FrontendsComponent } from './frontends.component';\r\nimport { PatientGoalsComponent } from './patient-goals/patient-goals.component';\r\nimport { PatientProfileInvalidComponent } from './patient-profile-invalid/patient-profile-invalid.component';\r\nimport { PatientProfileComponent } from './patient-profile/patient-profile.component';\r\nimport { PatientMealPlanViewComponent } from './patient-meal-plan-view/patient-meal-plan-view.component';\r\nimport { PatientFitnessPlanViewComponent } from './patient-fitness-plan-view/patient-fitness-plan-view.component';\r\nimport { NativeappAdvertComponent } from './nativeapp-advert/nativeapp-advert.component';\r\nimport { PatientCheckinComponent } from './patient-checkin/patient-checkin.component';\r\nimport { PatientCalendarViewComponent } from './patient-calendar-view/patient-calendar-view.component';\r\nimport { PatientFitnessWorkoutLogsViewComponent } from './patient-fitness-workout-logs-view/patient-fitness-workout-logs-view.component';\r\nimport { PatientsService } from 'app/@core/backend/common/services/CalorieFriend/patients.service';\r\nimport { FoodDiaryContainerComponent } from './food-tracking/food-diary-container/food-diary-container.component';\r\nimport { ChatModule } from 'app/@chat/chat.module';\r\nimport { PatientInvoicesComponent } from './patient-billing/patient-invoices/patient-invoices.component';\r\nimport { PatientInvoiceViewComponent } from './patient-billing/patient-invoice-view/patient-invoice-view.component';\r\nimport { RouterModule } from '@angular/router';\r\nimport { PatientSubscriptionsComponent } from './patient-billing/patient-subscriptions/patient-subscriptions.component';\r\nimport { PatientBillingComponent } from './patient-billing/patient-billing.component';\r\nimport { PatientSubscriptionViewComponent } from './patient-billing/patient-subscription-view/patient-subscription-view.component';\r\nimport { PatientSubscriptionMetaViewComponent } from './patient-billing/patient-subscription-meta-view/patient-subscription-meta-view.component';\r\nconst FRONTENDS_COMPONENTS = [\r\n FrontendsComponent,\r\n PatientMealPlanViewComponent,\r\n PatientProfileComponent,\r\n PatientGoalsComponent,\r\n PatientProfileInvalidComponent,\r\n PatientFitnessPlanViewComponent,\r\n PatientFitnessWorkoutLogsViewComponent,\r\n PatientCalendarViewComponent,\r\n PatientInvoicesComponent,\r\n PatientInvoiceViewComponent,\r\n PatientSubscriptionsComponent,\r\n PatientSubscriptionViewComponent,\r\n PatientSubscriptionMetaViewComponent,\r\n PatientBillingComponent,\r\n];\r\n\r\nconst NB_MODULES = [\r\n NbLayoutModule,\r\n NbOptionModule,\r\n NbMenuModule,\r\n NbSelectModule,\r\n NbSelectModule,\r\n NbDialogModule,\r\n NbToastrModule,\r\n NbCardModule,\r\n NbCalendarModule,\r\n NbSpinnerModule,\r\n NbEvaIconsModule,\r\n NbIconModule,\r\n NbSidebarModule,\r\n NbBadgeModule,\r\n NbButtonModule,\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n RouterModule,\r\n FrontendsRoutingModule,\r\n ...NB_MODULES,\r\n ComponentsModule,\r\n MaterialModule,\r\n MealItemPresentationModule,\r\n MealPresentationModule,\r\n GraphModule,\r\n CalorieFriendModule,\r\n CalendarModule.forRoot({\r\n provide: DateAdapter,\r\n useFactory: adapterFactory,\r\n }),\r\n ChatModule,\r\n ],\r\n declarations: [\r\n ...FRONTENDS_COMPONENTS,\r\n NativeappAdvertComponent,\r\n PatientCheckinComponent,\r\n FoodDiaryContainerComponent,\r\n ],\r\n providers: [CookieService, PatientsService],\r\n})\r\nexport class FrontendsModule {}\r\n"]}