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EAEA5H,KACAE,KACA,MAAM9V,GAAmByV,GAAgB,EAEnCgI,GAAc,GAAG,OAAO,SAAS,MAAM,GAAGpd,EAAO,KAAK,2BAA2B,GAE1Eqd,GAAM,IAEfjb,EAAA,IAACkb,GAAA,CACC,UAAW9a,EAAY,CACrB,OAAQ,OACR,UAAW+a,EAAA,CACZ,EACD,MAAO,CAAE,GAAGC,GAAc,WAAYC,EAAe,EAErD,SAAArb,EAAA,IAACsb,EAAA,wBACC,OAAQ,CACN,GAAG1d,EAAO,KACV,YAAAod,GACA,4BAA6BA,EAC/B,EACA,cACE9c,GAAC8B,MAAAub,IAAqB,MAAOrd,EAAS,cAAc,SAAS,EAE/D,YAAaA,GAAY8B,EAAA,IAAAlB,GAAA,CAAW,MAAOZ,EAAS,EAEpD,SAAA8B,EAAA,IAACwb,GAAmB,SAAnB,CAA4B,MAAOje,GAClC,SAAAyC,MAAC0B,GACC,UAAC5B,EAAA,KAAAgV,GACC,iBAAC2G,IACC,SACE3b,OAAA8C,WAAA,WAAA5C,MAACwa,GACC,UAAAxa,EAAA,IAACya,EAAA,CACC,KAAK,IACL,QACEza,EAAA,IAAC0b,GAAA,CACC,kBAAmBrb,GAEnB,eAAC6Z,GAAM,IACT,IAGN,QAEClc,GAAgB,KACnB,EACF,EAECJ,EAAO,aAAe,GAGzB,EACF,GACF,EACF,ICzFN+d,GAAS,OAAQ3b,EAAA,IAAAib,GAAA,EAAI,EAAI,SAAS,eAAe,MAAM,CAAgB","names":["define_import_meta_env_default","useAppInsightsPageViewTracker","appInsightPlugin","useAppInsightsContext","location","useLocation","useEffect","config","useGoogleAnalyticsPageTracking","pathname","ReactGA","PageViewTracker","ConcurrencyError","message","traceId","ConflictError","DuplicateError","NetworkError","ValidationError","errors","toString","__publicField","error","PrOSValidationError","ErrorName","ErrorAlert","Component","createRef","showReloadLink","messageBarProps","onClick","e","shouldShowReloadLink","formatMessage","text","item","NotFoundError","ServerError","errorDetails","MessageBar","MessageBarType","jsxs","Stack","jsx","IconButton","_a","Link","mergeStyles","ErrorBoundaryFallback","children","CoreStore","locationId","userId","makeObservable","observable","action","FeedbackStore","key","notification","x","args","runInAction","options","Environment","UserPreferencesStore","computed","stores","StoresContext","createContext","StoresProvider","useStores","useContext","useCoreStore","useFeedbackStore","useUserPreferencesStore","AuthorizationErrorBox","theme","useTheme","onLoginClick","event","CenteredBox","FontIcon","FontSizes","NavItem","to","match","useMatch","Fragment","QueryStateIndicator","isLoading","loadingTitle","data","Spinner","SpinnerSize","errorMessage","getErrorMessage","NO_TAGS_REGEX","UtilService","type","timezoneOptions","browserTimeZone","allTimeZones","timezones","z","SelectableOptionMenuItemType","_","t","country","name","value","FormRichTextEditor","React","props","ref","rules","containerStyles","label","disabled","bottomMessage","withMaxCharactersToShow","quillProps","onChange","useController","count","handleChange","content","strippedValue","getErrorStyles","className","Heading","ReactQuill","FieldItemError","_prop","Text","NO_AUTH","IF_MATCH","X_TENANT","TRACE_ID","CONTENT_TYPE_HEADER","ERROR_TYPE","LocationGateway","api","id","eTag","logo","formData","appointmentType","sortRequest","noticeId","practiceNotice","request","GatewaysContext","useGateways","cacheUpdateItemArray","queryClient","queryKey","applyUpdate","queryState","cacheUpsertSingleItemInArray","isIdentityEqual","prev","checkIdentity","other","hasUpdated","next","prevItem","mapStringsToDates","startDate","endDate","rest","mapDatesToStrings","DateTime","ProviderRefDataKeys","ProviderGateway","providerId","appointmentTypeId","payload","availability","appointmentTypeAvailabilityId","removeAppointmentType","provider","file","RefDataModel","values","v","ProviderCacheKeys","usePatientConfigQuery","providerApi","useQuery","usePatientConfigMutation","useQueryClient","useMutation","response","updateProviderandProviderList","useRemovePatientConfig","useProviderLocationsQuery","useProvidersRefDataQuery","refDataMap","keys","d","idx","useLocationProvidersQuery","useLocationProviderQuery","p","useLocationProviderMutation","useUpdateProviderPhotoMutation","useAppointmentTypeAvailabilitiesQuery","useProviderAppointmentTypesQuery","useCreateAppointmentTypeAvailabilityMutation","useDeleteAppointmentTypeAvailabilityMutation","success","cached","useUpdateAppointmentTypeAvailabilityMutation","CacheKeys","useCreateLocationsQuery","locationApi","useLocationsQuery","useLocationQuery","l","useLocationAppointmentTypesQuery","useUpdateLocationMutation","mapValues","a","useUpdateLocationLogoMutation","useUpdateAppointmentSortOrderMutation","reOrdered","appointmentTypes","useUpdateAppointmentTypeMutation","useLocationNoticesQuery","useAddPracticeNoticeMutation","updated","useUpdatePracticeNoticeMutation","useDeletePracticeNoticeMutation","useLocationNoticeQuery","refetch","useAddAppointmentTypeCategoryMutation","createdCategory","oldData","newAppointmentTypes","at","cat","newCategories","useUpdateAppointmentTypeCategoryMutation","updatedCategory","refreshCache","oldCategory","category","removedAppointmentTypes","b","uncategorisedAppointmentTypes","useAppointmentTypeCategoryMappingQuery","useDeleteAppointmentTypeCategoryMutation","UnavailabilityGateway","exclusionPeriod","FieldsAutoSaveWrapper","onSubmit","autoSave","autoSaveDelay","formState","useFormContext","form","handleSubmit","autoSaveHandler","debounce","unsubscribe","_v","info","isManualFormChangeAction","isProgrammaticallyFormChange","Overlay","getFormStyles","defaultConfirmationDialogButtonsText","FORM_PROMPT_DISCARD_MESSAGE","FORM_PROMPT_RESET_MESSAGE","FormSubmitCancelButtons","onCancel","disableSubmit","disableCancel","submitButtonProps","cancelButtonProps","submitDataTestAttr","cancelDataTestAttr","formId","onRenderSubmitCancelButtons","PrimaryButton","DefaultButton","confirm","reset","getFormClassNames","classNamesFunction","FormBase","defaultValues","validationMode","reValidateMode","styles","submitCancelButtonsProps","externalForm","defaultValuesRef","useRef","classNames","currentForm","useForm","isEqual","FormProvider","FormUnTyped","styled","Form","routes","WhenFeatureToggled","observer","areToggledFeaturesVisible","getOpacityColor","opacity","updateA","getColorFromString","navBarActionButtonStyles","isCurrent","style","NavBarNavItem","iconName","tab","ActionButton","NavBar","navigate","useNavigate","changeTab","useState","Header","UserProfile","Help","LocationPicker","currentLocation","menuItemSelected","ev","items","core","locations","handleLocationClicked","locationItems","isProductionEnvironment","toggleFeatureToggle","handleLogout","logout","handleFeatureToggle","handleManageSubscription","Persona","PersonaSize","initAppInsights","AppInsightsReactPlugin","ApplicationInsights","initGoogleAnalytics","HOTJAR_VERSION","initHotJar","siteId","Hotjar","LicenceGateway","licenceId","TenantGateway","stringify","useTenantProvidersQuery","tenantApi","useLicenceMappingsQuery","useAppointmentTypesTG","appointmentTypeArgs","sortedIds","UserPreferenceModel","UserGateway","ErrorType","ExceptionFilter","errorType","err","AuthorisationError","TenantInterceptorMiddleware","token","getAccessToken","tenant","QueryClient","ReactQueryProvider","camEndpoint","AxiosHelperBase","AuthorizationMiddleware","unavailabilityApi","userApi","licenceApi","QueryClientProvider","Dashboard","Navigate","useCurrentUserQuery","account","useAccount","useUserPreferencesQuery","usePermissionsChecker","user","userPermissions","useCallback","permission","operator","hasPermission","Authorized","permissions","GoogleTagManagerEvents","useGtmAuthorisation","tenantId","setCurrentUserId","r","Notifications","notifications","close","toMessageBarType","notificationType","BookingStatus","alphabeticalSortPredicate","checkProviderBaseInterval","baseInterval","isNewDurationBaseIntervalWrong","isExistingDurationBaseIntervalWrong","checkLocationBaseInterval","checkLocationMultiAppt","getBookingStatus","isAvailableExistingPatients","isAvailableNewPatients","getCombinedAppointmentTypeData","appointmentTypesTG","currentAppointmentType","currentAppointmentTypeTG","getCombinedProviderAppointmentTypeData","providerAppointmentTypes","currentProviderAppointmentType","getWarningFontIconStyles","iconStyles","WarningFontIcon","BaseIntervalWarningMessageBar","defaultLink","appointmentTypesLink","providersLink","BaseIntervalWarning","providers","userPreferences","isLocationBaseInterval","isProviderBaseInterval","pat","MultiApptWarningMessageBar","MultiApptWarning","combinedAppointmentTypeData","isLocationMultiApptCustomised","isProviderMultiApptCustomised","InfoBarRestriction","showMessageBar","setShowMessageBar","messageBarSettings","MainLayout","toolbar","userQuery","selectedLocationId","mainStyles","toolbarStyles","createElement","Customizer","lazyRoutes","__vitePreload","LazyWrapper","Shell","hasPermissions","useAsync","preloads","def","Suspense","Routes","Route","route","lazy","NotFoundErrorBox","configure","promiseFinally","initializeIcons","redirectUri","App","ThemeProvider","globalAppStyles","defaultTheme","scopedSettings","AuthenticationProvider","CenteredLargeSpinner","AppInsightsContext","Router","ErrorBoundary","ReactDOM"],"sources":["../../src/core/config/index.ts","../../src/core/analytics/app-insights/app-insights.hooks.ts","../../src/core/analytics/google-analytics/google-analitics.hooks.ts","../../src/PageViewTracker.tsx","../../src/common/apiErrors/ConcurrencyError.ts","../../src/common/apiErrors/ConflictError.ts","../../src/common/apiErrors/DuplicateError.ts","../../src/common/apiErrors/NetworkError.ts","../../src/common/Validation/ValidationError.ts","../../src/common/Validation/PrOSValidationError.ts","../../src/common/ui-components/Alert.tsx","../../src/common/ErrorBoundaryFallback.tsx","../../src/core/stores/CoreStore.ts","../../src/core/stores/FeedbackStore.ts","../../src/core/Environment.ts","../../src/core/stores/UserPreferenceStore.ts","../../src/common/StoresProvider.tsx","../../src/common/ui-components/UnauthorizedErrorBox.tsx","../../src/common/ui-components/NavItem.tsx","../../src/common/ui-components/QueryStateIndicator.tsx","../../src/modules/booking/shared/util-service.ts","../../src/common/ui-components/form/fields/FormRichTextEditor.tsx","../../src/core/types/api.constants.ts","../../src/core/gateways/practice/LocationGateway.ts","../../src/core/gateways-context/GatewaysContext.tsx","../../src/core/gateways-context/useGateways.tsx","../../src/core/gateways/ReactQueryCacheHelpers.ts","../../src/core/gateways/practice/ProviderGateway.ts","../../src/core/models/refData.model.ts","../../src/core/gateways/practice/ProviderHooks.ts","../../src/core/gateways/practice/LocationHooks.ts","../../src/core/gateways/practice/UnavailabilityGateway.ts","../../src/common/ui-components/form/FieldsAutoSaveWrapper.tsx","../../src/common/ui-components/form/Form.styles.ts","../../src/common/ui-components/form/Form.types.ts","../../src/common/ui-components/form/FormSubmitCancelButtons.tsx","../../src/common/ui-components/form/Form.tsx","../../src/common/routes.ts","../../src/core/WhenFeatureToggled.tsx","../../src/layout/NavBar.tsx","../../src/common/ui-components/Help.tsx","../../src/common/ui-components/LocationPicker.tsx","../../src/common/ui-components/UserProfile.tsx","../../src/core/analytics/app-insights/app-insights.utils.ts","../../src/core/analytics/google-analytics/google-analitics.utils.ts","../../src/core/analytics/hotjar/hot-jar.utils.ts","../../src/core/gateways/tenant/LicenceGateway.ts","../../src/core/gateways/tenant/TenantGateway.ts","../../src/core/gateways/tenant/TenantHooks.ts","../../src/core/models/userPreference.model.ts","../../src/core/gateways/user/UserGateway.ts","../../src/core/middleware/exception-filter.enums.ts","../../src/core/middleware/exception-filter.middleware.ts","../../src/core/middleware/tenant-interceptor.middleware.ts","../../src/core/ReactQueryProvider.tsx","../../src/Dashboard.tsx","../../src/core/gateways/user/UserHooks.ts","../../src/core/auth/Permissions.ts","../../src/core/auth/Authorized.tsx","../../src/common/gtm.enums.ts","../../src/common/hooks/useGtmAuthorisation.ts","../../src/common/Notifications.tsx","../../src/modules/booking/models/appointmentType.model.ts","../../src/common/utils.ts","../../src/modules/booking/components/WarningFontIcon.tsx","../../src/modules/booking/pages/appointmentTypes/warnings/appointment-types-base-interval-warning-message-bar.tsx","../../src/modules/booking/pages/appointmentTypes/warnings/appointments-setting-base-interval-warning.tsx","../../src/modules/booking/pages/appointmentTypes/warnings/appointment-types-multi-appt-warning-message-bar.tsx","../../src/modules/booking/pages/appointmentTypes/warnings/appointments-setting-multi-appt-warning.tsx","../../src/layout/InfoBarRestriction.tsx","../../src/layout/MainLayout.tsx","../../src/layout/Shell.tsx","../../src/App.tsx","../../src/index.tsx"],"sourcesContent":["import { Environment } from \"core/Environment\";\n\nimport { AuthenticationOptions } from \"@bps/http-client\";\nimport { IConfiguration } from \"@microsoft/applicationinsights-web\";\n\ninterface RuntimeConfig {\n appInsightsInstrumentationKey: string;\n googleTagManagerId: string;\n\n msal: AuthenticationOptions;\n\n locale: string;\n dateFormatPattern: string;\n\n bhbUrl: string;\n apiUrl: string;\n tgApiUrl: string;\n subscriptionUrl: string;\n PrOSHotJarSiteId: string;\n\n /** Environment field to drive feature toggles */\n environment: Environment;\n query: {\n staleTimeMillis: number;\n };\n appInsights?: IConfiguration;\n}\n\nexport interface AppConfig\n extends Omit {\n app: {\n version: string;\n commitHash: string;\n };\n\n signalrBaseURL: string;\n notificationDuration: number;\n}\n\n// ----- Get the appConfig as loaded from public/config.js -----\ndeclare global {\n interface Window {\n appConfig: RuntimeConfig;\n }\n}\n\nconst { appInsightsInstrumentationKey, ...runtime } = window.appConfig;\n// -------------------------------------------------------------\n\n// ----- Merge with .env settings ------------------------------\nexport const config: AppConfig = {\n ...runtime,\n\n msal: {\n ...runtime.msal,\n postAuthenticateRedirectUrl: import.meta.env.PUBLIC_URL || \"/\"\n },\n\n appInsights: appInsightsInstrumentationKey\n ? { instrumentationKey: appInsightsInstrumentationKey }\n : undefined,\n\n app: {\n version: import.meta.env.VITE_VERSION as string,\n commitHash: import.meta.env.VITE_COMMIT_HASH as string\n },\n\n bhbUrl: import.meta.env.VITE_BHB_URL || runtime.bhbUrl,\n apiUrl: import.meta.env.VITE_API_URL || runtime.apiUrl,\n tgApiUrl: import.meta.env.VITE_TG_API_URL || runtime.tgApiUrl,\n subscriptionUrl:\n import.meta.env.VITE_SUBSCRIPTION_URL || runtime.subscriptionUrl,\n PrOSHotJarSiteId:\n import.meta.env.VITE_HOTJAR_SITEID || runtime.PrOSHotJarSiteId,\n signalrBaseURL: \"/hubs\",\n\n notificationDuration: 4000\n};\n// -------------------------------------------------------------\n","import { config } from \"core/config\";\nimport { useEffect } from \"react\";\nimport { useLocation } from \"react-router-dom\";\n\nimport { useAppInsightsContext } from \"@microsoft/applicationinsights-react-js\";\n\nexport const useAppInsightsPageViewTracker = () => {\n const appInsightPlugin = useAppInsightsContext();\n const location = useLocation();\n useEffect(() => {\n if (config.environment && import.meta.env.MODE === \"development\") {\n appInsightPlugin.trackPageView &&\n appInsightPlugin.trackPageView({\n name: document.title,\n uri: location.pathname\n });\n }\n }, [appInsightPlugin, location]);\n};\n","import { useEffect } from \"react\";\nimport ReactGA from \"react-ga\";\nimport { useLocation } from \"react-router-dom\";\n\nexport const useGoogleAnalyticsPageTracking = () => {\n const { pathname } = useLocation();\n\n useEffect(() => {\n ReactGA.set({ page: pathname });\n ReactGA.pageview(pathname);\n }, [pathname]);\n};\n","import { useAppInsightsPageViewTracker } from \"core/analytics/app-insights/app-insights.hooks\";\nimport { useGoogleAnalyticsPageTracking } from \"core/analytics/google-analytics/google-analitics.hooks\";\n\nexport const PageViewTracker = () => {\n useAppInsightsPageViewTracker();\n useGoogleAnalyticsPageTracking();\n\n return null;\n};\n","export class ConcurrencyError extends Error {\n constructor(message?: string | undefined, public traceId?: string) {\n super(message);\n }\n}\n","export class ConflictError extends Error {\n constructor(message?: string | undefined, public traceId?: string) {\n super(message);\n\n // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n Object.setPrototypeOf(this, ConflictError.prototype);\n }\n}\n","export class DuplicateError extends Error {\n constructor(message?: string | undefined, public traceId?: string) {\n super(message);\n\n // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n Object.setPrototypeOf(this, DuplicateError.prototype);\n }\n}\n","export class NetworkError extends Error {}\n","export class ValidationError extends Error {\n errors: ErrorsMap[] = [];\n constructor(\n message?: string | undefined,\n errors?: ErrorsMap[],\n public traceId?: string\n ) {\n super(message ? message : toString(errors));\n\n // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n Object.setPrototypeOf(this, ValidationError.prototype);\n\n if (errors) {\n this.errors = errors;\n }\n }\n}\n\nexport interface ErrorsMap {\n ErrorMessage: string;\n MemberNames: string[];\n}\nfunction toString(errors?: ErrorsMap[]) {\n if (errors!.length < 1 || errors === undefined) {\n return \"A validation error occurred\";\n }\n\n const messages = errors.map(error => error.ErrorMessage);\n return messages.join(\", \");\n}\n","export class PrOSValidationError extends Error {\n errors: PrOSErrorsMap[] = [];\n constructor(\n message?: string | undefined,\n errors?: PrOSErrorsMap[],\n public traceId?: string\n ) {\n super(message ? message : toString(errors));\n\n // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n Object.setPrototypeOf(this, PrOSValidationError.prototype);\n\n if (errors) {\n this.errors = errors;\n }\n }\n}\n\nexport interface PrOSErrorsMap {\n [fieldName: string]: string[];\n}\n\nfunction toString(errors?: PrOSErrorsMap[]) {\n if (errors!.length < 1 || errors === undefined) {\n return \"A validation error occurred\";\n }\n\n const messages = Object.keys(errors).map(ErrorName => errors[ErrorName]);\n return messages.join(\", \");\n}\n","import { ConflictError, DuplicateError } from \"common/apiErrors\";\nimport { ValidationError } from \"common/Validation\";\nimport { Component, createRef, MouseEvent, ReactNode } from \"react\";\n\nimport {\n IconButton,\n IMessageBarProps,\n Link,\n mergeStyles,\n MessageBar,\n MessageBarType,\n Stack\n} from \"@bps/fluent-ui\";\nimport { NotFoundError, ServerError } from \"@bps/http-client\";\n\nexport type ErrorAlertProps = {\n error?: string | Error;\n showReloadLink?: boolean;\n} & IMessageBarProps;\n\nexport class ErrorAlert extends Component {\n private errorDetailsRef = createRef();\n\n render() {\n const { error, showReloadLink, ...messageBarProps } = this.props;\n const onClick = (e: MouseEvent) => {\n e.preventDefault();\n window.location.reload();\n };\n\n const shouldShowReloadLink =\n showReloadLink || error instanceof ConflictError;\n\n const formatMessage = (error: string | undefined | Error): ReactNode[] => {\n const text = error instanceof Error ? error.message : error;\n return text\n ? text.split(\"/n\").map(item => {\n return (\n \n {item}\n
\n
\n );\n })\n : [An error occurred];\n };\n\n let traceId: undefined | string;\n\n if (\n error instanceof NotFoundError ||\n error instanceof ConflictError ||\n error instanceof ValidationError ||\n error instanceof DuplicateError\n ) {\n traceId = error.traceId;\n }\n\n if (error instanceof ServerError) {\n traceId = error.traceId;\n }\n\n let errorDetails = error instanceof Error ? error.message : error;\n if (traceId) {\n errorDetails += `Trace ID: ${traceId}`;\n }\n if (error instanceof ServerError && error.detail) {\n errorDetails += `Data: ${error.detail}`;\n }\n\n return (\n \n \n {formatMessage(error)} \n {\n this.errorDetailsRef.current?.select();\n document.execCommand(\"copy\");\n }}\n />\n \n\n
\n {shouldShowReloadLink && (\n \n \n Click here\n {\" \"}\n to reload the page\n \n )}\n \n
\n );\n }\n}\n","import { ErrorAlert } from \"common/ui-components/Alert\";\nimport { FunctionComponent } from \"react\";\nimport { FallbackProps } from \"react-error-boundary\";\n\nexport const ErrorBoundaryFallback: FunctionComponent = ({\n error,\n children\n}) => {\n if (error) {\n return ;\n }\n return <>{children};\n};\n","import { guid } from \"core/types/Guid\";\nimport { action, makeObservable, observable } from \"mobx\";\n\nexport class CoreStore {\n locationId: guid;\n\n public setCurrentLocation = (locationId: string) => {\n this.locationId = locationId;\n };\n\n constructor() {\n makeObservable(this, {\n locationId: observable,\n currentUserId: observable,\n setCurrentLocation: action,\n setCurrentUserId: action\n });\n }\n currentUserId: guid;\n\n public setCurrentUserId = (userId: string) => {\n this.currentUserId = userId;\n };\n}\n","import { action, makeObservable, observable, runInAction } from \"mobx\";\nimport { ReactNode } from \"react\";\n\nexport type NotificationType = \"info\" | \"success\" | \"error\" | \"warning\";\n\nexport interface Notification {\n message: ReactNode;\n type: NotificationType;\n key: string;\n duration?: number;\n}\n\nexport class FeedbackStore {\n private keyCounter = 0;\n\n constructor(public config = { notificationDuration: 4000 }) {\n makeObservable(this, {\n close: action,\n notify: action\n });\n }\n\n notifications = observable([], { deep: false });\n\n close = (key: string) => {\n const notification = this.notifications.find(x => x.key === key);\n if (notification) {\n return this.notifications.remove(notification);\n }\n return false;\n };\n\n notify = (args: Omit): string => {\n const notification = { ...args, key: `${this.keyCounter++}` };\n this.notifications.push(notification);\n setTimeout(() => {\n // ⚠️ remove will not work unless notifications is created with deep: false option\n runInAction(() => {\n this.notifications.remove(notification);\n });\n }, args.duration || this.config.notificationDuration);\n return notification.key;\n };\n\n error = (message: ReactNode, options: { duration?: number } = {}) =>\n this.notify({\n message,\n type: \"error\",\n duration: !options.duration ? 3000 : options.duration\n });\n\n info = (message: ReactNode, options: { duration?: number } = {}) =>\n this.notify({\n message,\n type: \"info\",\n duration: options.duration\n });\n\n success = (message: ReactNode, options: { duration?: number } = {}) =>\n this.notify({\n message,\n type: \"success\",\n duration: options.duration\n });\n\n warn = (message: ReactNode, options: { duration?: number } = {}) =>\n this.notify({\n message,\n type: \"warning\",\n duration: options.duration\n });\n}\n","export enum Environment {\n Dev = \"deva\",\n Uat = \"uata\",\n Prod = \"proda\"\n}\n","import { config } from \"core/config\";\nimport { Environment } from \"core/Environment\";\nimport { action, computed, makeObservable, observable } from \"mobx\";\n\nexport class UserPreferencesStore {\n // Features are visible by default in the dev environment\n private _areToggledFeaturesVisible = config.environment === Environment.Dev;\n private _isProductionEnvironment = config.environment === Environment.Prod;\n\n public constructor() {\n makeObservable<\n UserPreferencesStore,\n \"_areToggledFeaturesVisible\" | \"_isProductionEnvironment\"\n >(this, {\n _isProductionEnvironment: observable,\n _areToggledFeaturesVisible: observable,\n toggleFeatureToggle: action,\n areToggledFeaturesVisible: computed\n });\n }\n\n public toggleFeatureToggle = () => {\n // For production the features aren't able to be toggled\n if (!this._isProductionEnvironment) {\n this._areToggledFeaturesVisible = !this._areToggledFeaturesVisible;\n }\n };\n\n public get areToggledFeaturesVisible(): boolean {\n if (!this._isProductionEnvironment) return this._areToggledFeaturesVisible;\n\n // Ensure that toggled features aren't displayed in production\n return false;\n }\n\n public get isProductionEnvironment(): boolean {\n return this._isProductionEnvironment;\n }\n}\n","import { config } from \"core/config\";\nimport { CoreStore, FeedbackStore } from \"core/stores\";\nimport { UserPreferencesStore } from \"core/stores/UserPreferenceStore\";\nimport { createContext, PropsWithChildren, useContext } from \"react\";\n\ninterface Stores {\n core: CoreStore;\n feedback: FeedbackStore;\n userPreferenceStore: UserPreferencesStore;\n}\n\nconst stores: Stores = {\n core: new CoreStore(),\n feedback: new FeedbackStore({\n notificationDuration: config.notificationDuration\n }),\n userPreferenceStore: new UserPreferencesStore()\n};\n\nexport const StoresContext = createContext(stores);\n\nexport const StoresProvider = ({ children }: PropsWithChildren) => {\n return (\n {children}\n );\n};\n\nexport const useStores = () => useContext(StoresContext);\nexport const useCoreStore = () => useStores().core;\nexport const useFeedbackStore = () => useStores().feedback;\nexport const useUserPreferencesStore = () => useStores().userPreferenceStore;\n","import { FunctionComponent, MouseEvent } from \"react\";\n\nimport {\n CenteredBox,\n FontIcon,\n FontSizes,\n Link,\n useTheme\n} from \"@bps/fluent-ui\";\n\nexport const AuthorizationErrorBox: FunctionComponent = () => {\n const theme = useTheme();\n const onLoginClick = (event: MouseEvent) => {\n event.stopPropagation();\n event.preventDefault();\n };\n return (\n \n \n

403

\n

\n You do not have appropriate permissions to access this page.
\n Check the URL and your user permissions before trying again.\n

\n

\n Alternatively,{\" \"}\n login as a different user.\n

\n
\n );\n};\n","import { ReactNode } from \"react\";\nimport { LinkProps, useMatch } from \"react-router-dom\";\n\nexport type NavItemRenderProps = Pick & {\n /**\n * True when \"to\" matches the current location\n */\n isActive: boolean;\n};\n\nexport type NavItemProps = Pick & {\n children?: (props: NavItemRenderProps) => ReactNode;\n};\n\n/**\n * This component can be used when a component needs to know whether a path matches the current location,\n * to, for example, style the current navigation link differently.\n *\n * It expects a render function as a child, passing in whether a given path matches the current location\n *\n * Example:\n * \n * {({ isActive, to }) => (\n *
  • \n * {isActive ? \"Current location matches Calendar path\" : Go to Calendar page}\n *
  • \n * )}\n *
    \n */\nexport const NavItem = ({ to, children }: NavItemProps) => {\n const match = useMatch(`${to}/*`);\n\n if (!children) return null;\n\n return <>{children({ to, isActive: !!match })};\n};\n","import { ErrorAlert } from \"common/ui-components/Alert\";\nimport { ReactNode } from \"react\";\n\nimport { Spinner, SpinnerSize, Stack } from \"@bps/fluent-ui\";\n\nexport interface QueryStateIndicatorProps {\n isLoading: boolean;\n loadingTitle?: string;\n error?: Error | Error[] | unknown;\n data: TData;\n children: ReactNode | ((data: TData) => ReactNode);\n}\n\nexport const QueryStateIndicator = ({\n isLoading,\n loadingTitle,\n error,\n data,\n children\n}: QueryStateIndicatorProps) => {\n if (isLoading) {\n return (\n \n \n \n );\n }\n\n const errorMessage = getErrorMessage(error, data);\n if (errorMessage) {\n return ;\n }\n\n if (typeof children === \"function\") {\n return children(data);\n }\n\n return <>{children};\n};\n\nfunction getErrorMessage(\n error: Error | Error[] | unknown | undefined,\n data: TData\n) {\n if (!error && data) return undefined;\n\n if (Array.isArray(error)) {\n return error.length ? error[0] : undefined;\n }\n\n return (error as Object)?.toString() ?? \"The data could not be loaded.\";\n}\n","import timezones from \"compact-timezone-list\";\nimport _ from \"lodash\";\nimport { IEnum } from \"modules/booking/shared/models/common.model\";\n\nimport { IDropdownOption, SelectableOptionMenuItemType } from \"@bps/fluent-ui\";\n\nexport const NO_TAGS_REGEX = /(<([^>]+)>)/gi;\n\nexport class UtilService {\n public static getEnumDescription(type: IEnum, key: any): string {\n if (!type) return \"\";\n return type[key];\n }\n\n public static getTimeZones(): IDropdownOption[] {\n const timezoneOptions: IDropdownOption[] = [];\n const browserTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n const allTimeZones = timezones.map(z => {\n return z.tzCode as string;\n }) as string[];\n\n if (browserTimeZone != null) {\n timezoneOptions.push(\n ...[\n {\n key: \"Header1\",\n text: \"Browser Time Zone\",\n itemType: SelectableOptionMenuItemType.Header\n },\n { key: browserTimeZone, text: this.cleanTzName(browserTimeZone) },\n {\n key: \"divider_1\",\n text: \"-\",\n itemType: SelectableOptionMenuItemType.Divider\n }\n ]\n );\n _.remove(allTimeZones, t => t === browserTimeZone);\n\n const country = browserTimeZone.split(\"/\")[0];\n timezoneOptions.push(\n {\n key: \"Header2\",\n text: \"Region Time Zones\",\n itemType: SelectableOptionMenuItemType.Header\n },\n ..._.filter(allTimeZones, t => t.startsWith(country)).map(t => {\n return { key: t, text: this.cleanTzName(t) };\n }),\n {\n key: \"divider_2\",\n text: \"-\",\n itemType: SelectableOptionMenuItemType.Divider\n }\n );\n _.remove(allTimeZones, t => t.startsWith(country));\n\n timezoneOptions.push(\n {\n key: \"Header3\",\n text: \"World Time Zones\",\n itemType: SelectableOptionMenuItemType.Header\n },\n ..._.map(allTimeZones, t => {\n return { key: t, text: this.cleanTzName(t) };\n }),\n {\n key: \"divider_3\",\n text: \"-\",\n itemType: SelectableOptionMenuItemType.Divider\n }\n );\n }\n\n return timezoneOptions;\n }\n\n public static cleanTzName(name: string) {\n return name.replace(/_/g, \" \");\n }\n\n public static getTextFromHtml(value: string | undefined) {\n return (value ?? \"\").replace(NO_TAGS_REGEX, \"\").trim();\n }\n}\n","import { UtilService } from \"modules/booking/shared/util-service\";\nimport \"quill-paste-smart\";\nimport React, { ReactFragment, Ref } from \"react\";\nimport { useController } from \"react-hook-form\";\nimport ReactQuill from \"react-quill\";\nimport { ReactQuillProps } from \"react-quill/lib\";\n\nimport {\n FieldItemError,\n Heading,\n IStackStyles,\n IStyle,\n mergeStyles,\n Stack,\n Text,\n useTheme\n} from \"@bps/fluent-ui\";\n\nimport { FormFieldProps } from \"./types\";\n\ntype FormRichTextEditorProps = FormFieldProps &\n Omit & {\n containerStyles?: IStackStyles;\n label?: string;\n disabled?: boolean;\n withMaxCharactersToShow?: number;\n bottomMessage?: ReactFragment;\n };\n\nexport const FormRichTextEditor = React.forwardRef(\n (props: FormRichTextEditorProps, ref: Ref) => {\n const theme = useTheme();\n const {\n name,\n rules,\n containerStyles,\n label,\n disabled,\n bottomMessage,\n withMaxCharactersToShow,\n ...quillProps\n } = props;\n\n const {\n field: { value, onChange },\n fieldState: { error }\n } = useController({ name, rules });\n\n const strippedPrevValue = UtilService.getTextFromHtml(value ?? \"\").trim();\n\n const count = strippedPrevValue.length;\n\n const handleChange = (content: string) => {\n const strippedValue = UtilService.getTextFromHtml(content ?? \"\");\n\n onChange(strippedValue.length ? content : null);\n };\n\n const getErrorStyles = (): IStyle | undefined =>\n error?.message\n ? {\n \".ql-toolbar.ql-snow\": {\n borderColor: theme.semanticColors.errorText\n },\n \".ql-container.ql-snow\": {\n borderColor: theme.semanticColors.errorText\n }\n }\n : undefined;\n\n const className = mergeStyles(quillProps.className, getErrorStyles(), {\n \".ql-toolbar,.ql-container\": {\n backgroundColor: disabled\n ? theme.semanticColors.disabledBackground\n : \"none\"\n },\n \".ql-editor\": { wordBreak: \"break-word\" }\n });\n\n return (\n \n {label && (\n \n {label}\n \n )}\n\n \n \n {error?.message && (\n \n )}\n ({\n root: {\n color: theme.semanticColors.disabledText,\n marginLeft: \"auto\",\n paddingTop: 8\n }\n })}\n horizontal\n tokens={{ childrenGap: 16 }}\n >\n {bottomMessage}\n {withMaxCharactersToShow && (\n \n {count}/{withMaxCharactersToShow}\n \n )}\n \n \n \n );\n }\n);\n","export const NO_AUTH = \"x-no-msal\";\nexport const IF_MATCH = \"If-Match\";\nexport const X_TENANT = \"X-Tenant\";\nexport const TRACE_ID = \"ProsWebApp\"; //appContext.appInsights?.context.telemetryTrace.traceID;\nexport const CONTENT_TYPE_HEADER = \"Content-Type\";\nexport const ERROR_TYPE = \"x-error-type\";\n","import { LocationDto } from \"core/models/location\";\nimport { CONTENT_TYPE_HEADER, IF_MATCH } from \"core/types/api.constants\";\nimport { guid } from \"core/types/Guid\";\nimport {\n AppointmentTypeDto,\n AppointmentTypeSortOrderDto\n} from \"modules/booking/models\";\nimport {\n AppointmentTypeCategoryDto,\n AppointmentTypeCategoryMappingDto,\n AppointmentTypeCategoryRequestDto\n} from \"modules/booking/models/appointmentTypeCategory\";\nimport {\n PracticeNoticeDto,\n PracticeNoticeRequest\n} from \"modules/booking/models/practiceNotice.model\";\n\nimport { AxiosInstance } from \"@bps/http-client\";\n\ninterface UploadLogoResponse {\n link: string;\n}\n\nexport class LocationGateway {\n constructor(private api: AxiosInstance) {}\n\n public getLocations = async (): Promise =>\n (await this.api.get(\"location\")).data;\n\n public getLocationById = async (locationId: guid): Promise =>\n (await this.api.get(`location/${locationId}`)).data;\n\n public getAppointmentTypesForLocation = async (\n locationId: guid\n ): Promise =>\n (\n await this.api.get(\n `location/${locationId}/appointmenttype`\n )\n ).data;\n\n public updateLocation = async (location: LocationDto) => {\n const { data } = await this.api.put(\"location\", location, {\n headers: {\n eTag: location.eTag\n }\n });\n\n return data;\n };\n\n public updatePatchLocationPatch = async (\n location: Patch\n ): Promise => {\n const { id, eTag, ...data } = location;\n const response = await this.api.patch(\n `/location/${id}`,\n data,\n {\n headers: {\n [IF_MATCH]: location.eTag\n }\n }\n );\n return { ...response.data };\n };\n\n public uploadLogo = async (\n locationId: string,\n logo: File\n ): Promise => {\n const formData = new FormData();\n formData.append(\"FileData\", logo);\n\n const { data } = await this.api.post(\n `location/${locationId}/uploadLogo`,\n formData,\n {\n headers: {\n [CONTENT_TYPE_HEADER]: \"multipart/form-data\"\n }\n }\n );\n\n return data.link;\n };\n\n public updateAppointmentTypeForLocation = async (\n locationId: string,\n appointmentType: AppointmentTypeDto\n ): Promise => {\n const { data } = await this.api.put(\n `location/${locationId}/appointmenttype/${appointmentType.id}`,\n appointmentType,\n {\n headers: {\n eTag: appointmentType.eTag\n }\n }\n );\n\n return data;\n };\n\n public updateSortOrder = async (\n locationId: string,\n sortRequest: AppointmentTypeSortOrderDto[]\n ) => {\n const { data } = await this.api.put(\n `location/${locationId}/appointmenttype/sort`,\n sortRequest\n );\n\n return data;\n };\n\n public getNoticesForLocation = async (\n locationId: guid\n ): Promise => {\n return (\n await this.api.get(\n `location/${locationId}/practicenotice`\n )\n ).data;\n };\n\n public getNoticeForLocation = async (\n locationId: guid,\n noticeId: guid\n ): Promise =>\n (\n await this.api.get(\n `location/${locationId}/practicenotice/${noticeId}`\n )\n ).data;\n\n public addNotice = async (\n practiceNotice: PracticeNoticeRequest\n ): Promise => {\n const { data } = await this.api.post(\n `location/${practiceNotice.locationId}/practicenotice`,\n practiceNotice\n );\n return data;\n };\n\n public deleteNotice = async (\n locationId: string,\n noticeId: string\n ): Promise => {\n await this.api.delete(\n `location/${locationId}/practicenotice/${noticeId}`\n );\n };\n\n public updateNotice = async (\n id: guid,\n practiceNotice: PracticeNoticeRequest\n ): Promise => {\n const { data } = await this.api.put(\n `location/${practiceNotice.locationId}/practicenotice/${id}`,\n practiceNotice,\n {\n headers: {\n eTag: practiceNotice.eTag\n }\n }\n );\n\n return data;\n };\n\n public addAppointmentTypeCategory = async (\n locationId: string,\n request: AppointmentTypeCategoryRequestDto\n ): Promise => {\n const { data } = await this.api.post(\n `location/${locationId}/appointmenttypecategory`,\n request\n );\n return data;\n };\n\n public updateAppointmentTypeCategory = async (\n locationId: string,\n id: string,\n request: AppointmentTypeCategoryRequestDto\n ): Promise => {\n const { data } = await this.api.put(\n `location/${locationId}/appointmenttypecategory/${id}`,\n request\n );\n return data;\n };\n\n public getAppointmentTypeCategoryMapping = async (\n locationId: string\n ): Promise => {\n const { data } = await this.api.get(\n `location/${locationId}/appointmenttypecategory`\n );\n return data;\n };\n\n public deleteAppointmentTypeCategory = async (\n locationId: string,\n id: string\n ): Promise => {\n await this.api.delete(\n `location/${locationId}/appointmenttypecategory/${id}`\n );\n };\n}\n","import { createContext } from \"react\";\n\nimport { IGatewaysContext } from \"./GatewaysContext.inteface\";\n\nexport const GatewaysContext = createContext(\n {} as IGatewaysContext\n);\n","import { useContext } from \"react\";\n\nimport { GatewaysContext } from \"./GatewaysContext\";\n\nexport const useGateways = () => useContext(GatewaysContext);\n","import { QueryClient, QueryKey } from \"react-query\";\n\ntype Entity = unknown & { id?: string };\n\ntype UpsertOptions = {\n queryClient: QueryClient; // React query client instance\n queryKey: QueryKey; // The key that points to the collection within the react-query cache\n item: TItem; // Item to be inserted\n isIdentityEqual?: (other: TItem) => boolean; // Function which checks if the identity of an existing item is equal to\n};\n\ntype DeleteOptions = Omit, \"item\"> & {\n id: TId; // Item id to be deleted\n};\n\n/**\n * Updates an array of items in the cache, provided the current state of those items is 'success'.\n *\n * @param queryClient React query client instance\n * @param queryKey The key that points to the collection within the react-query cache\n * @param applyUpdate The update function\n */\nexport const cacheUpdateItemArray = (\n queryClient: QueryClient,\n queryKey: QueryKey,\n applyUpdate: (items: T[]) => T[]\n) => {\n const queryState = queryClient.getQueryState(queryKey);\n if (queryState?.status !== \"success\") return;\n\n const data = queryState.data ?? [];\n queryClient.setQueryData(queryKey, applyUpdate(data));\n};\n\n/**\n * Inserts or updates a single item in a cached array of items. If the cached state\n * is not 'success' then no upsert will be performed.\n *\n * the identity of the item to be updated. Defaults to `other => other[\"id\"] === item[\"id\"]`\n * @param options\n */\nexport const cacheUpsertSingleItemInArray = (\n options: UpsertOptions\n) => {\n const { queryClient, queryKey, item, isIdentityEqual } = options;\n if (!item) return;\n\n cacheUpdateItemArray(queryClient, queryKey, prev => {\n const checkIdentity =\n isIdentityEqual ?? ((other: TItem) => item[\"id\"] === other[\"id\"]);\n\n let hasUpdated = false;\n\n const next = prev?.map(prevItem => {\n if (checkIdentity(prevItem)) {\n hasUpdated = true;\n return item;\n }\n\n return prevItem;\n });\n\n if (!hasUpdated) {\n next.push(item);\n }\n\n return next;\n });\n};\n\n/**\n * Deletes a single item from a cached array of items. If the cached state is not 'success'\n * then this is a no-op.\n *\n * the identity of the item to be updated. Defaults to `other => other[\"id\"] === item[\"id\"]`\n * @param options\n */\nexport const cacheDeleteSingleItemInArray = <\n TItem extends Entity = Entity,\n TId = string\n>(\n options: DeleteOptions\n) => {\n const { queryClient, queryKey, id, isIdentityEqual } = options;\n\n cacheUpdateItemArray(queryClient, queryKey, prev => {\n const checkIdentity =\n isIdentityEqual ??\n ((other: TItem) => other.id && (other.id as unknown as TId) === id);\n\n return prev.filter(item => !checkIdentity(item));\n });\n};\n","import { AxiosResponse } from \"axios\";\nimport { RefDataDto } from \"common/dtos\";\nimport { ProviderLocationsDto } from \"core/models/licence\";\nimport { CONTENT_TYPE_HEADER } from \"core/types/api.constants\";\nimport { guid } from \"core/types/Guid\";\nimport {\n ProviderAppointmentTypeDto,\n ProviderDto\n} from \"modules/booking/models\";\nimport { AppointmentTypeAvailabilityDto } from \"modules/booking/models/appointmentTypeAvailability.model\";\nimport {\n PatientConfigRequestDto,\n PatientConfigResponseDto\n} from \"modules/booking/models/patientConfig.model\";\n\nimport { AxiosInstance } from \"@bps/http-client\";\nimport { DateTime } from \"@bps/utils\";\n\nexport interface LocationProviderDto extends ProviderDto {\n locationId: guid;\n}\n\nexport type AppointmentTypeAvailabilityResponseDto = Omit<\n AppointmentTypeAvailabilityDto,\n \"startDate\" | \"endDate\"\n> & {\n startDate: string;\n endDate: string | null;\n};\n\nconst mapStringsToDates = (\n data: AppointmentTypeAvailabilityResponseDto\n): AppointmentTypeAvailabilityDto => {\n const { startDate, endDate, ...rest } = data;\n return {\n ...rest,\n startDate: new Date(startDate),\n endDate: endDate ? new Date(endDate) : null\n };\n};\n\nconst mapDatesToStrings = (\n data: AppointmentTypeAvailabilityDto\n): AppointmentTypeAvailabilityResponseDto => {\n const { startDate, endDate, ...rest } = data;\n return {\n startDate: DateTime.fromJSDate(startDate).toISODate(),\n endDate: endDate ? DateTime.fromJSDate(endDate).toISODate() : null,\n ...rest\n };\n};\n\nexport enum ProviderRefDataKeys {\n language = \"language\",\n genderIdentity = \"genderIdentity\",\n areaOfInterest = \"areaOfInterest\",\n providerOnlineStatus = \"providerOnlineStatus\"\n}\n\nexport class ProviderGateway {\n constructor(private api: AxiosInstance) {}\n\n public getProvidersForLocation = async (locationId: guid) => {\n const { data } = await this.api.get(\n `location/${locationId}/providers`\n );\n return data;\n };\n\n public getProviderLocations = async () => {\n const { data } = await this.api.get(\n \"provider/licence/providerLocations\"\n );\n return data;\n };\n\n public getPatientConfig = async (\n providerId: guid,\n locationId: guid,\n appointmentTypeId: guid\n ) => {\n const { data } = await this.api.get(\n `provider/${providerId}/location/${locationId}/appointmentType/${appointmentTypeId}/patientConfiguration`\n );\n return data;\n };\n\n public updatePatientConfig = async (payload: {\n providerId: guid;\n locationId: guid;\n appointmentTypeId: guid;\n request: PatientConfigRequestDto;\n }) => {\n const { providerId, locationId, appointmentTypeId, request } = payload;\n const { data } = await this.api.put(\n `provider/${providerId}/location/${locationId}/appointmentType/${appointmentTypeId}/patientConfiguration`,\n request\n );\n return data;\n };\n\n public getAppointmentTypeAvailabilities = async (\n providerId: guid,\n locationId: guid,\n appointmentTypeId: guid\n ) => {\n const { data } = await this.api.get<\n AppointmentTypeAvailabilityResponseDto[]\n >(\n `provider/${providerId}/location/${locationId}/availabilities/${appointmentTypeId}`\n );\n\n return data.map(mapStringsToDates);\n };\n\n public createAppointmentTypeAvailability = async (\n availability: AppointmentTypeAvailabilityDto\n ): Promise => {\n const { data } = await this.api.post<\n AppointmentTypeAvailabilityDto,\n AxiosResponse\n >(\n \"provider/appointmentType/availabilityRule\",\n mapDatesToStrings(availability)\n );\n\n return mapStringsToDates(data);\n };\n\n public updateAppointmentTypeAvailability = async (\n availability: AppointmentTypeAvailabilityDto\n ): Promise => {\n const { data } = await this.api.put<\n AppointmentTypeAvailabilityDto,\n AxiosResponse\n >(\n \"provider/appointmentType/availabilityRule\",\n mapDatesToStrings(availability),\n {\n headers: {\n eTag: availability.eTag\n }\n }\n );\n\n return mapStringsToDates(data);\n };\n\n public deleteAppointmentTypeAvailability = async (\n appointmentTypeAvailabilityId: guid,\n removeAppointmentType: boolean\n ): Promise => {\n const { data } = await this.api.delete>(\n `provider/appointmentType/availabilityRule/${appointmentTypeAvailabilityId}`,\n { params: { removeAppointmentType } }\n );\n\n return data;\n };\n\n public updateProviderForLocation = async (\n provider: LocationProviderDto\n ): Promise => {\n const { data } = await this.api.put<\n LocationProviderDto,\n AxiosResponse\n >(`provider/${provider.id}`, provider, {\n headers: {\n eTag: provider.eTag\n }\n });\n\n return data;\n };\n\n public getAppointmentTypesForProvider = async (\n providerId: guid,\n locationId: guid\n ) => {\n const { data } = await this.api.get(\n `provider/${providerId}/location/${locationId}/appointmentTypes`\n );\n return data;\n };\n\n public uploadProviderPhoto = async (\n locationId: string,\n providerId: string,\n file: File\n ): Promise => {\n const formData = new FormData();\n formData.append(\"fileData\", file);\n\n const { data } = await this.api.post(\n `provider/${providerId}/location/${locationId}/uploadPhoto`,\n formData,\n {\n headers: {\n [CONTENT_TYPE_HEADER]: \"multipart/form-data\"\n }\n }\n );\n\n return data.link;\n };\n\n public getRef = (name: string) =>\n this.api.get(`/ref/${name}`).then(x => x.data);\n}\n","import { RefDataDto } from \"common/dtos\";\n\nexport type KeyText = {\n key: string;\n text: string;\n};\n\nexport type KeyName = Omit & {\n name: string;\n};\n\nexport class RefDataModel {\n constructor(public values: RefDataDto[]) {}\n\n get keyTextValue() {\n return this.values.map(v => ({ key: v.code, text: v.text }));\n }\n\n get keyNameValue() {\n return this.values.map(v => ({ key: v.code, name: v.text }));\n }\n}\n","import { useGateways } from \"core/gateways-context\";\nimport { ProviderRefDataKeys } from \"core/gateways/practice/ProviderGateway\";\nimport {\n cacheUpdateItemArray,\n cacheUpsertSingleItemInArray\n} from \"core/gateways/ReactQueryCacheHelpers\";\nimport { RefDataModel } from \"core/models\";\nimport { ProviderLocationsDto } from \"core/models/licence\";\nimport { QueryOptions } from \"core/ReactQueryProvider\";\nimport { guid } from \"core/types/Guid\";\nimport {\n ProviderAppointmentTypeDto,\n ProviderDto\n} from \"modules/booking/models\";\nimport { AppointmentTypeAvailabilityDto } from \"modules/booking/models/appointmentTypeAvailability.model\";\nimport {\n PatientConfigRequestDto,\n PatientConfigResponseDto\n} from \"modules/booking/models/patientConfig.model\";\nimport {\n QueryClient,\n useMutation,\n useQuery,\n useQueryClient,\n UseQueryResult\n} from \"react-query\";\n\nexport const ProviderCacheKeys = {\n AppointmentTypeAvailability: \"appointment-type-availabilities\",\n LocationProviders: \"location-providers\",\n RefData: \"ref-data\",\n PatientConfig: \"patient-config\",\n ProviderAppointmentTypes: \"provider-appointment-types\",\n ProviderLocations: \"provider-locations\"\n};\n\nexport const usePatientConfigQuery = (\n locationId: guid,\n providerId: guid,\n appointmentTypeId: guid\n): UseQueryResult => {\n const { providerApi } = useGateways();\n\n return useQuery(\n [\n ProviderCacheKeys.PatientConfig,\n locationId,\n providerId,\n appointmentTypeId\n ],\n async () =>\n await providerApi.getPatientConfig(\n providerId,\n locationId,\n appointmentTypeId\n )\n );\n};\n\nexport const usePatientConfigMutation = () => {\n const queryClient = useQueryClient();\n const { providerApi } = useGateways();\n\n return useMutation<\n PatientConfigResponseDto,\n unknown,\n {\n locationId: string;\n providerId: string;\n appointmentTypeId: string;\n request: PatientConfigRequestDto;\n }\n >(\n ({ locationId, providerId, appointmentTypeId, request }) =>\n providerApi.updatePatientConfig({\n providerId,\n locationId,\n appointmentTypeId,\n request\n }),\n {\n onSuccess: (\n response: PatientConfigResponseDto,\n { locationId, providerId, appointmentTypeId }\n ) => {\n queryClient.setQueryData(\n [\n ProviderCacheKeys.PatientConfig,\n locationId,\n providerId,\n appointmentTypeId\n ],\n response\n );\n\n updateProviderandProviderList(locationId, providerId, queryClient);\n }\n }\n );\n};\n\nconst updateProviderandProviderList = (\n locationId: string,\n providerId: string,\n queryClient: QueryClient\n) => {\n // Refetch cache for provider appointment types table\n queryClient.refetchQueries([\n ProviderCacheKeys.ProviderAppointmentTypes,\n locationId,\n providerId\n ]);\n\n // Invalidate cache for providers table\n queryClient.invalidateQueries([\n ProviderCacheKeys.LocationProviders,\n locationId\n ]);\n};\n\n// Remove this customised appointment type from our patient config so we don't query for it\nexport const useRemovePatientConfig = () => {\n const queryClient = useQueryClient();\n return (locationId: guid, providerId: guid, appointmentTypeId: guid) => {\n queryClient.removeQueries([\n ProviderCacheKeys.PatientConfig,\n locationId,\n providerId,\n appointmentTypeId\n ]);\n };\n};\n\nexport const useProviderLocationsQuery = (\n options?: QueryOptions\n) => {\n const { providerApi } = useGateways();\n return useQuery(\n [ProviderCacheKeys.ProviderLocations],\n providerApi.getProviderLocations,\n options\n );\n};\n\nexport const useProvidersRefDataQuery = >(\n options?: QueryOptions, TResult>\n) => {\n const { providerApi } = useGateways();\n return useQuery(\n [ProviderCacheKeys.RefData],\n async () => {\n const refDataMap = new Map();\n const keys = Object.keys(ProviderRefDataKeys);\n // Get ref data\n const data = await Promise.all(keys.map(x => providerApi.getRef(x)));\n\n // Map ref data\n data.forEach((d, idx) => {\n keys[idx] &&\n refDataMap.set(\n keys[idx],\n new RefDataModel(d) // adapt RefDataDto to RefDataModel to have some usefully properties\n );\n });\n\n return refDataMap;\n },\n { ...options, cacheTime: Infinity, staleTime: Infinity }\n );\n};\n\nexport const useLocationProvidersQuery = (\n locationId: guid,\n options?: QueryOptions\n) => {\n const { providerApi } = useGateways();\n return useQuery(\n [ProviderCacheKeys.LocationProviders, locationId],\n async () => await providerApi.getProvidersForLocation(locationId),\n options\n );\n};\n\nexport const useLocationProviderQuery = (\n locationId: guid,\n providerId?: guid\n): UseQueryResult => {\n const options: QueryOptions = {\n select: (data: ProviderDto[]) => data.find(p => p.id === providerId)\n };\n\n return useLocationProvidersQuery(\n locationId,\n options\n );\n};\n\nexport const useLocationProviderMutation = () => {\n const queryClient = useQueryClient();\n const { providerApi } = useGateways();\n\n return useMutation<\n ProviderDto,\n unknown,\n { provider: ProviderDto; locationId: guid }\n >(\n ({ provider, locationId }) =>\n providerApi.updateProviderForLocation({ ...provider, locationId }),\n {\n onSuccess: (provider: ProviderDto, { locationId }) => {\n cacheUpsertSingleItemInArray({\n queryClient,\n queryKey: [ProviderCacheKeys.LocationProviders, locationId],\n item: provider\n });\n // Refetch cache for provider appointment types table\n queryClient.refetchQueries(ProviderCacheKeys.ProviderAppointmentTypes);\n\n // Refetch patient config cache for default on/off state for existing and new patients.\n queryClient.refetchQueries(ProviderCacheKeys.PatientConfig);\n }\n }\n );\n};\n\nexport const useUpdateProviderPhotoMutation = () => {\n const { providerApi } = useGateways();\n\n return useMutation<\n string,\n unknown,\n { locationId: string; providerId: string; file: File }\n >(({ locationId, providerId, file }) =>\n providerApi.uploadProviderPhoto(locationId, providerId, file)\n );\n};\n\nexport const useAppointmentTypeAvailabilitiesQuery = (\n locationId: guid,\n providerId: guid,\n appointmentTypeId: guid\n): UseQueryResult => {\n const { providerApi } = useGateways();\n return useQuery(\n [\n ProviderCacheKeys.AppointmentTypeAvailability,\n locationId,\n providerId,\n appointmentTypeId\n ],\n async () =>\n await providerApi.getAppointmentTypeAvailabilities(\n providerId,\n locationId,\n appointmentTypeId\n )\n );\n};\n\nexport const useProviderAppointmentTypesQuery = (\n locationId: guid,\n providerId: guid\n): UseQueryResult => {\n const { providerApi } = useGateways();\n\n return useQuery(\n [ProviderCacheKeys.ProviderAppointmentTypes, locationId, providerId],\n async () =>\n await providerApi.getAppointmentTypesForProvider(providerId, locationId)\n );\n};\n\nexport const useCreateAppointmentTypeAvailabilityMutation = () => {\n const queryClient = useQueryClient();\n const { providerApi } = useGateways();\n\n return useMutation<\n AppointmentTypeAvailabilityDto,\n unknown,\n { availability: AppointmentTypeAvailabilityDto }\n >(\n ({ availability }) =>\n providerApi.createAppointmentTypeAvailability(availability),\n {\n onSuccess: (availability: AppointmentTypeAvailabilityDto) => {\n const { locationId, providerId, appointmentTypeId } = availability;\n updateProviderandProviderList(locationId, providerId, queryClient);\n queryClient.invalidateQueries(\n ProviderCacheKeys.AppointmentTypeAvailability\n );\n cacheUpsertSingleItemInArray({\n queryClient,\n queryKey: [\n ProviderCacheKeys.AppointmentTypeAvailability,\n locationId,\n providerId,\n appointmentTypeId\n ],\n item: availability\n });\n }\n }\n );\n};\n\nexport const useDeleteAppointmentTypeAvailabilityMutation = (\n locationId: guid,\n providerId: guid,\n appointmentTypeId: guid\n) => {\n const queryClient = useQueryClient();\n const { providerApi } = useGateways();\n\n return useMutation<\n boolean,\n unknown,\n { appointmentTypeAvailabilityId: guid; removeAppointmentType: boolean }\n >(\n ({ appointmentTypeAvailabilityId, removeAppointmentType }) =>\n providerApi.deleteAppointmentTypeAvailability(\n appointmentTypeAvailabilityId,\n removeAppointmentType\n ),\n {\n onSuccess: (success, request) => {\n updateProviderandProviderList(locationId, providerId, queryClient);\n queryClient.invalidateQueries(\n ProviderCacheKeys.AppointmentTypeAvailability\n );\n if (success) {\n cacheUpdateItemArray(\n queryClient,\n [\n ProviderCacheKeys.AppointmentTypeAvailability,\n locationId,\n providerId,\n appointmentTypeId\n ],\n cached =>\n cached.filter(\n prev => prev.id !== request.appointmentTypeAvailabilityId\n )\n );\n }\n }\n }\n );\n};\n\nexport const useUpdateAppointmentTypeAvailabilityMutation = () => {\n const queryClient = useQueryClient();\n const { providerApi } = useGateways();\n\n return useMutation<\n AppointmentTypeAvailabilityDto,\n unknown,\n { availability: AppointmentTypeAvailabilityDto }\n >(\n ({ availability }) =>\n providerApi.updateAppointmentTypeAvailability(availability),\n {\n onSuccess: (availability: AppointmentTypeAvailabilityDto) => {\n cacheUpsertSingleItemInArray({\n queryClient,\n queryKey: [\n ProviderCacheKeys.AppointmentTypeAvailability,\n availability.locationId,\n availability.providerId,\n availability.appointmentTypeId\n ],\n item: availability\n });\n }\n }\n );\n};\n","import { useCoreStore } from \"common/StoresProvider\";\nimport { useGateways } from \"core/gateways-context\";\nimport {\n cacheUpdateItemArray,\n cacheUpsertSingleItemInArray\n} from \"core/gateways/ReactQueryCacheHelpers\";\nimport { LocationDto } from \"core/models/location\";\nimport { QueryOptions } from \"core/ReactQueryProvider\";\nimport { guid } from \"core/types/Guid\";\nimport { mapValues } from \"lodash\";\nimport {\n AppointmentTypeDto,\n AppointmentTypeSortOrderDto\n} from \"modules/booking/models\";\nimport {\n AppointmentTypeCategoryDto,\n AppointmentTypeCategoryMappingDto,\n AppointmentTypeCategoryRequestDto\n} from \"modules/booking/models/appointmentTypeCategory\";\nimport {\n PracticeNoticeDto,\n PracticeNoticeRequest\n} from \"modules/booking/models/practiceNotice.model\";\nimport {\n useMutation,\n useQuery,\n useQueryClient,\n UseQueryResult\n} from \"react-query\";\n\nimport { AxiosError } from \"@bps/http-client\";\n\nimport { ProviderCacheKeys } from \"./ProviderHooks\";\n\nconst CacheKeys = {\n LocationAppointmentTypes: \"location-appointment-types\",\n LocationExclusionPeriods: \"location-exclusion-periods\",\n LocationProviders: \"location-providers\",\n Locations: \"locations\",\n LocationNotices: \"location-notices\",\n LocationAppointmentTypeCategoryMapping: \"location-categories\"\n};\n\nfunction useCreateLocationsQuery(\n options?: QueryOptions\n) {\n const { locationApi } = useGateways();\n return useQuery(CacheKeys.Locations, locationApi.getLocations, options);\n}\n\nexport const useLocationsQuery = useCreateLocationsQuery;\n\nexport const useLocationQuery = (\n locationId: guid\n): UseQueryResult => {\n const options: QueryOptions = {\n select: (data: LocationDto[]) => data.find(l => l.id === locationId)\n };\n\n return useCreateLocationsQuery(options);\n};\n\nexport const useLocationAppointmentTypesQuery = (\n locationId: guid\n): UseQueryResult => {\n const { locationApi } = useGateways();\n return useQuery(\n [CacheKeys.LocationAppointmentTypes, locationId],\n async () => await locationApi.getAppointmentTypesForLocation(locationId)\n );\n};\n\nexport const useUpdateLocationMutation = () => {\n const queryClient = useQueryClient();\n const { locationApi } = useGateways();\n\n return useMutation(\n ({ location }) => {\n return locationApi.updatePatchLocationPatch(\n // convert undefined values into null to remove it in patch\n mapValues(location, a => {\n return typeof a === \"undefined\" ? null : a;\n }) as Patch\n );\n },\n {\n onSuccess: (location: LocationDto) => {\n cacheUpsertSingleItemInArray({\n queryClient,\n queryKey: CacheKeys.Locations,\n item: location\n });\n }\n }\n );\n};\n\nexport const useUpdateLocationLogoMutation = () => {\n const { locationApi } = useGateways();\n return useMutation(\n ({ id, logo }) => locationApi.uploadLogo(id, logo)\n );\n};\n\nexport const useUpdateAppointmentSortOrderMutation = () => {\n const queryClient = useQueryClient();\n const { locationApi } = useGateways();\n\n return useMutation<\n AppointmentTypeDto[],\n unknown,\n { locationId: string; reOrdered: AppointmentTypeSortOrderDto[] }\n >(\n ({ locationId, reOrdered }) =>\n locationApi.updateSortOrder(locationId, reOrdered),\n {\n onSuccess: (appointmentTypes: AppointmentTypeDto[], { locationId }) => {\n const queryKey = [CacheKeys.LocationAppointmentTypes, locationId];\n cacheUpdateItemArray(queryClient, queryKey, () => appointmentTypes);\n\n queryClient.invalidateQueries({\n queryKey: [\n CacheKeys.LocationAppointmentTypeCategoryMapping,\n locationId\n ]\n });\n }\n }\n );\n};\n\nexport const useUpdateAppointmentTypeMutation = () => {\n const queryClient = useQueryClient();\n const { locationApi } = useGateways();\n\n return useMutation<\n AppointmentTypeDto,\n unknown,\n { locationId: string; appointmentType: AppointmentTypeDto }\n >(\n ({ locationId, appointmentType }) =>\n locationApi.updateAppointmentTypeForLocation(locationId, appointmentType),\n {\n onSuccess: (appointmentType: AppointmentTypeDto, { locationId }) => {\n if (\n !appointmentType.isAvailableExistingPatients &&\n !appointmentType.isAvailableNewPatients\n ) {\n queryClient.invalidateQueries(CacheKeys.LocationProviders);\n queryClient.invalidateQueries(\n ProviderCacheKeys.ProviderAppointmentTypes\n );\n }\n\n cacheUpsertSingleItemInArray({\n queryClient,\n queryKey: [CacheKeys.LocationAppointmentTypes, locationId],\n item: appointmentType\n });\n\n // Refetch cache for provider appointment types table\n queryClient.refetchQueries(ProviderCacheKeys.ProviderAppointmentTypes);\n\n // Refetch patient config cache for default on/off state for existing and new patients.\n queryClient.refetchQueries(ProviderCacheKeys.PatientConfig);\n\n queryClient.invalidateQueries({\n queryKey: [\n CacheKeys.LocationAppointmentTypeCategoryMapping,\n locationId\n ]\n });\n }\n }\n );\n};\n\nexport const useLocationNoticesQuery = (\n locationId: guid\n): UseQueryResult => {\n const { locationApi } = useGateways();\n return useQuery(\n [CacheKeys.LocationNotices, locationId],\n async () => await locationApi.getNoticesForLocation(locationId)\n );\n};\n\nexport const useAddPracticeNoticeMutation = () => {\n const queryClient = useQueryClient();\n const { locationApi } = useGateways();\n return useMutation(\n request => locationApi.addNotice(request),\n {\n onSuccess: (updated: PracticeNoticeDto) => {\n const { locationId } = updated;\n\n cacheUpsertSingleItemInArray({\n queryClient,\n queryKey: [CacheKeys.LocationNotices, locationId],\n item: updated\n });\n }\n }\n );\n};\n\nexport const useUpdatePracticeNoticeMutation = () => {\n const queryClient = useQueryClient();\n const { locationApi } = useGateways();\n return useMutation(\n request => {\n if (request.id) return locationApi.updateNotice(request.id, request);\n else {\n throw Error(\"Id is required to update the notice\");\n }\n },\n {\n onSuccess: (updated: PracticeNoticeDto) => {\n const { locationId } = updated;\n\n cacheUpsertSingleItemInArray({\n queryClient,\n queryKey: [CacheKeys.LocationNotices, locationId],\n item: updated\n });\n }\n }\n );\n};\n\nexport const useDeletePracticeNoticeMutation = () => {\n const queryClient = useQueryClient();\n const { locationApi } = useGateways();\n\n return useMutation(\n async ({ locationId, noticeId }) => {\n await locationApi.deleteNotice(locationId, noticeId);\n },\n {\n onSuccess: (_, { locationId, noticeId }) => {\n cacheUpdateItemArray(\n queryClient,\n [CacheKeys.LocationNotices, locationId],\n cached => cached.filter(prev => prev.id !== noticeId)\n );\n }\n }\n );\n};\n\nexport const useLocationNoticeQuery = (\n noticeId?: guid,\n refetch?: boolean | \"always\"\n): UseQueryResult => {\n const { locationApi } = useGateways();\n const { locationId } = useCoreStore();\n return useQuery(\n [locationId, noticeId],\n async () => {\n if (noticeId)\n return await locationApi.getNoticeForLocation(locationId, noticeId);\n return undefined;\n },\n { enabled: !!noticeId, refetchOnMount: refetch }\n );\n};\n\nexport const useAddAppointmentTypeCategoryMutation = (locationId: guid) => {\n const { locationApi } = useGateways();\n const queryClient = useQueryClient();\n return useMutation<\n AppointmentTypeCategoryDto,\n AxiosError,\n AppointmentTypeCategoryRequestDto\n >(request => locationApi.addAppointmentTypeCategory(locationId, request), {\n onSuccess: createdCategory => {\n queryClient.setQueryData(\n [CacheKeys.LocationAppointmentTypeCategoryMapping, locationId],\n (oldData: AppointmentTypeCategoryMappingDto) => {\n const newAppointmentTypes = oldData.appointmentTypes.filter(\n at =>\n !createdCategory.appointmentTypes.find(cat => at.id === cat.id)\n );\n\n const newCategories = [...oldData.categories, createdCategory];\n\n return {\n appointmentTypes: newAppointmentTypes,\n categories: newCategories\n };\n }\n );\n }\n });\n};\n\nexport const useUpdateAppointmentTypeCategoryMutation = (locationId: guid) => {\n const { locationApi } = useGateways();\n const queryClient = useQueryClient();\n return useMutation<\n AppointmentTypeCategoryDto,\n AxiosError,\n {\n id: string;\n request: AppointmentTypeCategoryRequestDto;\n refreshCache?: boolean;\n }\n >(\n ({ id, request }) =>\n locationApi.updateAppointmentTypeCategory(locationId, id, request),\n {\n onSuccess: (updatedCategory, { refreshCache = true }) => {\n refreshCache &&\n queryClient.setQueryData(\n [CacheKeys.LocationAppointmentTypeCategoryMapping, locationId],\n (oldData: AppointmentTypeCategoryMappingDto) => {\n const oldCategory = oldData.categories.find(\n category =>\n category.appointmentTypeCategoryId ===\n updatedCategory.appointmentTypeCategoryId\n );\n\n // Any appt types removed from the category in the update\n const removedAppointmentTypes =\n oldCategory?.appointmentTypes.filter(\n a =>\n !updatedCategory.appointmentTypes.find(b => b.id === a.id)\n ) ?? [];\n\n const uncategorisedAppointmentTypes = [\n // Filters out any appt types added to the category in the update\n ...oldData.appointmentTypes.filter(\n at =>\n !updatedCategory.appointmentTypes.find(x => x.id === at.id)\n ),\n ...removedAppointmentTypes\n ];\n\n const newCategories = [\n ...oldData.categories.filter(\n category =>\n category.appointmentTypeCategoryId !==\n updatedCategory.appointmentTypeCategoryId\n ),\n updatedCategory\n ];\n\n const newData: AppointmentTypeCategoryMappingDto = {\n categories: newCategories,\n appointmentTypes: uncategorisedAppointmentTypes\n };\n\n return newData;\n }\n );\n }\n }\n );\n};\n\nexport const useAppointmentTypeCategoryMappingQuery = (locationId: guid) => {\n const { locationApi } = useGateways();\n return useQuery(\n [CacheKeys.LocationAppointmentTypeCategoryMapping, locationId],\n () => locationApi.getAppointmentTypeCategoryMapping(locationId)\n );\n};\n\nexport const useDeleteAppointmentTypeCategoryMutation = (locationId: guid) => {\n const { locationApi } = useGateways();\n const queryClient = useQueryClient();\n\n return useMutation(\n async id => await locationApi.deleteAppointmentTypeCategory(locationId, id),\n {\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: [\n CacheKeys.LocationAppointmentTypeCategoryMapping,\n locationId\n ]\n });\n\n // Appointment types in a deleted category have their sortOrder to null updated by the backend\n queryClient.invalidateQueries({\n queryKey: [CacheKeys.LocationAppointmentTypes, locationId]\n });\n }\n }\n );\n};\n","import { guid } from \"core/types/Guid\";\nimport {\n UnavailabilityDto,\n UnavailabilityUpdateDto\n} from \"modules/booking/models\";\n\nimport { AxiosInstance } from \"@bps/http-client\";\nimport { DateTime } from \"@bps/utils\";\n\ntype UnavailabilityResponseDto = Omit<\n UnavailabilityDto,\n \"startDate\" | \"endDate\"\n> & {\n startDate: string;\n endDate: string | null;\n};\n\nconst mapStringsToDates = (\n data: UnavailabilityResponseDto\n): UnavailabilityDto => {\n const { startDate, endDate, ...rest } = data;\n return {\n ...rest,\n startDate: new Date(startDate),\n endDate: endDate ? new Date(endDate) : undefined\n };\n};\n\nconst mapDatesToStrings = (data: UnavailabilityUpdateDto) => {\n const { startDate, endDate, ...rest } = data;\n return {\n startDate: DateTime.fromJSDate(startDate).toISODate(),\n endDate: endDate ? DateTime.fromJSDate(endDate).toISODate() : null,\n ...rest\n };\n};\n\nexport class UnavailabilityGateway {\n constructor(private api: AxiosInstance) {}\n\n public getExclusionPeriodsForLocation = async (\n locationId: guid\n ): Promise => {\n const { data } = await this.api.get(\n `unavailability?locationId=${locationId}`\n );\n\n return data.map(mapStringsToDates);\n };\n\n public addExclusionPeriod = async (\n exclusionPeriod: UnavailabilityUpdateDto\n ): Promise => {\n const { data } = await this.api.post(\n \"unavailability\",\n mapDatesToStrings(exclusionPeriod)\n );\n return mapStringsToDates(data);\n };\n\n public updateExclusionPeriod = async (\n exclusionPeriod: UnavailabilityUpdateDto\n ): Promise => {\n const { data } = await this.api.put(\n `unavailability/${exclusionPeriod.id}`,\n mapDatesToStrings(exclusionPeriod),\n {\n headers: {\n eTag: exclusionPeriod.eTag\n }\n }\n );\n\n return mapStringsToDates(data);\n };\n\n public deleteExclusionPeriod = async (id: string): Promise => {\n const { data } = await this.api.delete(`unavailability/${id}`);\n return data;\n };\n}\n","import { FormProps } from \"common/ui-components/form/Form.types\";\nimport { debounce } from \"lodash\";\nimport { PropsWithChildren, useEffect } from \"react\";\nimport { useFormContext } from \"react-hook-form\";\nimport { FieldValues } from \"react-hook-form/dist/types/fields\";\n\nimport { Overlay } from \"@bps/fluent-ui\";\n\ninterface FieldsAutoSaveWrapperProps\n extends Pick<\n FormProps,\n \"onSubmit\" | \"autoSave\" | \"autoSaveDelay\"\n > {\n className: string;\n}\nexport const FieldsAutoSaveWrapper = <\n FormValues extends FieldValues = FieldValues\n>({\n children,\n className,\n onSubmit,\n autoSave,\n autoSaveDelay = 500\n}: PropsWithChildren>) => {\n const { formState } = useFormContext();\n const form = useFormContext();\n\n const handleSubmit = () =>\n form.handleSubmit(() => onSubmit(form.getValues(), form))();\n\n const autoSaveHandler = debounce(handleSubmit, autoSaveDelay);\n\n useEffect(() => {\n if (autoSave) {\n const { unsubscribe } = form.watch((_v, info) => {\n // when user interacts with from controls\n const isManualFormChangeAction = info?.type === \"change\";\n // when we use form api to set a form value, e.g. setValue(\"name\", value)\n const isProgrammaticallyFormChange =\n (info[\"values\"] && info?.name) || !info[\"values\"];\n\n if (\n info?.name &&\n (isManualFormChangeAction || isProgrammaticallyFormChange)\n ) {\n autoSaveHandler();\n unsubscribe();\n }\n });\n return () => unsubscribe();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [form.formState.submitCount]);\n\n return (\n
    \n {!autoSave && formState.isSubmitting && (\n \n )}\n {children}\n
    \n );\n};\n","import { FormStyles } from \"./Form.types\";\n\nexport const getFormStyles = (): FormStyles => ({\n root: { display: \"flex\", flexDirection: \"column\", height: \"100%\" },\n fields: {\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n flexGrow: 1,\n overflowY: \"auto\"\n },\n buttons: {\n display: \"flex\",\n padding: 16,\n width: \"100%\",\n justifyContent: \"flex-end\"\n }\n});\n","import { PropsWithChildren, ReactNode } from \"react\";\nimport { Mode } from \"react-hook-form\";\nimport { FieldValues } from \"react-hook-form/dist/types/fields\";\nimport {\n DefaultValues,\n UseFormProps,\n UseFormReturn\n} from \"react-hook-form/dist/types/form\";\n\nimport { IStyle, IStyleFunctionOrObject, ITheme } from \"@bps/fluent-ui\";\n\nimport { FormSubmitCancelButtonsProps } from \"./FormSubmitCancelButtons\";\n\nexport interface FormProps\n extends PropsWithChildren<{\n /**\n * Optional prop to pass external form api in a case you need to have the api access outside the Form component\n */\n form?: UseFormReturn;\n defaultValues?: DefaultValues;\n validationMode?: Mode;\n reValidateMode?: UseFormProps[\"reValidateMode\"];\n onSubmit: (\n values: FormValues,\n form: UseFormReturn\n ) => Promise;\n styles?: IStyleFunctionOrObject;\n id?: string;\n onRenderSubmitCancelButtons?: (\n form: UseFormReturn\n ) => ReactNode;\n submitCancelButtonsProps?: FormSubmitCancelButtonsProps;\n /**\n * Activates form auto-saving.\n */\n autoSave?: boolean;\n /**\n * Optional prop what sets auto-save debouncing delay. Default is 500ms.\n */\n autoSaveDelay?: number;\n }> {}\n\nexport interface FormStyles {\n root: IStyle;\n fields: IStyle;\n buttons: IStyle;\n}\n\nexport interface FormStylesProps {\n theme: ITheme;\n}\n\nexport const defaultConfirmationDialogButtonsText = {\n discard: \"Discard\",\n reset: \"Reset\",\n cancel: \"Keep editing\"\n};\n\nexport const FORM_PROMPT_DISCARD_MESSAGE = \"Discard your changes?\";\nexport const FORM_PROMPT_RESET_MESSAGE = \"Reset your changes?\";\n","import {\n defaultConfirmationDialogButtonsText,\n FORM_PROMPT_RESET_MESSAGE\n} from \"common/ui-components/form/Form.types\";\nimport { ReactNode } from \"react\";\nimport { useFormContext } from \"react-hook-form\";\nimport { FieldValues } from \"react-hook-form/dist/types/fields\";\nimport { UseFormReturn } from \"react-hook-form/dist/types/form\";\n\nimport {\n confirm,\n DefaultButton,\n IButtonProps,\n PrimaryButton,\n Spinner,\n SpinnerSize\n} from \"@bps/fluent-ui\";\n\nexport interface FormSubmitCancelButtonsProps {\n onCancel?: (form: UseFormReturn) => void;\n disableCancel?: boolean;\n disableSubmit?: boolean;\n submitButtonProps?: IButtonProps;\n cancelButtonProps?: IButtonProps;\n submitDataTestAttr?: string;\n cancelDataTestAttr?: string;\n formId?: string;\n className?: string;\n onRenderSubmitCancelButtons?: (form: UseFormReturn) => ReactNode;\n}\n\nexport const FormSubmitCancelButtons = <\n FormValues extends FieldValues = FieldValues\n>({\n onCancel,\n disableSubmit,\n disableCancel,\n submitButtonProps,\n cancelButtonProps,\n submitDataTestAttr,\n cancelDataTestAttr,\n formId,\n className,\n onRenderSubmitCancelButtons\n}: FormSubmitCancelButtonsProps) => {\n const form = useFormContext();\n\n return (\n
    \n {onRenderSubmitCancelButtons ? (\n onRenderSubmitCancelButtons(form)\n ) : (\n <>\n \n form.formState.isSubmitting ? (\n \n ) : null\n }\n />\n\n {\n if (onCancel) {\n onCancel(form);\n } else {\n confirm({\n dialogContentProps: { subText: FORM_PROMPT_RESET_MESSAGE },\n confirmButtonProps: {\n text: defaultConfirmationDialogButtonsText.reset\n },\n cancelButtonProps: {\n text: defaultConfirmationDialogButtonsText.cancel\n }\n }).then(reset => {\n if (reset) {\n form.reset();\n }\n });\n }\n }}\n />\n \n )}\n
    \n );\n};\n","import { FieldsAutoSaveWrapper } from \"common/ui-components/form/FieldsAutoSaveWrapper\";\nimport { config } from \"core/config\";\nimport { Environment } from \"core/Environment\";\nimport { isEqual } from \"lodash\";\nimport { useEffect, useRef } from \"react\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { FieldValues } from \"react-hook-form/dist/types/fields\";\n\nimport { classNamesFunction, styled, useTheme } from \"@bps/fluent-ui\";\nimport { DevTool } from \"@hookform/devtools\";\n\nimport { getFormStyles } from \"./Form.styles\";\nimport { FormProps, FormStyles, FormStylesProps } from \"./Form.types\";\nimport { FormSubmitCancelButtons } from \"./FormSubmitCancelButtons\";\n\nconst getFormClassNames = classNamesFunction();\n\nconst FormBase = (\n props: FormProps\n) => {\n const {\n defaultValues,\n validationMode = \"onChange\",\n reValidateMode,\n children,\n onSubmit,\n styles,\n id,\n onRenderSubmitCancelButtons,\n submitCancelButtonsProps,\n form: externalForm,\n autoSave,\n autoSaveDelay = 500\n } = props;\n\n const defaultValuesRef = useRef(defaultValues);\n const theme = useTheme();\n const classNames = getFormClassNames(styles, { theme });\n const currentForm = useForm({\n mode: validationMode,\n reValidateMode,\n defaultValues\n });\n\n const form = externalForm ?? currentForm;\n\n // reset form in a case of new defaultValues\n useEffect(() => {\n if (!isEqual(defaultValuesRef.current, defaultValues)) {\n defaultValuesRef.current = defaultValues;\n // Note it is a partial reset and there is bug when you reinitialize form and a new value is undefined it does not\n // merge old adn new values property. In a new major react-form-hooks update it will be fixed.\n // https://github.com/react-hook-form/react-hook-form/discussions/8138\n form.reset(defaultValues);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [defaultValues]);\n\n return (\n <>\n {...form}>\n {\n try {\n await onSubmit(values, form);\n } catch (e) {\n // reject promise to return isSubmitSuccessful as false in a case\n // api request has been failed\n return Promise.reject();\n }\n })}\n >\n \n {children}\n \n {!autoSave && (\n \n {...submitCancelButtonsProps}\n className={classNames.buttons}\n onRenderSubmitCancelButtons={onRenderSubmitCancelButtons}\n />\n )}\n \n \n\n {/* ReactFormHooks Dev Tools https://react-hook-form.com/dev-tools */}\n {config.environment === Environment.Dev &&\n process.env.NODE_ENV === \"development\" && (\n
    \n \n
    \n )}\n \n );\n};\n\nconst FormUnTyped = styled(\n FormBase,\n getFormStyles\n);\n\nexport const Form = (\n props: FormProps\n) => ;\n","export const routes = {\n appointmentBooking: {\n basePath: \"booking\",\n locationEdit: \"/booking/practice-profile\",\n onlineSettings: \"/booking/online-settings\"\n },\n\n premierOnlineServices: {\n basePath: \"/premier-online-services\"\n },\n dashboard: \"\"\n};\n","import { useUserPreferencesStore } from \"common/StoresProvider\";\nimport { observer } from \"mobx-react-lite\";\nimport { FunctionComponent } from \"react\";\n\n/**\n * The component renders children when the config.development is set to true or when the\n * feature has been toggled through the menu option\n * @param children\n * @constructor\n */\n\ninterface WhenFeatureToggledProps {\n else?: JSX.Element;\n}\nexport const WhenFeatureToggled: FunctionComponent =\n observer(props => {\n const { areToggledFeaturesVisible } = useUserPreferencesStore();\n\n return areToggledFeaturesVisible ? (\n <>{props.children}\n ) : (\n props.else ?? null\n );\n });\n","import { routes } from \"common/routes\";\nimport {\n Help,\n LocationPicker,\n NavItem,\n UserProfile\n} from \"common/ui-components\";\nimport { WhenFeatureToggled } from \"core/WhenFeatureToggled\";\nimport { observer } from \"mobx-react-lite\";\nimport { useEffect, useState } from \"react\";\nimport { Link, useLocation, useNavigate } from \"react-router-dom\";\n\nimport {\n ActionButton,\n getColorFromString,\n Header,\n IButtonStyles,\n IStyle,\n ITheme,\n Stack,\n updateA,\n useTheme\n} from \"@bps/fluent-ui\";\n\nconst getOpacityColor = (theme: ITheme, opacity: number) =>\n updateA(getColorFromString(theme.palette.neutralLight)!, opacity).str;\n\nexport const navBarActionButtonStyles = (\n theme: ITheme,\n isCurrent?: boolean\n): Partial => {\n const style: IStyle = { color: theme.palette.white };\n\n return {\n icon: style,\n menuIcon: style,\n iconHovered: style,\n iconPressed: style,\n root: { background: isCurrent ? getOpacityColor(theme, 25) : \"inherit\" }\n };\n};\n\nconst NavBarNavItem = ({\n to,\n text,\n iconName,\n tab\n}: {\n to: string;\n text: string;\n iconName: string;\n tab: string;\n}) => {\n const theme = useTheme();\n\n // Split string to find first part of url. For example with \"/booking/pratice-profile\" we find \"/booking\"\n const isCurrent = tab.split(\"/\")[1] === to.toString().split(\"/\")[1];\n\n return (\n \n {({ to }) => (\n \n \n \n )}\n \n );\n};\n\nexport const NavBar = observer(() => {\n const navigate = useNavigate();\n const location = useLocation();\n const [tab, changeTab] = useState(location.pathname);\n\n // Hook to update navbar tab if page has changed\n useEffect(() => {\n if (tab === location.pathname) return;\n\n changeTab(location.pathname);\n }, [location.pathname, tab]);\n\n return (\n <>\n {\n navigate(routes.appointmentBooking.locationEdit);\n }\n }}\n userBox={}\n styles={{ root: { minHeight: \"auto\" } }}\n >\n \n\n \n \n \n \n \n \n \n \n );\n});\n","import { navBarActionButtonStyles } from \"layout/NavBar\";\nimport { useLocation, useNavigate } from \"react-router-dom\";\n\nimport { ActionButton, IContextualMenuItem, useTheme } from \"@bps/fluent-ui\";\n\nexport const Help = () => {\n const theme = useTheme();\n const currentLocation = useLocation();\n const navigate = useNavigate();\n\n const menuItemSelected = (\n ev?: React.MouseEvent,\n item?: IContextualMenuItem\n ) => {\n if (item?.data === currentLocation.pathname) {\n // Appcues is loaded by Google Tag Manager, it does not appear on the Window, therefore using a @ts-ignore tag here.\n // @ts-ignore\n Appcues.show(item.key);\n } else {\n navigate(`${item?.data}?appcue=${item?.key}`);\n }\n };\n\n const appCuesItems: IContextualMenuItem[] = [\n {\n key: \"1c78ca6c-1df4-45f4-ad0c-9a55c8263c02\",\n data: \"/booking/practice-profile\",\n text: \"Practice Profile\",\n onClick: menuItemSelected\n },\n {\n key: \"650d67cf-fa05-48a2-9e4e-4a4514dcec62\",\n data: \"/booking/online-settings\",\n text: \"Online Settings\",\n onClick: menuItemSelected\n },\n {\n key: \"d5372743-3c00-40cf-aa80-d4c35b48e5c6\",\n data: \"/booking/appointment-types\",\n text: \"Appointment Types\",\n onClick: menuItemSelected\n },\n {\n key: \"4c7553f1-2d61-418e-b500-00969332aadb\",\n data: \"/booking/providers\",\n text: \"Providers\",\n onClick: menuItemSelected\n },\n {\n key: \"b645abf9-204c-4d03-bcad-6741509e04c4\",\n data: \"/booking/exclusion-periods\",\n text: \"Exclusion Periods\",\n onClick: menuItemSelected\n }\n ];\n\n const items: IContextualMenuItem[] = [\n {\n key: \"interactiveGuide\",\n text: \"Interactive guide\",\n subMenuProps: { items: appCuesItems }\n },\n {\n key: \"knowledgeBase\",\n text: \"Knowledge base\",\n onClick: () => {\n window.open(\n \"https://kb.bpsoftware.net/bh/Bookings/index.htm\",\n \"_blank\"\n );\n }\n }\n ];\n\n return (\n \n );\n};\n","import { useCoreStore } from \"common/StoresProvider\";\nimport { useLocationsQuery } from \"core/gateways/practice/LocationHooks\";\nimport { navBarActionButtonStyles } from \"layout/NavBar\";\nimport { observer } from \"mobx-react-lite\";\nimport { useLocation, useNavigate } from \"react-router\";\n\nimport { ActionButton, IContextualMenuItem, useTheme } from \"@bps/fluent-ui\";\n\nexport const LocationPicker = observer(() => {\n const core = useCoreStore();\n const navigate = useNavigate();\n const location = useLocation();\n const theme = useTheme();\n const { isLoading, data: locations } = useLocationsQuery();\n const currentLocation = locations?.find(l => l.id === core.locationId);\n\n if (isLoading || !locations?.length) return null;\n\n const handleLocationClicked = (_, data: IContextualMenuItem) => {\n if (location.pathname.match(\"booking/providers/\")) {\n navigate(\"./booking/providers\");\n }\n\n core.setCurrentLocation(data.key);\n };\n\n const locationItems = locations.map(\n (location): IContextualMenuItem => ({\n id: `location-${location.id}`,\n key: location.id,\n text: location.name,\n onClick: handleLocationClicked\n })\n );\n\n return (\n \n );\n});\n","import { config } from \"core/config\";\nimport { navBarActionButtonStyles } from \"layout/NavBar\";\nimport { observer } from \"mobx-react-lite\";\n\nimport {\n ActionButton,\n IIconProps,\n Persona,\n PersonaSize,\n useTheme\n} from \"@bps/fluent-ui\";\nimport { logout } from \"@bps/http-client\";\n\nimport { useUserPreferencesStore } from \"../StoresProvider\";\n\ninterface IUserProfileMenuItem {\n key: string;\n iconProps: IIconProps;\n text: string;\n onClick: () => void;\n}\n\nexport const UserProfile = observer(() => {\n const theme = useTheme();\n\n const {\n isProductionEnvironment,\n toggleFeatureToggle,\n areToggledFeaturesVisible\n } = useUserPreferencesStore();\n\n const handleLogout = () => {\n logout().then(() => {});\n };\n\n const handleFeatureToggle = async () => {\n toggleFeatureToggle();\n };\n\n const handleManageSubscription = () => {\n window.open(config.subscriptionUrl, \"_blank\");\n };\n\n const items: IUserProfileMenuItem[] = [];\n\n if (areToggledFeaturesVisible) {\n items.push({\n key: \"manageSubscription\",\n text: \"Manage subscription\",\n iconProps: {\n iconName: \"NavigateExternalInline\",\n styles: { root: { order: 1, marginBottom: \"4px\" } }\n },\n onClick: handleManageSubscription\n });\n }\n\n if (!isProductionEnvironment) {\n items.push({\n key: \"featureToggle\",\n iconProps: {\n iconName: areToggledFeaturesVisible ? \"toggleRight\" : \"toggleLeft\",\n styles: { root: { order: 1 } }\n },\n text: `Toggle features ${areToggledFeaturesVisible ? \"off\" : \"on\"}`,\n onClick: handleFeatureToggle\n });\n }\n\n items.push({\n key: \"logout\",\n text: \"Logout\",\n iconProps: {\n iconName: \"\",\n styles: { root: { order: 1 } }\n },\n onClick: handleLogout\n });\n\n return (\n \n ({\n primaryText: {\n color: theme.palette.white,\n selectors: {\n \"&:hover\": {\n color: theme.palette.white\n }\n }\n }\n })}\n text=\"\"\n imageInitials=\"\"\n size={PersonaSize.size24}\n />\n \n );\n});\n","import { config } from \"core/config\";\n\nimport { ReactPlugin as AppInsightsReactPlugin } from \"@microsoft/applicationinsights-react-js\";\nimport { ApplicationInsights } from \"@microsoft/applicationinsights-web\";\n\nexport const initAppInsights = () => {\n const appInsightPlugin = new AppInsightsReactPlugin();\n\n const appInsights = new ApplicationInsights({\n config: {\n enableAutoRouteTracking: false,\n disableFetchTracking: false,\n extensions: [appInsightPlugin as any],\n ...config.appInsights\n }\n });\n appInsights.loadAppInsights();\n return appInsightPlugin;\n};\n","import ReactGA from \"react-ga\";\n\nexport const initGoogleAnalytics = () => {\n ReactGA.initialize((window as any).appConfig.gtmId);\n};\n","import { Environment } from \"core/Environment\";\n\nimport Hotjar from \"@hotjar/browser\";\n\nimport { config } from \"../../config\";\n\nconst HOTJAR_VERSION = 6;\n\nexport const initHotJar = () => {\n if (\n window.appConfig.environment === Environment.Dev ||\n window.appConfig.environment === Environment.Uat ||\n window.appConfig.environment === Environment.Prod\n ) {\n const siteId = Number(config.PrOSHotJarSiteId);\n Hotjar.init(siteId, HOTJAR_VERSION);\n }\n};\n","import {\n LicenceDto,\n LicenceSummaryDto,\n LicenceTypeDto,\n ProviderAssignLicenceDto\n} from \"core/models/licence\";\nimport { guid } from \"core/types/Guid\";\n\nimport { AxiosInstance } from \"@bps/http-client\";\n\nexport class LicenceGateway {\n constructor(public api: AxiosInstance) {}\n\n public getLicences = async (): Promise =>\n (await this.api.get(\"licences\")).data;\n\n public getLicenceToBeRenewed = async (): Promise =>\n (await this.api.get(\"licences/toBeRenewed\")).data;\n\n public getLicenceToBeRemoved = async (): Promise =>\n (await this.api.get(\"licences/toBeRemoved\")).data;\n\n public assignLicence = async (\n data: ProviderAssignLicenceDto\n ): Promise => {\n const response = await this.api.put(\n `licences/assign?userId=${data.userId}&licenceType=${data.licenceType}`\n );\n return { ...response.data };\n };\n\n public unassignLicence = async (licenceId: guid): Promise => {\n const response = await this.api.put(`licences/${licenceId}/remove`);\n return { ...response.data };\n };\n\n public getLicenceTypes = async (): Promise =>\n (await this.api.get(\"licenceTypes\")).data;\n}\n","import { LicenceMappingDto } from \"core/models/licenceMapping\";\nimport { OrgUnitDto } from \"core/models/orgUnit\";\nimport { TenantProviderDto } from \"core/models/tenantProvider\";\nimport {\n AppointmentTypeTGArgs,\n AppointmentTypeTGDto\n} from \"modules/booking/models\";\nimport { stringify } from \"query-string\";\n\nimport { AxiosInstance } from \"@bps/http-client\";\n\nexport class TenantGateway {\n constructor(private api: AxiosInstance) {}\n public getOrgUnits = async (): Promise =>\n (await this.api.get(\"client/orgUnit\")).data;\n\n public getTenantProviders = async (): Promise =>\n (await this.api.get(\"client/provider\")).data;\n\n public getLicenceMappings = async (): Promise =>\n (await this.api.get(\"licenceMapping\")).data;\n\n public getAppointmentTypesTG = async (\n args?: AppointmentTypeTGArgs\n ): Promise => {\n return (\n await this.api.get(\n `appointmentTypes?${stringify(args!)}`\n )\n ).data;\n };\n}\n","import { useGateways } from \"core/gateways-context\";\nimport { LicenceMappingDto } from \"core/models/licenceMapping\";\nimport { OrgUnitDto } from \"core/models/orgUnit\";\nimport { TenantProviderDto } from \"core/models/tenantProvider\";\nimport { QueryOptions } from \"core/ReactQueryProvider\";\nimport {\n AppointmentTypeTGArgs,\n AppointmentTypeTGDto\n} from \"modules/booking/models\";\nimport { useQuery } from \"react-query\";\n\nconst CacheKeys = {\n OrgUnits: \"orgUnits\",\n Providers: \"providers\",\n LicenceMappings: \"licenceMappings\",\n AppointmentTypesTG: \"appointmentTypesTG\"\n};\n\nexport const useOrgUnitsQuery = (\n options?: QueryOptions\n) => {\n const { tenantApi } = useGateways();\n return useQuery(CacheKeys.OrgUnits, tenantApi.getOrgUnits, options);\n};\nexport const useTenantProvidersQuery = (\n options?: QueryOptions\n) => {\n const { tenantApi } = useGateways();\n return useQuery(CacheKeys.Providers, tenantApi.getTenantProviders, options);\n};\n\nexport const useLicenceMappingsQuery = (\n options?: QueryOptions\n) => {\n const { tenantApi } = useGateways();\n return useQuery(\n CacheKeys.LicenceMappings,\n tenantApi.getLicenceMappings,\n options\n );\n};\n\nexport const useAppointmentTypesTG = (\n appointmentTypeArgs?: AppointmentTypeTGArgs\n) => {\n const { tenantApi } = useGateways();\n\n // Measure to ensure requests with the same id's but different order aren't considered as a new query\n const sortedIds = [...(appointmentTypeArgs?.appointmentTypeIds ?? [])].sort(\n (a, b) => (a < b ? -1 : 1)\n );\n\n return useQuery(\n [CacheKeys.AppointmentTypesTG, sortedIds],\n async () => await tenantApi.getAppointmentTypesTG(appointmentTypeArgs)\n );\n};\n","export interface UserPreferenceDto {\n name: string;\n value: string;\n}\n\nexport class UserPreferenceModel {\n public settingName: string;\n public settingValue: string;\n\n constructor(public values: UserPreferenceDto) {\n this.settingName = values.name;\n this.settingValue = values.value;\n }\n}\n\nexport interface UserPreferenceArgs {\n names: string[];\n}\n","import { UserDto } from \"core/models\";\nimport {\n UserPreferenceArgs,\n UserPreferenceDto,\n UserPreferenceModel\n} from \"core/models/userPreference.model\";\nimport { stringify } from \"query-string\";\n\nimport { AxiosInstance } from \"@bps/http-client\";\n\nexport class UserGateway {\n constructor(private api: AxiosInstance) {}\n\n public getUserPreferences = async (\n args: UserPreferenceArgs\n ): Promise => {\n const data = (\n await this.api.get(\n `userpreferences?${stringify(args)}`\n )\n ).data;\n return data.map(x => new UserPreferenceModel(x));\n };\n\n public getCurrentUser = async (): Promise =>\n (await this.api.get(\"users/me\")).data;\n}\n","export enum ErrorType {\n ValidationError = \"ValidationError\",\n BusinessError = \"BusinessError\",\n AuthorizationError = \"AuthorizationError\",\n NotFoundError = \"NotFoundError\",\n DuplicateError = \"DuplicateError\"\n}\n","import {\n ConcurrencyError,\n ConflictError,\n DuplicateError,\n NetworkError\n} from \"common/apiErrors\";\nimport {\n ErrorsMap,\n PrOSErrorsMap,\n PrOSValidationError,\n ValidationError\n} from \"common/Validation\";\nimport { ErrorType } from \"core/middleware/exception-filter.enums\";\nimport { ERROR_TYPE, TRACE_ID } from \"core/types/api.constants\";\n\nimport {\n AuthorisationError,\n AxiosError,\n IMiddleware,\n NotFoundError,\n ServerError\n} from \"@bps/http-client\";\n\nexport class ExceptionFilter implements IMiddleware {\n constructor(private traceId?: string) {}\n public onRejected = (error: AxiosError): Promise => {\n if (error.response) {\n // Last TraceID used by AppInsights. It should correspond to the AJAX Request operation id.\n // The request was made and the server responded with a status code\n // that falls out of the range of 2xx\n const errorType: ErrorType | undefined =\n error.response.headers && error.response.headers[ERROR_TYPE];\n\n if (error.response.status >= 500) {\n return Promise.reject(\n new ServerError(error.response.status, error.response.data, TRACE_ID)\n );\n } else if (error.response.status === 404) {\n return Promise.reject(\n new NotFoundError(error.response.data, undefined, TRACE_ID)\n );\n } else if (error.response.status === 412) {\n return Promise.reject(new ConflictError(error.response.data, TRACE_ID));\n } else if (error.response.status === 409) {\n return Promise.reject(\n new ConcurrencyError(error.response.data, TRACE_ID)\n );\n } else {\n // all other 4xx errors\n let err: Error;\n // Beef Validation Error\n if (errorType === ErrorType.ValidationError) {\n // ValidationError is supposed to be an object where keys are the field name and values\n // are the messages. Sometimes the API returns a single string as the data\n if (typeof error.response.data === \"string\") {\n err = new ValidationError(error.response.data, undefined, TRACE_ID);\n } else {\n err = new ValidationError(\n undefined,\n error.response.data as ErrorsMap[],\n TRACE_ID\n );\n }\n // Beef Business Error\n } else if (\n errorType === ErrorType.BusinessError &&\n error.response.data\n ) {\n err = new ValidationError(\n error.response.data as string,\n undefined,\n TRACE_ID\n );\n // Beef Authorization Error\n } else if (errorType === ErrorType.AuthorizationError) {\n err = new AuthorisationError(\n error.response.status,\n error.response.data as string,\n TRACE_ID\n );\n // Beef Duplicate Error\n } else if (errorType === ErrorType.DuplicateError) {\n err = new DuplicateError(error.response.data as string, TRACE_ID);\n\n // Non-Beef Validation Error\n } else {\n err = new PrOSValidationError(\n error.response.statusText,\n error.response.data?.errors as PrOSErrorsMap[],\n TRACE_ID\n );\n }\n return Promise.reject(err);\n }\n } else if (error.request) {\n // The request was made but no response was received or the response could not be read (missing CORS header)\n // `error.request` is an instance of XMLHttpRequest in the browser and an instance of\n // http.ClientRequest in node.js\n return Promise.reject(new NetworkError(error.message));\n } else {\n // Something happened in setting up the request that triggered an Error\n return Promise.reject(\n new Error(typeof error === \"string\" ? error : error.message)\n );\n }\n };\n}\n","import { InternalAxiosRequestConfig } from \"axios\";\nimport { X_TENANT } from \"core/types/api.constants\";\n\nimport { getAccessToken, IMiddleware } from \"@bps/http-client\";\n\n/**\n * Returns a request interceptor that will add an X-Tenant HTTP header\n * with either the value of tenant if provided or will default to the\n * value of the hostname\n */\nexport class TenantInterceptorMiddleware\n implements IMiddleware\n{\n onFulfilled = async (\n config: InternalAxiosRequestConfig\n ): Promise => {\n const token = (await getAccessToken(true)) as string | undefined;\n if (!token) return config;\n\n const decoded = JSON.parse(atob(token.split(\".\")[1]));\n const tenant = decoded.name.split(\"\\\\\")[0];\n if (tenant) {\n config.headers[X_TENANT] = tenant;\n }\n\n return config;\n };\n}\n","import { config } from \"core/config\";\nimport { GatewaysContext } from \"core/gateways-context\";\nimport {\n LocationGateway,\n ProviderGateway,\n UnavailabilityGateway\n} from \"core/gateways/practice\";\nimport { LicenceGateway, TenantGateway } from \"core/gateways/tenant\";\nimport { UserGateway } from \"core/gateways/user/UserGateway\";\nimport { ExceptionFilter } from \"core/middleware\";\nimport { TenantInterceptorMiddleware } from \"core/middleware/tenant-interceptor.middleware\";\nimport { NO_AUTH } from \"core/types/api.constants\";\nimport { PrOsApiSchema } from \"core/types/api.interface\";\nimport { PropsWithChildren } from \"react\";\nimport { QueryClient, QueryClientProvider, UseQueryOptions } from \"react-query\";\n\nimport {\n AuthorizationMiddleware,\n AxiosHelperBase,\n EndpointConfig\n} from \"@bps/http-client\";\n\nexport type QueryOptions = Omit<\n UseQueryOptions,\n \"queryKey\" | \"queryFn\"\n>;\n\nconst queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n refetchOnWindowFocus: false,\n retry: false,\n staleTime: config.query.staleTimeMillis\n }\n }\n});\n\nexport const ReactQueryProvider = ({\n children\n}: PropsWithChildren) => {\n const camEndpoint: EndpointConfig = {\n practice: { baseURL: config.apiUrl },\n tenant: { baseURL: config.tgApiUrl }\n };\n\n const axiosHelper = new AxiosHelperBase(camEndpoint, {\n request: [\n new AuthorizationMiddleware(NO_AUTH),\n new TenantInterceptorMiddleware()\n ],\n respond: [new ExceptionFilter()]\n });\n\n const api = axiosHelper.initialize();\n\n const locationApi = new LocationGateway(api.practice);\n const providerApi = new ProviderGateway(api.practice);\n const unavailabilityApi = new UnavailabilityGateway(api.practice);\n\n const userApi = new UserGateway(api.tenant);\n const licenceApi = new LicenceGateway(api.tenant);\n const tenantApi = new TenantGateway(api.tenant);\n\n return (\n \n {children}\n \n );\n};\n","import { routes } from \"common/routes\";\nimport { Navigate } from \"react-router-dom\";\n\nconst Dashboard = () => {\n return ;\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default Dashboard;\n","import { useGateways } from \"core/gateways-context\";\nimport { UserDto } from \"core/models\";\nimport {\n UserPreferenceArgs,\n UserPreferenceModel\n} from \"core/models/userPreference.model\";\nimport { useQuery, UseQueryResult } from \"react-query\";\n\nimport { useAccount } from \"@azure/msal-react\";\n\nexport enum UserCacheKeys {\n Profile = \"user-profile\",\n Preferences = \"user-preferences\"\n}\n\nexport const useCurrentUserQuery = (): UseQueryResult => {\n const account = useAccount();\n const { userApi } = useGateways();\n\n return useQuery(UserCacheKeys.Profile, userApi.getCurrentUser, {\n cacheTime: Infinity,\n staleTime: Infinity,\n enabled: !!account\n });\n};\n\nexport const useUserPreferencesQuery = () => {\n const { userApi } = useGateways();\n\n const args: UserPreferenceArgs = {\n names: [\"AppointmentLength\"]\n };\n return useQuery(\n UserCacheKeys.Preferences,\n async () => await userApi.getUserPreferences(args)\n );\n};\n","import { useCurrentUserQuery } from \"core/gateways/user/UserHooks\";\nimport { useCallback } from \"react\";\n\nexport type PermissionsSpec = string | string[];\nexport type PermissionsOperator = \"and\" | \"or\";\n\ntype PermissionsChecker = (\n permission?: PermissionsSpec,\n operator?: PermissionsOperator\n) => boolean;\n\nexport const usePermissionsChecker = (): PermissionsChecker => {\n const { data: user } = useCurrentUserQuery();\n const userPermissions = user?.permissions;\n\n return useCallback(\n (permission: string[] | string, operator: PermissionsOperator = \"and\") => {\n if (!permission) return true;\n if (Array.isArray(permission) && !permission.length) return true;\n\n if (!userPermissions?.length) return false;\n\n const hasPermission = (permission: string) =>\n userPermissions.includes(permission);\n\n if (typeof permission === \"string\") return hasPermission(permission);\n\n return operator === \"or\"\n ? permission.some(hasPermission)\n : permission.every(hasPermission);\n },\n [userPermissions]\n );\n};\n","import { AuthorizationErrorBox } from \"common/ui-components\";\nimport {\n PermissionsOperator,\n usePermissionsChecker\n} from \"core/auth/Permissions\";\nimport { PropsWithChildren } from \"react\";\n\ninterface Props {\n permissions?: string | string[];\n operator?: PermissionsOperator;\n}\n\nexport const Authorized = ({\n permissions,\n operator,\n children\n}: PropsWithChildren) => {\n const hasPermissions = usePermissionsChecker();\n\n if (!hasPermissions(permissions, operator)) {\n return ;\n }\n\n return <>{children};\n};\n","export enum GoogleTagManagerEvents {\n Authenticated = \"authenticated\"\n}\n","import { GoogleTagManagerEvents } from \"common/gtm.enums\";\nimport { useCoreStore } from \"common/StoresProvider\";\nimport { UserDto } from \"core/models\";\nimport { useEffect } from \"react\";\n\nexport const useGtmAuthorisation = (\n user: UserDto | undefined,\n tenantId: string | undefined\n) => {\n const { setCurrentUserId } = useCoreStore();\n useEffect(() => {\n if (gtm && user && tenantId) {\n gtm.push({\n event: GoogleTagManagerEvents.Authenticated,\n userId: user.id,\n tenantId,\n roles: user.roles.map(r => r.roleCode).join(\",\")\n });\n setCurrentUserId(user.id);\n }\n }, [user, tenantId, setCurrentUserId]);\n};\n","import { useFeedbackStore } from \"common/StoresProvider\";\nimport { NotificationType } from \"core/stores/FeedbackStore\";\nimport { observer } from \"mobx-react-lite\";\n\nimport { MessageBar, MessageBarType, Stack } from \"@bps/fluent-ui\";\n\nexport const Notifications = observer(() => {\n const { notifications, close } = useFeedbackStore();\n\n return (\n \n {notifications.map(x => (\n {\n close(x.key);\n }}\n >\n {x.message}\n \n ))}\n \n );\n});\n\nconst toMessageBarType = (notificationType: NotificationType) => {\n switch (notificationType) {\n case \"error\":\n return MessageBarType.error;\n case \"info\":\n return MessageBarType.info;\n case \"success\":\n return MessageBarType.success;\n case \"warning\": {\n return MessageBarType.warning;\n }\n }\n};\n","export interface AppointmentTypeDto {\n id: string;\n eTag: string;\n name: string;\n duration?: string;\n onlineName?: string;\n onlineDescription?: string;\n minuteDuration?: number;\n sortOrder?: number;\n emailContent?: string;\n emailContentEnabled?: boolean;\n isAvailableExistingPatients?: boolean;\n isAvailableNewPatients?: boolean;\n newPatientDuration?: number;\n isCancellable?: boolean;\n customised?: boolean;\n allowPatientNotes?: boolean;\n appointmentInformationEnabled?: boolean;\n appointmentInformation?: string;\n displayAppointmentLength?: boolean;\n}\n\nexport interface AppointmentTypeSortOrderDto {\n id: string;\n sortOrder?: number;\n}\n\nexport interface AppointmentTypeTGArgs {\n appointmentTypeIds: string[];\n}\n\nexport interface AppointmentTypeTGDto {\n id: string;\n name: string;\n duration?: number;\n groupBooking?: boolean;\n maxGroupSize?: number;\n}\n\nexport interface AppointmentTypeCombined extends AppointmentTypeDto {\n groupBooking?: boolean;\n maxGroupSize?: number;\n durationTG?: number;\n bookingStatus: BookingStatus;\n}\n\nexport enum BookingStatus {\n Online = \"1\",\n Offline = \"0\"\n}\n","import {\n AppointmentTypeCombined,\n AppointmentTypeDto,\n AppointmentTypeTGDto,\n BookingStatus,\n ProviderAppointmentTypeCombined,\n ProviderAppointmentTypeDto\n} from \"../modules/booking/models\";\n\n/**Utility function to sort objects alphabetically by key */\nexport const alphabeticalSortPredicate =\n (key: keyof T) =>\n (a: T, b: T) => {\n if (a[key] < b[key]) {\n return -1;\n }\n if (a[key] > b[key]) {\n return 1;\n }\n return 0;\n };\n\n// Helper Functions\nexport const checkProviderBaseInterval = (\n appointmentType: AppointmentTypeDto,\n baseInterval: number\n) => {\n // React can re-render the page with a undefined value before we navigate off to the provider appointment type's page.\n if (appointmentType === undefined) {\n return false;\n }\n\n const isNewDurationBaseIntervalWrong =\n appointmentType.newPatientDuration! % baseInterval !== 0 &&\n appointmentType.isAvailableNewPatients;\n\n const isExistingDurationBaseIntervalWrong =\n (appointmentType.minuteDuration! * 60) % baseInterval !== 0 &&\n appointmentType.isAvailableExistingPatients;\n\n return (\n (isNewDurationBaseIntervalWrong || isExistingDurationBaseIntervalWrong) &&\n appointmentType.customised\n );\n};\n\nexport const checkLocationBaseInterval = (\n appointmentType: AppointmentTypeDto,\n baseInterval: number\n) => {\n return (\n appointmentType.newPatientDuration! % baseInterval !== 0 &&\n appointmentType.isAvailableNewPatients === true\n );\n};\n\nexport const checkLocationMultiAppt = (\n appointmentType: AppointmentTypeCombined\n) => {\n return (\n (appointmentType.durationTG !== appointmentType.newPatientDuration! ||\n appointmentType.durationTG !== appointmentType.minuteDuration! * 60) &&\n appointmentType.groupBooking &&\n appointmentType.isAvailableNewPatients\n );\n};\nexport const getBookingStatus = (\n isAvailableExistingPatients: boolean,\n isAvailableNewPatients: boolean\n) =>\n isAvailableExistingPatients || isAvailableNewPatients\n ? BookingStatus.Online\n : BookingStatus.Offline;\n\nexport function getCombinedAppointmentTypeData(\n appointmentTypes: AppointmentTypeDto[],\n appointmentTypesTG: AppointmentTypeTGDto[]\n) {\n if (!appointmentTypes) return null;\n if (!appointmentTypesTG) return null;\n\n const mergedAppointtmentTypeData = appointmentTypes.map(\n currentAppointmentType => {\n const currentAppointmentTypeTG = appointmentTypesTG.find(\n type => type.id === currentAppointmentType.id\n );\n\n return {\n maxGroupSize: currentAppointmentTypeTG?.maxGroupSize,\n groupBooking: currentAppointmentTypeTG?.groupBooking,\n durationTG: currentAppointmentTypeTG?.duration,\n bookingStatus: getBookingStatus(\n !!currentAppointmentType.isAvailableExistingPatients,\n !!currentAppointmentType.isAvailableNewPatients\n ),\n ...currentAppointmentType\n } as AppointmentTypeCombined;\n }\n );\n return mergedAppointtmentTypeData;\n}\n\nexport function getCombinedProviderAppointmentTypeData(\n providerAppointmentTypes: ProviderAppointmentTypeDto[],\n appointmentTypesTG: AppointmentTypeTGDto[]\n) {\n if (!providerAppointmentTypes) return null;\n if (!appointmentTypesTG) return null;\n\n const mergedAppointtmentTypeData = providerAppointmentTypes.map(\n currentAppointmentType => {\n const currentProviderAppointmentType = appointmentTypesTG.find(\n type => type.id === currentAppointmentType.appointmentTypeId\n );\n\n return {\n maxGroupSize: currentProviderAppointmentType?.maxGroupSize,\n groupBooking: currentProviderAppointmentType?.groupBooking,\n durationTG: currentProviderAppointmentType?.duration,\n ...currentAppointmentType\n } as ProviderAppointmentTypeCombined;\n }\n );\n return mergedAppointtmentTypeData;\n}\n","import { FontIcon, IFontIconStyles, ITheme, useTheme } from \"@bps/fluent-ui\";\n\ninterface WarningFontIconProps {\n iconStyles?: IFontIconStyles;\n}\n\nexport const getWarningFontIconStyles = (\n theme: ITheme,\n iconStyles?: IFontIconStyles\n) => ({\n root: {\n fontSize: 16,\n color: theme.semanticColors.severeWarningIcon,\n alignSelf: \"center\",\n transform: \"rotate(-180deg)\",\n ...iconStyles?.root\n }\n});\n\nexport const WarningFontIcon = ({ iconStyles }: WarningFontIconProps) => {\n const theme = useTheme();\n\n return (\n \n );\n};\n","import { WarningFontIcon } from \"modules/booking/components/WarningFontIcon\";\nimport { FunctionComponent } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\n\nimport { Link, MessageBar, MessageBarType, Text } from \"@bps/fluent-ui\";\n\ninterface BaseIntervalWarningMessageBarProps {}\nexport const BaseIntervalWarningMessageBar: FunctionComponent<\n BaseIntervalWarningMessageBarProps\n> = () => {\n const navigate = useNavigate();\n\n const defaultLink = (\n \n default appointment length\n \n );\n\n const appointmentTypesLink = (\n {\n navigate(\"/booking/appointment-types\", { replace: true });\n }}\n >\n Appointment Types\n \n );\n\n const providersLink = (\n {\n navigate(\"/booking/providers\", { replace: true });\n }}\n >\n Providers\n \n );\n\n return (\n \n \n Your Bp Premier {defaultLink} has changed. Please review and update\n impacted {appointmentTypesLink} and {providersLink} that have customised\n appointments. Records requiring action are denoted with the icon\n \n \n \n );\n};\n","import {\n checkLocationBaseInterval,\n checkProviderBaseInterval\n} from \"common/utils\";\nimport {\n useLocationAppointmentTypesQuery,\n useLocationQuery\n} from \"core/gateways/practice/LocationHooks\";\nimport { useLocationProvidersQuery } from \"core/gateways/practice/ProviderHooks\";\nimport { useUserPreferencesQuery } from \"core/gateways/user/UserHooks\";\nimport { observer } from \"mobx-react-lite\";\n\nimport { BaseIntervalWarningMessageBar } from \"./appointment-types-base-interval-warning-message-bar\";\n\ninterface BaseIntervalWarningProps {\n locationId: string;\n}\n\nexport const BaseIntervalWarning = observer(\n ({ locationId }: BaseIntervalWarningProps) => {\n const { data: location } = useLocationQuery(locationId);\n const { data: providers } = useLocationProvidersQuery(locationId);\n const { data: appointmentTypes } =\n useLocationAppointmentTypesQuery(locationId);\n\n const { data: userPreferences } = useUserPreferencesQuery();\n\n if (!(providers?.length && appointmentTypes?.length && location))\n return null;\n\n // Check if any appointment type duration is not a interval of the base appointment type duration.\n // If true, we will display a alert banner across PrOS\n const baseInterval: number = Number(\n userPreferences?.find(\n x => x.settingName.toLowerCase() === \"appointmentlength\"\n )?.settingValue\n );\n\n // Check Location Customised appointment types\n const isLocationBaseInterval =\n appointmentTypes.filter(at => checkLocationBaseInterval(at, baseInterval))\n .length > 0;\n\n // Check Provider Customised appointment types\n const isProviderBaseInterval =\n providers.filter(\n p =>\n p.appointmentTypes.filter(pat =>\n checkProviderBaseInterval(pat, baseInterval)\n ).length > 0\n ).length > 0;\n\n return (\n <>\n {(isLocationBaseInterval || isProviderBaseInterval) && (\n \n )}\n \n );\n }\n);\n","import { WarningFontIcon } from \"modules/booking/components/WarningFontIcon\";\nimport { FunctionComponent } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\n\nimport { Link, MessageBar, MessageBarType, Text } from \"@bps/fluent-ui\";\n\ninterface MultiApptWarningMessageBarProps {}\nexport const MultiApptWarningMessageBar: FunctionComponent<\n MultiApptWarningMessageBarProps\n> = () => {\n const navigate = useNavigate();\n\n const appointmentTypesLink = (\n {\n navigate(\"/booking/appointment-types\", { replace: true });\n }}\n >\n Appointment Types\n \n );\n\n const providersLink = (\n {\n navigate(\"/booking/providers\", { replace: true });\n }}\n >\n Providers\n \n );\n\n return (\n \n \n Your appointment type has been set up to allow multiple bookings per\n appointment slot in Bp Premier. Please review and update impacted\n 'custom' durations in {appointmentTypesLink} and {providersLink}.\n Records requiring action are denoted with the following icon\n \n \n \n );\n};\n","import {\n checkLocationMultiAppt,\n getCombinedAppointmentTypeData\n} from \"common/utils\";\nimport {\n useLocationAppointmentTypesQuery,\n useLocationQuery\n} from \"core/gateways/practice/LocationHooks\";\nimport { useLocationProvidersQuery } from \"core/gateways/practice/ProviderHooks\";\nimport { useAppointmentTypesTG } from \"core/gateways/tenant\";\nimport { observer } from \"mobx-react-lite\";\n\nimport { MultiApptWarningMessageBar } from \"./appointment-types-multi-appt-warning-message-bar\";\n\ninterface MultiApptWarningProps {\n locationId: string;\n}\n\nexport const MultiApptWarning = observer(\n ({ locationId }: MultiApptWarningProps) => {\n const { data: location } = useLocationQuery(locationId);\n const { data: providers } = useLocationProvidersQuery(locationId);\n const { data: appointmentTypes } =\n useLocationAppointmentTypesQuery(locationId);\n\n const { data: appointmentTypesTG } = useAppointmentTypesTG({\n appointmentTypeIds: appointmentTypes?.map(at => at.id) ?? []\n });\n if (\n !(\n providers?.length &&\n appointmentTypes?.length &&\n appointmentTypesTG?.length &&\n location\n )\n )\n return null;\n\n // Combine tenant gateway's appointment type for group booking data.\n const combinedAppointmentTypeData = getCombinedAppointmentTypeData(\n appointmentTypes!,\n appointmentTypesTG!\n );\n\n if (!combinedAppointmentTypeData) return null;\n\n // Check Location Customised appointment types\n const isLocationMultiApptCustomised = combinedAppointmentTypeData.some(at =>\n checkLocationMultiAppt(at)\n );\n\n // Check Provider Customised appointment types\n const isProviderMultiApptCustomised = providers.some(p => {\n const combinedAppointmentTypeData = getCombinedAppointmentTypeData(\n p.appointmentTypes!,\n appointmentTypesTG!\n );\n return combinedAppointmentTypeData!.some(pat => {\n return checkLocationMultiAppt(pat);\n });\n });\n\n return (\n <>\n {(isLocationMultiApptCustomised || isProviderMultiApptCustomised) && (\n \n )}\n \n );\n }\n);\n","import { useState } from \"react\";\n\nimport { Link, MessageBar, MessageBarType, Text } from \"@bps/fluent-ui\";\n\nimport { useLocationsQuery } from \"../core/gateways/practice\";\n\nexport const InfoBarRestriction = () => {\n const [showMessageBar, setShowMessageBar] = useState(true);\n const { data: locations } = useLocationsQuery();\n if (!showMessageBar) {\n return null;\n }\n\n const isLocationsDisabled = locations?.every(\n location => location.practiceCanTurnOnOnlineBooking === false\n );\n\n if (!isLocationsDisabled) {\n return null;\n }\n\n return (\n setShowMessageBar(false)}\n dismissButtonAriaLabel=\"close-info-bar-restriction\"\n messageBarType={MessageBarType.warning}\n >\n \n Your account has been suspended and online bookings has been turned off.\n Please contact the Bp Sales team on\n 1300 40 111 to re-activate your\n account.\n \n \n );\n};\n","import { useGtmAuthorisation } from \"common/hooks/useGtmAuthorisation\";\nimport { Notifications } from \"common/Notifications\";\nimport { useStores } from \"common/StoresProvider\";\nimport { QueryStateIndicator } from \"common/ui-components/QueryStateIndicator\";\nimport { useCurrentUserQuery } from \"core/gateways/user/UserHooks\";\nimport { observer } from \"mobx-react-lite\";\nimport { BaseIntervalWarning } from \"modules/booking/pages/appointmentTypes/warnings/appointments-setting-base-interval-warning\";\nimport { MultiApptWarning } from \"modules/booking/pages/appointmentTypes/warnings/appointments-setting-multi-appt-warning\";\nimport { ComponentType, createElement, PropsWithChildren } from \"react\";\n\nimport {\n Customizer,\n IMessageBarProps,\n mergeStyles,\n MessageBarType,\n Stack\n} from \"@bps/fluent-ui\";\n\nimport { InfoBarRestriction } from \"./InfoBarRestriction\";\nimport { NavBar } from \"./NavBar\";\n\nexport interface MainLayoutProps {\n toolbar?: ComponentType;\n}\n\nconst messageBarSettings: Partial = {\n styles: props => ({\n root: props.messageBarType === MessageBarType.info && {\n background: props.theme.palette.white\n }\n })\n};\n\nexport const MainLayout = observer(\n ({ toolbar, children }: PropsWithChildren) => {\n const userQuery = useCurrentUserQuery();\n\n const { core } = useStores();\n const selectedLocationId = core.locationId;\n useGtmAuthorisation(userQuery.data, selectedLocationId);\n\n const mainStyles = mergeStyles({\n flexGrow: 1,\n backgroundColor: \"#f3f3f4\",\n overflow: \"auto\",\n padding: 16,\n position: \"relative\"\n });\n\n const toolbarStyles = mergeStyles({\n padding: \"0 16px\",\n margin: \"4px 0\"\n });\n\n return (\n \n \n \n {selectedLocationId && (\n <>\n \n \n \n )}\n \n\n {toolbar && (\n
    \n {createElement(toolbar)}\n
    \n )}\n \n \n \n
    {children}
    \n \n
    \n );\n }\n);\n","import Dashboard from \"Dashboard\";\n\nimport { routes } from \"common/routes\";\nimport { Authorized } from \"core/auth/Authorized\";\nimport {\n PermissionsOperator,\n PermissionsSpec,\n usePermissionsChecker\n} from \"core/auth/Permissions\";\nimport { ComponentType, lazy, Suspense } from \"react\";\nimport { Route, Routes } from \"react-router-dom\";\nimport { useAsync } from \"react-use\";\n\nimport { NotFoundErrorBox, Overlay } from \"@bps/fluent-ui\";\n\nimport { MainLayout } from \"./MainLayout\";\n\ninterface LazyRoute {\n path: string;\n exact?: boolean;\n permissions?: PermissionsSpec;\n permissionsOperator?: PermissionsOperator;\n importComponent: () => Promise<{ default: ComponentType }>;\n}\n\nconst lazyRoutes: LazyRoute[] = [\n {\n path: `${routes.appointmentBooking.basePath}/*`,\n importComponent: () =>\n import(/* webpackChunkName: \"booking\"*/ \"../modules/booking\")\n },\n\n {\n path: `${routes.premierOnlineServices.basePath}/*`,\n importComponent: () =>\n import(\n /* webpackChunkName: \"premierOnlineServices\"*/ \"../modules/premierOnlineServices\"\n )\n }\n];\n\n// Simple wrapper component that renders the resolved lazy import\nconst LazyWrapper = ({ component: Component }) => ;\n\nexport const Shell = () => {\n const hasPermissions = usePermissionsChecker();\n\n useAsync(async () => {\n if (!hasPermissions) return;\n\n const preloads = lazyRoutes\n .filter(def => hasPermissions(def.permissions, def.permissionsOperator))\n .map(def => def.importComponent());\n\n await Promise.all(preloads);\n }, [hasPermissions]);\n\n return (\n \n }>\n \n } />\n\n {lazyRoutes.map(route => (\n \n \n \n }\n />\n ))}\n\n } />\n \n \n \n );\n};\n","import { PageViewTracker } from \"PageViewTracker\";\n\nimport { ErrorBoundaryFallback } from \"common/ErrorBoundaryFallback\";\nimport { StoresProvider } from \"common/StoresProvider\";\nimport { ErrorAlert } from \"common/ui-components\";\nimport { initAppInsights } from \"core/analytics/app-insights/app-insights.utils\";\nimport { initGoogleAnalytics } from \"core/analytics/google-analytics/google-analitics.utils\";\nimport { initHotJar } from \"core/analytics/hotjar/hot-jar.utils\";\nimport { config } from \"core/config\";\nimport { ReactQueryProvider } from \"core/ReactQueryProvider\";\nimport { Shell } from \"layout/Shell\";\nimport { configure } from \"mobx\";\nimport promiseFinally from \"promise.prototype.finally\";\nimport { ErrorBoundary } from \"react-error-boundary\";\nimport { ReactQueryDevtools } from \"react-query/devtools\";\nimport { Route, BrowserRouter as Router, Routes } from \"react-router-dom\";\n\nimport {\n CenteredLargeSpinner,\n defaultTheme,\n globalAppStyles,\n initializeIcons,\n mergeStyles,\n scopedSettings,\n ThemeProvider\n} from \"@bps/fluent-ui\";\nimport { AuthenticationProvider } from \"@bps/http-client\";\nimport { AppInsightsContext } from \"@microsoft/applicationinsights-react-js\";\n\nimport \"./common/reset.css\";\n\n// observables can only be mutated within actions\nconfigure({ enforceActions: \"observed\" });\n\npromiseFinally.shim();\n\n// Fluent UI and NP custom icons ref: https://devinfrasa.z8.web.core.windows.net/?path=/story/foundations-icons--icons-stories\ninitializeIcons(\n \"https://static2.sharepointonline.com/files/fabric/assets/icons/\"\n);\n\ninitGoogleAnalytics();\ninitHotJar();\nconst appInsightPlugin = initAppInsights();\n\nconst redirectUri = `${window.location.origin}${config.msal.postAuthenticateRedirectUrl}`;\n\nexport const App = () => {\n return (\n \n (\n \n )}\n renderError={message => }\n >\n \n \n \n \n <>\n \n \n \n \n }\n />\n \n\n \n \n \n\n {config.environment && import.meta.env.MODE === \"development\" && (\n \n )}\n \n \n \n \n \n );\n};\n","import { App } from \"App\";\n\nimport \"index.css\";\nimport ReactDOM from \"react-dom\";\nimport \"react-quill/dist/quill.snow.css\";\n\nReactDOM.render(, document.getElementById(\"root\") as HTMLElement);\n"],"file":"assets/index-CMKDlfFK.js"}