{"version":3,"file":"index.26841e5b.js","sources":["../../vite/modulepreload-polyfill","../../src/language/LanguageContext.ts","../../src/services/constant.ts","../../src/language/translations.ts","../../src/assets/translations/languages.ts","../../src/models/CacheProfile.ts","../../src/models/graphql/GetCacheDriverVehicles.ts","../../src/models/graphql/GetCacheJourneys.ts","../../src/models/graphql/GetCacheProfile.ts","../../src/models/graphql/GetCacheVehicleMakes.ts","../../src/models/graphql/SetCacheDriverVehicles.ts","../../src/models/graphql/SetCacheJourneys.ts","../../src/models/graphql/SetCacheProfile.ts","../../src/models/graphql/SetCacheVehicleMakes.ts","../../src/models/graphql/AssignDriverToJourney.ts","../../src/models/graphql/AssignJourneyVehicle.ts","../../src/models/graphql/AssociateJourney.ts","../../src/models/graphql/ChangeJourneyStatus.ts","../../src/models/graphql/CreateVehicle.ts","../../src/models/graphql/DeleteJourney.ts","../../src/models/graphql/DeleteVehicle.ts","../../src/models/graphql/GetAssociatedJourneys.ts","../../src/models/graphql/GetDriverById.ts","../../src/models/graphql/GetFlightInfo.ts","../../src/models/graphql/GetJourneyByCode.ts","../../src/models/graphql/GetPhoneByCountry.ts","../../src/models/graphql/GetPhoneByLocation.ts","../../src/models/graphql/GetTravellerPosition.ts","../../src/models/graphql/GetVehicleMakes.ts","../../src/models/graphql/GetVehicleModels.ts","../../src/models/graphql/GetVehiclesByDriverId.ts","../../src/models/graphql/GetVehicleSeries.ts","../../src/models/graphql/LogIn.ts","../../src/models/graphql/LogInPhone.ts","../../src/models/graphql/NewSessionMutation.ts","../../src/models/graphql/PruneJourneys.ts","../../src/models/graphql/RetrieveSessionQuery.ts","../../src/models/graphql/SendOTP.ts","../../src/models/graphql/UpdateDriverPosition.ts","../../src/models/graphql/UpdateVehicle.ts","../../src/models/graphql/GetCacheApiError.ts","../../src/models/graphql/SetCacheApiError.ts","../../src/services/store.ts","../../src/services/apolloCacheHooks.ts","../../src/components/Header.tsx","../../src/layout/MainLayout.tsx","../../src/components/StickyBackButton.tsx","../../src/components/Vehicle.tsx","../../src/utils/useOnlineStatus.tsx","../../src/services/apolloNetworkHooks/useOfflineProofQuery.ts","../../src/services/apolloNetworkHooks/useGetDriverVehicles.ts","../../src/services/apolloNetworkHooks/useAddVehicle.ts","../../src/services/apolloNetworkHooks/useAssignJourney.ts","../../src/services/apolloNetworkHooks/useAssignVehicle.ts","../../src/services/hooks/useDataLayer.ts","../../src/services/hooks/useAddAction.ts","../../src/services/apolloNetworkHooks/useAssociateJourney.ts","../../src/services/validateJwt.ts","../../src/services/apolloNetworkHooks/useAuthenticatedQuery.ts","../../src/models/graphql/CreateAction.ts","../../src/services/apolloNetworkHooks/useCreateAction.ts","../../src/services/apolloNetworkHooks/useDeleteJourney.ts","../../src/services/apolloNetworkHooks/useDeleteVehicle.ts","../../src/models/graphql/UpdateDriver.ts","../../src/utils/parsingFunctions.tsx","../../src/services/apolloNetworkHooks/useEditDriverData.ts","../../src/services/apolloNetworkHooks/useEditVehicle.ts","../../src/services/apolloNetworkHooks/useGetAssociatedJourneys.ts","../../src/services/apolloNetworkHooks/useGetDriverData.ts","../../src/services/apolloNetworkHooks/useGetJourneyByCode.ts","../../src/services/apolloNetworkHooks/useGetPhoneByCountry.ts","../../src/services/apolloNetworkHooks/useGetPhoneByLocation.ts","../../src/services/apolloNetworkHooks/useGetVehicleMakes.ts","../../src/services/apolloNetworkHooks/useGetVehicleSeries.ts","../../src/services/apolloNetworkHooks/useLoginEmail.ts","../../src/services/apolloNetworkHooks/useLoginPhone.ts","../../src/services/apolloNetworkHooks/usePruneJourneys.ts","../../src/services/apolloNetworkHooks/useRetrieveSession.ts","../../src/models/graphql/SearchActions.ts","../../src/services/apolloNetworkHooks/useSearchActions.ts","../../src/services/apolloNetworkHooks/useSendOTP.ts","../../src/models/graphql/UploadDriverPhoto.ts","../../src/services/apolloNetworkHooks/useSetDriverPhoto.ts","../../src/services/apolloNetworkHooks/useSetJourneyStatus.ts","../../src/models/graphql/UploadAttachment.ts","../../src/services/apolloNetworkHooks/useUploadAttachment.ts","../../src/models/graphql/ValidateAccessTokenQuery.ts","../../src/services/apolloNetworkHooks/useNewSession.ts","../../src/services/apolloNetworkHooks/useValidateAccessToken.ts","../../src/types/global.ts","../../src/pages/DriverInformation.tsx","../../src/pages/DriverName.tsx","../../src/pages/EditProfile.tsx","../../src/types/journeyStatus.ts","../../src/components/Journey/JourneyFilters.tsx","../../src/components/StatusIndicator.tsx","../../src/components/Journey/JourneyHeaderBox.tsx","../../src/components/Journey/JourneyInfoAddons.tsx","../../src/components/Journey/JourneyInfoDetail.tsx","../../src/components/JourneyOverviewBox.tsx","../../src/pages/InstructionalVideo.tsx","../../src/pages/JourneyOverview.tsx","../../src/components/FilePreview.tsx","../../src/components/fileUpload/fileUpload.tsx","../../src/components/fileUpload/fileUploadSecond.tsx","../../src/utils/useIsIos.tsx","../../src/utils/useIsMobile.tsx","../../src/components/Meet&GreetSign.tsx","../../src/components/Journey/JourneyInfo.tsx","../../src/types/actions.ts","../../src/components/Journey/JourneyInfoBoxButtons.tsx","../../src/components/Journey/JourneyInfoBox.tsx","../../src/components/PickupIssues/PickupIssues.tsx","../../src/services/apolloNetworkHooks/useCreateJourneyAction.ts","../../src/components/PickupIssues/SingleIssueDrawer.tsx","../../src/components/ProgressBarStatus.tsx","../../src/components/ProgressBarStatusButton.tsx","../../src/components/Traveller/GeoPoint.tsx","../../src/components/Traveller/TravellerInfo.tsx","../../src/services/apolloNetworkHooks/useGetFlightInfo.ts","../../src/services/apolloNetworkHooks/useGetTravellerPosition.ts","../../src/services/apolloNetworkHooks/useUpdateDriverPosition.ts","../../src/pages/JourneyPage.tsx","../../src/queries/captcha/captchaTypeDefs.ts","../../src/queries/captcha/hooks/captcha/useGetCaptchaToken.ts","../../src/queries/geo/geoTypeDefs.ts","../../src/queries/geo/hooks/ip/useQueryIPAddressInfo.ts","../../src/pages/LogIn.tsx","../../src/pages/PinScreen.tsx","../../src/pages/Profile.tsx","../../src/pages/Support/Contact.tsx","../../src/pages/Support/FAQ.tsx","../../src/pages/Support/Videos.tsx","../../src/pages/Support/index.tsx","../../src/pages/VehiclePage.tsx","../../src/pages/WelcomePage.tsx","../../src/App.tsx","../../src/components/ScrollToTop.tsx","../../src/language/WithLanguage.tsx","../../src/services/apollo.ts","../../src/main.tsx"],"sourcesContent":["const p = function polyfill() {\n const relList = document.createElement('link').relList;\n if (relList && relList.supports && relList.supports('modulepreload')) {\n return;\n }\n for (const link of document.querySelectorAll('link[rel=\"modulepreload\"]')) {\n processPreload(link);\n }\n new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== 'childList') {\n continue;\n }\n for (const node of mutation.addedNodes) {\n if (node.tagName === 'LINK' && node.rel === 'modulepreload')\n processPreload(node);\n }\n }\n }).observe(document, { childList: true, subtree: true });\n function getFetchOpts(script) {\n const fetchOpts = {};\n if (script.integrity)\n fetchOpts.integrity = script.integrity;\n if (script.referrerpolicy)\n fetchOpts.referrerPolicy = script.referrerpolicy;\n if (script.crossorigin === 'use-credentials')\n fetchOpts.credentials = 'include';\n else if (script.crossorigin === 'anonymous')\n fetchOpts.credentials = 'omit';\n else\n fetchOpts.credentials = 'same-origin';\n return fetchOpts;\n }\n function processPreload(link) {\n if (link.ep)\n // ep marker = processed\n return;\n link.ep = true;\n // prepopulate the load record\n const fetchOpts = getFetchOpts(link);\n fetch(link.href, fetchOpts);\n }\n};__VITE_IS_MODERN__&&p();","import React, { Dispatch, SetStateAction } from 'react';\n\nexport interface ILanguageContext {\n language: string | undefined;\n setLanguage: Dispatch> | undefined;\n}\n\nexport const LanguageContext = React.createContext({\n language: undefined,\n setLanguage: undefined,\n});\n","export const journeysPerPage = 999;\n\nexport const baseURL = import.meta.env.VITE_API_URL as string;\nexport const routes = {\n login: {\n email: '/email',\n phone: '/phone',\n pin: '/pin',\n name: '/name',\n welcome: '/welcome',\n },\n journeys: '/journeys',\n journey: '/journey',\n profile: '/profile',\n information: '/information',\n newVehicle: '/new-vehicle',\n updateVehicle: '/update-vehicle',\n editProfile: '/edit-profile',\n support: '/support',\n video: '/video',\n};\n\nexport const storyblock = {\n baseUrl: 'https://api.storyblok.com/v2/cdn',\n token: 'nHYqtOzXUiZTEvkErPlKnAtt',\n};\n\nexport const monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\nexport const filterStatuses: any = {\n upcoming: ['AVAILABLE', 'PLANNED', 'UNDERWAY_TO_PICKUP', 'ARRIVED_AT_PICKUP', 'JOURNEY_IN_PROGRESS'],\n completed: ['COMPLETED'],\n cancelled: ['CANCELLED', 'NO_LONGER_AVAILABLE', 'REASSIGNED_DRIVER', 'REASSIGNED_TRANSFER_COMPANY'],\n};\n","import { storyblock } from '../services/constant';\n\nexport const translations: { [key: string]: { [key: string]: string } } = {};\n\nexport const languageCodes: Array = [];\n\nexport const fetchTranslations = async (lng = 'en') => {\n console.log('loading translations');\n if (translations[lng]) return;\n\n const queryParams = `language=${lng}&token=${storyblock.token}&version=published`;\n let result = null;\n\n try {\n console.log('loading translations 2');\n result = await fetch(\n `${storyblock.baseUrl}/stories/driver-app/driver-app-pages/?${queryParams}`,\n ).then((res) => res.json());\n\n console.log('loading translations 3');\n\n if (result?.story?.content) {\n console.log('loading translations 4');\n translations[lng] = result.story.content;\n }\n }\n catch (e) {\n console.log('loading translations 5', e);\n console.log('Error in fetching translations from Storyblock - ', e);\n }\n\n return result;\n};\n\nexport const getAllLanguageCodes = async () => {\n let result = null;\n\n try {\n result = await fetch(\n `${storyblock.baseUrl}/spaces/me/?token=${storyblock.token}`,\n ).then((res) => res.json());\n\n if (result?.space?.language_codes) {\n result.space.language_codes.forEach((langCode: string) => {\n languageCodes.push(langCode);\n });\n }\n }\n catch (e) {\n console.log('Error in fetching language codes from Storyblock - ', e);\n }\n\n return result;\n};\n","export const langs = [\n { name: 'Afar', code: 'aa', flag: 'dj' },\n { name: 'Abkhazian', code: 'ab', flag: 'ge' },\n { name: 'Afrikaans', code: 'af', flag: 'za' },\n { name: 'Akan', code: 'ak', flag: 'gh' },\n { name: 'Amharic', code: 'am', flag: 'et' },\n { name: 'Arabic', code: 'ar', flag: 'sa' },\n { name: 'Assamese', code: 'as', flag: 'in' },\n { name: 'Awadhi', code: 'aw', flag: 'in' },\n { name: 'Aymara', code: 'ay', flag: 'bo' },\n { name: 'Azerbaijani', code: 'az', flag: 'az' },\n { name: 'Bhojpuri', code: 'b1', flag: 'in' },\n { name: 'Maithili', code: 'b2', flag: 'np' },\n { name: 'Bashkir', code: 'ba', flag: 'ru' },\n { name: 'Belarussian', code: 'be', flag: 'by' },\n { name: 'Bulgarian', code: 'bg', flag: 'bg' },\n { name: 'Bihari', code: 'bh', flag: 'in' },\n { name: 'Bislama', code: 'bi', flag: 'vu' },\n { name: 'Balochi', code: 'bl', flag: 'pk' },\n { name: 'Bengali', code: 'bn', flag: 'bd' },\n { name: 'Tibetan', code: 'bo', flag: 'cn' },\n { name: 'Breton', code: 'br', flag: 'fr' },\n { name: 'Catalan', code: 'ca', flag: 'ca' },\n { name: 'Cebuano', code: 'cb', flag: 'ph' },\n { name: 'Chechen', code: 'ce', flag: 'ce' },\n { name: 'Corsican', code: 'co', flag: 'fr' },\n { name: 'Czech', code: 'cs', flag: 'cz' },\n { name: 'Welsh', code: 'cy', flag: 'cy' },\n { name: 'Danish', code: 'da', flag: 'dk' },\n { name: 'German', code: 'de', flag: 'de' },\n { name: 'Dakhini', code: 'dk', flag: 'in' },\n { name: 'Bhutani', code: 'dz', flag: 'bt' },\n { name: 'Greek', code: 'el', flag: 'gr' },\n { name: 'English', code: 'en', flag: 'gb' },\n { name: 'Esperanto', code: 'eo', flag: 'eo' },\n { name: 'Spanish', code: 'es', flag: 'es' },\n { name: 'Estonian', code: 'et', flag: 'ee' },\n { name: 'Basque', code: 'eu', flag: 'eu' },\n { name: 'Persian', code: 'fa', flag: 'ir' },\n { name: 'Finnish', code: 'fi', flag: 'fi' },\n { name: 'Fiji', code: 'fj', flag: 'fj' },\n { name: 'Faeroese', code: 'fo', flag: 'fo' },\n { name: 'French', code: 'fr', flag: 'fr' },\n { name: 'Frisian', code: 'fy', flag: 'nl' },\n { name: 'Irish', code: 'ga', flag: 'ie' },\n { name: 'Scottish Gaelic', code: 'gd', flag: 'gd' },\n { name: 'Galician', code: 'gl', flag: 'gl' },\n { name: 'Guarani', code: 'gn', flag: 'py' },\n { name: 'Gujarati', code: 'gu', flag: 'in' },\n { name: 'Hausa', code: 'ha', flag: 'ne' },\n { name: 'Hindi', code: 'hi', flag: 'in' },\n { name: 'Croatian', code: 'hr', flag: 'hr' },\n { name: 'Haitian Creole', code: 'ht', flag: 'ht' },\n { name: 'Hungarian', code: 'hu', flag: 'hu' },\n { name: 'Armenian', code: 'hy', flag: 'am' },\n { name: 'Interlingua', code: 'ia', flag: 'ia' },\n { name: 'Interlingue', code: 'ie', flag: 'ie' },\n { name: 'Inupiak', code: 'ik', flag: 'ik' },\n { name: 'Indonesian', code: 'in', flag: 'id' },\n { name: 'Icelandic', code: 'is', flag: 'is' },\n { name: 'Italian', code: 'it', flag: 'it' },\n { name: 'Hebrew', code: 'iw', flag: 'il' },\n { name: 'Japanese', code: 'ja', flag: 'jp' },\n { name: 'Yiddish', code: 'ji', flag: 'ji' },\n { name: 'Javanese', code: 'jw', flag: 'id' },\n { name: 'Georgian', code: 'ka', flag: 'ge' },\n { name: 'Kabyle', code: 'kb', flag: 'dz' },\n { name: 'Konkani', code: 'ki', flag: 'in' },\n { name: 'Kazakh', code: 'kk', flag: 'kz' },\n { name: 'Greenlandic', code: 'kl', flag: 'gl' },\n { name: 'Khmer', code: 'km', flag: 'kh' },\n { name: 'Kannada', code: 'kn', flag: 'in' },\n { name: 'Korean', code: 'ko', flag: 'kr' },\n { name: 'Kashmiri', code: 'ks', flag: 'in' },\n { name: 'Kurdish', code: 'ku', flag: 'iq' },\n { name: 'Kirghiz', code: 'ky', flag: 'kg' },\n { name: 'Latin', code: 'la', flag: 'va' },\n { name: 'Luxembourgish', code: 'lb', flag: 'lu' },\n { name: 'Lombard', code: 'lm', flag: 'it' },\n { name: 'Lingala', code: 'ln', flag: 'cg' },\n { name: 'Laothian', code: 'lo', flag: 'la' },\n { name: 'Lithuanian', code: 'lt', flag: 'lt' },\n { name: 'Latvian', code: 'lv', flag: 'lv' },\n { name: 'Malagasy', code: 'mg', flag: 'mg' },\n { name: 'Maori', code: 'mi', flag: 'nz' },\n { name: 'Macedonian', code: 'mk', flag: 'mk' },\n { name: 'Malayalam', code: 'ml', flag: 'in' },\n { name: 'Mongolian', code: 'mn', flag: 'mn' },\n { name: 'Moldavian', code: 'mo', flag: 'md' },\n { name: 'Marathi', code: 'mr', flag: 'in' },\n { name: 'Malay', code: 'ms', flag: 'my' },\n { name: 'Maltese', code: 'mt', flag: 'mt' },\n { name: 'Makhuwa', code: 'mu', flag: 'mz' },\n { name: 'Marwari', code: 'mw', flag: 'in' },\n { name: 'Burmese', code: 'my', flag: 'mm' },\n { name: 'Nauru', code: 'na', flag: 'nr' },\n { name: 'Nepali', code: 'ne', flag: 'np' },\n { name: 'Dutch', code: 'nl', flag: 'nl' },\n { name: 'Norwegian', code: 'no', flag: 'no' },\n { name: 'Occitan', code: 'oc', flag: 'fr' },\n { name: 'Oromo', code: 'om', flag: 'et' },\n { name: 'Oriya', code: 'or', flag: 'in' },\n { name: 'Punjabi', code: 'pa', flag: 'pk' },\n { name: 'Polish', code: 'pl', flag: 'pl' },\n { name: 'Pashto', code: 'ps', flag: 'af' },\n { name: 'Portuguese', code: 'pt', flag: 'pt' },\n { name: 'Quechua', code: 'qu', flag: 'pe' },\n { name: 'Rifian', code: 'ri', flag: 'ma' },\n { name: 'Rhaeto-Romance', code: 'rm', flag: 'ch' },\n { name: 'Kirundi', code: 'rn', flag: 'bi' },\n { name: 'Romanian', code: 'ro', flag: 'ro' },\n { name: 'Russian', code: 'ru', flag: 'ru' },\n { name: 'Kinyarwanda', code: 'rw', flag: 'rw' },\n { name: 'Sanskrit', code: 'sa', flag: 'in' },\n { name: 'Sindhi', code: 'sd', flag: 'pk' },\n { name: 'Sangro', code: 'sg', flag: 'cf' },\n { name: 'Serbo-Croatian', code: 'sh', flag: 'rs' },\n { name: 'Sinhalese', code: 'si', flag: 'lk' },\n { name: 'Slovak', code: 'sk', flag: 'sk' },\n { name: 'Slovenian', code: 'sl', flag: 'si' },\n { name: 'Samoan', code: 'sm', flag: 'ws' },\n { name: 'Shona', code: 'sn', flag: 'zw' },\n { name: 'Somali', code: 'so', flag: 'so' },\n { name: 'Albanian', code: 'sq', flag: 'al' },\n { name: 'Serbian', code: 'sr', flag: 'rs' },\n { name: 'Siswati', code: 'ss', flag: 'sz' },\n { name: 'Sesotho', code: 'st', flag: 'ls' },\n { name: 'Sundanese', code: 'su', flag: 'id' },\n { name: 'Swedish', code: 'sv', flag: 'se' },\n { name: 'Swahili', code: 'sw', flag: 'ke' },\n { name: 'Tamil', code: 'ta', flag: 'lk' },\n { name: 'Telugu', code: 'te', flag: 'in' },\n { name: 'Tajik', code: 'tg', flag: 'tj' },\n { name: 'Thai', code: 'th', flag: 'th' },\n { name: 'Tigrinya', code: 'ti', flag: 'er' },\n { name: 'Turkmen', code: 'tk', flag: 'tm' },\n { name: 'Tagalog', code: 'tl', flag: 'ph' },\n { name: 'Tuareg', code: 'tm', flag: 'tm' },\n { name: 'Setswana', code: 'tn', flag: 'bw' },\n { name: 'Tonga', code: 'to', flag: 'to' },\n { name: 'Turkish', code: 'tr', flag: 'tr' },\n { name: 'Tsonga', code: 'ts', flag: 'za' },\n { name: 'Tatar', code: 'tt', flag: 'ru' },\n { name: 'Twi', code: 'tw', flag: 'gh' },\n { name: 'Tamazight', code: 'tz', flag: 'tz' },\n { name: 'Uyghur', code: 'ug', flag: 'cn' },\n { name: 'Ukrainian', code: 'uk', flag: 'ua' },\n { name: 'Urdu', code: 'ur', flag: 'pk' },\n { name: 'Uzbek', code: 'uz', flag: 'uz' },\n { name: 'Vietnamese', code: 'vi', flag: 'vn' },\n { name: 'Volapuk', code: 'vo', flag: 'vo' },\n { name: 'Wolof', code: 'wo', flag: 'sn' },\n { name: 'Xhosa', code: 'xh', flag: 'za' },\n { name: 'Yoruba', code: 'yo', flag: 'ng' },\n { name: 'Chinese', code: 'zh', flag: 'cn' },\n { name: 'Zulu', code: 'zu', flag: 'za' },\n];\n","export interface CacheProfile {\n name?: string\n email?: string\n phone?: string\n token?: string\n refreshToken?: string\n accessToken?: string\n id?: number\n driverId?: number\n photo?: string\n lastJourneyView?: string\n lastJourneyId?: number\n created?: string\n videoLang?: string\n}\n\nexport const CacheProfileEmpty: CacheProfile = {\n name: '',\n email: '',\n phone: '',\n token: '',\n refreshToken: '',\n accessToken: '',\n id: 0,\n driverId: 0,\n photo: '',\n lastJourneyView: '',\n lastJourneyId: 0,\n created: '',\n videoLang: 'en',\n};\n","import { gql } from '@apollo/client';\n\nconst GetCacheDriverVehicles = gql`query getCacheDriverVehicles {\n vehicles @client\n}`;\n\nexport default GetCacheDriverVehicles;\n","import { gql } from '@apollo/client';\n\nconst GetCacheJourneys = gql`\n query getCachedJourneys {\n currentPage @client\n pageSize @client\n totalPages @client\n totalResults @client\n items @client\n }\n`;\n\nexport default GetCacheJourneys;\n","import { gql } from '@apollo/client';\n\nconst GetCacheProfile = gql`\n query getCachedProfile {\n name @client\n email @client\n phone @client\n token @client\n refreshToken @client\n accessToken @client\n id @client\n driverId @client\n photo @client\n lastJourneyView @client\n lastJourneyId @client\n videoLang @client\n }\n`;\n\nexport default GetCacheProfile;\n","import { gql } from '@apollo/client';\n\nconst GetCacheVehicleMakes = gql`\n query getCachedVehiclesMakes {\n makes @client\n }\n`;\n\nexport default GetCacheVehicleMakes;\n","import { gql } from '@apollo/client';\n\nconst SetCacheDriverVehicles = gql`\n mutation setCacheDriverVehicles {\n vehicles @client\n }\n`;\n\nexport default SetCacheDriverVehicles;\n","import { gql } from '@apollo/client';\n\nconst SetCacheJourneys = gql`\n mutation setCachedJourneys {\n currentPage @client\n pageSize @client\n totalPages @client\n totalResults @client\n items @client\n }\n`;\n\nexport default SetCacheJourneys;\n","import { gql } from '@apollo/client';\n\nconst SetCacheProfile = gql`\n mutation setCachedProfile {\n name @client\n email @client\n phone @client\n token @client\n refreshToken @client\n accessToken @client\n id @client\n driverId @client\n photo @client\n lastJourneyView @client\n lastJourneyId @client\n created @client\n videoLang @client\n }\n`;\n\nexport default SetCacheProfile;\n","import { gql } from '@apollo/client';\n\nconst SetCacheVehicleMakes = gql`\n mutation setCachedVehiclesMakes {\n makes @client\n }\n`;\n\nexport default SetCacheVehicleMakes;\n","import { gql } from '@apollo/client/core';\n\nconst assignDriverToJourneyQuery = gql`mutation assignJourney($id: Int!, $driverCode: String!, $accessToken: String!) {\n assignJourney(id: $id, code: $driverCode, accessToken: $accessToken) {\n success\n message\n id\n driverId\n driverCode\n created\n updated\n info {\n totalPrice\n totalFare\n canBeCompleted\n canBeCancelled\n completedOn\n nextAction\n status\n destinationLocation {\n id\n address {\n formattedAddress\n originalAddress\n establishment\n streetName\n streetNumber\n city\n postalCode\n region\n countryCode\n }\n hub\n }\n originLocation {\n id\n address {\n formattedAddress\n originalAddress\n establishment\n streetName\n streetNumber\n city\n postalCode\n region\n countryCode\n }\n hub\n }\n quoteId\n journeyCode\n bookingId\n hubId\n id\n created\n updated\n traveller {\n firstName\n lastName\n email\n phone\n flightNumber\n trainNumber\n languageIsoCode\n passengerCount\n luggageCount\n }\n price {\n currencyCode\n fareCurrencyCode\n partnerBusinessModel\n price\n priceVat\n fare\n fareVatLevel\n partnerCommission\n platformFee\n fixedPrice\n }\n execution {\n vehicleCategory\n pickupDate\n pickupTimeZone\n fleetId\n assignedDriverId\n assignedDriverVehicleId\n transferCompanyId\n meetingPointId\n meetingPointType\n durationInSeconds\n executionCode\n distance {\n value\n unit\n }\n }\n }\n }\n}`;\n\nexport default assignDriverToJourneyQuery;\n","import { gql } from '@apollo/client/core';\n\nconst assignJourneyVehicleQuery = gql`\n mutation assignJourneyVehicle($journeyId: Int!, $vehicleId: Int!, $accessToken: String!) {\n assignJourneyVehicle(journeyId: $journeyId, vehicleId: $vehicleId, accessToken: $accessToken) {\n success\n message\n }\n }\n`;\n\nexport default assignJourneyVehicleQuery;\n","import { gql } from '@apollo/client/core';\n\nconst associateJourneyMutation = gql`mutation associateJourney($code: String!, $token: String!, $accessToken: String!) {\n associateJourney(code: $code, token: $token, accessToken: $accessToken) {\n success\n message\n id\n driverId\n driverCode\n created\n updated\n info {\n totalPrice\n totalFare\n canBeCompleted\n canBeCancelled\n completedOn\n nextAction\n status\n destinationLocation {\n id\n address {\n formattedAddress\n originalAddress\n establishment\n streetName\n streetNumber\n city\n postalCode\n region\n countryCode\n }\n hubInfo {\n name\n hubType\n }\n hub\n }\n originLocation {\n id\n address {\n formattedAddress\n originalAddress\n establishment\n streetName\n streetNumber\n city\n postalCode\n region\n countryCode\n }\n hubInfo {\n name\n hubType\n }\n hub\n }\n quoteId\n journeyCode\n bookingId\n hubId\n id\n created\n updated\n traveller {\n firstName\n lastName\n email\n phone\n flightNumber\n trainNumber\n languageIsoCode\n passengerCount\n luggageCount\n }\n price {\n currencyCode\n fareCurrencyCode\n partnerBusinessModel\n price\n priceVat\n fare\n fareVatLevel\n partnerCommission\n platformFee\n fixedPrice\n }\n execution {\n vehicleCategory\n pickupDate\n pickupTimeZone\n fleetId\n assignedDriverId\n assignedDriverVehicleId\n transferCompanyId\n meetingPointId\n meetingPointType\n durationInSeconds\n executionCode\n distance {\n value\n unit\n }\n }\n }\n }\n}`;\n\nexport default associateJourneyMutation;\n","import { gql } from '@apollo/client/core';\n\nconst changeJourneyStatusQuery = gql`\n mutation changeJourneyStatus($status: String!, $id: Int!, $lat: String, $long: String, $accessToken: String, $acknowledgeCompletingPickupDateInFuture: Boolean) {\n changeJourneyStatus(status: $status, id: $id, lat: $lat, long: $long, accessToken: $accessToken, acknowledgeCompletingPickupDateInFuture: $acknowledgeCompletingPickupDateInFuture) {\n success\n message\n }\n }\n`;\n\nexport default changeJourneyStatusQuery;\n","import { gql } from '@apollo/client/core';\n\nconst createVehicle = gql`mutation createVehicle($driverId: Int!, $serieId: Int!, $plate: String!, $accessToken: String!) {\n createVehicle(driverId: $driverId, serieId: $serieId, plate: $plate, accessToken: $accessToken) {\n success\n message\n modelName\n makeName\n seriesName\n id\n driverId\n licensePlate\n }\n}`;\n\nexport default createVehicle;\n","import { gql } from '@apollo/client/core';\n\nconst deleteJourneyQuery = gql`mutation deleteJourney($sessionToken: String!, $journeyDriverCode: String!) {\n deleteJourney(sessionToken: $sessionToken, journeyDriverCode: $journeyDriverCode) {\n success\n message\n }\n}`;\n\nexport default deleteJourneyQuery;\n","import { gql } from '@apollo/client/core';\n\nconst deleteVehicleQuery = gql`mutation deleteVehicle($id: Int!, $accessToken: String!) {\n deleteVehicle(id: $id, accessToken: $accessToken) {\n success\n message\n }\n}`;\n\nexport default deleteVehicleQuery;\n","import { gql } from '@apollo/client/core';\n\nconst getAssociatedJourneysQuery = gql`\n query getAssociatedJourneys(\n $token: String!, \n $accessToken: String!, \n $page: Int!, \n $size: Int!, \n $textSearch: String, \n $pickupDateAfter: String, \n $pickupDateBefore: String, \n $includedStatuses: [String]\n ){\n getAssociatedJourneys(\n token: $token, \n accessToken: $accessToken, \n page: $page, \n size: $size,\n textSearch: $textSearch, \n pickupDateAfter: $pickupDateAfter, \n pickupDateBefore: $pickupDateBefore, \n includedStatuses: $includedStatuses\n ){\n success\n message\n currentPage\n pageSize\n totalPages\n totalResults\n items {\n addons {\n addonType\n amount\n price {\n currencyCode\n fareCurrencyCode\n partnerBusinessModel\n price\n priceVat\n fare\n fareVatLevel\n partnerCommission\n platformFee\n fixedPrice\n }\n }\n totalPrice\n totalFare\n canBeCompleted\n canBeCancelled\n completedOn\n nextAction\n status\n destinationLocation {\n id\n address {\n formattedAddress\n originalAddress\n establishment\n streetName\n streetNumber\n city\n postalCode\n region\n countryCode\n }\n hubInfo {\n name\n hubType\n }\n hub\n }\n originLocation {\n id\n address {\n formattedAddress\n originalAddress\n establishment\n streetName\n streetNumber\n city\n postalCode\n region\n countryCode\n }\n hubInfo {\n name\n hubType\n details {\n code\n value\n }\n }\n hub\n }\n quoteId\n journeyCode\n driverCode\n bookingId\n hubId\n id\n created\n updated\n traveller {\n firstName\n lastName\n email\n phone\n flightNumber\n trainNumber\n shipName\n languageIsoCode\n passengerCount\n luggageCount\n }\n price {\n currencyCode\n fareCurrencyCode\n partnerBusinessModel\n price\n priceVat\n fare\n fareVatLevel\n partnerCommission\n platformFee\n fixedPrice\n }\n execution {\n vehicleCategory\n pickupDate\n pickupTimeZone\n fleetId\n assignedDriverId\n assignedDriverVehicleId\n transferCompanyId\n meetingPointId\n meetingPointType\n durationInSeconds\n executionCode\n distance {\n value\n unit\n }\n }\n flightInfo {\n status \n scheduledTime \n estimatedTime \n airline\n delay \n city\n }\n }\n }\n}`;\n\nexport default getAssociatedJourneysQuery;\n","import { gql } from '@apollo/client/core';\n\nconst getDriverById = gql`query getDriver($id: Int!, $accessToken: String!) {\n getDriver(id: $id, accessToken: $accessToken) {\n success\n message\n driverId\n name\n phone\n userId\n created\n updated\n }\n}`;\n\nexport default getDriverById;\n","import { gql } from '@apollo/client/core';\n\nconst getFlightInfo = gql`\n query getFlightInfo($params: FlightInfoParams!, $accessToken: String!) {\n getFlightInfo(params: $params, accessToken: $accessToken) {\n status\n scheduledTime \n estimatedTime\n airline\n delay \n city\n }\n }\n`;\n\nexport default getFlightInfo;\n","import { gql } from '@apollo/client/core';\n\nconst getJourneyByCodeQuery = gql`query getJourneyByDriverCode($code: String!, $accessToken: String) {\n getJourneyByDriverCode(code: $code, accessToken: $accessToken) {\n success\n message\n totalPrice\n totalFare\n canBeCompleted\n canBeCancelled\n completedOn\n nextAction\n status\n destinationLocationId\n originLocationId\n quoteId\n journeyCode\n driverCode\n bookingId\n hubId\n id\n created\n updated\n destinationLocation {\n id\n address {\n formattedAddress\n originalAddress\n establishment\n streetName\n streetNumber\n city\n postalCode\n region\n countryCode\n }\n hubInfo {\n name\n hubType\n details {\n code\n value\n }\n }\n hub\n position {\n lat\n lng\n }\n }\n originLocation {\n id\n address {\n formattedAddress\n originalAddress\n establishment\n streetName\n streetNumber\n city\n postalCode\n region\n countryCode\n }\n hubInfo {\n name\n hubType\n details {\n code\n value\n }\n }\n hub\n position {\n lat\n lng\n }\n }\n traveller {\n firstName\n lastName\n email\n phone\n flightNumber\n trainNumber\n shipName\n languageIsoCode\n passengerCount\n luggageCount\n meetAndGreetSignText\n driverComments\n phoneVerificationInfo {\n formattedPhone\n }\n }\n price {\n currencyCode\n fareCurrencyCode\n partnerBusinessModel\n price\n priceVat\n fare\n fareVatLevel\n partnerCommission\n platformFee\n fixedPrice\n }\n addons {\n addonType\n amount\n price {\n currencyCode\n fareCurrencyCode\n partnerBusinessModel\n price\n priceVat\n fare\n fareVatLevel\n partnerCommission\n platformFee\n fixedPrice\n }\n }\n execution {\n vehicleCategory\n pickupDate\n pickupTimeZone\n fleetId\n assignedDriverId\n assignedDriverVehicleId\n transferCompanyId\n meetingPointId\n meetingPointType\n durationInSeconds\n executionCode\n distance {\n value\n unit\n }\n }\n meetingPoint {\n id\n geographicLocation {\n lat\n lng\n }\n title\n description\n }\n transferCompany {\n id\n name\n transferCompany\n openingHoursFrom\n openingHoursTo\n fullTimeSupport\n supportPhone\n supportEmail\n }\n flightInfo {\n status \n scheduledTime \n estimatedTime \n airline\n delay \n city\n }\n }\n}`;\n\nexport default getJourneyByCodeQuery;\n","import { gql } from '@apollo/client/core';\n\nconst getPhoneByCountryQuery = gql`\n query getPhoneByCountry($countryCode: String!, $contactType: String!, $language: String) {\n getPhoneByCountry(countryCode: $countryCode, contactType: $contactType, language: $language) {\n success\n message\n phone\n }\n }\n`;\n\nexport default getPhoneByCountryQuery;\n","import { gql } from '@apollo/client/core';\n\nconst getPhoneByLocationQuery = gql`\n query getPhoneByLocation($contactType: String!, $lat: String!, $lng: String!, $language: String) {\n getPhoneByLocation(contactType: $contactType, lat: $lat, lng: $lng, language: $language) {\n success\n message\n phone\n }\n }\n`;\n\nexport default getPhoneByLocationQuery;\n","import { gql } from '@apollo/client/core';\n\nconst getTravellerPositionQuery = gql`query travellerPosition($id: Int!, $accessToken: String!) {\n travellerPosition(id: $id, accessToken: $accessToken) {\n position {\n lat\n lng\n }\n recordedAt\n message\n success\n }\n}`;\n\nexport default getTravellerPositionQuery;\n","import { gql } from '@apollo/client/core';\n\nconst getVehicleMakes = gql`query getVehicleMakes($accessToken: String!) {\n getVehicleMakes(page: 0, size: 9999, accessToken: $accessToken) {\n success\n message\n pagination {\n currentPage\n pageSize\n totalPages\n totalResults\n } \n results {\n name\n id\n }\n }\n}`;\n\nexport default getVehicleMakes;\n","import { gql } from '@apollo/client/core';\n\nconst getVehicleModels = gql`\n query getVehicleModels($makeId: Int!) {\n getVehicleModels(makeId: $makeId, page: 0, size: 9999) {\n success\n message\n pagination {\n currentPage\n pageSize\n totalPages\n totalResults\n }\n results {\n makeName\n name\n id\n }\n }\n }\n`;\n\nexport default getVehicleModels;\n","import { gql } from '@apollo/client/core';\n\nconst getVehiclesByDriverId = gql`query getVehicles($driverId: Int!, $page: Int!, $size: Int!, $accessToken: String!) {\n getVehicles(driverId: $driverId, page: $page, size: $size, accessToken: $accessToken) {\n success\n message\n pagination {\n currentPage\n pageSize\n totalPages\n totalResults\n }\n results {\n modelName\n makeName\n seriesName\n id\n driverId\n licensePlate\n created\n updated\n }\n }\n}`;\n\nexport default getVehiclesByDriverId;\n","import { gql } from '@apollo/client/core';\n\nconst getVehicleSeries = gql`\n query getVehicleSeries($makeId: Int!, $accessToken: String!) {\n getVehicleSeries(makeId: $makeId, accessToken: $accessToken) {\n success\n message\n pagination {\n currentPage\n pageSize\n totalPages\n totalResults\n }\n results {\n modelName\n makeName\n name\n id\n }\n }\n }\n`;\n\nexport default getVehicleSeries;\n","import { gql } from '@apollo/client/core';\n\nconst loginWithEmailAndPasswordQuery = gql`\n query authEmail($email: String!, $password: String!, $sessionToken: String!) {\n authEmail(email: $email, password: $password, sessionToken: $sessionToken) {\n success\n message\n userId\n driverId\n name\n email\n created\n token\n refreshToken\n accessToken\n updated\n photo\n }\n }\n`;\n\nexport default loginWithEmailAndPasswordQuery;\n","import { gql } from '@apollo/client/core';\n\nconst loginWithPhoneQuery = gql`\n query authPhone($phone: String!, $otp: String!, $sessionToken: String!) {\n authPhone(phone: $phone, otp: $otp, sessionToken: $sessionToken) {\n success\n message\n userId\n driverId\n name\n phone\n created\n token\n refreshToken\n accessToken\n updated\n photo\n expiresInSeconds\n }\n }\n`;\n\nexport default loginWithPhoneQuery;\n","import { gql } from '@apollo/client/core';\n\nconst NewSessionMutation = gql`mutation newSession($userAgent: String!) {\n newSession(userAgent: $userAgent) {\n success\n driverId\n token\n message\n }\n}`;\n\nexport default NewSessionMutation;\n","import { gql } from '@apollo/client/core';\n\nconst pruneJourneysQuery = gql`mutation pruneJourneys($sessionToken: String!, $includedStatuses: [String!]) {\n pruneJourneys(sessionToken: $sessionToken, includedStatuses: $includedStatuses) {\n success\n message\n }\n}`;\n\nexport default pruneJourneysQuery;\n","import { gql } from '@apollo/client/core';\n\nconst RetrieveSessionQuery = gql`mutation retrieveSession($token: String!, $refreshToken: String!) {\n retrieveSession(token: $token, refreshToken: $refreshToken) {\n success\n driverId\n userId\n name\n photo\n phone\n email\n token\n refreshToken\n accessToken\n message\n expiresInSeconds\n }\n}`;\n\nexport default RetrieveSessionQuery;\n","import { gql } from '@apollo/client/core';\n\nconst sendOtpQuery = gql`mutation sendOTP($phone: String!, $captchaToken: String) {\n sendOTP(phone: $phone, captchaToken: $captchaToken) {\n success\n message\n errorCode\n error\n }\n}`;\n\nexport default sendOtpQuery;\n","import { gql } from '@apollo/client/core';\n\nconst updateDriverPositionMutation = gql`mutation updateDriverPosition($id: Int!, $lat: Float!, $lng: Float!, $accessToken: String!) {\n updateDriverPosition(id: $id, lat: $lat, lng: $lng, accessToken: $accessToken) {\n success\n message\n }\n}`;\n\nexport default updateDriverPositionMutation;\n","import { gql } from '@apollo/client/core';\n\nconst updateVehicleQuery = gql`mutation updateVehicle($id: Int!, $serieId: Int!, $plate: String!, $accessToken: String!) {\n updateVehicle(id: $id, serieId: $serieId, plate: $plate, accessToken: $accessToken) {\n success\n message\n modelName\n makeName\n seriesName\n id\n driverId\n licensePlate\n }\n}`;\n\nexport default updateVehicleQuery;\n","import { gql } from '@apollo/client';\n\nconst GetCacheApiError = gql`\n query getCacheApiError {\n status @client\n }\n`;\n\nexport default GetCacheApiError;\n","import { gql } from '@apollo/client';\n\nconst SetCacheApiError = gql`\n mutation setCacheApiError {\n status @client\n }\n`;\n\nexport default SetCacheApiError;\n","const localStorageTag = 'localStorage';\nconst cookieTag = 'cookie';\nconst sessionTokenKey = 'sessionToken';\nconst refreshTokenKey = 'refreshToken';\nconst accessTokenKey = 'accessToken';\nconst tokenExpirationTime = 'tokenExpiration';\n\nfunction getCookie(name: string) {\n const value = `; ${document.cookie}`;\n const parts = value.split(`; ${name}=`);\n\n if (parts?.length === 2) {\n return parts?.pop()?.split(';').shift();\n }\n\n return '';\n}\n\nfunction setCookie(cname: string, cvalue: string, domain?: string, exdays = 60) {\n const d = new Date();\n\n d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);\n\n const expires = `expires=${d.toUTCString()}`;\n\n domain = domain || document.location.host;\n domain = domain.split(':')[0];\n\n document.cookie = `${cname}=${cvalue};${expires};path=/;${domain === 'localhost' ? '' : `domain=.${domain};`}`;\n}\n\nexport const checkStorageAndCookies = () => {\n function checkStorage() {\n const test = 'test';\n\n try {\n window?.localStorage?.setItem(test, test);\n window?.localStorage?.removeItem(test);\n\n return true;\n }\n catch (e) {\n return false;\n }\n }\n\n const localStorage = checkStorage();\n const cookies = navigator.cookieEnabled;\n\n if (localStorage) return localStorageTag;\n\n return cookies ? cookieTag : 'unavailable';\n};\n\nexport const getSessionToken = () => {\n const store = checkStorageAndCookies();\n // Available store is localStorage\n if (store === localStorageTag) {\n return window?.localStorage?.getItem(sessionTokenKey);\n }\n // Available store is cookie\n if (store === cookieTag) {\n return getCookie(sessionTokenKey);\n }\n\n return null;\n};\n\nexport const storeSessionToken = (token: string) => {\n const store = checkStorageAndCookies();\n // Available store is localStorage\n if (store === localStorageTag) {\n return window?.localStorage?.setItem(sessionTokenKey, token);\n }\n // Available store is cookie\n if (store === cookieTag) {\n return setCookie(sessionTokenKey, token);\n }\n\n return null;\n};\n\nexport const getRefreshToken = () => {\n const store = checkStorageAndCookies();\n // Available store is localStorage\n if (store === localStorageTag) {\n return window?.localStorage?.getItem(refreshTokenKey);\n }\n // Available store is cookie\n if (store === cookieTag) {\n return getCookie(refreshTokenKey);\n }\n\n return null;\n};\n\nexport const storeRefreshToken = (token: string) => {\n const store = checkStorageAndCookies();\n // Available store is localStorage\n if (store === localStorageTag) {\n return window?.localStorage?.setItem(refreshTokenKey, token);\n }\n // Available store is cookie\n if (store === cookieTag) {\n return setCookie(refreshTokenKey, token);\n }\n\n return null;\n};\n\nexport const getAccessToken = () => {\n const store = checkStorageAndCookies();\n // Available store is localStorage\n if (store === localStorageTag) {\n return window?.localStorage?.getItem(accessTokenKey);\n }\n // Available store is cookie\n if (store === cookieTag) {\n return getCookie(accessTokenKey);\n }\n\n return null;\n};\n\nexport const storeAccessToken = (token: string) => {\n const store = checkStorageAndCookies();\n // Available store is localStorage\n if (store === localStorageTag) {\n return window?.localStorage?.setItem(accessTokenKey, token);\n }\n // Available store is cookie\n if (store === cookieTag) {\n return setCookie(accessTokenKey, token);\n }\n\n return null;\n};\n\nexport const storeLanguage = (languageCode: string) => {\n const store = checkStorageAndCookies();\n // Available store is localStorage\n if (store === localStorageTag) {\n return window?.localStorage?.setItem('lang', languageCode);\n }\n // Available store is cookie\n if (store === cookieTag) {\n return setCookie('lang', languageCode);\n }\n\n return null;\n};\n\nexport const getLanguage = () => {\n const store = checkStorageAndCookies();\n // Available store is localStorage\n if (store === localStorageTag) {\n return window?.localStorage?.getItem('lang');\n }\n // Available store is cookie\n if (store === cookieTag) {\n return getCookie('lang');\n }\n\n return null;\n};\n\nexport const getTokenExpirationTime = () => {\n const store = checkStorageAndCookies();\n // Available store is localStorage\n if (store === localStorageTag) {\n return window?.localStorage?.getItem(tokenExpirationTime);\n }\n // Available store is cookie\n if (store === cookieTag) {\n return getCookie(tokenExpirationTime);\n }\n\n return null;\n};\n\nexport const storeTokenExpirationTime = (seconds: string) => {\n const store = checkStorageAndCookies();\n // Available store is localStorage\n if (store === localStorageTag) {\n return window?.localStorage?.setItem(tokenExpirationTime, seconds);\n }\n // Available store is cookie\n if (store === cookieTag) {\n return setCookie(tokenExpirationTime, seconds);\n }\n\n return null;\n};\n","import { useMutation, useQuery } from '@apollo/client';\n\nimport { CacheAssociatedJourneys } from '../models/CacheAssociatedJourneys';\nimport { CacheDriverVehicle } from '../models/CacheDriverVehicles';\nimport { CacheProfile, CacheProfileEmpty } from '../models/CacheProfile';\nimport { CacheVehicleMake } from '../models/CacheVehicleMakes';\nimport {\n GetCacheProfile, SetCacheJourneys, SetCacheProfile, SetCacheVehicleMakes,\n} from '../models/graphql';\nimport GetCacheApiError from '../models/graphql/GetCacheApiError';\nimport SetCacheApiError from '../models/graphql/SetCacheApiError';\nimport SetCacheDriverVehicles from '../models/graphql/SetCacheDriverVehicles';\nimport { storeAccessToken, storeRefreshToken, storeSessionToken } from './store';\n\nexport const useSetCacheProfile = () => {\n const [setCacheProfile] = useMutation(SetCacheProfile);\n\n return (profile: CacheProfile) => new Promise((resolve) => {\n setCacheProfile({\n variables: profile,\n update: (cache) => {\n const ProfileCache = cache.readQuery({\n query: GetCacheProfile,\n });\n let newData: CacheProfile = CacheProfileEmpty;\n\n // Read existing data\n if (typeof ProfileCache === 'object') newData = { ...ProfileCache };\n // Append changed property values\n Object.keys(profile).forEach((property: any) => {\n // @ts-ignore\n newData[property] = profile[property];\n });\n\n cache.writeQuery({\n query: SetCacheProfile,\n data: newData,\n });\n\n storeSessionToken(newData.token ? newData.token : '');\n storeRefreshToken(newData.refreshToken ? newData.refreshToken : '');\n storeAccessToken(newData.accessToken ? newData.accessToken : '');\n\n resolve(newData);\n },\n });\n });\n};\n\nexport const useSetCacheAssociatedJourneys = () => {\n const [setCacheJourneys] = useMutation(SetCacheJourneys);\n\n return (journeysPageData: CacheAssociatedJourneys) => setCacheJourneys({\n variables: journeysPageData,\n update: (cache) => {\n cache.writeQuery({\n query: SetCacheJourneys,\n data: journeysPageData,\n });\n },\n });\n};\n\nexport const useSetCacheVehicleMakes = () => {\n const [setCacheVehiclesMakes] = useMutation(SetCacheVehicleMakes);\n\n return (vehicleMakes: CacheVehicleMake[]) => setCacheVehiclesMakes({\n variables: { makes: vehicleMakes },\n update: (cache) => {\n cache.writeQuery({\n query: SetCacheVehicleMakes,\n data: { makes: vehicleMakes },\n });\n },\n });\n};\n\nexport const useSetCacheDriverVehicles = () => {\n const [setCacheDriverVehicles] = useMutation(SetCacheDriverVehicles);\n\n return (vehicles: CacheDriverVehicle[]) => setCacheDriverVehicles({\n variables: { vehicles },\n update: (cache) => {\n cache.writeQuery({\n query: SetCacheVehicleMakes,\n data: { vehicles },\n });\n },\n });\n};\n\nexport const useSetApiError = () => {\n const [setApiError] = useMutation(SetCacheApiError);\n const { data: getCacheApiErrorData } = useQuery(GetCacheApiError);\n\n return (active: boolean) => setApiError({\n variables: { status: active },\n update: (cache) => {\n cache.writeQuery({\n query: SetCacheApiError,\n data: { status: active },\n });\n },\n });\n};\n","import { useQuery } from '@apollo/client';\nimport ListIcon from '@transferz/fe-component-library/list-icon';\nimport LogoIcon from '@transferz/fe-component-library/logo-icon';\nimport MenuIcon from '@transferz/fe-component-library/menu-icon';\nimport PopUp from '@transferz/fe-component-library/pop-up';\nimport ProfileIcon from '@transferz/fe-component-library/profile-icon';\nimport QuestionMarkIcon from '@transferz/fe-component-library/question-mark-icon';\nimport { IData } from '@transferz/fe-component-library/types/src/types/dropdown';\nimport Typography from '@transferz/fe-component-library/typography';\nimport XIcon from '@transferz/fe-component-library/x-icon';\nimport { withLDConsumer } from 'launchdarkly-react-client-sdk';\nimport { useLocalize } from 'localize-react';\nimport React, {\n FunctionComponent, useContext, useEffect, useMemo, useRef, useState,\n} from 'react';\nimport { useLocation, useNavigate } from 'react-router-dom';\n\nimport { langs } from '../assets/translations/languages';\nimport { LanguageContext } from '../language/LanguageContext';\nimport { fetchTranslations, languageCodes } from '../language/translations';\nimport { CacheProfileEmpty } from '../models/CacheProfile';\nimport { GetCacheProfile } from '../models/graphql';\nimport { useSetCacheProfile } from '../services/apolloCacheHooks';\nimport { routes } from '../services/constant';\nimport { storeLanguage } from '../services/store';\n\ntype HeaderProps = {\n flags?: any;\n};\n\nconst Header: FunctionComponent = ({ flags }) => {\n const navigate = useNavigate();\n const location = useLocation();\n const { translate } = useLocalize();\n\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n const setCacheProfile = useSetCacheProfile();\n\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n const buttonRef = useRef(null);\n\n const { language, setLanguage } = useContext(LanguageContext);\n const [languages, setLanguages] = useState([]);\n\n const showMenu =\n location.pathname !== routes.login.phone &&\n location.pathname !== routes.login.email &&\n location.pathname !== routes.login.name &&\n location.pathname !== routes.login.pin &&\n (cachedProfileData.email || cachedProfileData.phone);\n\n const toggleMenu = () => {\n console.log('DEBUG User clicked menu button');\n setIsMenuOpen(!isMenuOpen);\n };\n\n const handleLogout = () => {\n setCacheProfile(CacheProfileEmpty).then(() => {\n navigate('/');\n });\n };\n\n const profile = cachedProfileData?.photo ? (\n {cachedProfileData.name}\n ) : (\n \n );\n\n const menuItems = [\n {\n label: translate('your_journeys'),\n icon: ,\n onClick: () => {\n console.log('DEBUG User clicked Your Journeys, redirecting to journeys overview page...');\n navigate('/journeys');\n },\n },\n {\n label: translate('profile'),\n icon: profile,\n onClick: () => {\n console.log('DEBUG User clicked Profile, redirecting to profile page...');\n navigate('/profile');\n },\n },\n {\n label: translate('support'),\n icon: ,\n onClick: () => {\n console.log('DEBUG User clicked Support, redirecting to support page...');\n navigate('/support');\n },\n },\n ];\n\n useEffect(() => {\n const enabledLangs = Object.keys(flags)\n .filter((key: string) => key.substring(0, 8) === 'language' && !!flags[key])\n .map((filteredKey: string) => filteredKey.substring(8, filteredKey.length).toLowerCase());\n const availableLanguages = enabledLangs.map((lang: string) => {\n const currentLang = langs.find((curr) => curr.code === lang) as any;\n return {\n label: `${currentLang.name} (${lang.toUpperCase()})`,\n value: lang,\n icon: currentLang.flag,\n };\n });\n setLanguages(availableLanguages);\n }, []);\n const sortedLanguages = useMemo(\n () => languages.sort((a: any, b: any) => {\n const labelA = a.label.toUpperCase();\n const labelB = b.label.toUpperCase();\n if (labelA < labelB) return -1;\n if (labelA > labelB) return 1;\n return 0;\n }),\n [languages],\n );\n\n return (\n
\n
navigate('/journeys')}>\n \n \n {translate('driver_app')}\n \n
\n
\n navigate(routes.support)}>\n \n {translate('support')}\n \n \n\n {showMenu &&\n (flags.hamburgerMenu ? (\n \n {isMenuOpen ? : }\n
\n ) : (\n navigate('/profile')}\n >\n \n
\n ))}\n \n\n {\n fetchTranslations(lang.value as string).then(() => {\n console.log(`DEBUG User changed language to ${lang.value}`);\n setLanguage!(lang.value as string);\n storeLanguage(lang.value as string);\n });\n }}\n className=\"hamburger-menu-pop-up\"\n />\n \n );\n};\n\nexport default withLDConsumer()(Header);\n","import React from 'react';\n\nimport Header from '../components/Header';\n\ntype Props = {\n children: JSX.Element | JSX.Element[];\n}\n\nconst MainLayout: React.FC = ({ children }) => (\n
\n
\n
\n {children}\n
\n
\n);\n\nexport default MainLayout;\n","import { Button } from '@transferz/fe-component-library/button';\nimport ChevronIcon from '@transferz/fe-component-library/chevron-icon';\nimport { useLocalize } from 'localize-react';\nimport React, { FunctionComponent, useEffect, useState } from 'react';\nimport { useNavigate } from 'react-router';\n\ntype StickyBackButtonProps = {\n buttonText?: string;\n onClick?: () => void;\n};\n\nconst StickyBackButton: FunctionComponent = ({ buttonText, onClick }) => {\n const navigate = useNavigate();\n const { translate } = useLocalize();\n const [isSticky, setIsSticky] = useState(false);\n\n useEffect(() => {\n const onPageScroll = (e: any) => {\n if (window.scrollY > 0 && !isSticky) {\n setIsSticky(true);\n }\n else {\n setIsSticky(false);\n }\n };\n\n document.addEventListener('scroll', onPageScroll);\n\n return () => {\n document.removeEventListener('scroll', onPageScroll);\n };\n }, []);\n\n return (\n
\n
\n }\n iconPosition=\"left\"\n textColor=\"asphalt6\"\n onClick={\n onClick ||\n (() => {\n console.log('DEBUG User clicked back button, navigating to previous page...');\n navigate(-1);\n })\n }\n className=\"back-button\"\n data-testid=\"button_page-back\"\n />\n
\n
\n );\n};\n\nexport default StickyBackButton;\n","import { Button } from '@transferz/fe-component-library/button';\nimport CarIcon from '@transferz/fe-component-library/car-icon';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { useLocalize } from 'localize-react';\nimport React from 'react';\nimport { useNavigate } from 'react-router';\n\nimport { CacheDriverVehicle } from '../models/CacheDriverVehicles';\nimport { routes } from '../services/constant';\n\ntype Props = {\n vehicle: CacheDriverVehicle;\n handleClick?: (id: number) => any;\n selected?: number;\n nonEditable?: boolean;\n};\n\nconst Vehicle = ({\n vehicle, handleClick, selected, nonEditable,\n}: Props) => {\n const navigate = useNavigate();\n const { translate } = useLocalize();\n\n const handleEditVehicle = (vehicleID: number, license: string, carBrand: string, carType: string) => {\n navigate(routes.updateVehicle, {\n state: {\n vehicleID,\n license,\n carBrand,\n carType,\n route: nonEditable ? 'profile' : 'information',\n },\n });\n };\n return (\n {\n if (handleClick) handleClick(vehicle.id);\n console.log(`DEBUG User selected vehicle: ${vehicle.makeName} ${vehicle.modelName}`);\n }}\n >\n {!nonEditable ? (\n
\n
\n
\n
\n
\n
\n
\n ) : (\n
\n \n
\n )}\n
\n {`${vehicle.makeName} ${vehicle.modelName}`}\n \n {vehicle.licensePlate}\n \n
\n handleEditVehicle(\n vehicle.id,\n vehicle.licensePlate,\n vehicle.makeName,\n `${vehicle.seriesName} ${vehicle.modelName}`,\n )}\n />\n
\n );\n};\n\nexport default Vehicle;\n","import React, { useContext, useEffect, useState } from 'react';\n\nconst PING_RESOURCE = '/flags/4x3/gb.svg';\nconst TIMEOUT_TIME_MS = 3000;\nconst onlinePollingInterval = 3000;\n\nexport const ONLINE_STATUS: {\n online: boolean;\n queries: any[];\n} = {\n online: true,\n queries: [],\n};\n\nconst timeout = (time: number, promise: Promise) => new Promise((resolve, reject) => {\n setTimeout(() => {\n reject(new Error('Request timed out.'));\n }, time);\n promise.then(resolve, reject);\n});\n\nconst checkOnlineStatus = async () => {\n const controller = new AbortController();\n const { signal } = controller;\n\n // If the browser has no network connection return offline\n if (!navigator.onLine) return navigator.onLine;\n\n //\n try {\n await timeout(\n TIMEOUT_TIME_MS,\n fetch(PING_RESOURCE, {\n method: 'GET',\n signal,\n }),\n );\n return true;\n }\n catch (error) {\n // Error Log\n console.error(error);\n\n // This can be because of request timed out\n // so we abort the request for any case\n controller.abort();\n }\n return false;\n};\n\nconst OnlineStatusContext = React.createContext(true);\n\nexport const OnlineStatusProvider: React.FC = ({ children }) => {\n const [onlineStatus, setOnlineStatus] = useState(true);\n\n const checkStatus = async () => {\n const online = await checkOnlineStatus();\n setOnlineStatus(online);\n };\n\n useEffect(() => {\n if (!ONLINE_STATUS.online && ONLINE_STATUS.queries.length && onlineStatus) {\n ONLINE_STATUS.queries.forEach((query: any) => query());\n\n ONLINE_STATUS.queries = [];\n }\n\n ONLINE_STATUS.online = onlineStatus;\n }, [onlineStatus]);\n\n useEffect(() => {\n window.addEventListener('offline', () => {\n setOnlineStatus(false);\n });\n\n // Add polling in case of slow connection\n const id = setInterval(() => {\n checkStatus();\n }, onlinePollingInterval);\n\n return () => {\n window.removeEventListener('offline', () => {\n setOnlineStatus(false);\n });\n\n clearInterval(id);\n };\n }, []);\n\n return (\n \n {children}\n \n );\n};\n\nexport const useOnlineStatus = () => useContext(OnlineStatusContext);\n\nexport default useOnlineStatus;\n","import { ONLINE_STATUS } from '../../utils/useOnlineStatus';\n\nexport const useOfflineProofQuery = () => (query: any) => {\n if (!ONLINE_STATUS.online) ONLINE_STATUS.queries.push(query);\n else if (query) query();\n};\n","import { useLazyQuery, useQuery } from '@apollo/client';\n\nimport { GetCacheProfile, getVehiclesByDriverIdQuery } from '../../models/graphql';\nimport { useSetCacheDriverVehicles } from '../apolloCacheHooks';\nimport { useAuthenticatedQuery } from './index';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const useGetDriverVehicles = () => {\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n const setCacheDriverVehicles = useSetCacheDriverVehicles();\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n const [\n getVehicles,\n {\n refetch: getVehiclesRefetch,\n called,\n },\n ] = useLazyQuery(getVehiclesByDriverIdQuery, {\n fetchPolicy: 'no-cache',\n });\n\n const handleNewData = (\n res: any,\n callback?: (data: any) => void,\n ) => {\n const data = res?.data?.getVehicles?.results;\n\n setCacheDriverVehicles(data);\n\n if (callback) callback(data);\n };\n\n return (\n callback?: (data: any) => void,\n ) => {\n const variables = {\n driverId: cachedProfileData?.driverId,\n page: 0,\n size: 999,\n };\n\n if (called) {\n return offlineProofQuery(() => authenticatedQuery((accessToken) => getVehiclesRefetch({\n ...variables,\n accessToken,\n }).then((res) => {\n handleNewData(res, callback);\n })));\n }\n\n return offlineProofQuery(() => authenticatedQuery((accessToken) => getVehicles({\n variables: {\n ...variables,\n accessToken,\n },\n }).then((res) => {\n handleNewData(res, callback);\n })));\n };\n};\n","import { useMutation } from '@apollo/client';\n\nimport {\n createVehicleQuery,\n} from '../../models/graphql';\nimport { useAuthenticatedQuery } from './index';\nimport { useGetDriverVehicles } from './useGetDriverVehicles';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const useAddVehicle = () => {\n const [createVehicle] = useMutation(createVehicleQuery, {\n fetchPolicy: 'no-cache',\n });\n const getDriverVehicles = useGetDriverVehicles();\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n\n const handleNewData = (\n res: any,\n callback: (data: any) => void,\n ) => {\n // getDriverVehicles();\n if (callback) callback(res?.data?.createVehicle);\n };\n\n return (\n driverId: number,\n serieId: number,\n plate: string,\n callback: (data: any) => void,\n ) => offlineProofQuery(() => authenticatedQuery((accessToken) => createVehicle({\n variables: {\n driverId,\n serieId,\n plate: plate.toUpperCase().replace(/ /g, ''),\n accessToken,\n },\n }).then((res) => {\n handleNewData(res, callback);\n })));\n};\n","import { useMutation } from '@apollo/client';\n\nimport { assignDriverToJourneyQuery } from '../../models/graphql';\nimport { useAuthenticatedQuery } from './index';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const useAssignJourney = () => {\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n const [assignJourney] = useMutation(assignDriverToJourneyQuery, {\n fetchPolicy: 'no-cache',\n });\n\n const handleNewData = (\n res: any,\n callback: (data: any) => void,\n ) => {\n if (callback) callback(res?.data?.assignJourney);\n };\n\n return (\n id: number,\n driverCode: string,\n callback: (data: any) => void,\n ) => offlineProofQuery(() => authenticatedQuery((accessToken) => {\n assignJourney({\n variables: {\n id,\n driverCode: driverCode.toUpperCase(),\n accessToken,\n },\n }).then((res) => {\n handleNewData(res, callback);\n });\n }));\n};\n","import { useMutation } from '@apollo/client';\n\nimport { assignJourneyVehicleQuery } from '../../models/graphql';\nimport { useAuthenticatedQuery } from './index';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const useAssignVehicle = () => {\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n const [assignVehicle] = useMutation(assignJourneyVehicleQuery, {\n fetchPolicy: 'no-cache',\n });\n\n const handleNewData = (\n res: any,\n callback: (data: any) => void,\n ) => {\n if (callback) callback(res?.data?.assignJourneyVehicle);\n };\n\n return (\n id: number,\n vehicleId: number,\n callback: (data: any) => void,\n ) => offlineProofQuery(() => authenticatedQuery((accessToken) => {\n assignVehicle({\n variables: {\n journeyId: id,\n vehicleId,\n accessToken,\n },\n }).then((res) => {\n handleNewData(res, callback);\n });\n }));\n};\n","import { useQuery } from '@apollo/client';\nimport TagManager from 'react-gtm-module';\n\nimport { GetCacheProfile } from '../../models/graphql';\n\nexport const useDataLayer = () => {\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n\n const trackEvent = (dataLayer: any) => {\n TagManager.dataLayer({\n ...dataLayer,\n driverId: cachedProfileData?.driverId,\n name: cachedProfileData?.name,\n email: cachedProfileData?.email,\n userId: cachedProfileData?.id,\n });\n };\n\n return {\n trackEvent,\n };\n};\n","import { useQuery } from '@apollo/client';\nimport { datadogRum } from '@datadog/browser-rum';\n\nimport { GetCacheProfile } from '../../models/graphql';\n\nexport const useAddAction = () => {\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n\n const addAction = (name: string, options: any) => {\n datadogRum.addAction(name, {\n ...options,\n driverId: cachedProfileData?.driverId,\n name: cachedProfileData?.name,\n email: cachedProfileData?.email,\n userId: cachedProfileData?.id,\n });\n };\n\n return {\n addAction,\n };\n};\n","import { useMutation, useQuery } from '@apollo/client';\n\nimport { CacheProfile } from '../../models/CacheProfile';\nimport { associateJourneyMutation, GetCacheProfile } from '../../models/graphql';\nimport { useDataLayer } from '../../services/hooks/useDataLayer';\nimport { useAddAction } from '../hooks/useAddAction';\nimport { useAuthenticatedQuery } from './index';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const useAssociateJourney = () => {\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n const { trackEvent } = useDataLayer();\n const { addAction } = useAddAction();\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n const [associateJourney] = useMutation(associateJourneyMutation, {\n fetchPolicy: 'no-cache',\n });\n\n const sessionToken = cachedProfileData?.token;\n\n const handleNewData = (\n res: any,\n callback: (data: any) => void,\n ) => {\n if (callback) callback(res?.data?.associateJourney);\n };\n\n return (\n code: string,\n callback: (data: any) => void,\n profileData?: CacheProfile,\n omitAuthentication = false,\n ) => {\n if (omitAuthentication) {\n trackEvent({\n event: 'token-tracking',\n sessionToken,\n accessToken: profileData?.accessToken,\n url: window.location.href,\n });\n addAction('token-tracking', {\n sessionToken,\n accessToken: profileData?.accessToken,\n url: window.location.href,\n });\n return associateJourney({\n variables: {\n code: code.toUpperCase(),\n token: profileData ? profileData.token : sessionToken,\n accessToken: profileData?.accessToken ?? cachedProfileData?.accessToken,\n },\n }).then((res) => {\n handleNewData(res, callback);\n });\n }\n\n return offlineProofQuery(() => authenticatedQuery((accessToken) => {\n console.log('#### DEBUGGING start ####');\n console.log(' useAssociateJourney - mutation - profileData = ', profileData);\n console.log(' useAssociateJourney - mutation - accessToken = ', accessToken);\n console.log('#### DEBUGGING end ####');\n trackEvent({\n event: 'token-tracking',\n accessToken,\n url: window.location.href,\n });\n addAction('token-tracking', {\n accessToken,\n url: window.location.href,\n });\n associateJourney({\n variables: {\n code: code.toUpperCase(),\n token: profileData ? profileData.token : sessionToken,\n accessToken,\n },\n }).then((res) => {\n handleNewData(res, callback);\n });\n }, profileData));\n };\n};\n","// @ts-ignore\nimport { isJwtExpired } from 'jwt-check-expiration';\n\nexport const validateJwt = (token?: string | undefined | null) => {\n try {\n // @ts-ignore\n return isJwtExpired(token);\n }\n catch (e) {\n console.log('Invalid JWT provided. Error - ', e);\n\n return true;\n }\n};\n","import { useQuery } from '@apollo/client';\nimport { useEffect, useState } from 'react';\n\nimport { CacheProfile } from '../../models/CacheProfile';\nimport { GetCacheProfile } from '../../models/graphql';\nimport { getAccessToken, getRefreshToken } from '../store';\nimport { validateJwt } from '../validateJwt';\nimport { useValidateAccessToken } from './index';\n\nconst tokenInitialValue = 'initialValue';\nlet gqlAuthenticatedQueriesWaiting: any = [];\nlet profile: CacheProfile = {};\n\nexport const useAuthenticatedQuery = () => {\n const [validToken, setValidToken] = useState(tokenInitialValue);\n const [validationInProgress, setValidationInProgress] = useState(false);\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n const validateAccessToken = useValidateAccessToken();\n\n const triggerQueries = (token?: string) => {\n if (token && token !== tokenInitialValue && gqlAuthenticatedQueriesWaiting?.length) {\n gqlAuthenticatedQueriesWaiting.forEach((authenticatedQuery: any) => {\n if (authenticatedQuery) authenticatedQuery(token);\n });\n\n gqlAuthenticatedQueriesWaiting = [];\n }\n else if (!token) {\n gqlAuthenticatedQueriesWaiting = [];\n }\n };\n\n useEffect(() => {\n // Resetting token to empty string means we need to check validity via API\n if (!validToken) {\n console.log('AUTHENTICATED QUERY LAYER - validateAccessToken - profile - ', profile);\n\n validateAccessToken(\n {\n ...profile,\n accessToken: getAccessToken(),\n refreshToken: getRefreshToken(),\n },\n (response: any) => {\n // API validated token or generated new one that's valid\n if (response?.accessToken) {\n setValidToken(response?.accessToken);\n }\n\n setTimeout(() => {\n setValidationInProgress(false);\n }, 50);\n },\n );\n }\n else if (!validationInProgress) {\n triggerQueries(validToken);\n }\n }, [validToken, validationInProgress]);\n\n return (query: (validAccessToken: string) => any, profileData?: CacheProfile) => {\n profile = profileData ?? cachedProfileData;\n const tokenExpired = validateJwt(profile?.accessToken);\n\n gqlAuthenticatedQueriesWaiting.push(query);\n\n if (gqlAuthenticatedQueriesWaiting.length > 1) {\n setTimeout(() => {\n if (profile?.accessToken) triggerQueries(profile?.accessToken);\n }, 100);\n }\n // If array isn't empty, that means other query triggered validation\n // In that case just push new query to wait for execution\n else if (\n gqlAuthenticatedQueriesWaiting.length === 1 &&\n !validationInProgress\n ) {\n if (tokenExpired) {\n setValidationInProgress(true);\n\n setTimeout(() => {\n setValidToken('');\n }, 50);\n }\n else {\n setValidationInProgress(true);\n setValidToken(profile?.accessToken);\n\n setTimeout(() => {\n triggerQueries(profile?.accessToken);\n setValidationInProgress(false);\n }, 50);\n }\n }\n };\n};\n","import { gql } from '@apollo/client/core';\n\nconst createAction = gql`\n query createAction($journeyId: Int!, $type: String, $position: Position $accessToken: String!) {\n createAction(journeyId: $journeyId, type: $type, position: $position, accessToken: $accessToken) {\n success\n message\n id\n }\n }\n`;\n\nexport default createAction;\n","import { useLazyQuery } from '@apollo/client';\n\nimport createActionQuery from '../../models/graphql/CreateAction';\nimport { JourneyActionTypeEnum } from '../../types/actions';\nimport { Position } from '../../types/journey';\nimport { useAuthenticatedQuery } from './useAuthenticatedQuery';\n\nexport const useCreateAction = () => {\n const authenticatedQuery = useAuthenticatedQuery();\n const [createAction, { refetch: createActionRefetch, called }] = useLazyQuery(createActionQuery, {\n fetchPolicy: 'no-cache',\n });\n\n return (\n journeyId: number,\n type: JourneyActionTypeEnum,\n position: Position,\n callback: (data: any) => void,\n ) => authenticatedQuery((accessToken) => {\n if (called) {\n createActionRefetch({\n position,\n type,\n variables: {\n journeyId,\n type,\n position,\n accessToken,\n },\n }).then(async (res) => {\n if (res?.data?.createAction?.success) {\n console.log(res.data.createAction);\n }\n\n if (callback) callback(res?.data?.createAction);\n });\n }\n else {\n createAction({\n variables: {\n journeyId,\n type,\n position,\n accessToken,\n },\n }).then(async (res) => {\n if (res?.data?.createAction?.success) {\n console.log(res.data.createAction);\n }\n\n if (callback) callback(res?.data?.createAction);\n });\n }\n });\n};\n","import { useMutation, useQuery } from '@apollo/client';\n\nimport { deleteJourneyQuery, GetCacheProfile } from '../../models/graphql';\nimport { useAuthenticatedQuery } from './index';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const useDeleteJourney = () => {\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n const [deleteJourney] = useMutation(deleteJourneyQuery, {\n fetchPolicy: 'no-cache',\n });\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n\n const sessionToken = cachedProfileData?.token;\n\n const handleNewData = (\n res: any,\n callback: (data: any) => void,\n ) => {\n if (callback) callback(res?.data?.deleteJourney);\n };\n\n return (\n journeyDriverCode: string,\n callback: (data: any) => void,\n ) => offlineProofQuery(() => authenticatedQuery(() => {\n deleteJourney({\n variables: {\n sessionToken,\n journeyDriverCode,\n },\n }).then((res) => {\n handleNewData(res, callback);\n });\n }));\n};\n","import { useMutation } from '@apollo/client';\n\nimport { deleteVehicleQuery } from '../../models/graphql';\nimport { useAuthenticatedQuery } from './index';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const useDeleteVehicle = () => {\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n const [deleteVehicle] = useMutation(deleteVehicleQuery, {\n fetchPolicy: 'no-cache',\n });\n\n const handleNewData = (\n res: any,\n callback: (data: any) => void,\n ) => {\n if (callback) callback(res?.data?.deleteVehicle);\n };\n\n return (\n id: number,\n callback: (data: any) => void,\n ) => offlineProofQuery(() => authenticatedQuery((accessToken) => {\n deleteVehicle({\n variables: {\n id,\n accessToken,\n },\n }).then((res) => {\n handleNewData(res, callback);\n });\n }));\n};\n","import { gql } from '@apollo/client/core';\n\nconst updateDriverQuery = gql`mutation updateDriver($id: Int!, $phone: String!, $name: String!, $accessToken: String!) {\n updateDriver(id: $id, phone: $phone, name: $name, accessToken: $accessToken) {\n success\n message\n }\n}`;\n\nexport default updateDriverQuery;\n","import { monthNames } from '../services/constant';\n\nexport const parseDate = (date: any) => {\n const newDate = new Date(date);\n\n const day = newDate.getDate();\n const month = newDate.getMonth();\n const year = newDate.getFullYear();\n\n return `${day} ${monthNames[month]} ${year}`;\n};\n\nexport const parseDateTime = (date: any) => {\n const newDate = new Date(date);\n\n const day = newDate.getDate();\n const month = newDate.getMonth();\n const year = newDate.getFullYear();\n const hour = newDate.getHours().toString().padStart(2, '0');\n const minute = newDate.getMinutes().toString().padStart(2, '0');\n\n return `${day} ${monthNames[month]} ${year} ${hour}:${minute}`;\n};\n\nexport const parseTime = (date: any) => {\n const newDate = new Date(date);\n\n const hour = newDate.getHours().toString().padStart(2, '0');\n const minute = newDate.getMinutes().toString().padStart(2, '0');\n\n return `${hour}:${minute} `;\n};\n\nexport const daysInMonth = (date: Date) => {\n const month = date.getMonth();\n const year = date.getFullYear();\n return new Date(year, month, 0).getDate();\n};\n\nexport const tomorrowOrToday = (date: Date) => {\n const nowDate = new Date();\n let todayOrTomorrow = '';\n const journeyDate = new Date(date!);\n const timeDifference = (journeyDate.getTime() - nowDate.getTime()) / 1000 / 60 / 60;\n if (date && timeDifference > -24 && timeDifference < 48) {\n let dateNowDate; let dateJourneyDate;\n if (journeyDate.getMonth() === nowDate.getMonth()) {\n dateNowDate = nowDate.getDate();\n dateJourneyDate = journeyDate.getDate();\n }\n else if (journeyDate.getMonth() > nowDate.getMonth()) {\n dateNowDate = nowDate.getDate();\n dateJourneyDate = daysInMonth(journeyDate) + journeyDate.getDate();\n }\n else {\n dateNowDate = daysInMonth(nowDate) + nowDate.getDate();\n dateJourneyDate = journeyDate.getDate();\n }\n const betw = dateJourneyDate - dateNowDate;\n if (betw === 0) todayOrTomorrow = 'date_today';\n if (betw === 1) todayOrTomorrow = 'date_tomorrow';\n }\n return todayOrTomorrow;\n};\n\nexport const before24Hours = (date: Date): boolean => {\n const nowDate = new Date();\n let is24Hours = false;\n const journeyDate = new Date(date!);\n const timeDifference = (journeyDate.getTime() - nowDate.getTime()) / 1000 / 60 / 60;\n\n if (timeDifference < 24) is24Hours = true;\n\n return is24Hours;\n};\n\nexport const parseString = (string:string) => {\n const newString = string.replace('_', ' ').toLowerCase();\n return newString.charAt(0).toUpperCase() + newString.slice(1);\n};\n\nexport const standardizePhoneNumber = (phone: string) => {\n const phoneParts = phone.split(' ');\n\n if (!phoneParts[1]) return phone;\n\n const phonePrefix = phoneParts[0];\n let phoneNumber = phoneParts[1]\n .replace(/ /g, '')\n .replace(/-/g, '')\n .replace(/\\\\/g, '')\n .replace(/\\//g, '');\n\n // @ts-ignore\n if (String(phoneNumber[0]) === '0') phoneNumber = phoneNumber.slice(1, phoneNumber.length);\n\n return phonePrefix + phoneNumber;\n};\n","import { useMutation, useQuery } from '@apollo/client';\n\nimport { GetCacheProfile } from '../../models/graphql';\nimport updateDriverQuery from '../../models/graphql/UpdateDriver';\nimport { standardizePhoneNumber } from '../../utils/parsingFunctions';\nimport { useSetCacheProfile } from '../apolloCacheHooks';\nimport { useAuthenticatedQuery } from './index';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const useEditDriverData = () => {\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n const setCacheProfile = useSetCacheProfile();\n const [updateDriver] = useMutation(updateDriverQuery, {\n fetchPolicy: 'no-cache',\n });\n\n return (\n id: number,\n phone: string,\n name: string,\n callback: (data: any) => void,\n ) => offlineProofQuery(() => authenticatedQuery((accessToken) => {\n updateDriver({\n variables: {\n id,\n phone: standardizePhoneNumber(phone),\n name,\n accessToken,\n },\n }).then(async (res) => {\n if (res?.data?.updateDriver?.success) {\n const driverData = {\n ...cachedProfileData,\n phone,\n name,\n };\n\n await setCacheProfile(driverData);\n }\n\n if (callback) callback(res?.data?.updateDriver);\n });\n }));\n};\n","import { useMutation } from '@apollo/client';\n\nimport { updateVehicleQuery } from '../../models/graphql';\nimport { useAuthenticatedQuery } from './index';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const useEditVehicle = () => {\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n const [editVehicle] = useMutation(updateVehicleQuery, {\n fetchPolicy: 'no-cache',\n });\n\n const handleNewData = (\n res: any,\n callback: (data: any) => void,\n ) => {\n if (callback) callback(res?.data?.updateVehicle);\n };\n\n return (\n vehicleId: number,\n serieId: number,\n plate: string,\n callback: (data: any) => void,\n ) => offlineProofQuery(() => authenticatedQuery((accessToken) => {\n editVehicle({\n variables: {\n id: vehicleId,\n serieId,\n plate: plate.toUpperCase().replace(/ /g, ''),\n accessToken,\n },\n }).then((res) => {\n handleNewData(res, callback);\n });\n }));\n};\n","import { useLazyQuery, useQuery } from '@apollo/client';\n\nimport { getAssociatedJourneysQuery, GetCacheProfile } from '../../models/graphql';\nimport { useDataLayer } from '../../services/hooks/useDataLayer';\nimport { useSetCacheAssociatedJourneys } from '../apolloCacheHooks';\nimport { journeysPerPage } from '../constant';\nimport { useAddAction } from '../hooks/useAddAction';\nimport { useAuthenticatedQuery } from './index';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const useGetAssociatedJourneys = () => {\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n const setCacheJourneys = useSetCacheAssociatedJourneys();\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n const { trackEvent } = useDataLayer();\n const { addAction } = useAddAction();\n\n const [\n getAssociatedJourneys,\n {\n refetch: associatedJourneysRefetch,\n called,\n },\n ] = useLazyQuery(getAssociatedJourneysQuery, {\n fetchPolicy: 'no-cache',\n });\n\n const sessionToken = cachedProfileData?.token;\n\n const handleNewData = (\n res: any,\n callback: (data: any) => void,\n ) => {\n const journeysData = res?.data?.getAssociatedJourneys;\n\n delete journeysData?.message;\n\n setCacheJourneys(journeysData).then(() => {\n if (callback) callback(journeysData);\n });\n };\n\n return (\n filters: any,\n callback: (data: any) => void,\n ) => {\n if (filters.pickupDateAfter) {\n filters.pickupDateAfter.setHours(23, 59, 59);\n }\n if (filters.pickupDateAfter) {\n filters.pickupDateBefore.setHours(23, 59, 59);\n }\n if (called) {\n return offlineProofQuery(authenticatedQuery((accessToken) => associatedJourneysRefetch({\n page: 0,\n token: sessionToken,\n accessToken,\n size: journeysPerPage,\n textSearch: filters.textSearch,\n pickupDateAfter: filters.pickupDateAfter ? filters.pickupDateAfter.toISOString() : '',\n pickupDateBefore: filters.pickupDateBefore ? filters.pickupDateBefore.toISOString() : '',\n includedStatuses: filters.includedStatuses,\n }).then((res) => {\n handleNewData(res, callback);\n }).finally(() => {\n trackEvent({\n event: 'token-tracking',\n sessionToken,\n accessToken,\n url: window.location.href,\n });\n addAction('token-tracking', {\n sessionToken,\n accessToken,\n url: window.location.href,\n });\n })));\n }\n\n return offlineProofQuery(() => authenticatedQuery((accessToken) => getAssociatedJourneys({\n variables: {\n page: 0,\n token: sessionToken,\n accessToken,\n size: journeysPerPage,\n textSearch: filters.textSearch,\n pickupDateAfter: filters.pickupDateAfter ? filters.pickupDateAfter.toISOString() : '',\n pickupDateBefore: filters.pickupDateBefore ? filters.pickupDateBefore.toISOString() : '',\n includedStatuses: filters.includedStatuses,\n },\n }).then((res) => {\n handleNewData(res, callback);\n }).finally(() => {\n trackEvent({\n event: 'token-tracking',\n sessionToken,\n accessToken,\n url: window.location.href,\n });\n addAction('token-tracking', {\n sessionToken,\n accessToken,\n url: window.location.href,\n });\n })));\n };\n};\n","import { useLazyQuery, useQuery } from '@apollo/client';\n\nimport { GetCacheProfile, getDriverById } from '../../models/graphql';\nimport { useSetCacheProfile } from '../apolloCacheHooks';\nimport { useAuthenticatedQuery } from './index';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const useGetDriverData = () => {\n const setCacheProfile = useSetCacheProfile();\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n const [\n getDriver,\n {\n refetch: getDriverRefetch,\n called,\n },\n ] = useLazyQuery(getDriverById, {\n fetchPolicy: 'no-cache',\n });\n\n const handleNewData = async (\n res: any,\n callback?: (data: any) => void,\n ) => {\n const driverData = { ...res?.data?.getDriver };\n\n driverData.id = driverData.userId;\n\n delete driverData.userId;\n delete driverData.created;\n delete driverData.updated;\n\n await setCacheProfile(driverData);\n\n if (callback) callback(driverData);\n };\n\n return (\n callback?: (data: any) => void,\n ) => {\n if (called) {\n return offlineProofQuery(() => authenticatedQuery((accessToken) => {\n getDriverRefetch({\n id: cachedProfileData?.driverId,\n accessToken,\n }).then((res) => {\n handleNewData(res, callback);\n });\n }));\n }\n\n return offlineProofQuery(() => authenticatedQuery((accessToken) => getDriver({\n variables: {\n id: cachedProfileData?.driverId,\n accessToken,\n },\n }).then((res) => {\n handleNewData(res, callback);\n })));\n };\n};\n","import { useLazyQuery, useQuery } from '@apollo/client';\n\nimport { GetCacheProfile, getJourneyByCodeQuery } from '../../models/graphql';\nimport { useDataLayer } from '../../services/hooks/useDataLayer';\nimport { useAddAction } from '../hooks/useAddAction';\nimport { useAuthenticatedQuery } from './index';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const useGetJourneyByCode = () => {\n const [\n getJourneyByCode,\n {\n refetch: getJourneyByCodeRefetch,\n called,\n },\n ] = useLazyQuery(\n getJourneyByCodeQuery,\n {\n fetchPolicy: 'no-cache',\n },\n );\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n const { trackEvent } = useDataLayer();\n const { addAction } = useAddAction();\n\n const handleNewData = (\n res: any,\n callback: (data: any) => void,\n ) => {\n if (callback) callback(res?.data?.getJourneyByDriverCode);\n };\n\n return (\n code: string,\n callback: (data: any) => void,\n ) => {\n if (cachedProfileData.accessToken) {\n return offlineProofQuery(() => authenticatedQuery((accessToken) => {\n if (called) {\n getJourneyByCodeRefetch({ code: code.toUpperCase(), accessToken })\n .then((res) => {\n handleNewData(res, callback);\n })\n .finally(() => {\n trackEvent({\n event: 'token-tracking',\n accessToken,\n url: window.location.href,\n fromRefetch: true,\n });\n addAction('token-tracking', {\n accessToken,\n url: window.location.href,\n fromRefetch: true,\n });\n });\n }\n\n getJourneyByCode({ variables: { code: code.toUpperCase(), accessToken } })\n .then((res) => {\n handleNewData(res, callback);\n })\n .finally(() => {\n trackEvent({\n event: 'token-tracking',\n accessToken,\n url: window.location.href,\n fromRefetch: false,\n });\n addAction('token-tracking', {\n accessToken,\n url: window.location.href,\n fromRefetch: false,\n });\n });\n }));\n }\n if (called) {\n return getJourneyByCodeRefetch({ code: code.toUpperCase() })\n .then((res) => {\n handleNewData(res, callback);\n })\n .finally(() => {\n trackEvent({\n event: 'token-tracking',\n url: window.location.href,\n fromRefetch: true,\n });\n });\n }\n\n return getJourneyByCode({ variables: { code: code.toUpperCase() } })\n .then((res) => {\n handleNewData(res, callback);\n });\n };\n};\n","import { useLazyQuery } from '@apollo/client';\n\nimport { getPhoneByCountryQuery } from '../../models/graphql';\n\nexport const useGetPhoneByCountry = () => {\n const [\n getPhoneByCountry,\n {\n refetch: getPhoneByCountryRefetch,\n called,\n },\n ] = useLazyQuery(\n getPhoneByCountryQuery,\n {\n fetchPolicy: 'no-cache',\n },\n );\n\n const handleNewData = async (\n res: any,\n callback?: (data: any) => void,\n ) => {\n if (callback) callback(res?.data?.getPhoneByCountry);\n };\n\n return (\n countryCode: string,\n contactType: string,\n language?: string,\n callback?: (data: any) => void,\n ) => {\n if (called) {\n return getPhoneByCountryRefetch({\n countryCode,\n contactType,\n language,\n }).then((res:any) => {\n handleNewData(res, callback);\n });\n }\n return getPhoneByCountry({\n variables: {\n countryCode,\n contactType,\n language,\n },\n }).then((res:any) => {\n handleNewData(res, callback);\n });\n };\n};\n","import { useLazyQuery } from '@apollo/client';\n\nimport { getPhoneByLocationQuery } from '../../models/graphql';\n\nexport const useGetPhoneByLocation = () => {\n const [\n getPhoneByLocation,\n {\n refetch: getPhoneByLocationRefetch,\n called,\n },\n ] = useLazyQuery(\n getPhoneByLocationQuery,\n {\n fetchPolicy: 'no-cache',\n },\n );\n\n const handleNewData = async (\n res: any,\n callback?: (data: any) => void,\n ) => {\n if (callback) callback(res?.data?.getPhoneByLocation);\n };\n\n return (\n contactType: string,\n lat:string,\n lng:string,\n language?: string,\n callback?: (data: any) => void,\n ) => {\n if (called) {\n return getPhoneByLocationRefetch({\n contactType,\n lat,\n lng,\n language,\n }).then((res:any) => {\n handleNewData(res, callback);\n });\n }\n return getPhoneByLocation({\n variables: {\n contactType,\n lat,\n lng,\n language,\n },\n }).then((res:any) => {\n handleNewData(res, callback);\n });\n };\n};\n","import { useLazyQuery } from '@apollo/client';\n\nimport { CacheVehicleMake } from '../../models/CacheVehicleMakes';\nimport { getVehicleMakes } from '../../models/graphql';\nimport { useSetCacheVehicleMakes } from '../apolloCacheHooks';\nimport { useAuthenticatedQuery } from './index';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const useGetVehicleMakes = () => {\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n const setCacheVehicleMakes = useSetCacheVehicleMakes();\n const [\n getVehiclesMakes,\n {\n refetch: getVehiclesMakesRefetch,\n called,\n },\n ] = useLazyQuery(getVehicleMakes, {\n fetchPolicy: 'no-cache',\n });\n\n const handleNewData = (\n res: any,\n callback?: (data: any) => void,\n ) => {\n const data = res?.data?.getVehicleMakes?.results;\n const vehicleMakes: CacheVehicleMake[] = [];\n\n data?.forEach((item: { name: string; id: number }) => {\n vehicleMakes.push({\n value: item.id,\n label: item.name,\n });\n });\n\n setCacheVehicleMakes(vehicleMakes);\n\n if (callback) callback(vehicleMakes);\n };\n\n return (\n callback?: (data: any) => void,\n ) => {\n if (called) {\n return offlineProofQuery(() => authenticatedQuery((accessToken) => getVehiclesMakesRefetch({ accessToken })\n .then((res) => {\n handleNewData(res, callback);\n })));\n }\n\n return offlineProofQuery(() => authenticatedQuery((accessToken) => getVehiclesMakes({\n variables: { accessToken },\n }).then((res) => {\n handleNewData(res, callback);\n })));\n };\n};\n","import { useLazyQuery } from '@apollo/client';\n\nimport { getVehicleSeries } from '../../models/graphql';\nimport { useAuthenticatedQuery } from './index';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const useGetVehicleSeries = () => {\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n const [\n getVehiclesSeries,\n {\n refetch: getVehiclesSeriesRefetch,\n called,\n },\n ] = useLazyQuery(getVehicleSeries, {\n fetchPolicy: 'no-cache',\n });\n\n const handleNewData = (\n res: any,\n callback?: (data: any) => void,\n ) => {\n const data = res?.data?.getVehicleSeries?.results;\n const vehicleSeries: any[] = [];\n\n data?.forEach((item: {\n id: number;\n name: string;\n makeName: string;\n modelName: string;\n }) => {\n vehicleSeries.push({\n value: item.id,\n label: `${item.name} ${item.modelName}`,\n });\n });\n\n if (callback) callback(vehicleSeries);\n };\n\n return (\n makeId: number,\n callback?: (data: any) => void,\n ) => {\n const variables = {\n makeId,\n };\n\n if (called) {\n return offlineProofQuery(() => authenticatedQuery((accessToken) => getVehiclesSeriesRefetch({\n ...variables,\n accessToken,\n }).then((res) => {\n handleNewData(res, callback);\n })));\n }\n\n return offlineProofQuery(() => authenticatedQuery((accessToken) => getVehiclesSeries({\n variables: {\n ...variables,\n accessToken,\n },\n }).then((res) => {\n handleNewData(res, callback);\n })));\n };\n};\n","import { useLazyQuery, useQuery } from '@apollo/client';\n\nimport {\n GetCacheProfile,\n loginWithEmailAndPasswordQuery,\n} from '../../models/graphql';\nimport { useSetCacheProfile } from '../apolloCacheHooks';\n\nexport const useLoginEmail = () => {\n const setCacheProfile = useSetCacheProfile();\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n const [\n login,\n {\n refetch: loginRefetch,\n called,\n },\n ] = useLazyQuery(\n loginWithEmailAndPasswordQuery,\n );\n\n const sessionToken = cachedProfileData?.token;\n\n const handleNewData = async (\n res: any,\n callback: (data: any) => void,\n ) => {\n const driverData = { ...res?.data?.authEmail };\n\n if (driverData?.success) {\n driverData.id = driverData.userId;\n\n delete driverData.userId;\n delete driverData.created;\n delete driverData.updated;\n\n await setCacheProfile(driverData);\n }\n\n if (callback) callback(driverData);\n };\n\n return (\n email: string,\n password: string,\n callback: (data: any) => void,\n ) => {\n if (called) {\n loginRefetch({\n email,\n password,\n sessionToken,\n }).then((res) => {\n handleNewData(res, callback);\n });\n }\n else {\n login({\n variables: {\n email,\n password,\n sessionToken,\n },\n }).then((res) => {\n handleNewData(res, callback);\n });\n }\n };\n};\n","import { useLazyQuery, useQuery } from '@apollo/client';\n\nimport {\n GetCacheProfile,\n loginWithPhoneQuery,\n} from '../../models/graphql';\nimport { standardizePhoneNumber } from '../../utils/parsingFunctions';\nimport { useSetCacheProfile } from '../apolloCacheHooks';\n\nexport const useLoginPhone = () => {\n const setCacheProfile = useSetCacheProfile();\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n const [\n login,\n {\n refetch: loginRefetch,\n called,\n },\n ] = useLazyQuery(\n loginWithPhoneQuery,\n );\n\n const sessionToken = cachedProfileData?.token;\n\n const handleNewData = async (\n res: any,\n callback: (data: any) => void,\n ) => {\n const driverData = { ...res?.data?.authPhone };\n\n driverData.id = driverData.userId;\n\n delete driverData.userId;\n delete driverData.updated;\n\n if (driverData.success) {\n await setCacheProfile(driverData);\n }\n\n if (callback) callback(driverData);\n };\n\n return (\n phone: string,\n otp: string,\n callback: (data: any) => void,\n ) => {\n if (called) {\n loginRefetch({\n otp,\n phone: standardizePhoneNumber(phone),\n sessionToken,\n }).then((res) => {\n handleNewData(res, callback);\n });\n }\n else {\n login({\n variables: {\n otp,\n phone: standardizePhoneNumber(phone),\n sessionToken,\n },\n }).then((res) => {\n handleNewData(res, callback);\n });\n }\n };\n};\n","import { useMutation, useQuery } from '@apollo/client';\n\nimport { GetCacheProfile, pruneJourneysQuery } from '../../models/graphql';\nimport { useAuthenticatedQuery } from './index';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const usePruneJourneys = () => {\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n const [pruneJourneys] = useMutation(pruneJourneysQuery, {\n fetchPolicy: 'no-cache',\n });\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n\n const sessionToken = cachedProfileData?.token;\n\n const handleNewData = (\n res: any,\n callback: (data: any) => void,\n ) => {\n if (callback) callback(res?.data?.pruneJourneys);\n };\n\n return (\n includedStatuses: string[],\n callback: (data: any) => void,\n ) => offlineProofQuery(() => authenticatedQuery(() => {\n pruneJourneys({\n variables: {\n sessionToken,\n includedStatuses,\n },\n }).then((res) => {\n handleNewData(res, callback);\n });\n }));\n};\n","import { useMutation } from '@apollo/client';\n\nimport { RetrieveSessionQuery } from '../../models/graphql';\nimport { useSetCacheProfile } from '../apolloCacheHooks';\n\nlet called = false;\n\nexport const useRetrieveSession = () => {\n const setCacheProfile = useSetCacheProfile();\n const [retrieveSession] = useMutation(RetrieveSessionQuery);\n\n return (\n token: string,\n refreshToken: string,\n callback: (data: any) => void,\n ) => retrieveSession({\n variables: {\n token,\n refreshToken,\n },\n }).then(async (res) => {\n const driverData = { ...res?.data?.retrieveSession };\n\n called = true;\n\n if (driverData?.success) {\n driverData.id = driverData.userId;\n\n delete driverData.userId;\n delete driverData.created;\n delete driverData.updated;\n delete driverData.success;\n delete driverData.message;\n\n await setCacheProfile(driverData);\n }\n\n if (callback) callback(driverData);\n });\n};\n","import { gql } from '@apollo/client/core';\n\nconst searchActions = gql`query searchActions($journeyId: Int!, $page: Int!, $size: Int!, $accessToken: String!) {\n searchActions(journeyId: $journeyId, page: $page, size: $size, accessToken: $accessToken) {\n success\n message\n pagination {\n currentPage\n pageSize\n totalPages\n totalResults\n }\n results {\n id\n journeyId\n type\n created\n attachments {\n id\n externalKey\n contentType\n }\n }\n }\n}`;\n\nexport default searchActions;\n","import { useLazyQuery } from '@apollo/client';\n\nimport SearchActionsQuery from '../../models/graphql/SearchActions';\n// import { useSetCacheProfile } from '../apolloCacheHooks';\nimport { useAuthenticatedQuery } from './useAuthenticatedQuery';\n\nexport const useSearchActions = () => {\n // const setCacheProfile = useSetCacheProfile();\n const authenticatedQuery = useAuthenticatedQuery();\n const [\n searchActions,\n {\n called,\n refetch: searchActionsRefetch,\n },\n ] = useLazyQuery(SearchActionsQuery, {\n fetchPolicy: 'no-cache',\n });\n\n return (\n journeyId: number,\n page: number,\n size: number,\n callback?: (data: any) => void,\n ) => {\n if (called) {\n return authenticatedQuery((accessToken) => searchActionsRefetch({\n variables: {\n journeyId,\n page,\n size,\n accessToken,\n },\n }).then((res) => {\n if (callback) {\n callback(res.data.searchActions.results);\n }\n }));\n }\n return authenticatedQuery((accessToken) => searchActions({\n variables: {\n journeyId,\n page,\n size,\n accessToken,\n },\n }).then((res) => {\n if (callback) {\n callback(res.data.searchActions.results);\n }\n }));\n };\n};\n","import { useMutation } from '@apollo/client';\n\nimport { sendOtpQuery } from '../../models/graphql';\nimport { standardizePhoneNumber } from '../../utils/parsingFunctions';\n\nexport const useSendOTP = () => {\n const [sendOtp] = useMutation(sendOtpQuery);\n\n const handleNewData = async (\n res: any,\n callback: (data: any) => void,\n ) => {\n if (callback) callback(res?.data?.sendOTP);\n };\n\n return (\n params: {\n phoneNumber: string,\n captchaToken?: string,\n },\n callback: (data: any) => void,\n ) => sendOtp({\n variables: {\n phone: standardizePhoneNumber(params.phoneNumber),\n captchaToken: params.captchaToken,\n },\n }).then((res) => {\n handleNewData(res, callback);\n });\n};\n","import { gql } from '@apollo/client/core';\n\nconst UploadDriverPhotoQuery = gql`mutation uploadDriverPhoto($id: String!, $file: Upload!, $accessToken: String!) {\n uploadDriverPhoto(id: $id, file: $file, accessToken: $accessToken) { \n success\n message\n }\n}`;\n\nexport default UploadDriverPhotoQuery;\n","import { useMutation, useQuery } from '@apollo/client';\n\nimport {\n GetCacheProfile,\n} from '../../models/graphql';\nimport UploadDriverPhotoQuery from '../../models/graphql/UploadDriverPhoto';\nimport { useSetCacheProfile } from '../apolloCacheHooks';\nimport { useAuthenticatedQuery } from './index';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const useSetDriverPhoto = () => {\n const setCacheProfile = useSetCacheProfile();\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n const [uploadPhoto] = useMutation(UploadDriverPhotoQuery);\n\n const handleNewData = async (\n res: any,\n callback: (data: any) => void,\n ) => {\n if (res.data.uploadDriverPhoto.success) {\n await setCacheProfile({\n photo: res?.url,\n });\n }\n\n if (callback) callback(res);\n };\n\n return (\n file: any,\n callback: (data: any) => void,\n ) => {\n const fileUrl = URL.createObjectURL(file);\n\n return offlineProofQuery(() => authenticatedQuery((accessToken) => uploadPhoto({\n variables: {\n id: String(cachedProfileData?.driverId),\n file,\n accessToken,\n },\n }).then((res) => handleNewData({ ...res, url: fileUrl }, callback))));\n };\n};\n","import { useMutation } from '@apollo/client';\n\nimport { changeJourneyStatusQuery } from '../../models/graphql';\nimport { useAuthenticatedQuery } from './index';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const useSetJourneyStatus = () => {\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n const [setJourneyStatus] = useMutation(changeJourneyStatusQuery, {\n fetchPolicy: 'no-cache',\n });\n\n const handleNewData = (\n res: any,\n callback: (data: any) => void,\n ) => {\n if (callback) callback(res?.data?.changeJourneyStatus);\n };\n\n return (\n id: number,\n status: string,\n lat: string,\n long: string,\n callback: (data: any) => void,\n acknowledgeCompletingPickupDateInFuture?: boolean,\n ) => offlineProofQuery(() => authenticatedQuery((accessToken) => setJourneyStatus({\n variables: {\n id,\n status,\n lat,\n long,\n acknowledgeCompletingPickupDateInFuture,\n accessToken,\n },\n }).then((res) => {\n handleNewData(res, callback);\n })));\n};\n","import { gql } from '@apollo/client/core';\n\nconst UploadAttachment = gql`mutation uploadAttachment($id: String!, $file: Upload!, $accessToken: String!) {\n uploadAttachment(id: $id, file: $file, accessToken: $accessToken) { \n success\n message\n }\n}`;\n\nexport default UploadAttachment;\n","import { useMutation } from '@apollo/client';\n\nimport {\n GetCacheProfile,\n} from '../../models/graphql';\nimport UploadAttachment from '../../models/graphql/UploadAttachment';\nimport { useAuthenticatedQuery } from './useAuthenticatedQuery';\n\nexport const useUploadAttachment = () => {\n const authenticatedQuery = useAuthenticatedQuery();\n const [uploadPhoto] = useMutation(UploadAttachment);\n\n const handleNewData = async (\n res: any,\n callback: (data: any) => void,\n ) => {\n console.log(res, 'data u upload attachment');\n\n if (callback) callback(res);\n };\n\n return (\n id:string,\n file: any,\n callback: (data: any) => void,\n ) => {\n const fileUrl = URL.createObjectURL(file);\n\n return authenticatedQuery((accessToken) => uploadPhoto({\n variables: {\n id: String(id),\n file,\n accessToken,\n },\n }).then((res) => handleNewData({ ...res, url: fileUrl }, callback)));\n };\n};\n","import { gql } from '@apollo/client/core';\n\nconst validateAccessTokenQuery = gql`query validateAccessToken($accessToken: String!) {\n validateAccessToken(accessToken: $accessToken) {\n success\n message\n userId\n driverId\n name\n phone\n photo\n email\n created\n }\n}`;\n\nexport default validateAccessTokenQuery;\n","import { useMutation } from '@apollo/client';\n\nimport { CacheProfileEmpty } from '../../models/CacheProfile';\nimport { NewSessionMutation } from '../../models/graphql';\nimport { useSetCacheProfile } from '../apolloCacheHooks';\n\nexport const useNewSession = () => {\n const setCacheProfile = useSetCacheProfile();\n const [newSession] = useMutation(NewSessionMutation, {\n variables: {\n userAgent: navigator.userAgent,\n },\n fetchPolicy: 'no-cache',\n });\n\n return (callback?: (data: any) => void) => {\n newSession().then((res: any) => {\n const token = res?.data?.newSession?.token;\n const id = res?.data?.newSession?.driverId;\n\n if (token) {\n setCacheProfile({\n ...CacheProfileEmpty,\n token,\n driverId: id,\n });\n\n if (callback) callback(token);\n }\n else if (callback) callback(null);\n });\n };\n};\n","import { useLazyQuery, useQuery } from '@apollo/client';\n\nimport { GetCacheProfile } from '../../models/graphql';\nimport validateAccessTokenQuery from '../../models/graphql/ValidateAccessTokenQuery';\nimport { useSetCacheProfile } from '../apolloCacheHooks';\nimport { getAccessToken, getRefreshToken, getSessionToken } from '../store';\nimport { useNewSession } from './useNewSession';\nimport { useRetrieveSession } from './useRetrieveSession';\n\nexport const useValidateAccessToken = () => {\n const newSession = useNewSession();\n const retrieveSession = useRetrieveSession();\n const setCacheProfile = useSetCacheProfile();\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n const [\n validateAccessToken,\n {\n refetch: validateAccessTokenRefetch,\n called,\n },\n ] = useLazyQuery(validateAccessTokenQuery, {\n fetchPolicy: 'no-cache',\n });\n\n const handleNewData = async (\n profileData = cachedProfileData,\n res: any,\n callback?: (data: any) => void,\n ) => {\n const driverData = { ...res?.data?.validateAccessToken };\n\n if (driverData?.success && driverData?.userId) {\n driverData.id = driverData.userId;\n driverData.accessToken = profileData.accessToken;\n\n delete driverData.userId;\n delete driverData.created;\n delete driverData.updated;\n delete driverData.success;\n delete driverData.message;\n\n await setCacheProfile(driverData);\n\n if (callback) callback(driverData);\n }\n // If accessToken is not valid, retrieve new one from refreshToken\n else {\n const storedSessionToken = getSessionToken();\n const storedRefreshToken = getRefreshToken();\n\n if (!storedRefreshToken || !storedSessionToken) {\n console.log('SESSION or REFRESH token not available');\n\n return newSession(() => {\n if (callback) callback(null);\n });\n }\n\n console.log('RETRIEVE NEW ACCESS TOKEN - refreshToken - from localStorage');\n\n retrieveSession(\n profileData?.token,\n storedRefreshToken,\n (newProfile: any) => {\n if (newProfile.driverId) {\n if (callback) callback(newProfile);\n }\n else {\n newSession(() => {\n if (callback) callback(null);\n });\n }\n },\n );\n }\n };\n\n return (\n profileData = cachedProfileData,\n callback?: (data: any) => void,\n ) => {\n const variables = { accessToken: profileData?.accessToken };\n\n if (called) {\n return validateAccessTokenRefetch(variables).then((res) => {\n handleNewData(profileData, res, callback);\n });\n }\n\n return validateAccessToken({ variables }).then((res) => {\n handleNewData(profileData, res, callback);\n });\n };\n};\n","export type NotificationType = {\n text: string,\n variant: 'error' | 'neutral' | 'success'\n}\n\nexport enum LocationServices {\n UNKNOWN = 'unknown',\n DISABLED = 'disabled',\n ENABLED = 'enabled'\n}\n","import { useQuery } from '@apollo/client';\nimport { Button } from '@transferz/fe-component-library/button';\nimport CarIcon from '@transferz/fe-component-library/car-icon';\nimport PlusCircleIcon from '@transferz/fe-component-library/circle-plus-icon';\nimport Dropdown from '@transferz/fe-component-library/dropdown';\nimport ImageUpload from '@transferz/fe-component-library/image-upload';\nimport Input from '@transferz/fe-component-library/input';\nimport Loader from '@transferz/fe-component-library/loader';\nimport Notification from '@transferz/fe-component-library/notification';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { useLocalize } from 'localize-react';\nimport { set } from 'lodash';\nimport React, { FunctionComponent, useEffect, useState } from 'react';\nimport { Controller, SubmitHandler, useForm } from 'react-hook-form';\nimport { useLocation, useNavigate } from 'react-router';\n\nimport StickyBackButton from '../components/StickyBackButton';\nimport Vehicle from '../components/Vehicle';\nimport { CacheDriverVehicle } from '../models/CacheDriverVehicles';\nimport { CacheVehicleMake } from '../models/CacheVehicleMakes';\nimport { GetCacheJourneys, GetCacheProfile, GetCacheVehicleMakes } from '../models/graphql';\nimport {\n useAddVehicle,\n useAssignJourney,\n useAssignVehicle,\n useGetAssociatedJourneys,\n useGetDriverVehicles,\n useGetVehicleMakes,\n useGetVehicleSeries,\n useSetDriverPhoto,\n useSetJourneyStatus,\n} from '../services/apolloNetworkHooks';\nimport { routes } from '../services/constant';\nimport { useAddAction } from '../services/hooks/useAddAction';\nimport { useDataLayer } from '../services/hooks/useDataLayer';\nimport { LocationServices, NotificationType } from '../types/global';\n\nexport interface IData {\n value: number;\n label: string;\n}\n\n// type FormFields = {\n// license: string;\n// carBrand: number;\n// carType: number;\n// };\n\nlet latestSelectedVehicleId = 0;\n\nconst DriverInformation: FunctionComponent = () => {\n const navigate = useNavigate();\n const { translate } = useLocalize();\n const { trackEvent } = useDataLayer();\n const { addAction } = useAddAction();\n const location: { [key: string]: any } = useLocation();\n const [loading, setLoading] = useState(false);\n const [selectedVehicleId, setSelectedVehicleId] = useState(0);\n const [vehicles, setVehicles] = useState([]);\n const [carMakes, setCarMakes] = useState([]);\n const [carSeriesDropdown, setCarSeriesDropdown] = useState([]);\n const [notification, showNotification] = useState();\n const [locationServices, setLocationServices] = useState(LocationServices.UNKNOWN);\n const [showButtonLoading, setShowButtonLoading] = useState(false);\n\n const { data: cachedVehicleMakes } = useQuery(GetCacheVehicleMakes);\n const { data: cachedJourneysData } = useQuery(GetCacheJourneys);\n const { data: cachedProfileData, loading: loadingProfileData } = useQuery(GetCacheProfile);\n\n const getAssociatedJourneys = useGetAssociatedJourneys();\n const getVehicleMakes = useGetVehicleMakes();\n const getVehicleSeries = useGetVehicleSeries();\n const getDriverVehicles = useGetDriverVehicles();\n const updateDriverPhoto = useSetDriverPhoto();\n const assignJourney = useAssignJourney();\n const assignVehicle = useAssignVehicle();\n const setJourneyStatus = useSetJourneyStatus();\n const addVehicle = useAddVehicle();\n\n const {\n register, handleSubmit, control, watch,\n } = useForm();\n\n const licenseValue = watch('license');\n const carBrandValue = watch('carBrand');\n const carTypeValue = watch('carType');\n\n const selectVehicle = (id: number) => {\n setSelectedVehicleId(id);\n };\n\n const getJourneys = () => {\n getAssociatedJourneys({}, () => {\n const driverCode = cachedProfileData.lastJourneyView;\n\n if (driverCode) navigate(`${routes.journey}/${driverCode}`);\n });\n };\n\n const handleSubmitAndStartJourney = (position: any) => {\n const handleJourneyStatusChange = () => {\n setJourneyStatus(\n cachedProfileData.lastJourneyId,\n 'underway',\n position.coords ? String(position.coords.latitude) : '',\n position.coords ? String(position.coords.longitude) : '',\n (data: any) => {\n if (data?.success) {\n console.log(\n `INFO Journey ${cachedProfileData?.lastJourneyView || ''} started, redirecting to journey page...`,\n );\n getJourneys();\n setShowButtonLoading(false);\n }\n else {\n setLoading(false);\n }\n },\n );\n };\n const handleVehicleAssign = () => {\n assignVehicle(cachedProfileData.lastJourneyId, selectedVehicleId || latestSelectedVehicleId, (data: any) => {\n latestSelectedVehicleId = 0;\n\n if (data?.success) {\n handleJourneyStatusChange();\n }\n else {\n setLoading(false);\n }\n });\n };\n const handleDriverAssign = () => {\n assignJourney(cachedProfileData.lastJourneyId, cachedProfileData.lastJourneyView, (data: any) => {\n if (data?.success) {\n handleVehicleAssign();\n }\n else {\n setLoading(false);\n }\n });\n };\n\n setLoading(true);\n let cachedJourney;\n if (cachedJourneysData?.items?.length) {\n cachedJourney = cachedJourneysData.items.filter(\n (journey: any) => journey.driverCode === cachedProfileData.lastJourneyView,\n )[0];\n\n if (cachedJourney?.execution?.assignedDriverId) {\n if (cachedJourney?.execution?.assignedDriverVehicleId) {\n handleJourneyStatusChange();\n }\n else {\n handleVehicleAssign();\n }\n }\n else {\n handleDriverAssign();\n }\n }\n else {\n handleDriverAssign();\n }\n trackEvent({\n event: 'journey-started',\n driverCode: cachedJourney?.driverCode,\n journeyCode: cachedJourney?.journeyCode,\n });\n addAction('journey-started', {\n driverCode: cachedJourney?.driverCode,\n journeyCode: cachedJourney?.journeyCode,\n });\n };\n\n const handleLocationErrorCases = (error: any) => {\n switch (error.code) {\n case error.PERMISSION_DENIED:\n showNotification({\n text: translate('location_denied'),\n variant: 'neutral',\n });\n setLocationServices(LocationServices.DISABLED);\n break;\n case error.POSITION_UNAVAILABLE:\n setLocationServices(LocationServices.DISABLED);\n break;\n case error.TIMEOUT:\n setLocationServices(LocationServices.DISABLED);\n break;\n default:\n console.error('Unexpected error code from Geolocation API: ', error.code);\n setLocationServices(LocationServices.DISABLED);\n break;\n }\n };\n\n const handleGetDriverLocation = () => {\n if (navigator.geolocation) {\n let timeoutId: any = null;\n\n // Start a timer\n timeoutId = setTimeout(() => {\n setLocationServices(LocationServices.DISABLED);\n }, 2000);\n try {\n navigator.geolocation.getCurrentPosition(\n // success callback\n (position) => {\n clearTimeout(timeoutId);\n setLocationServices(LocationServices.ENABLED);\n handleSubmitAndStartJourney(position);\n },\n // error callback (position will be undefined)\n (error) => {\n clearTimeout(timeoutId);\n handleLocationErrorCases(error);\n setTimeout(() => {\n handleSubmitAndStartJourney('error');\n }, 2000);\n },\n );\n }\n catch (e) {\n alert('Location is not available!');\n handleSubmitAndStartJourney('error');\n }\n }\n else {\n alert('navigator.geolocation is not available!');\n handleSubmitAndStartJourney('error');\n }\n };\n\n const onSubmit: SubmitHandler = () => {\n console.log('DEBUG User clicked on \"Submit and start journey\" button...');\n setLocationServices(LocationServices.UNKNOWN);\n setShowButtonLoading(true);\n if (licenseValue && carTypeValue && cachedProfileData?.photo) {\n addVehicle(cachedProfileData?.driverId, carTypeValue, licenseValue, (newVehicle: any) => {\n console.log('INFO New vehicle added successfully');\n if (!selectedVehicleId) {\n latestSelectedVehicleId = newVehicle.id;\n\n setSelectedVehicleId(latestSelectedVehicleId);\n getDriverVehicles((newVehicles: CacheDriverVehicle[]) => {\n setVehicles(newVehicles);\n });\n handleGetDriverLocation();\n }\n });\n }\n // If driver picked one of his already existing vehicles\n else if (vehicles?.length && selectedVehicleId) {\n handleGetDriverLocation();\n }\n };\n\n const handleAddNewVehicle = () => {\n console.log('DEBUG User clicked on add new vehicle button, navigating to new vehicle page...');\n navigate(routes.newVehicle, { state: { route: 'information' } });\n };\n\n const handleUploadPhoto = (e: React.ChangeEvent) => {\n const file = (e.target as HTMLInputElement).files![0];\n\n setLoading(true);\n\n updateDriverPhoto(file, (data: any) => {\n if (data?.data?.uploadDriverPhoto?.success) {\n console.log(`DEBUG User changed profile photo to: ${file?.name}, file size: ${file?.size} kb`);\n\n if (!data?.url) {\n showNotification({ text: translate('uploaded_photo'), variant: 'success' });\n }\n else {\n showNotification({ text: translate('changed_photo'), variant: 'success' });\n }\n setLoading(false);\n }\n else {\n showNotification({ text: translate('could_not_save'), variant: 'error' });\n setLoading(false);\n }\n });\n };\n\n const renderLocationColor = () => {\n if (locationServices === LocationServices.ENABLED) return 'atlantis5';\n if (locationServices === LocationServices.DISABLED) return 'red5';\n return 'asphalt6';\n };\n\n useEffect(() => {\n if (!carBrandValue) return;\n const value = carBrandValue.value ? carBrandValue.value : carBrandValue;\n getVehicleSeries(value, (data) => {\n setCarSeriesDropdown(data);\n });\n }, [carBrandValue]);\n\n useEffect(() => {\n if (notification) {\n setTimeout(() => {\n showNotification(undefined);\n }, 2000);\n }\n }, [loadingProfileData, notification]);\n\n useEffect(() => {\n if (!vehicles?.length) {\n setLoading(true);\n\n getDriverVehicles((newVehicles: CacheDriverVehicle[]) => {\n newVehicles.sort((a, b) => Date.parse(b.updated) - Date.parse(a.updated));\n if (newVehicles[0]) setSelectedVehicleId(newVehicles[0].id);\n\n setVehicles(newVehicles);\n setLoading(false);\n });\n }\n }, [cachedProfileData?.driverId]);\n\n useEffect(() => {\n console.log('INFO Driver information page loaded');\n if (navigator.geolocation) {\n let timeoutId: any = null;\n\n // Start a timer\n timeoutId = setTimeout(() => {\n setLocationServices(LocationServices.DISABLED);\n }, 2000);\n\n navigator.geolocation.getCurrentPosition(\n // success callback\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n () => {\n clearTimeout(timeoutId);\n setLocationServices(LocationServices.ENABLED);\n },\n // error callback (position will be undefined)\n (error) => {\n clearTimeout(timeoutId);\n handleLocationErrorCases(error);\n },\n );\n }\n else {\n alert('Browser does not support geolocation!');\n }\n\n // If no cached vehicle makes, fetch them all for a dropdown\n if (!cachedVehicleMakes?.makes?.length) {\n getVehicleMakes((vehicleMakes: CacheVehicleMake[]) => {\n if (vehicleMakes?.length) {\n setCarMakes(vehicleMakes);\n }\n else {\n // @TODO write some kind of an error to the user\n }\n });\n }\n else {\n setCarMakes(cachedVehicleMakes.makes);\n }\n\n if (location?.state?.notification) {\n window.history.replaceState({}, document.title);\n\n switch (location?.state?.notification) {\n case 'delete':\n showNotification({ text: translate('deleted_vehicle'), variant: 'success' });\n break;\n case 'update':\n showNotification({ text: translate('changed_details'), variant: 'success' });\n break;\n case 'create':\n showNotification({ text: translate('new_vehicle'), variant: 'success' });\n break;\n default:\n }\n }\n }, []);\n\n if (loading) {\n return ;\n }\n\n return (\n
\n
\n \n \n {translate('submit_information')}\n \n
\n \n {translate('location_services')}\n :\n {' '}\n \n {translate(locationServices)}\n \n \n \n \n\n \n\n {vehicles?.length ? (\n /* Driver has existing vehicles related to him */\n
\n {translate('your_vehicle')}\n\n {vehicles.map((vehicle: CacheDriverVehicle) => (\n
\n \n
\n ))}\n\n
\n
\n \n \n {translate('new_vehicle')}\n \n
\n
\n
\n ) : (\n /* Driver doesn't have existing vehicles related to him */\n <>\n }\n data-testid=\"input_license-text\"\n confirmed={licenseValue?.length >= 3}\n />\n\n (\n {\n onChange(brand.value);\n }}\n onBlur={onBlur}\n confirmed={!!carBrandValue}\n isSearchable\n />\n )}\n />\n (\n {\n onChange(type.value);\n }}\n onBlur={onBlur}\n confirmed={!!carTypeValue}\n isSearchable\n />\n )}\n />\n \n )}\n
\n {notification && (\n
\n \n
\n )}\n\n
\n :
}\n data-testid=\"submit_driver-information\"\n type=\"submit\"\n // Disabled if driver didn't pick existing vehicle or inserted mandatory values for new one\n // Disabled if driver didn't upload a photo or doesn't have one already uploaded\n disabled={\n !cachedProfileData?.photo ||\n (!selectedVehicleId && !(!!licenseValue && !!carTypeValue)) ||\n locationServices === LocationServices.UNKNOWN\n }\n />\n
\n \n
\n );\n};\n\nexport default DriverInformation;\n","import { useQuery } from '@apollo/client';\nimport ArrowIcon from '@transferz/fe-component-library/arrow-icon';\nimport { Button } from '@transferz/fe-component-library/button';\nimport Input from '@transferz/fe-component-library/input';\nimport Loader from '@transferz/fe-component-library/loader';\nimport ProfileIcon from '@transferz/fe-component-library/profile-icon';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { useLocalize } from 'localize-react';\nimport React, { FunctionComponent, useEffect, useState } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useNavigate } from 'react-router-dom';\n\nimport { GetCacheProfile } from '../models/graphql';\nimport { useSetCacheProfile } from '../services/apolloCacheHooks';\nimport { useAssociateJourney, useEditDriverData } from '../services/apolloNetworkHooks';\nimport { routes } from '../services/constant';\n\nconst DriverName: FunctionComponent = () => {\n const navigate = useNavigate();\n const setCacheProfile = useSetCacheProfile();\n const associateJourney = useAssociateJourney();\n const updateDriver = useEditDriverData();\n const { data: cachedProfileData, loading: loadingProfileData } = useQuery(GetCacheProfile);\n const [loading, setLoading] = useState(false);\n const { register, watch } = useForm({ defaultValues: { driverName: '' } });\n const driverName = watch('driverName');\n const { translate } = useLocalize();\n\n const handleClick = () => {\n setLoading(true);\n\n const driverData = { ...cachedProfileData };\n\n driverData.name = driverName;\n\n updateDriver(\n driverData.id,\n driverData.phone,\n driverData.name,\n () => {\n if (cachedProfileData?.lastJourneyView) {\n const code = cachedProfileData?.lastJourneyView;\n\n associateJourney(code, () => {\n setCacheProfile({\n lastJourneyView: '',\n }).then(() => {\n setTimeout(() => {\n setLoading(false);\n\n navigate(\n `${routes.journey}/${code}`,\n { state: { notification: 'addJourneySuccess' } },\n );\n }, 250);\n });\n }, driverData, true);\n }\n else {\n setTimeout(() => {\n setLoading(false);\n\n navigate(routes.journeys);\n }, 250);\n }\n },\n );\n };\n\n useEffect(() => {\n if (!loadingProfileData && !cachedProfileData?.phone) {\n navigate(routes.login.phone);\n }\n }, [loadingProfileData]);\n\n if (loading) {\n return ();\n }\n\n return (\n
\n \n {translate('your_name')}\n \n \n
\n \n \n
\n \n {translate('name_number_saved')}\n \n
\n }\n iconPosition=\"right\"\n priority=\"primary\"\n variant=\"confirm\"\n fullWidth\n disabled={driverName.length < 2}\n onClick={handleClick}\n />\n
\n
\n
\n );\n};\n\nexport default DriverName;\n","import { useQuery } from '@apollo/client';\nimport { Button } from '@transferz/fe-component-library/button';\nimport CircleCheckIcon from '@transferz/fe-component-library/circle-check-icon';\nimport Input from '@transferz/fe-component-library/input';\nimport PhoneInput from '@transferz/fe-component-library/phone-input';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { useLocalize } from 'localize-react';\nimport React, { FunctionComponent, useEffect, useState } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useNavigate, useParams } from 'react-router-dom';\n\nimport StickyBackButton from '../components/StickyBackButton';\nimport { GetCacheProfile } from '../models/graphql';\nimport { useEditDriverData } from '../services/apolloNetworkHooks';\nimport { routes } from '../services/constant';\n\nconst EditProfile: FunctionComponent = () => {\n const navigate = useNavigate();\n const { path } = useParams();\n const { translate } = useLocalize();\n\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n const [phoneInput, setPhoneInput] = useState(cachedProfileData?.phone);\n const [isNameValid, setIsNameValid] = useState(false);\n\n const updateDriver = useEditDriverData();\n\n const { register, watch } = useForm({ defaultValues: { driverName: cachedProfileData.name } });\n const driverName = watch('driverName');\n\n useEffect(() => {\n if (driverName?.length >= 2) {\n setIsNameValid(true);\n }\n else {\n setIsNameValid(false);\n }\n }, [driverName]);\n\n const handleClick = () => {\n const driverData = { ...cachedProfileData };\n\n if (path === 'name') {\n driverData.name = driverName;\n }\n else {\n driverData.phone = phoneInput;\n }\n\n updateDriver(driverData.id, driverData.phone, driverData.name, () => {\n console.log('INFO Driver data updated successfully');\n navigate(routes.profile, { state: { notification: 'updateProfile' } });\n });\n };\n\n return (\n
\n \n \n {path === 'name' ? translate('your_name_label') : translate('mobile_number')}\n \n {path === 'name' ? (\n \n ) : (\n setPhoneInput(phone)}\n initialValue={phoneInput}\n label={translate('mobile_number')}\n className=\"custom-phone-input\"\n path={`${window.location.origin}/flags/4x3`}\n />\n )}\n\n
\n
\n }\n iconPosition=\"left\"\n variant=\"info\"\n priority=\"primary\"\n fullWidth\n disabled={path === 'name' ? driverName?.length < 2 : !phoneInput}\n onClick={handleClick}\n />\n
\n
\n
\n );\n};\n\nexport default EditProfile;\n","export enum JourneyStatus {\n AVAILABLE = 'AVAILABLE',\n PLANNED = 'PLANNED',\n UNDERWAY_TO_PICKUP = 'UNDERWAY_TO_PICKUP',\n ARRIVED_AT_PICKUP = 'ARRIVED_AT_PICKUP',\n JOURNEY_IN_PROGRESS = 'JOURNEY_IN_PROGRESS',\n COMPLETED = 'COMPLETED',\n CANCELLED_FREE = 'CANCELLED_FREE',\n CANCELLED_WITH_COSTS = 'CANCELLED_WITH_COSTS',\n CANCELLED = 'CANCELLED',\n NO_LONGER_AVAILABLE = 'NO_LONGER_AVAILABLE',\n REASSIGNED_TRANSFER_COMPANY = 'REASSIGNED_TRANSFER_COMPANY',\n REASSIGNED_DRIVER = 'REASSIGNED_DRIVER'\n}\n\nexport enum JourneyStatusStrings {\n AVAILABLE = 'upcoming',\n PLANNED = 'upcoming',\n UNDERWAY_TO_PICKUP = 'on_the_way_to_pickup',\n ARRIVED_AT_PICKUP = 'arrived_at_pickup',\n JOURNEY_IN_PROGRESS = 'on_the_way_to_drop_off',\n COMPLETED = 'completed',\n CANCELLED_FREE = 'cancelled',\n CANCELLED_WITH_COSTS = 'cancelled',\n CANCELLED = 'n_unavailableCancelled',\n NO_LONGER_AVAILABLE = 'n_unavailableNoLongerAvailable',\n REASSIGNED_TRANSFER_COMPANY = 'n_unavailableOtherTransco',\n REASSIGNED_DRIVER = 'n_unavailableOtherDriver',\n}\n","import BottomDrawer from '@transferz/fe-component-library/bottom-drawer';\nimport { Button } from '@transferz/fe-component-library/button';\nimport Dropdown from '@transferz/fe-component-library/dropdown';\nimport Input from '@transferz/fe-component-library/input';\nimport PenIcon from '@transferz/fe-component-library/pen-icon';\nimport RangeDatePicker from '@transferz/fe-component-library/range-date-picker';\nimport SortSizeIcon from '@transferz/fe-component-library/sort-size-icon';\nimport Typography from '@transferz/fe-component-library/typography';\nimport XIcon from '@transferz/fe-component-library/x-icon';\nimport { useLocalize } from 'localize-react';\nimport { debounce } from 'lodash';\nimport React, { FunctionComponent, useState } from 'react';\nimport { Controller, useFormContext } from 'react-hook-form';\n\nimport { filterStatuses } from '../../services/constant';\nimport { JourneyStatus } from '../../types/journeyStatus';\n\ntype JourneyFiltersProps = {\n filterJourneys: (filters: any) => void;\n};\n\nconst JourneyFilters: FunctionComponent = ({ filterJourneys }) => {\n const { translate } = useLocalize();\n const [isOpen, setIsOpen] = useState(false);\n const [showFlags, setShowFlags] = useState(false);\n\n const {\n setValue, watch, register, control, reset,\n } = useFormContext();\n\n const { filters, language, driverCode } = watch();\n\n const data = [\n {\n value: JourneyStatus.AVAILABLE,\n label: translate('upcoming_filter'),\n },\n {\n value: JourneyStatus.UNDERWAY_TO_PICKUP,\n label: translate('on_way_to_pickup_filter'),\n },\n {\n value: JourneyStatus.ARRIVED_AT_PICKUP,\n label: translate('arrived_at_pickup_filter'),\n },\n {\n value: JourneyStatus.JOURNEY_IN_PROGRESS,\n label: translate('on_way_to_dropoff_filter'),\n },\n ];\n\n const clearDates = () => {\n setValue('filters', { ...filters, pickupDateAfter: '', pickupDateBefore: '' });\n filterJourneys({ ...filters, pickupDateAfter: '', pickupDateBefore: '' });\n };\n\n const onResetFilters = () => {\n reset({\n filters: {\n ...filters,\n pickupDateAfter: '',\n pickupDateBefore: '',\n includedStatuses: filterStatuses.upcoming,\n },\n language,\n driverCode,\n });\n filterJourneys({\n textSearch: filters.textSearch,\n pickupDateAfter: '',\n pickupDateBefore: '',\n includedStatuses: filterStatuses.upcoming,\n });\n setShowFlags(false);\n };\n\n const clearStatus = () => {\n setValue('filters', { ...filters, includedStatuses: filterStatuses.upcoming });\n filterJourneys({ ...filters, includedStatuses: filterStatuses.upcoming });\n };\n\n const clearSearch = () => {\n setValue('filters', { ...filters, textSearch: '' });\n filterJourneys({ ...filters, textSearch: '' });\n };\n\n return (\n
\n
\n {\n // @ts-ignore\n if (!e.target.value) {\n clearSearch();\n }\n else {\n debounce(() => {\n // @ts-ignore\n setValue('filters.textSearch', e.target.value);\n }, 400)();\n }\n }}\n autoComplete=\"off\"\n />\n }\n label=\"\"\n circle\n onClick={() => setIsOpen(true)}\n className=\"journey-filters-button\"\n priority=\"secondary\"\n data-testid=\"input_filters-button\"\n />\n
\n
\n setIsOpen(false)}>\n
\n {/* @ts-ignore */}\n {\n setValue('filters.pickupDateAfter', start);\n setValue('filters.pickupDateBefore', end);\n }}\n className=\"m-b-24\"\n onClear={clearDates}\n />\n\n (\n onChange(e.value)}\n />\n )}\n />\n\n
\n \n {\n setIsOpen(false);\n setShowFlags(true);\n }}\n />\n
\n
\n
\n
\n {(!!filters.pickupDateAfter || !!filters.pickupDateBefore || !!filters.includedStatuses) && showFlags && (\n
\n \n {translate('set_filter_label')}\n :\n \n
\n {!!(filters.pickupDateAfter || filters.pickupDateBefore) && (\n
\n \n \n {translate('remove_date_filter')}\n \n \n
\n )}\n {!!filters.includedStatuses.length && (\n
\n \n \n {translate('remove_status_filter')}\n \n \n
\n )}\n
\n
\n )}\n
\n );\n};\nexport default JourneyFilters;\n","import CircleIcon from '@transferz/fe-component-library/circle-icon';\nimport Input from '@transferz/fe-component-library/input';\nimport { useLocalize } from 'localize-react';\nimport React from 'react';\n\nimport { JourneyStatus, JourneyStatusStrings } from '../types/journeyStatus';\n\ntype Props = {\n status: JourneyStatus | undefined;\n withoutLabel?: boolean;\n};\n\nconst StatusIndicator = ({ status, withoutLabel }: Props) => {\n const { translate } = useLocalize();\n const isCancelledOrCompleted =\n status === JourneyStatus.CANCELLED ||\n status === JourneyStatus.COMPLETED ||\n status === JourneyStatus.NO_LONGER_AVAILABLE ||\n status === JourneyStatus.REASSIGNED_TRANSFER_COMPANY ||\n status === JourneyStatus.REASSIGNED_DRIVER;\n const color = isCancelledOrCompleted ? 'asphalt7' : 'atlantis5';\n return (\n
\n {!withoutLabel ? (\n }\n />\n ) : (\n
\n \n {status && (\n
\n {translate(JourneyStatusStrings[status])}\n
\n )}\n
\n )}\n
\n );\n};\n\nexport default StatusIndicator;\n","import CircleIcon from '@transferz/fe-component-library/circle-icon';\nimport DangerIcon from '@transferz/fe-component-library/danger-icon';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { useLocalize } from 'localize-react';\nimport React from 'react';\n\nimport { JourneyStatus } from '../../types/journeyStatus';\nimport StatusIndicator from '../StatusIndicator';\n\ninterface JourneyOverviewBoxProps {\n status?: JourneyStatus | undefined;\n dangerIcon?: boolean\n }\n\nconst JourneyHeaderBox = ({\n status,\n dangerIcon = false,\n}: JourneyOverviewBoxProps) => (\n
\n {status && (\n \n )}\n {dangerIcon && }\n
\n);\n\nexport default JourneyHeaderBox;\n","import BabySeatIcon from '@transferz/fe-component-library/baby-seat-icon';\nimport BoosterSeatIcon from '@transferz/fe-component-library/booster-seat-icon';\nimport ChildSeatIcon from '@transferz/fe-component-library/child-seat-icon';\nimport CirclePlusIcon from '@transferz/fe-component-library/circle-plus-icon';\nimport LocationIcon from '@transferz/fe-component-library/location-icon';\nimport LuggageIcon from '@transferz/fe-component-library/luggage-icon';\nimport MeetAndGreetIcon from '@transferz/fe-component-library/meet-and-greet-icon';\nimport PetsIcon from '@transferz/fe-component-library/pets-icon';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { useLocalize } from 'localize-react';\nimport React, {\n FunctionComponent, ReactElement, useEffect, useState,\n} from 'react';\n\nenum JourneyAddons {\n BOOSTER_SEAT = 'booster_seat',\n CHILD_SEAT = 'child_seat',\n PETS = 'pets',\n BABY_SEAT = 'baby_seat',\n SPECIAL_LUGGAGE = 'special_luggage',\n EXTRA_STOP = 'extra_stop',\n MEET_GREET = 'meet_greet'\n}\n\n// TODO prebaciti u types\ntype AddonType = {\n addonType: keyof typeof JourneyAddons,\n amount: number,\n price: any\n}\ninterface JourneyInfoAddonsProps {\n addons: AddonType[],\n className?: string\n}\n\ntype AddonsIconsType = {\n [key: string]: ReactElement;\n}\n\nconst icons: AddonsIconsType = {\n BOOSTER_SEAT: ,\n PETS: ,\n BABY_SEAT: ,\n CHILD_SEAT: ,\n SPECIAL_LUGGAGE: ,\n EXTRA_STOP: ,\n MEET_GREET: ,\n};\n\nconst JourneyInfoAddons: FunctionComponent = ({ addons, className }) => {\n const { translate } = useLocalize();\n\n return (\n
\n
\n \n
\n\n
\n {addons.map((addon: AddonType) => (\n
\n {icons[addon.addonType]}\n \n {translate(JourneyAddons[addon.addonType])}\n {addon.amount > 1 && (\n \n {' '}\n {`(${(addon.amount)})`}\n \n )}\n \n
\n ))}\n
\n
\n );\n};\n\nexport default JourneyInfoAddons;\n","import Typography from '@transferz/fe-component-library/typography';\nimport React, { FunctionComponent, ReactElement, ReactNode } from 'react';\n\ntype Props = {\n title: string,\n icon: ReactElement,\n onClick?: () => void,\n text?: ReactNode,\n rightIcon?: ReactElement,\n className?: string,\n dataTestId?: string,\n}\n\nconst JourneyInfoDetail: FunctionComponent = ({\n title,\n icon,\n onClick,\n text,\n rightIcon,\n dataTestId,\n className = '',\n}) => (\n
\n
\n \n {icon}\n \n
\n {title}\n \n {text}\n \n
\n
\n {rightIcon && (\n
\n
{rightIcon}
\n
\n )}\n
\n);\nexport default JourneyInfoDetail;\n","import '@transferz/fe-component-library/style';\n\nimport CalendarNewIcon from '@transferz/fe-component-library/calendar-new-icon';\nimport ChevronIcon from '@transferz/fe-component-library/chevron-icon';\nimport ClockIcon from '@transferz/fe-component-library/clock-icon';\nimport Divider from '@transferz/fe-component-library/divider';\nimport { FlightStatusEnum, FlightTracker } from '@transferz/fe-component-library/flight-tracker';\nimport LocationIcon from '@transferz/fe-component-library/location-icon';\nimport Notification from '@transferz/fe-component-library/notification';\nimport PlaneIcon from '@transferz/fe-component-library/plane-icon';\nimport PointOfInterestIcon from '@transferz/fe-component-library/point-of-interest-icon';\nimport SeaportIcon from '@transferz/fe-component-library/seaport-icon';\nimport ShipIcon from '@transferz/fe-component-library/ship-icon';\nimport TrainIcon from '@transferz/fe-component-library/train-icon';\nimport TrashIcon from '@transferz/fe-component-library/trash-icon';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { withLDConsumer } from 'launchdarkly-react-client-sdk';\nimport { useLocalize } from 'localize-react';\nimport React, { useEffect, useState } from 'react';\n\nimport { JourneyStatus } from '../types/journeyStatus';\nimport { parseDate, tomorrowOrToday } from '../utils/parsingFunctions';\nimport JourneyHeaderBox from './Journey/JourneyHeaderBox';\nimport JourneyInfoAddons from './Journey/JourneyInfoAddons';\nimport JourneyInfoDetail from './Journey/JourneyInfoDetail';\n\ninterface JourneyOverviewBoxProps {\n onClick?: () => void;\n handleDelete: () => any;\n driverCode: string;\n pickupDate?: string;\n startLocation?: string;\n endLocation?: string;\n status: JourneyStatus;\n startLocationHub: string;\n endLocationHub: string;\n addons?: any[];\n flightNumber: string;\n estimatedTime: string;\n scheduledTime: string;\n delay?: number;\n flightStatus: FlightStatusEnum;\n flags?: any;\n shipName?: string;\n}\n\nconst JourneyOverviewBox = ({\n onClick,\n handleDelete,\n driverCode,\n pickupDate,\n startLocation,\n endLocation,\n status,\n startLocationHub,\n endLocationHub,\n addons = [],\n flightNumber,\n estimatedTime,\n scheduledTime,\n delay,\n flightStatus,\n flags,\n shipName,\n}: JourneyOverviewBoxProps) => {\n const parts: RegExpMatchArray | null = driverCode?.match(/.{1,3}/g);\n const splittedDriverCode = parts && parts.join(' ');\n const { translate } = useLocalize();\n const [showIcon, setShowIcon] = useState(false);\n\n const journeyDate = new Date(pickupDate!);\n const todayOrTomorrow = tomorrowOrToday(journeyDate);\n\n const date = todayOrTomorrow ? translate(todayOrTomorrow) : pickupDate && parseDate(pickupDate);\n const time = pickupDate && pickupDate.split('T')[1].slice(0, -3);\n\n const isCancelled =\n status === JourneyStatus.CANCELLED ||\n status === JourneyStatus.NO_LONGER_AVAILABLE ||\n status === JourneyStatus.REASSIGNED_DRIVER ||\n status === JourneyStatus.REASSIGNED_TRANSFER_COMPANY;\n const isCompleted = status === JourneyStatus.COMPLETED;\n\n const canDelete =\n isCancelled || isCompleted || status === JourneyStatus.AVAILABLE || status === JourneyStatus.PLANNED;\n\n const renderIcon = (icon: string) => {\n switch (icon) {\n case 'AIRPORT':\n return ;\n case 'SEAPORT':\n return ;\n case 'TRAIN_STATION':\n return ;\n case 'POINT_OF_INTEREST':\n return ;\n default:\n return ;\n }\n };\n\n useEffect(() => {\n const journeyStarted =\n status === JourneyStatus.JOURNEY_IN_PROGRESS ||\n status === JourneyStatus.UNDERWAY_TO_PICKUP ||\n status === JourneyStatus.ARRIVED_AT_PICKUP;\n\n const refDate = Date.now() - 1000 * 60 * 60 * 3;\n\n if (journeyStarted && new Date(pickupDate!) < new Date(refDate)) {\n setShowIcon(true);\n }\n }, [status]);\n\n return (\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n \n
\n \n
\n
\n
\n \n {splittedDriverCode}\n {isCancelled && }\n \n {canDelete && (\n {\n ev.stopPropagation();\n handleDelete();\n }}\n >\n \n
\n )}\n
\n\n {flags?.showFlightTracker && flightNumber && (\n \n )}\n\n {shipName && (\n }\n />\n )}\n\n
\n {renderIcon(startLocationHub)}\n \n {startLocation}\n \n
\n
\n {renderIcon(endLocationHub)}\n \n {endLocation}\n \n
\n
\n }\n className=\"w-6\"\n dataTestId=\"journey_date\"\n />\n\n }\n className=\"w-6\"\n dataTestId=\"journey_time\"\n />\n
\n {addons.length > 0 && }\n {addons.length > 0 && }\n \n \n );\n};\n\nexport default withLDConsumer()(JourneyOverviewBox);\n","import { Button } from '@transferz/fe-component-library/button';\nimport ChevronIcon from '@transferz/fe-component-library/chevron-icon';\nimport { useLocalize } from 'localize-react';\nimport React, { FunctionComponent } from 'react';\nimport YouTube from 'react-youtube';\n\ntype InstuctionalVideoProps = {\n isOpen: boolean;\n videoId: string;\n onClose: () => void;\n}\n\nconst InstructionalVideo: FunctionComponent = ({ videoId, onClose, isOpen }) => {\n const { translate } = useLocalize();\n\n const onVideoReady = (e: any) => {\n e.target.playVideo();\n };\n\n return (\n
\n
\n }\n iconPosition=\"left\"\n textColor=\"asphalt6\"\n onClick={onClose}\n className=\"back-button m-t-11\"\n />\n
\n \n
\n );\n};\n\nexport default InstructionalVideo;\n","import '@transferz/fe-component-library/style';\n\nimport { useQuery } from '@apollo/client';\nimport BottomDrawer from '@transferz/fe-component-library/bottom-drawer';\nimport { Button } from '@transferz/fe-component-library/button';\nimport ChevronIcon from '@transferz/fe-component-library/chevron-icon';\nimport CircleCheckIcon from '@transferz/fe-component-library/circle-check-icon';\nimport CircleXIcon from '@transferz/fe-component-library/circle-x-icon';\nimport ClockIcon from '@transferz/fe-component-library/clock-icon';\nimport Divider from '@transferz/fe-component-library/divider';\nimport Dropdown from '@transferz/fe-component-library/dropdown';\nimport Input from '@transferz/fe-component-library/input';\nimport Loader from '@transferz/fe-component-library/loader';\nimport NoResultsIcon from '@transferz/fe-component-library/no-results-icon';\nimport Notification from '@transferz/fe-component-library/notification';\nimport QuestionMarkIcon from '@transferz/fe-component-library/question-mark-icon';\nimport Tabs from '@transferz/fe-component-library/tabs';\nimport TrashIcon from '@transferz/fe-component-library/trash-icon';\nimport Typography from '@transferz/fe-component-library/typography';\nimport VideoCard from '@transferz/fe-component-library/video-card';\nimport { useLocalize } from 'localize-react';\nimport React, { ReactElement, useEffect, useState } from 'react';\nimport { Controller, FormProvider, useForm } from 'react-hook-form';\nimport { useNavigate, useParams } from 'react-router-dom';\n\nimport JourneyFilters from '../components/Journey/JourneyFilters';\nimport JourneyOverviewBox from '../components/JourneyOverviewBox';\nimport { GetCacheProfile } from '../models/graphql';\nimport { useSetApiError, useSetCacheProfile } from '../services/apolloCacheHooks';\nimport {\n useAssociateJourney,\n useDeleteJourney,\n useGetAssociatedJourneys,\n useGetJourneyByCode,\n usePruneJourneys,\n} from '../services/apolloNetworkHooks';\nimport { filterStatuses, routes } from '../services/constant';\nimport { useAddAction } from '../services/hooks/useAddAction';\nimport { useDataLayer } from '../services/hooks/useDataLayer';\nimport { Journey } from '../types/journey';\nimport { JourneyStatus } from '../types/journeyStatus';\nimport InstructionalVideo from './InstructionalVideo';\nimport { InstructionalVideoType } from './Support/Videos';\n\ntype JourneyFiltersType = {\n textSearch: string;\n pickupDateAfter: string;\n pickupDateBefore: string;\n includedStatuses: string[];\n};\n\nexport const JourneyFiltersDefault: JourneyFiltersType = {\n textSearch: '',\n pickupDateAfter: '',\n pickupDateBefore: '',\n includedStatuses: [],\n};\n\nconst JourneyOverview: () => ReactElement = function () {\n const { translate } = useLocalize();\n const navigate = useNavigate();\n const setCacheProfile = useSetCacheProfile();\n const { trackEvent } = useDataLayer();\n const { addAction } = useAddAction();\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n const { code } = useParams();\n const getAssociatedJourneys = useGetAssociatedJourneys();\n const getJourneyByCode = useGetJourneyByCode();\n const associateJourney = useAssociateJourney();\n const deleteJourney = useDeleteJourney();\n const pruneJourneys = usePruneJourneys();\n const [codeInputError, setCodeInputError] = useState('');\n const [loading, setLoading] = useState(true);\n const [isCodeValid, setIsCodeValid] = useState(false);\n const [activeTab, setActiveTab] = useState('upcoming');\n const [journeys, setJourneys] = useState();\n const [helpDrawer, setHelpDrawer] = useState(false);\n const [videoId, setVideoId] = useState('');\n const setApiError = useSetApiError();\n const [uncompletedJourneysNotification, setUncompletedJourneysNotification] = useState(false);\n const [deleteJourneyDrawer, setDeleteJourneyDrawer] = useState(false);\n const [pruneJourneysDrawer, setPruneJourneysDrawer] = useState(false);\n const [deleteJourneyCode, setDeleteJourneyCode] = useState('');\n const [loadingJourneys, setLoadingJourneys] = useState(true);\n\n const methods = useForm({\n defaultValues: {\n language: cachedProfileData.videoLang || 'en',\n driverCode: '',\n filters: JourneyFiltersDefault,\n },\n });\n\n const filters = methods.watch('filters');\n\n const tabs = [\n {\n label: translate('upcoming'),\n icon: ,\n active: activeTab === 'upcoming',\n tab: 'upcoming',\n },\n {\n label: translate('completed'),\n icon: ,\n active: activeTab === 'completed',\n tab: 'completed',\n },\n {\n label: translate('cancelled'),\n icon: ,\n active: activeTab === 'cancelled',\n tab: 'cancelled',\n },\n ];\n\n const languages = [\n { value: 'en', label: `${translate('english')} (EN)`, icon: 'gb' },\n { value: 'it', label: `${translate('italian')} (IT)`, icon: 'it' },\n { value: 'es', label: `${translate('spanish')} (ES)`, icon: 'es' },\n { value: 'pt', label: `${translate('portuguese')} (PT)`, icon: 'pt' },\n { value: 'de', label: `${translate('german')} (DE)`, icon: 'de' },\n ];\n\n const videos: { [key: string]: InstructionalVideoType } = {\n en: {\n title: 'How to add driver codes using the transferz Driver app',\n videoId: '6pKXSAv4J8g',\n duration: 83,\n cover: 'phone',\n },\n it: {\n title: \"Come aggiungere i codici per conducenti utilizzando l'applicazione di Transferz per conducenti\",\n videoId: 'xpidbqj1O8s',\n duration: 91,\n cover: 'phone',\n },\n es: {\n title: 'Cómo agregar códigos de conductor usando la aplicación Transferz Driver',\n videoId: 'F8fztwfVuRM',\n duration: 84,\n cover: 'phone',\n },\n pt: {\n title: \"Como adicionar códigos de motorista usando o 'Driver App' da Transferz\",\n videoId: '4ESlyjtUNts',\n duration: 342,\n cover: 'phone',\n },\n de: {\n title: 'Hinzufügen von Fahrercodes mit der transferz Driver App',\n videoId: 'RPi4M4zooPc',\n duration: 119,\n cover: 'phone',\n },\n };\n\n const codeValue = methods.watch('driverCode');\n const currentLanguage = methods.watch('language');\n const sortUpcomingJourneys = (items: Journey[]) => {\n const currentDate = new Date();\n const delayed = items.filter((journey: Journey) => new Date(journey.execution.pickupDate) < currentDate);\n const onTime = items.filter((journey: Journey) => new Date(journey.execution.pickupDate) >= currentDate);\n\n return [\n ...delayed.sort((a, b) => Date.parse(a.execution.pickupDate) - Date.parse(b.execution.pickupDate)),\n ...onTime.sort((a, b) => Date.parse(a.execution.pickupDate) - Date.parse(b.execution.pickupDate)),\n ];\n };\n\n const getJourneys = () => {\n if (filters.includedStatuses.length === 0) return setLoading(false);\n\n getAssociatedJourneys(filters, (data: any) => {\n if (data.success) {\n const items: Journey[] = data?.items;\n const sortedJourneys: Journey[] =\n activeTab === 'upcoming'\n ? sortUpcomingJourneys(items)\n : items.sort((a, b) => Date.parse(b.execution.pickupDate) - Date.parse(a.execution.pickupDate));\n setJourneys(sortedJourneys);\n setLoadingJourneys(false);\n console.log(`INFO Retrieved ${sortedJourneys.length} ${activeTab} journeys`);\n }\n else {\n setApiError(true);\n setLoading(false);\n }\n });\n };\n\n const addJourney = () => {\n const driverCode = codeValue.replace(/ /g, '').toUpperCase();\n console.log(`DEBUG User clicked on Add button. Adding journey with driver code ${driverCode}`);\n\n const handleFailedResponse = () => {\n setLoading(false);\n setIsCodeValid(false);\n setCodeInputError(translate('incorrect_code'));\n };\n\n setLoading(true);\n\n getJourneyByCode(driverCode, (getJourneyData: any) => {\n if (getJourneyData?.success) {\n associateJourney(driverCode, (associateJourneyData: any) => {\n if (associateJourneyData.success) {\n setCodeInputError('');\n setIsCodeValid(true);\n getJourneys();\n trackEvent({\n event: 'journey-added',\n driverCode,\n journeyCode: associateJourneyData?.info?.journeyCode,\n });\n addAction('journey-added', {\n driverCode,\n journeyCode: associateJourneyData?.info?.journeyCode,\n });\n setTimeout(() => {\n console.log(`INFO Navigating to journey details page for journey ${driverCode}`);\n navigate(`${routes.journey}/${driverCode}`, { state: { notification: 'addJourneySuccess' } });\n }, 500);\n }\n else {\n handleFailedResponse();\n }\n });\n }\n else {\n handleFailedResponse();\n }\n });\n };\n\n const handleTabClick = (tab: string) => {\n setActiveTab(tab);\n setLoadingJourneys(true);\n console.log(`DEBUG Retrieving the list of ${tab} journeys...`);\n\n methods.setValue('filters', {\n ...JourneyFiltersDefault,\n includedStatuses: filterStatuses[tab],\n });\n };\n\n const toggleHelpDrawer = () => {\n setHelpDrawer(!helpDrawer);\n };\n\n const navigateToSupportVideos = () => {\n navigate(routes.support);\n };\n\n const openDeleteJourneyDrawer = (driverCode: string) => {\n setDeleteJourneyDrawer(true);\n setDeleteJourneyCode(driverCode);\n };\n\n const handleDeleteJourney = () => {\n deleteJourney(deleteJourneyCode, (deleteJourneyData: any) => {\n if (deleteJourneyData.success) {\n getJourneys();\n setDeleteJourneyDrawer(false);\n setDeleteJourneyCode('');\n }\n });\n };\n\n const openPruneJourneysDrawer = () => {\n setPruneJourneysDrawer(true);\n };\n\n const handlePruneJourneys = () => {\n const statuses =\n activeTab === 'completed'\n ? [JourneyStatus.COMPLETED]\n : [JourneyStatus.CANCELLED, JourneyStatus.NO_LONGER_AVAILABLE];\n\n pruneJourneys(statuses, (pruneJourneysData: any) => {\n if (pruneJourneysData.success) {\n getJourneys();\n setPruneJourneysDrawer(false);\n }\n });\n };\n\n useEffect(() => {\n if (activeTab === 'upcoming') {\n journeys?.forEach((journey: Journey) => {\n const journeyStarted =\n journey.status === JourneyStatus.JOURNEY_IN_PROGRESS ||\n journey.status === JourneyStatus.UNDERWAY_TO_PICKUP ||\n journey.status === JourneyStatus.ARRIVED_AT_PICKUP;\n\n const refDate = Date.now() - 1000 * 60 * 60 * 3;\n\n if (journeyStarted && new Date(journey.execution.pickupDate) < new Date(refDate)) {\n setUncompletedJourneysNotification(true);\n }\n });\n }\n }, [activeTab, journeys]);\n\n useEffect(() => {\n if (isCodeValid) {\n setIsCodeValid(false);\n }\n }, [codeValue]);\n\n useEffect(() => {\n getJourneys();\n }, [filters, filters.textSearch]);\n\n useEffect(() => {\n // If driver opened a driver link with a code\n console.log('INFO Journey overview page loaded');\n if (code && code.length >= 6) {\n return navigate(`${routes.journey}/${code}`);\n }\n }, []);\n\n if (loading) {\n console.log('INFO Loading Journey Overview page...');\n return ;\n }\n\n return (\n
\n \n {translate('page_title')}\n \n
\n \n {translate('page_subtitle')}\n \n \n
\n
\n
\n {\n e.target.value = e.target.value\n .replace(/ /g, '')\n .replace(/(.{3})/g, '$1 ')\n .trim();\n methods.setValue('driverCode', e.target.value);\n }}\n maxLength={11}\n />\n
\n \n \n
\n
\n {uncompletedJourneysNotification && (\n
\n \n
\n )}\n
\n \n
\n {loadingJourneys ? (\n
\n \n
\n ) : (\n <>\n {activeTab === 'upcoming' ? (\n <>\n \n
getJourneys())}>\n \n \n
\n {!journeys?.length && (\n }\n variant=\"info\"\n message={translate('no_journeys_found_title')}\n additionalText={translate('No_journeys_found_text')}\n />\n )}\n \n ) : (\n
\n \n \n \n {translate(activeTab === 'completed' ? 'clear_completed_button' : 'clear_cancelled_button')}\n \n
\n \n )}\n\n {journeys ? (\n
\n {journeys?.map((journey: Journey) => (\n {\n console.log(`DEBUG User clicked on journey ${journey.driverCode}, opening details page...`);\n navigate(`${routes.journey}/${journey.driverCode}`);\n }}\n startLocation={journey?.originLocation?.address?.formattedAddress || translate('N_A')}\n endLocation={journey?.destinationLocation?.address?.formattedAddress || translate('N_A')}\n status={journey.status}\n pickupDate={journey?.execution?.pickupDate}\n startLocationHub={journey?.originLocation?.hubInfo?.hubType}\n endLocationHub={journey?.destinationLocation?.hubInfo?.hubType}\n addons={journey?.addons}\n handleDelete={() => openDeleteJourneyDrawer(journey?.driverCode)}\n flightNumber={journey.traveller.flightNumber}\n estimatedTime={journey.flightInfo?.estimatedTime || ''}\n scheduledTime={journey.flightInfo?.scheduledTime || ''}\n delay={journey.flightInfo?.delay}\n flightStatus={journey.flightInfo?.status}\n shipName={journey?.traveller?.shipName}\n />\n ))}\n
\n ) : (\n activeTab === 'upcoming' && (\n
\n \n {translate('available_journeys')}\n \n {translate('no_upcoming_journeys')}\n
\n )\n )}\n \n )}\n\n \n \n (\n {\n // @ts-ignore\n setCacheProfile({ videoLang: lang.value }).then(() => {\n onChange(lang.value);\n });\n }}\n onBlur={onBlur}\n className=\"m-b-24\"\n noValidation\n />\n )}\n />\n setVideoId(videos[currentLanguage].videoId)}\n cover={videos[currentLanguage].cover as any}\n className=\"m-b-24\"\n />\n \n }\n iconPosition=\"right\"\n variant=\"info\"\n priority=\"primary\"\n className=\"m-b-10\"\n onClick={navigateToSupportVideos}\n />\n \n setDeleteJourneyDrawer(false)}\n >\n }\n iconPosition=\"left\"\n fullWidth\n onClick={handleDeleteJourney}\n className=\"m-b-10\"\n />\n \n setPruneJourneysDrawer(false)}\n >\n }\n iconPosition=\"left\"\n fullWidth\n onClick={handlePruneJourneys}\n className=\"m-b-10\"\n />\n \n setVideoId('')} />\n \n );\n};\n\nexport default JourneyOverview;\n","import Typography from '@transferz/fe-component-library/typography';\nimport XIcon from '@transferz/fe-component-library/x-icon';\nimport { useLocalize } from 'localize-react';\nimport React from 'react';\n\ntype Props = {\n file: string;\n deleteFile?: ()=>void;\n}\n\nconst FilePreview = ({ file = 'test file', deleteFile }: Props) => (\n
\n {file}\n \n
\n);\n\nexport default FilePreview;\n","import './fileUpload.scss';\n\nimport React, { ChangeEventHandler, FunctionComponent, ReactElement } from 'react';\n\ntype FileUploadProps = {\n onChange: ChangeEventHandler;\n file?: string;\n className?: string;\n text: string;\n icon?: ReactElement;\n secondary?: boolean;\n}\n\nconst FileUpload: FunctionComponent = ({\n onChange,\n file = '',\n className = '',\n text = 'Upload',\n icon,\n secondary,\n}) => (\n
\n
\n \n \n
\n
\n);\n\nexport default FileUpload;\n","import './fileUpload.scss';\n\nimport React, { ChangeEventHandler, FunctionComponent, ReactElement } from 'react';\n\ntype FileUploadProps = {\n onChange: ChangeEventHandler;\n file?: string;\n className?: string;\n text: string;\n icon?: ReactElement;\n}\n\nconst FileUploadSecond: FunctionComponent = ({\n onChange,\n file = '',\n className = '',\n text = 'Upload',\n icon,\n}) => (\n
\n
\n \n \n
\n
\n);\n\nexport default FileUploadSecond;\n","import {\n useEffect, useState,\n} from 'react';\n\nconst useIsIos = () => {\n const [isIos, setIsIos] = useState(false);\n\n useEffect(() => {\n if (typeof window !== 'undefined') {\n const iOS = [\n 'iPad Simulator',\n 'iPhone Simulator',\n 'iPod Simulator',\n 'iPad',\n 'iPhone',\n 'iPod',\n ].includes(navigator.platform)\n // iPad on iOS 13 detection\n || (navigator.userAgent.includes('Mac') && 'ontouchend' in document);\n\n setIsIos(iOS);\n }\n }, []);\n\n return isIos;\n};\n\nexport default useIsIos;\n","/* eslint-disable */\nimport {\n useEffect, useState,\n} from 'react';\n\nconst useIsMobile = () => {\n const [isMobile, setIsMobile] = useState(false);\n\n useEffect(() => {\n if (typeof window !== 'undefined') {\n let check = false;\n\n // @ts-ignore\n (function (a) { if (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0, 4))) check = true; }(navigator.userAgent || navigator.vendor || window.opera));\n\n setIsMobile(check);\n }\n }, []);\n\n return isMobile;\n};\n\nexport default useIsMobile;\n","import Typography from '@transferz/fe-component-library/typography';\nimport React, { FunctionComponent, useEffect } from 'react';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport StickyBackButton from './StickyBackButton';\n\ninterface props {\n name: string;\n handleClick: any;\n}\n\nconst MeetSign: FunctionComponent = ({ name, handleClick }) => (\n \n
\n
\n \n
\n
\n \n {name}\n \n
\n
\n
\n);\n\nexport default MeetSign;\n","import BriefcaseIcon from '@transferz/fe-component-library/briefcase-icon';\nimport CalendarIcon from '@transferz/fe-component-library/calendar-icon';\nimport CarRightIcon from '@transferz/fe-component-library/car-right-icon';\nimport ClockIcon from '@transferz/fe-component-library/clock-icon';\nimport EyeIcon from '@transferz/fe-component-library/eye-icon';\nimport HashtagIcon from '@transferz/fe-component-library/hashtag-icon';\nimport LocationIcon from '@transferz/fe-component-library/location-icon';\nimport MapIcon from '@transferz/fe-component-library/map-icon';\nimport MeetingPoint from '@transferz/fe-component-library/meeting-point';\nimport MeetingPointIcon from '@transferz/fe-component-library/meeting-point-icon';\nimport PersonIcon from '@transferz/fe-component-library/person-icon';\nimport PlaneIcon from '@transferz/fe-component-library/plane-icon';\nimport PointOfInterestIcon from '@transferz/fe-component-library/point-of-interest-icon';\nimport SeaportIcon from '@transferz/fe-component-library/seaport-icon';\nimport TrainIcon from '@transferz/fe-component-library/train-icon';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { useLocalize } from 'localize-react';\nimport React, { FunctionComponent, useState } from 'react';\n\nimport { Journey } from '../../types/journey';\nimport { JourneyStatus } from '../../types/journeyStatus';\nimport { parseDate, parseString } from '../../utils/parsingFunctions';\nimport useIsIos from '../../utils/useIsIos';\nimport useIsMobile from '../../utils/useIsMobile';\nimport MeetSign from '../Meet&GreetSign';\nimport JourneyInfoDetail from './JourneyInfoDetail';\n\ntype Props = {\n journey: Journey;\n status: JourneyStatus;\n};\n\nconst JourneyInfo: FunctionComponent = ({ journey, status }) => {\n const { translate } = useLocalize();\n const {\n execution: { pickupDate },\n traveller: { meetAndGreetSignText, passengerCount, luggageCount },\n execution: { vehicleCategory },\n } = journey;\n\n const date = parseDate(pickupDate);\n const time = pickupDate.split('T')[1].slice(0, -3);\n const isIos = useIsIos();\n const isIMobile = useIsMobile();\n const [showSignText, setShowSignText] = useState(false);\n const isAirport = (hubType: string) => hubType === 'AIRPORT';\n\n const openMap = (mapLocation: any) => {\n const address = mapLocation?.address?.originalAddress;\n\n if (address) {\n if (isIMobile) {\n window.open(isIos ? `maps:q=${encodeURIComponent(address)}` : `geo:0,0?q=${encodeURIComponent(address)}`);\n }\n else {\n window.open(`https://maps.google.com/?q=${encodeURIComponent(address)}`);\n }\n }\n };\n\n const startedJourney = Object.keys(JourneyStatus).indexOf(status) > 1;\n\n const renderIcon = (icon: string) => {\n switch (icon) {\n case 'AIRPORT':\n return ;\n case 'SEAPORT':\n return ;\n case 'TRAIN_STATION':\n return ;\n case 'POINT_OF_INTEREST':\n return ;\n default:\n return ;\n }\n };\n\n const originLocation = journey?.originLocation?.address;\n const destinationLocation = journey?.destinationLocation?.address;\n\n const renderAddressHeader = (originalAddress: string, formattedAddress: string, hubType: string) => {\n if (originalAddress) {\n return isAirport(hubType) ? originalAddress.slice(0, originalAddress.indexOf(',')) : originalAddress;\n }\n return isAirport(hubType) ? formattedAddress.slice(0, formattedAddress.indexOf(',')) : formattedAddress;\n };\n\n return (\n
\n \n Journey details\n \n }\n onClick={() => openMap(journey?.originLocation)}\n className=\"pointer m-b-16\"\n />\n {journey?.meetingPoint.title && (\n \n )}\n {journey.traveller.trainNumber && (\n }\n className=\"m-b-20 pointer\"\n />\n )}\n }\n onClick={() => openMap(journey?.destinationLocation)}\n className=\"m-b-20 pointer\"\n />\n
\n } className=\"w-6\" />\n } className=\"w-6\" />\n
\n
\n } />\n\n } />\n
\n }\n className=\"m-t-16 m-b-20\"\n />\n }\n text={translate('sign')}\n rightIcon={startedJourney && meetAndGreetSignText ? : undefined}\n onClick={() => {\n if (startedJourney && meetAndGreetSignText) {\n setShowSignText(true);\n }\n }}\n className=\"m-t-16 m-b-8\"\n />\n }\n text={translate('journey_code')}\n />\n\n {showSignText && (\n {\n setShowSignText(false);\n }}\n />\n )}\n
\n );\n};\n\nexport default JourneyInfo;\n","export enum JourneyActionTypeEnum {\n DRIVER_DELAYED = 'DRIVER_DELAYED',\n TRAVELLER_NO_SHOW = 'TRAVELLER_NO_SHOW',\n ADDITIONAL_PROOF_TRAVELLER_NO_SHOW = 'ADDITIONAL_PROOF_TRAVELLER_NO_SHOW',\n DRIVER_LEFT_PICKUP = 'DRIVER_LEFT_PICKUP',\n}\n\nexport enum JourneyActionTitles {\n DRIVER_DELAYED = 'reported_driver_late_less',\n TRAVELLER_NO_SHOW = 'reported_traveller_no_show',\n ADDITIONAL_PROOF_TRAVELLER_NO_SHOW = 'submitted_additional_proof',\n DRIVER_LEFT_PICKUP = 'l_issues_reported_driverLeftPickup',\n}\n\nexport type Pagination = {\n currentPage: number,\n pageSize: number,\n totalPages: number,\n totalResults: number\n}\n\nexport type JourneyAction = {\n id: number,\n journeyId: number,\n created: string,\n updated: string,\n type: JourneyActionTypeEnum,\n attachmentFileIds: number[];\n}\n\nexport type GetActionsResponse = {\n pagination: Pagination,\n results: JourneyAction[];\n}\n","import { Button } from '@transferz/fe-component-library/button';\nimport DangerIcon from '@transferz/fe-component-library/danger-icon';\nimport PhoneRingIcon from '@transferz/fe-component-library/phone-ring-icon';\nimport SmsIcon from '@transferz/fe-component-library/sms-icon';\nimport WhatsAppIcon from '@transferz/fe-component-library/whats-app-icon';\nimport { withLDConsumer } from 'launchdarkly-react-client-sdk';\nimport React, { FunctionComponent, useRef } from 'react';\n\ninterface JourneyInfoBoxButtonsProp {\n setJourneyIssuesDrawer: () => void;\n travellerPhone: string;\n status: string;\n notYetStarted?: boolean;\n availableForStarting?: boolean;\n isCancelled?: boolean;\n}\n\nconst JourneyInfoBoxButtons: FunctionComponent = ({\n setJourneyIssuesDrawer,\n travellerPhone,\n status,\n notYetStarted,\n availableForStarting,\n isCancelled,\n}) => {\n const callLinkRef = useRef(null);\n const smsLinkRef = useRef(null);\n const whatsAppLinkRef = useRef(null);\n\n return (\n
\n {\n console.log('DEBUG User clicked on phone icon, calling phone number...');\n callLinkRef.current?.click();\n }}\n priority=\"primary\"\n variant=\"info\"\n circle\n icon={}\n />\n {\n console.log('DEBUG User clicked on whats app icon, opening app...');\n whatsAppLinkRef?.current?.click();\n }}\n disabled={notYetStarted || isCancelled}\n priority=\"primary\"\n className=\"margin-left-8\"\n variant=\"confirm\"\n circle\n icon={}\n />\n {/* WhatsApp */}\n {\n console.log('DEBUG User clicked on sms icon, opening app...');\n smsLinkRef?.current?.click();\n }}\n disabled={notYetStarted || isCancelled}\n className=\"margin-left-8 transparent\"\n circle\n icon={}\n />\n }\n />\n \n .\n \n \n .\n \n \n .\n \n
\n );\n};\n\nexport default withLDConsumer()(JourneyInfoBoxButtons);\n","import Accordion from '@transferz/fe-component-library/accordion';\nimport DangerIcon from '@transferz/fe-component-library/danger-icon';\nimport Divider from '@transferz/fe-component-library/divider';\nimport NotesIcon from '@transferz/fe-component-library/notes-icon';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { useLocalize } from 'localize-react';\nimport React, { useMemo } from 'react';\n\nimport { JourneyAction, JourneyActionTitles } from '../../types/actions';\nimport { JourneyStatus } from '../../types/journeyStatus';\nimport { Traveller } from '../../types/traveller';\nimport { parseDate } from '../../utils/parsingFunctions';\nimport JourneyHeaderBox from './JourneyHeaderBox';\nimport JourneyInfoAddons from './JourneyInfoAddons';\nimport JourneyInfoBoxButtons from './JourneyInfoBoxButtons';\n\ninterface JourneyOverviewBoxProps {\n onClick?: () => void;\n driverCode: string;\n status?: JourneyStatus;\n setJourneyIssuesDrawer: () => void;\n traveller: Traveller;\n addons: any[];\n className?: string;\n actions: JourneyAction[];\n dangerIcon?: boolean;\n availableForStarting?: boolean;\n travellerPosition?: any;\n scrollToTravellerPosition: () => void;\n}\n\nconst JourneyInfoBox = ({\n onClick,\n driverCode,\n status,\n setJourneyIssuesDrawer,\n traveller,\n addons,\n className = '',\n actions,\n dangerIcon = false,\n availableForStarting,\n travellerPosition,\n scrollToTravellerPosition,\n}: JourneyOverviewBoxProps) => {\n const { translate } = useLocalize();\n const notYetStarted = !status || status === JourneyStatus.PLANNED || status === JourneyStatus.AVAILABLE;\n const isCancelled =\n status === JourneyStatus.CANCELLED ||\n status === JourneyStatus.NO_LONGER_AVAILABLE ||\n status === JourneyStatus.REASSIGNED_TRANSFER_COMPANY ||\n status === JourneyStatus.REASSIGNED_DRIVER;\n\n const infoMessage = notYetStarted || isCancelled ? translate('notification_message') : driverCode || 'N/A';\n // TODO Add a condition for journey issues once theyre added in api\n const actionsCount = actions?.length;\n const showDivider = traveller.driverComments || traveller.meetAndGreetSignText || !!actionsCount;\n const reportedIssues = useMemo(\n () => (\n
\n {actions &&\n actions.length > 0 &&\n actions.map((action: JourneyAction, index: number) => {\n const createdDateString = `${action.created}+00:00`;\n const createdDate = new Date(createdDateString);\n const date = parseDate(createdDateString);\n const hours = createdDate.getHours().toString();\n const minutes = createdDate.getMinutes().toString();\n const time = `${hours.length > 1 ? hours : `0${hours}`}:${minutes.length > 1 ? minutes : `0${minutes}`}`;\n return (\n
\n \n {translate(JourneyActionTitles[action.type])}\n \n {`${date}, ${time}`}\n {index < actionsCount - 1 && }\n
\n );\n })}\n
\n ),\n [actions],\n );\n\n return (\n
\n \n
\n \n {notYetStarted || isCancelled ? driverCode : `${traveller.firstName} ${traveller.lastName}`}\n \n \n {infoMessage}\n \n setJourneyIssuesDrawer()}\n travellerPhone={traveller?.phoneVerificationInfo?.formattedPhone || traveller.phone}\n status={status!}\n notYetStarted={notYetStarted}\n isCancelled={isCancelled}\n availableForStarting={availableForStarting}\n />\n {!!addons.length && }\n {showDivider && }\n {traveller.driverComments && (\n }\n text={traveller.driverComments}\n className={`comment-accordion ${!actionsCount ? 'no-border' : ''}`}\n />\n )}\n {!!actionsCount && (\n }\n title={`${actionsCount} ${translate(actionsCount > 1 ? 'issues_reported' : 'issue_reported_singular')}`}\n nodeElement={reportedIssues}\n className=\"issues-accordion\"\n />\n )}\n {travellerPosition?.position\n && (status === JourneyStatus.ARRIVED_AT_PICKUP || status === JourneyStatus.UNDERWAY_TO_PICKUP)\n && (\n scrollToTravellerPosition()}\n data-testid=\"scroll_to_journey-button\"\n >\n Show traveller location\n \n )}\n
\n
\n );\n};\n\nexport default JourneyInfoBox;\n","import BriefcaseIcon from '@transferz/fe-component-library/briefcase-icon';\nimport { Button } from '@transferz/fe-component-library/button';\nimport CircleXIcon from '@transferz/fe-component-library/circle-x-icon';\nimport ClockIcon from '@transferz/fe-component-library/clock-icon';\nimport DangerIcon from '@transferz/fe-component-library/danger-icon';\nimport LocationIcon from '@transferz/fe-component-library/location-icon';\nimport PhoneRingIcon from '@transferz/fe-component-library/phone-ring-icon';\nimport PlusPersonIcon from '@transferz/fe-component-library/plus-person-icon';\nimport SadFaceIcon from '@transferz/fe-component-library/sad-face-icon';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { withLDConsumer } from 'launchdarkly-react-client-sdk';\nimport { useLocalize } from 'localize-react';\nimport React, { FunctionComponent } from 'react';\n\nimport { PickupIssuesEnum } from '../../pages/JourneyPage';\nimport { JourneyAction, JourneyActionTypeEnum } from '../../types/actions';\nimport { JourneyStatus } from '../../types/journeyStatus';\n\ntype PickupIssuesProps = {\n status: JourneyStatus;\n openSingleIssue: (issue: keyof typeof PickupIssuesEnum) => void;\n callCustomerService: () => void;\n openSuccessPage: () => void;\n flags?: any;\n actions: JourneyAction[];\n};\n\nconst PickupIssues: FunctionComponent = ({\n status,\n openSingleIssue,\n callCustomerService,\n openSuccessPage,\n flags,\n actions,\n}) => {\n const isDisabled = status === JourneyStatus.PLANNED || status === JourneyStatus.AVAILABLE;\n const { translate } = useLocalize();\n\n const travelerNoShowSubmited = actions?.find((item: any) => item.type === JourneyActionTypeEnum.TRAVELLER_NO_SHOW);\n const driverLeftSubmitted = actions?.find((item: any) => item.type === JourneyActionTypeEnum.DRIVER_LEFT_PICKUP);\n const additionalNoShowProofSubmitted = actions?.find((item: any) => item.type === JourneyActionTypeEnum.ADDITIONAL_PROOF_TRAVELLER_NO_SHOW);\n\n const reportTravelerNoShow = () => {\n openSingleIssue('cannot_find_traveller');\n };\n\n const getDriverLeftLabel = () => {\n if (!driverLeftSubmitted && !travelerNoShowSubmited && !additionalNoShowProofSubmitted) {\n return translate('b_cannotFindTravellerLeaving');\n }\n\n if (driverLeftSubmitted && !travelerNoShowSubmited) {\n return translate('b_report_traveller_no_show');\n }\n\n if (travelerNoShowSubmited) {\n return translate('b_add_additional_proof');\n }\n\n return translate('b_cannotFindTravellerLeaving');\n };\n\n return (\n
\n \n {translate('capacity_addons_issues')}\n \n }\n variant=\"cancel\"\n data-testid=\"too_many_travellers\"\n disabled={isDisabled}\n textColor={isDisabled ? 'asphalt4' : 'red5'}\n className=\"m-b-16\"\n onClick={() => {\n console.log('DEBUG User clicked on too many travellers issue, opening drawer...');\n openSingleIssue('too_many_travellers');\n }}\n />\n }\n variant=\"cancel\"\n disabled={isDisabled}\n data-testid=\"to_many_suitcases\"\n textColor={isDisabled ? 'asphalt4' : 'red5'}\n className=\"m-b-16\"\n onClick={() => {\n console.log('DEBUG User clicked on too many suitcases, opening drawer...');\n openSingleIssue('too_many_suitcases');\n }}\n />\n }\n data-testid=\"missing_addons\"\n variant=\"cancel\"\n disabled={isDisabled}\n textColor={isDisabled ? 'asphalt4' : 'red5'}\n className=\"m-b-32\"\n onClick={() => {\n console.log('DEBUG User clicked on missing addons, opening drawer...');\n openSingleIssue('missing_addons');\n }}\n />\n {flags.driverIssues && (\n <>\n \n {translate('driver_issues')}\n \n }\n variant=\"cancel\"\n textColor=\"red5\"\n className=\"m-b-16\"\n data-testid=\"im_too_late\"\n onClick={() => {\n console.log('DEBUG User clicked on im too late, opening drawer...');\n openSingleIssue('im_too_late');\n }}\n />\n }\n variant=\"cancel\"\n textColor=\"red5\"\n data-testid=\"blockage_at_pickup_point\"\n className=\"m-b-32\"\n onClick={() => {\n console.log('DEBUG User clicked on blockage at pickup point, opening drawer...');\n openSingleIssue('blockage_at_pickup_point');\n }}\n />\n \n )}\n \n {translate('traveller_issues')}\n \n {flags.driverLeft ? (\n }\n data-testid=\"cannot_find_traveller\"\n variant=\"cancel\"\n textColor={isDisabled ? 'asphalt4' : 'red5'}\n disabled={isDisabled}\n className=\"m-b-16\"\n onClick={() => (travelerNoShowSubmited ? openSuccessPage() : reportTravelerNoShow())}\n />\n ) :\n (\n }\n variant=\"cancel\"\n textColor={isDisabled ? 'asphalt4' : 'red5'}\n disabled={isDisabled}\n className=\"m-b-16\"\n data-testid=\"cannot_find_traveller\"\n onClick={() => (travelerNoShowSubmited ? openSuccessPage() : openSingleIssue('cannot_find_traveller'))}\n />\n )}\n }\n variant=\"cancel\"\n textColor={isDisabled ? 'asphalt4' : 'red5'}\n className=\"m-b-32\"\n data-testid=\"refuses_to_get_in_car\"\n disabled={isDisabled}\n onClick={() => {\n console.log('DEBUG User clicked on refuses to get in car, opening drawer...');\n openSingleIssue('refuses_to_get_in_car');\n }}\n />\n \n {translate('other_issues')}\n \n }\n iconPosition=\"left\"\n onClick={() => {\n console.log('DEBUG User clicked on call customer service, opening drawer...');\n callCustomerService();\n }}\n className=\"m-b-10\"\n />\n
\n );\n};\n\nexport default withLDConsumer()(PickupIssues);\n","import { useLazyQuery } from '@apollo/client';\n\nimport createActionQuery from '../../models/graphql/CreateAction';\nimport { JourneyActionTypeEnum } from '../../types/actions';\nimport { Position } from '../../types/journey';\nimport { useAuthenticatedQuery } from './useAuthenticatedQuery';\n\nexport const useCreateAction = () => {\n const authenticatedQuery = useAuthenticatedQuery();\n const [createAction] = useLazyQuery(createActionQuery, {\n fetchPolicy: 'no-cache',\n });\n\n return (\n journeyId: number,\n type: JourneyActionTypeEnum,\n position: Position,\n callback: (data: any) => void,\n ) => authenticatedQuery((accessToken) => {\n createAction({\n variables: {\n journeyId,\n type,\n position,\n accessToken,\n },\n }).then(async (res) => {\n if (res?.data?.createAction?.success) {\n console.log(res.data.createAction);\n }\n\n if (callback) callback(res?.data?.createAction);\n });\n });\n};\n","import BottomDrawer from '@transferz/fe-component-library/bottom-drawer';\nimport { Button } from '@transferz/fe-component-library/button';\nimport Checkbox from '@transferz/fe-component-library/checkbox';\nimport ChevronIcon from '@transferz/fe-component-library/chevron-icon';\nimport MinusPersonIcon from '@transferz/fe-component-library/minus-person-icon';\nimport Notification from '@transferz/fe-component-library/notification';\nimport PhoneRingIcon from '@transferz/fe-component-library/phone-ring-icon';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { useLocalize } from 'localize-react';\nimport React, { FunctionComponent, useEffect, useState } from 'react';\n\nimport { PickupIssuesEnum, SingleIssue } from '../../pages/JourneyPage';\nimport { useCreateAction } from '../../services/apolloNetworkHooks/useCreateJourneyAction';\nimport { useAddAction } from '../../services/hooks/useAddAction';\nimport { useDataLayer } from '../../services/hooks/useDataLayer';\nimport { JourneyAction, JourneyActionTypeEnum } from '../../types/actions';\n\ntype SingleIssueDrawerProps = {\n issue: SingleIssue | null;\n isOpen: boolean;\n onClose: () => void;\n goBack: () => void;\n callTransferCompany?: () => void;\n callCustomerService?: () => void;\n openSubmitProofDrawer?: () => void;\n actions: JourneyAction[];\n getActions: () => void;\n journeyId: number;\n journeyCode?: string;\n driverCode?: string;\n};\n\nconst SingleIssueDrawer: FunctionComponent = ({\n issue,\n isOpen,\n onClose,\n goBack,\n callTransferCompany,\n callCustomerService,\n openSubmitProofDrawer,\n actions,\n getActions,\n journeyId,\n journeyCode,\n driverCode,\n}) => {\n const [reportedDelayDrawer, setReportedDelayDrawer] = useState(false);\n const [isChecked, setIsChecked] = useState(false);\n const [position, setPosition] = useState({} as any);\n const { translate } = useLocalize();\n const createAction = useCreateAction();\n const { trackEvent } = useDataLayer();\n const { addAction } = useAddAction();\n\n const reportDriverDelayed = () => {\n console.log('DEBUG User clicked report driver delayed button, opened drawer');\n createAction(journeyId, JourneyActionTypeEnum.DRIVER_DELAYED, position, () => {\n console.log('INFO Delay reported action created successfully');\n getActions();\n });\n onClose();\n setReportedDelayDrawer(true);\n trackEvent({\n event: 'submitted-delay',\n journeyCode,\n driverCode,\n });\n addAction('submitted-delay', {\n journeyCode,\n driverCode,\n });\n };\n\n const reportedDriverDelayed =\n actions?.length && !!actions.find((action: JourneyAction) => action.type === JourneyActionTypeEnum.DRIVER_DELAYED);\n\n const reportedDriverLeft =\n actions?.length && !!actions.find((action: JourneyAction) => action.type === JourneyActionTypeEnum.DRIVER_LEFT_PICKUP);\n\n const onCheckboxChange = () => {\n setIsChecked(!isChecked);\n console.log(`DEBUG User clicked checkbox, changed to ${!isChecked}`);\n };\n\n useEffect(() => {\n setIsChecked(false);\n }, [isOpen]);\n\n useEffect(() => {\n if (!reportedDriverLeft && issue?.type === PickupIssuesEnum.cannot_find_traveller) {\n console.log('DEBUG User clicked report driver leave');\n createAction(journeyId, JourneyActionTypeEnum.DRIVER_LEFT_PICKUP, position, () => {\n console.log('INFO Driver left reported action created successfully');\n getActions();\n });\n }\n }, [issue]);\n\n useEffect(() => {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(\n (pos) => {\n setPosition({\n lat: pos?.coords?.latitude,\n lng: pos?.coords?.longitude,\n });\n },\n () => {\n setPosition({\n lat: null,\n lng: null,\n });\n },\n );\n }\n }, []);\n\n const renderContent = () => {\n if (isOpen) {\n console.log(`INFO Drawer opened with issue type: ${issue?.type}`);\n }\n switch (issue?.type) {\n case 'too_many_travellers':\n case 'too_many_suitcases':\n case 'missing_addons':\n return (\n }\n iconPosition=\"left\"\n onClick={callTransferCompany && callTransferCompany}\n />\n );\n case 'im_too_late':\n case 'blockage_at_pickup_point':\n return (\n <>\n {reportedDriverDelayed ? (\n \n ) : (\n \n )}\n \n {translate('your_delay_is')}\n {' '}\n \n {' '}\n {translate('more_than_15_minutes')}\n \n {translate('please_call_transfer_company')}\n \n }\n iconPosition=\"left\"\n onClick={callTransferCompany && callTransferCompany}\n className=\"m-b-36\"\n />\n \n {translate('cannot_reach_transfer_company')}\n \n }\n iconPosition=\"left\"\n onClick={callCustomerService && callCustomerService}\n />\n \n );\n case 'refuses_to_get_in_car':\n return (\n }\n iconPosition=\"left\"\n onClick={callCustomerService && callCustomerService}\n />\n );\n case 'cannot_find_traveller':\n return (\n <>\n
\n \n
\n }\n iconPosition=\"left\"\n label={translate('traveller_noShow')}\n variant=\"info\"\n priority=\"primary\"\n fullWidth\n disabled={!isChecked}\n className=\"m-b-10\"\n data-testid=\"report_no-show\"\n onClick={openSubmitProofDrawer && openSubmitProofDrawer}\n />\n \n );\n default:\n }\n };\n return (\n <>\n \n {renderContent()}\n \n setReportedDelayDrawer(false)}\n >\n }\n iconPosition=\"left\"\n fullWidth\n onClick={() => setReportedDelayDrawer(false)}\n className=\"m-b-10\"\n data-testid=\"reportedDelay_button\"\n />\n \n \n );\n};\n\nexport default SingleIssueDrawer;\n","import CarRightIcon from '@transferz/fe-component-library/car-right-icon';\nimport CircleCheckIcon from '@transferz/fe-component-library/circle-check-icon';\nimport LocationIcon from '@transferz/fe-component-library/location-icon';\nimport React from 'react';\n\nimport { JourneyStatus } from '../types/journeyStatus';\n\ninterface ProgressBarStatusProps {journeyStatus?: JourneyStatus, assignedToAnotherDriver?: boolean}\n\nconst ProgressBarStatus = ({ journeyStatus = JourneyStatus.AVAILABLE, assignedToAnotherDriver = true }: ProgressBarStatusProps) => {\n const currentStatus = () => {\n if (!assignedToAnotherDriver) return '';\n const status = journeyStatus?.toString().toLocaleLowerCase();\n return status;\n };\n\n return (\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n );\n};\n\nexport default ProgressBarStatus;\n","import React from 'react';\n\nimport { JourneyStatus } from '../types/journeyStatus';\n\ninterface ProgressBarStatusProps {\n journeyStatus?: JourneyStatus,\n assignedToAnotherDriver?: boolean,\n setShowProgresBarStatus: () => void\n}\n\nconst ProgressBarStatusButton = ({\n journeyStatus = JourneyStatus.AVAILABLE,\n assignedToAnotherDriver = true,\n setShowProgresBarStatus,\n}: ProgressBarStatusProps) => {\n const currentStatus = () => {\n if (!assignedToAnotherDriver) return '';\n const status = journeyStatus?.toString().toLocaleLowerCase();\n return status;\n };\n\n return (\n
\n
\n
\n
\n
\n
\n );\n};\n\nexport default ProgressBarStatusButton;\n","import GeoMap from '@transferz/fe-component-library/geo-map';\nimport React, { useEffect, useRef, useState } from 'react';\n\nexport const GeoPoint: any = (props: any) => {\n const {\n position,\n travellerPosition,\n center,\n zoom = 12,\n draggable = true,\n googleApiKey,\n } = props;\n const [positionId, setPositionId] = useState();\n const [userPosition, setUserPosition] = useState();\n const markerRef = useRef(null) as any;\n const userPositionIconRef = useRef(null) as any;\n const travellerPositionIconRef = useRef(null) as any;\n const mapRef = useRef(null) as any;\n const mapsRef = useRef(null) as any;\n\n const haversineDistance = (pos1: any, pos2: any) => {\n // Radius of the Earth in km\n const R = 6371.1;\n // Convert degrees to radians\n const rlat1 = pos1.lat * (Math.PI / 180);\n // Convert degrees to radians\n const rlat2 = pos2.lat * (Math.PI / 180);\n // Radian difference (latitudes)\n const difflat = rlat2 - rlat1;\n // Radian difference (longitudes)\n const difflon = (pos2.lng - pos1.lng) * (Math.PI / 180);\n\n // eslint-disable-next-line no-mixed-operators\n return 2 * R * Math.asin(Math.sqrt(Math.sin(difflat / 2) * Math.sin(difflat / 2) +\n Math.cos(rlat1) * Math.cos(rlat2) * Math.sin(difflon / 2) * Math.sin(difflon / 2)));\n };\n\n const addUserIcon = ({ map }: any, pos: any) => {\n if (userPositionIconRef.current) {\n userPositionIconRef.current.setMap(null);\n }\n userPositionIconRef.current = new google.maps.Marker({\n position: pos,\n icon: {\n anchor: new google.maps.Point(16, 16),\n // eslint-disable-next-line no-multi-str\n url: 'data:image/svg+xml;utf-8, \\\n ',\n },\n map,\n });\n };\n\n const addMarker = ({ map, maps }: any, markerPos: any) => {\n if (markerRef.current) {\n markerRef.current.setMap(null);\n }\n navigator.geolocation.getCurrentPosition((pos) => {\n const userPos = { lat: pos.coords.latitude, lng: pos.coords.longitude };\n addUserIcon({ map }, userPos);\n setUserPosition(userPos);\n if (haversineDistance(position, userPos) < 5) {\n const bounds = new maps.LatLngBounds();\n bounds.extend(position);\n bounds.extend({ lat: userPosition.coords.latitude, lng: userPosition.coords.longitude });\n map.fitBounds(bounds);\n }\n });\n const id = navigator.geolocation.watchPosition((pos) => {\n const userPos = { lat: pos.coords.latitude, lng: pos.coords.longitude };\n addUserIcon({ map }, { lat: pos.coords.latitude, lng: pos.coords.longitude });\n setUserPosition(userPos);\n });\n setPositionId(id);\n if (markerRef) {\n markerRef.current = new maps.Marker({\n markerPos,\n map,\n draggable,\n });\n }\n };\n\n const handleApiLoaded = ({ map, maps }: any) => {\n mapRef.current = map;\n mapsRef.current = maps;\n if (position?.lat && position?.lng) {\n addMarker({ map, maps }, position);\n }\n };\n\n const addTravellerIcon = ({ map }: any) => {\n if (travellerPositionIconRef.current) {\n travellerPositionIconRef.current.setMap(null);\n }\n const svg =\n `\n \nCreated with Fabric.js 5.2.4\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n`;\n\n travellerPositionIconRef.current = new google.maps.Marker({\n position: travellerPosition.position,\n optimized: false,\n icon: {\n anchor: new google.maps.Point(16, 16),\n scaledSize: new google.maps.Size(45, 45),\n url: 'data:image/svg+xml;utf-8,' + encodeURIComponent(svg),\n },\n map,\n });\n };\n\n useEffect(() => {\n if (travellerPosition && mapRef.current) {\n addTravellerIcon({ map: mapRef.current });\n }\n }, [travellerPosition]);\n\n useEffect(() => () => {\n navigator.geolocation.clearWatch(positionId);\n }, [positionId]);\n\n return (\n
\n \n
\n );\n};\n","import Typography from '@transferz/fe-component-library/typography';\nimport { useLocalize } from 'localize-react';\nimport React, { forwardRef, PropsWithChildren } from 'react';\n\nimport { Journey } from '../../types/journey';\nimport { GeoPoint } from './GeoPoint';\n\ntype Props = {\n journey: Journey;\n googleApiKey: string;\n travellerPosition: any;\n};\n\n// eslint-disable-next-line react/display-name\nconst TravellerInfo = forwardRef>(({\n journey, googleApiKey, travellerPosition,\n}, ref) => {\n const { translate } = useLocalize();\n\n const timeDifference = (timeStr: string) => {\n // Parse the input time string and get the current time\n const inputTime = new Date(timeStr);\n const currentTime = new Date();\n const currentTimeUTC = new Date(\n currentTime.getUTCFullYear(),\n currentTime.getUTCMonth(),\n currentTime.getUTCDate(),\n currentTime.getUTCHours(),\n currentTime.getUTCMinutes(),\n currentTime.getUTCSeconds(),\n );\n\n const deltaMs = currentTimeUTC.getTime() - inputTime.getTime();\n const totalMinutes = Math.floor(deltaMs / 1000 / 60);\n const hours = Math.floor(totalMinutes / 60);\n const minutes = totalMinutes % 60;\n\n // Format the output\n if (hours === 1) {\n if (minutes) {\n return minutes === 1 ? `${hours} hour ${minutes} minute ago` : `${hours} hour ${minutes} minutes ago`;\n }\n return `${hours} hour ago`;\n }\n if (hours > 1) {\n if (minutes) {\n return minutes === 1 ? `${hours} hours ${minutes} minute ago` : `${hours} hours ${minutes} minutes ago`;\n }\n return `${hours} hours ago`;\n }\n return minutes === 1 ? `${minutes} minute ago` : `${minutes} minutes ago`;\n };\n\n return (\n
\n \n Traveller location\n \n \n \n \n \n \n \n \n \n
\n)}\n />\n {travellerPosition?.recordedAt && (\n
\n Traveller location updated\n {' '}\n {timeDifference(travellerPosition.recordedAt)}\n
\n )}\n
\n );\n});\n\nexport default TravellerInfo;\n","import { useLazyQuery } from '@apollo/client';\n\nimport { getFlightInfoQuery } from '../../models/graphql';\nimport { useAuthenticatedQuery } from './index';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const useGetFlightInfo = () => {\n const [\n getFlightInfo,\n {\n refetch: getFlightInfoRefetch,\n called,\n },\n ] = useLazyQuery(\n getFlightInfoQuery,\n {\n fetchPolicy: 'no-cache',\n },\n );\n\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n\n const handleNewData = (\n res: any,\n callback: (data: any) => void,\n ) => {\n if (callback) callback(res?.data?.getFlightInfo);\n };\n\n return (\n params: any,\n callback: (data: any) => void,\n ) => offlineProofQuery(() => authenticatedQuery((accessToken) => {\n if (called) {\n getFlightInfoRefetch({ params, accessToken })\n .then((res) => {\n handleNewData(res, callback);\n });\n }\n\n getFlightInfo({ variables: { params, accessToken } })\n .then((res) => {\n handleNewData(res, callback);\n });\n }));\n};\n","import { useLazyQuery } from '@apollo/client';\n\nimport { getTravellerPositionQuery } from '../../models/graphql';\nimport { useAuthenticatedQuery } from './index';\n\nexport const useGetTravellerPosition = () => {\n const [\n getTravellerPosition,\n {\n refetch: getTravellerPositionRefetch,\n called,\n },\n ] = useLazyQuery(\n getTravellerPositionQuery,\n {\n fetchPolicy: 'no-cache',\n },\n );\n\n const authenticatedQuery = useAuthenticatedQuery();\n\n return (\n journeyId: number,\n callback?: (data: any) => void,\n ) => {\n if (called) {\n return authenticatedQuery((accessToken) => getTravellerPositionRefetch({\n variables: {\n id: journeyId,\n accessToken,\n },\n }).then((res) => {\n console.log(res);\n if (callback) {\n callback(res.data.travellerPosition);\n }\n }));\n }\n\n return authenticatedQuery((accessToken) => getTravellerPosition({\n variables: {\n id: journeyId,\n accessToken,\n },\n }).then((res) => {\n console.log(res);\n if (callback) {\n callback(res.data.travellerPosition);\n }\n }));\n };\n};\n","import { useMutation } from '@apollo/client';\n\nimport { updateDriverPositionMutation } from '../../models/graphql';\nimport { useAuthenticatedQuery } from './index';\nimport { useOfflineProofQuery } from './useOfflineProofQuery';\n\nexport const useUpdateDriverPosition = () => {\n const authenticatedQuery = useAuthenticatedQuery();\n const offlineProofQuery = useOfflineProofQuery();\n const [updateDriverPosition] = useMutation(updateDriverPositionMutation, {\n fetchPolicy: 'no-cache',\n });\n\n const handleNewData = (\n res: any,\n callback: (data: any) => void,\n ) => {\n if (callback) callback(res);\n };\n\n return (\n id: number,\n lat: number,\n lng: number,\n callback: (data: any) => void,\n ) => offlineProofQuery(() => authenticatedQuery((accessToken) => {\n updateDriverPosition({\n variables: {\n id,\n lat,\n lng,\n accessToken,\n },\n }).then((res) => {\n handleNewData(res, callback);\n })\n .catch((e: any) => {\n console.log(e);\n });\n }));\n};\n","import { useQuery } from '@apollo/client';\nimport BottomDrawer from '@transferz/fe-component-library/bottom-drawer';\nimport { Button } from '@transferz/fe-component-library/button';\nimport CameraIcon from '@transferz/fe-component-library/camera-icon';\nimport CarRightIcon from '@transferz/fe-component-library/car-right-icon';\nimport ChevronIcon from '@transferz/fe-component-library/chevron-icon';\nimport CircleCheckIcon from '@transferz/fe-component-library/circle-check-icon';\nimport CirclePlusIcon from '@transferz/fe-component-library/circle-plus-icon';\nimport CircleXIcon from '@transferz/fe-component-library/circle-x-icon';\nimport { FlightStatusEnum, FlightTracker } from '@transferz/fe-component-library/flight-tracker';\nimport GeoDirection from '@transferz/fe-component-library/geo-direction';\nimport ImageUpload from '@transferz/fe-component-library/image-upload';\nimport Loader from '@transferz/fe-component-library/loader';\nimport LocationIcon from '@transferz/fe-component-library/location-icon';\nimport Notification from '@transferz/fe-component-library/notification';\nimport ShipIcon from '@transferz/fe-component-library/ship-icon';\nimport TimerIcon from '@transferz/fe-component-library/timer-icon';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { withLDConsumer } from 'launchdarkly-react-client-sdk';\nimport { useLocalize } from 'localize-react';\nimport React, {\n FunctionComponent, useEffect, useRef, useState,\n} from 'react';\nimport { useLocation, useNavigate, useParams } from 'react-router-dom';\n\nimport FilePreview from '../components/FilePreview';\nimport FileUpload from '../components/fileUpload/fileUpload';\nimport FileUploadSecond from '../components/fileUpload/fileUploadSecond';\nimport JourneyInfo from '../components/Journey/JourneyInfo';\nimport JourneyInfoBox from '../components/Journey/JourneyInfoBox';\nimport PickupIssues from '../components/PickupIssues/PickupIssues';\nimport SingleIssueDrawer from '../components/PickupIssues/SingleIssueDrawer';\nimport ProgressBarStatus from '../components/ProgressBarStatus';\nimport ProgressBarStatusButton from '../components/ProgressBarStatusButton';\nimport TravellerInfo from '../components/Traveller/TravellerInfo';\nimport { GetCacheJourneys, GetCacheProfile } from '../models/graphql';\nimport { useSetApiError, useSetCacheProfile } from '../services/apolloCacheHooks';\nimport {\n useAssociateJourney,\n useCreateAction,\n useGetAssociatedJourneys,\n useGetJourneyByCode,\n useGetPhoneByCountry,\n useGetPhoneByLocation,\n useSearchActions,\n useSetJourneyStatus,\n useUploadAttachment,\n} from '../services/apolloNetworkHooks';\nimport { useGetFlightInfo } from '../services/apolloNetworkHooks/useGetFlightInfo';\nimport { useGetTravellerPosition } from '../services/apolloNetworkHooks/useGetTravellerPosition';\nimport { useUpdateDriverPosition } from '../services/apolloNetworkHooks/useUpdateDriverPosition';\nimport { baseURL, filterStatuses, routes } from '../services/constant';\nimport { useAddAction } from '../services/hooks/useAddAction';\nimport { useDataLayer } from '../services/hooks/useDataLayer';\nimport { JourneyAction, JourneyActionTypeEnum } from '../types/actions';\nimport { FlightInfo, Journey } from '../types/journey';\nimport { JourneyStatus } from '../types/journeyStatus';\nimport { before24Hours } from '../utils/parsingFunctions';\nimport { JourneyFiltersDefault } from './JourneyOverview';\n\nlet buttonTimeout: ReturnType | null = null;\nlet completedMessageTimeout: ReturnType | null = null;\n\nexport enum PickupIssuesEnum {\n too_many_travellers = 'too_many_travellers',\n too_many_suitcases = 'too_many_suitcases',\n missing_addons = 'missing_addons',\n im_too_late = 'im_too_late',\n blockage_at_pickup_point = 'blockage_at_pickup_point',\n cannot_find_traveller = 'cannot_find_traveller',\n refuses_to_get_in_car = 'refuses_to_get_in_car',\n}\n\nexport type SingleIssue = {\n type: keyof typeof PickupIssuesEnum;\n title: string;\n text?: string;\n};\n\ntype FileType = {\n file: File | null;\n url: string;\n name: string;\n size: number;\n date: Date | number;\n};\n\nconst JourneyPage: FunctionComponent = ({ flags }) => {\n const classBase = 'journey-info-page';\n const navigate = useNavigate();\n const { translate } = useLocalize();\n const { trackEvent } = useDataLayer();\n const { addAction } = useAddAction();\n const [onMyWayButtonProgress, setOnMyWayButtonProgress] = useState(false);\n const [showProgresBarStatus, setShowProgresBarStatus] = useState(false);\n const [journey, setJourney] = useState(null);\n const [journeyStatus, setJourneyStatus] = useState();\n const [alreadyAssociated, setAlreadyAssociated] = useState(false);\n const [availableForStarting, setAvailableForStarting] = useState(false);\n const [loading, setLoading] = useState(true);\n const [loadingStatus, setLoadingStatus] = useState(false);\n const [completedMessage, setCompletedMessage] = useState(false);\n const [completedError, setCompletedError] = useState(false);\n const [assignedToAnotherDriver, setAssignedToAnotherDriver] = useState(false);\n const [journeyAdded, setJourneyAdded] = useState(false);\n const [completeJourneyDrawer, setCompleteJourneyDrawer] = useState(false);\n const [journeyIssuesDrawer, setJourneyIssuesDrawer] = useState(false);\n const [singleIssueDrawer, setSingleIssueDrawer] = useState(null);\n const [customerServicePhone, setCustomerServicePhone] = useState('');\n const [submitProofDrawer, setSubmitProofDrawer] = useState(false);\n const [locationPicture, setLocationPicture] = useState();\n const [otherProof, setOtherProof] = useState([]);\n const [submitProofSuccess, setSubmitProofSuccess] = useState(false);\n const [googleApiKey, setGoogleApiKey] = useState('');\n const [actions, setActions] = useState([]);\n const [showIcon, setShowIcon] = useState(false);\n const [disabledAtPickup, setDisabledAtPickup] = useState(true);\n const [canNotStartJourneyDrawer, setCanNotStartJourneyDrawer] = useState(false);\n const [flightInfo, setFlightInfo] = useState();\n const [flightInfoLoading, setFlightInfoLoading] = useState(false);\n const [driverPosition, setDriverPosition] = useState({} as any);\n const [uploadErrorMessage, setUploadErrorMessage] = useState(false);\n const [loadingButton, setLoadingButton] = useState(false);\n const [travellerPosition, setTravellerPosition] = useState();\n\n const intervalRef = useRef();\n const locationElementRef = useRef(null);\n\n const getAssociatedJourneys = useGetAssociatedJourneys();\n const getJourneyByCode = useGetJourneyByCode();\n const associateJourney = useAssociateJourney();\n const setCacheProfile = useSetCacheProfile();\n const changeJourneyStatus = useSetJourneyStatus();\n const setApiError = useSetApiError();\n const getPhoneByCountry = useGetPhoneByCountry();\n const getPhoneByLocation = useGetPhoneByLocation();\n const createAction = useCreateAction();\n const uploadAttachment = useUploadAttachment();\n const searchActions = useSearchActions();\n const getFlightInfo = useGetFlightInfo();\n const updateDriverPosition = useUpdateDriverPosition();\n const getTravellerPosition = useGetTravellerPosition();\n\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n const { data: cachedJourneysData } = useQuery(GetCacheJourneys);\n\n const { code } = useParams();\n const callLinkRef = useRef(null);\n const smsLinkRef = useRef(null);\n const customerServiceLinkRef = useRef(null);\n const transferCompanyLinkRef = useRef(null);\n\n const driverLoggedIn = cachedProfileData?.phone || cachedProfileData?.email;\n const driverCode = journey?.execution?.executionCode;\n const journeyCode = journey?.journeyCode;\n const parts: any = driverCode?.match(/.{1,3}/g);\n const splittedDriverCode = parts && parts.join(' ');\n const location: { [key: string]: any } = useLocation();\n const [fileSizeError, setFileSizeError] = useState(false);\n const [trackDriverPosition, setTrackDriverPosition] = useState(false);\n\n const fetchTravellerPosition = () => {\n if (journey) {\n getTravellerPosition(journey?.id, (data: any) => {\n setTravellerPosition(data);\n });\n }\n };\n\n useEffect(() => {\n let intervalID: number;\n if (journey && (journeyStatus === JourneyStatus.ARRIVED_AT_PICKUP || journeyStatus === JourneyStatus.UNDERWAY_TO_PICKUP)) {\n fetchTravellerPosition();\n const intervalFunction = () => {\n console.log('DEBUG Checking for traveller location change...');\n fetchTravellerPosition();\n };\n intervalID = window.setInterval(intervalFunction, 15000);\n }\n return () => {\n clearInterval(intervalID);\n };\n }, [journey, journeyStatus]);\n\n const handleUpdateDriverPosition = () => {\n if (journey && navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(\n (pos) => {\n updateDriverPosition(journey?.id, pos?.coords?.latitude, pos?.coords?.longitude, () => {\n console.log('INFO driver position updated');\n });\n },\n (error) => {\n console.log('INFO cant fetch position');\n console.log('INFO error code', error?.code);\n console.log('INFO error message', error?.message);\n },\n );\n }\n };\n\n const scrollToLocation = () => {\n if (locationElementRef?.current) {\n const top = locationElementRef.current.getBoundingClientRect().top + window.scrollY - 120;\n window.scrollTo({ top, behavior: 'smooth' });\n }\n };\n\n useEffect(() => {\n if (flags.trackDriverPosition && trackDriverPosition) {\n handleUpdateDriverPosition();\n intervalRef.current = setInterval(() => {\n handleUpdateDriverPosition();\n }, 15000);\n }\n return () => {\n clearInterval(intervalRef.current);\n };\n }, [trackDriverPosition, journey]);\n\n const getJourneys = () => {\n getAssociatedJourneys({}, () => {\n setLoadingStatus(false);\n });\n };\n\n const handleAddToMyJourney = () => {\n console.log(`DEBUG User clicked on \"Add to my journeys\" button, associating journey ${code}`);\n // For authorized driver immediately associate journey\n if (driverLoggedIn && code) {\n associateJourney(code, (associateJourneyData: any) => {\n if (associateJourneyData.success) {\n console.log(`INFO Journey ${code} associated successfully`);\n setAlreadyAssociated(true);\n setAvailableForStarting(true);\n setJourneyAdded(true);\n setJourneyStatus(JourneyStatus.PLANNED);\n setTimeout(() => {\n setJourneyAdded(false);\n }, 2000);\n }\n else {\n setApiError(true);\n }\n });\n }\n // Un-authorized driver needs to register before associating a journey\n else {\n setCacheProfile({\n lastJourneyView: code,\n }).then(() => {\n navigate(routes.login.phone);\n });\n }\n };\n\n const handleStartJourney = () => {\n setCacheProfile({\n lastJourneyView: code,\n lastJourneyId: journey?.id,\n }).then(() => {\n navigate(routes.information, {\n state: {\n journeyId: journey?.id,\n driverCode: journey?.driverCode,\n },\n });\n });\n };\n\n const handleGetDriverLocation = (callback: (position?: GeolocationPosition) => void) => {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(\n callback,\n (e: any) => {\n // @TODO here we should display an error about disabled location permissions\n // For now we just continue with the API call\n if (callback) callback();\n },\n {\n enableHighAccuracy: true,\n timeout: 5000,\n maximumAge: 0,\n },\n );\n }\n else {\n alert(translate('geolocation_not_supported'));\n }\n };\n\n const handleArrivedAtPickup = (position?: GeolocationPosition) => {\n setLoadingStatus(true);\n setDriverPosition({\n lat: position?.coords?.latitude,\n lng: position?.coords?.longitude,\n });\n\n if (journey?.id) {\n changeJourneyStatus(\n journey.id,\n 'driver-arrived',\n position ? String(position.coords.latitude) : '',\n position ? String(position.coords.longitude) : '',\n () => {\n console.log(`INFO Journey ${code} status changed to \"driver-arrived\"`);\n setJourneyStatus(JourneyStatus.ARRIVED_AT_PICKUP);\n getJourneys();\n },\n );\n\n trackEvent({\n event: 'journey-arrived',\n driverCode,\n journeyCode,\n });\n addAction('journey-arrived', {\n driverCode,\n journeyCode,\n });\n }\n };\n\n const handleJourneyInProgress = (position?: GeolocationPosition) => {\n setLoadingStatus(true);\n setDriverPosition({\n lat: position?.coords?.latitude,\n lng: position?.coords?.longitude,\n });\n if (journey?.id) {\n changeJourneyStatus(\n journey.id,\n 'progress',\n position ? String(position.coords.latitude) : '',\n position ? String(position.coords.longitude) : '',\n () => {\n console.log(`INFO Journey ${code} status changed to \"progress\"`);\n setJourneyStatus(JourneyStatus.JOURNEY_IN_PROGRESS);\n getJourneys();\n console.log('INFO Get jouneys');\n },\n );\n\n trackEvent({\n event: 'journey-in-progress',\n driverCode,\n journeyCode,\n });\n addAction('journey-in-progress', {\n driverCode,\n journeyCode,\n });\n }\n };\n\n const handleArrivedAtDropOff = (position?: GeolocationPosition) => {\n setDriverPosition({\n lat: position?.coords?.latitude,\n lng: position?.coords?.longitude,\n });\n if (\n journey?.execution?.pickupDate &&\n new Date(journey?.execution?.pickupDate).getTime() - new Date().getTime() > 3600 * 1000 * 24\n ) {\n setCompletedError(true);\n\n if (completedMessageTimeout) {\n clearTimeout(completedMessageTimeout);\n }\n\n completedMessageTimeout = setTimeout(() => {\n setCompletedError(false);\n }, 2000);\n }\n else {\n setLoadingStatus(true);\n\n if (journey?.id) {\n setTrackDriverPosition(false);\n changeJourneyStatus(\n journey.id,\n 'complete',\n position ? String(position.coords.latitude) : '',\n position ? String(position.coords.longitude) : '',\n (data) => {\n if (data.success) {\n console.log(`INFO Journey ${code} status changed to \"complete\"`);\n setCompletedMessage(true);\n setJourneyStatus(JourneyStatus.COMPLETED);\n getJourneys();\n\n if (completedMessageTimeout) {\n clearTimeout(completedMessageTimeout);\n }\n\n completedMessageTimeout = setTimeout(() => {\n setCompletedMessage(false);\n }, 2000);\n }\n else {\n setCompleteJourneyDrawer(true);\n setLoadingStatus(false);\n }\n },\n );\n\n trackEvent({\n event: 'journey-completed',\n driverCode,\n journeyCode,\n });\n addAction('journey-completed', {\n driverCode,\n journeyCode,\n });\n }\n }\n };\n\n const confirmArrivedAtDropOff = (position?: GeolocationPosition) => {\n console.log(\"DEBUG User clicked on 'Arrived at drop-off' button\");\n setTrackDriverPosition(false);\n if (journey?.id) {\n changeJourneyStatus(\n journey.id,\n 'complete',\n position ? String(position.coords.latitude) : '',\n position ? String(position.coords.longitude) : '',\n (data) => {\n if (data.success) {\n console.log(`INFO Journey ${code || ''} completed successfully`);\n setCompletedMessage(true);\n setJourneyStatus(JourneyStatus.COMPLETED);\n getJourneys();\n\n if (completedMessageTimeout) {\n clearTimeout(completedMessageTimeout);\n }\n\n completedMessageTimeout = setTimeout(() => {\n setCompletedMessage(false);\n }, 2000);\n }\n setCompleteJourneyDrawer(false);\n },\n true,\n );\n }\n };\n\n const getPhone = (position: any) => {\n if (position.coords) {\n setDriverPosition({\n lat: position?.coords?.latitude,\n lng: position?.coords?.longitude,\n });\n getPhoneByLocation(\n 'DRIVER',\n String(position.coords.latitude),\n String(position.coords.longitude),\n '',\n (data: any) => {\n if (data?.success) {\n setCustomerServicePhone(data?.phone);\n }\n },\n );\n }\n else {\n getPhoneByCountry('US', 'DRIVER', '', (data: any) => {\n if (data?.success) {\n setCustomerServicePhone(data?.phone);\n }\n });\n }\n };\n\n const getJourneyActions = () => {\n searchActions(journey!.id, 0, 100, (data) => {\n setActions(data);\n });\n };\n\n const callCustomerService = () => {\n console.log(\"DEBUG User clicked on 'Call customer service' button, calling customer service\");\n customerServiceLinkRef?.current?.click();\n };\n\n const callTransferCompany = () => {\n console.log(\"DEBUG User clicked on 'Call transfer company' button, calling transfer company\");\n transferCompanyLinkRef?.current?.click();\n };\n\n const openSubmitProofDrawer = () => {\n console.log(\"DEBUG User clicked on 'Submit proof' button, opened submit proof drawer\");\n setSubmitProofDrawer(true);\n setSingleIssueDrawer(null);\n };\n\n const issues: { [key in PickupIssuesEnum]: SingleIssue } = {\n too_many_travellers: {\n type: 'too_many_travellers',\n title: translate('too_many_travellers_title'),\n text: translate('too_many_travellers_text'),\n },\n too_many_suitcases: {\n type: 'too_many_suitcases',\n title: translate('too_many_suitcases_title'),\n text: translate('too_many_suitcases_text'),\n },\n missing_addons: {\n type: 'missing_addons',\n title: translate('missing_addons_title'),\n text: translate('missing_addons_text'),\n },\n im_too_late: {\n type: 'im_too_late',\n title: translate('im_too_late_title'),\n },\n blockage_at_pickup_point: {\n type: 'blockage_at_pickup_point',\n title: translate('blockage_at_pickup_point_title'),\n },\n cannot_find_traveller: {\n type: 'cannot_find_traveller',\n title: translate('cannot_find_traveller_title'),\n text: translate('cannot_find_traveller_text'),\n },\n refuses_to_get_in_car: {\n type: 'refuses_to_get_in_car',\n title: translate('refuses_to_get_in_car_title'),\n text: translate('refuses_to_get_in_car_text'),\n },\n };\n\n const openSingleIssueDrawer = (issue: keyof typeof PickupIssuesEnum) => {\n setJourneyIssuesDrawer(false);\n setSingleIssueDrawer(issues[issue]);\n };\n\n const uploadLocationPhoto = (e: React.ChangeEvent) => {\n const file: any = (e.target as HTMLInputElement).files![0];\n const filesize = file ? file.size / 1024 / 1024 : 0;\n const url = URL.createObjectURL(file);\n if (filesize >= 25) {\n setFileSizeError(true);\n console.log(`DEBUG User tried to upload a file that is too big: ${file.name} with size ${file.size}`);\n }\n else {\n setLocationPicture({\n file,\n url,\n name: file.name,\n size: file.size,\n date: file.lastModifiedDate,\n });\n console.log(\n `DEBUG User ${locationPicture ? 'uploaded' : 'changed'} location photo: ${file.name} with size ${file.size}`,\n );\n }\n };\n\n const uploadMoreProof = (e: React.ChangeEvent) => {\n const file: any = (e.target as HTMLInputElement).files![0];\n\n const filesize = file ? file.size / 1024 / 1024 : 0;\n\n const url = URL.createObjectURL(file);\n\n console.log(`DEBUG User uploaded more proof: ${file.name} with size ${file.size}`);\n\n if (\n otherProof?.length &&\n otherProof.findIndex((item) => item.size === file.size && item.date === file.lastModified) > -1\n ) {\n return;\n }\n\n if (filesize >= 25) {\n setFileSizeError(true);\n }\n else {\n setOtherProof([\n ...otherProof,\n {\n file,\n url,\n name: file.name,\n size: file.size,\n date: file.lastModified,\n },\n ]);\n }\n e.target.value = '';\n };\n\n const submitProof = () => {\n setLoadingButton(true);\n console.log(\"DEBUG User clicked on 'Submit proof' button, submitting proof...\");\n const files: any = [];\n if (locationPicture?.file) {\n files.push(locationPicture?.file);\n }\n if (otherProof.length !== 0) {\n otherProof.forEach((item: FileType) => files.push(item.file));\n }\n const travelerNoShowSubmited = actions?.find((item: any) => item.type === JourneyActionTypeEnum.TRAVELLER_NO_SHOW);\n const issueType = travelerNoShowSubmited\n ? JourneyActionTypeEnum.ADDITIONAL_PROOF_TRAVELLER_NO_SHOW\n : JourneyActionTypeEnum.TRAVELLER_NO_SHOW;\n createAction(journey!.id, issueType, driverPosition, (actionData: any) => {\n if (actionData?.success) {\n let uploadedCount = 0;\n\n files.forEach((file: any) => {\n uploadAttachment(actionData?.id, file, (res: any) => {\n if (!res?.data?.uploadAttachment?.success) {\n console.log(`INFO Uploading file ${file?.name} with size ${file?.size} failed`);\n setUploadErrorMessage(true);\n setLoadingButton(false);\n }\n else {\n console.log(`INFO Uploading file ${file?.name} with size ${file?.size} success`);\n uploadedCount += 1;\n if (uploadedCount === files.length) {\n getJourneyActions();\n setSubmitProofSuccess((prevState) => !prevState);\n setSubmitProofDrawer(false);\n setLocationPicture({\n file: null,\n url: '',\n name: '',\n size: 0,\n date: 0,\n });\n setOtherProof([]);\n setLoadingButton(false);\n }\n }\n });\n });\n }\n else {\n setApiError(true);\n }\n });\n trackEvent({\n event: 'submitted-traveller-no-show',\n journeyCode,\n driverCode,\n });\n addAction('submitted-traveller-no-show', {\n driverCode,\n journeyCode,\n });\n };\n\n const deleteFile = (file: FileType) => {\n setOtherProof((prevState: any) => prevState.filter((item: FileType) => item !== file));\n };\n\n const openMap = () => {\n console.log('DEBUG User clicked on map');\n if (journey) {\n const originAddress = encodeURIComponent(journey.originLocation.address.originalAddress);\n const destinationAddress = encodeURIComponent(journey.destinationLocation.address.originalAddress);\n window.open(\n `https://www.google.com/maps/dir/?api=1&origin=${originAddress}&destination=${destinationAddress}&travelmode=driving&dir_action=navigate`,\n );\n }\n };\n\n const onFlightInfoRefresh = () => {\n if (journey?.traveller.flightNumber && journey?.execution.pickupDate) {\n const origin = journey?.originLocation;\n const destination = journey?.destinationLocation;\n let hubInfo = null;\n if (origin?.hub && destination?.hub) {\n if (origin?.hubInfo?.hubType === 'AIRPORT') {\n hubInfo = origin?.hubInfo;\n }\n else {\n hubInfo = destination?.hubInfo;\n }\n }\n else if (origin?.hub) {\n hubInfo = origin?.hubInfo;\n }\n else {\n hubInfo = destination?.hubInfo;\n }\n\n const hubIataCode = hubInfo?.details?.filter((detail) => detail.code === 'iata')[0]?.value;\n setFlightInfoLoading(true);\n getFlightInfo(\n {\n flightNumber: journey?.traveller.flightNumber,\n flightDate: decodeURIComponent(journey?.execution.pickupDate),\n airportIataCode: hubIataCode,\n directionality: 'ARRIVAL',\n },\n (data) => {\n setFlightInfo({\n ...data,\n updatedOn: new Date().toISOString(),\n });\n setFlightInfoLoading(false);\n },\n );\n }\n };\n\n const checkJourneyStatus = (newJourney: Journey | null, allJourneys: Journey[]) => {\n const associatedJourney = allJourneys.filter(\n (cachedJourney: any) => cachedJourney.driverCode === newJourney?.driverCode,\n )[0];\n\n // If journey was already associated don't show add button\n if (associatedJourney) {\n setJourneyStatus(associatedJourney.status);\n console.log(`INFO Journey Status: ${associatedJourney.status}`);\n\n setAlreadyAssociated(true);\n setAvailableForStarting(\n associatedJourney.status === JourneyStatus.AVAILABLE || associatedJourney.status === JourneyStatus.PLANNED,\n );\n }\n // If journey wasn't started by another driver\n else if (!newJourney?.execution?.assignedDriverId) {\n setJourneyStatus(JourneyStatus.AVAILABLE);\n console.log(`INFO Journey Status: ${JourneyStatus.AVAILABLE}`);\n }\n else {\n setJourneyStatus(JourneyStatus.NO_LONGER_AVAILABLE);\n console.log(`INFO Journey Status: ${JourneyStatus.NO_LONGER_AVAILABLE}`);\n }\n };\n\n const getJourneyByDriverCode = (journeyDriverCode: string) => {\n getJourneyByCode(journeyDriverCode, (getJourneyData: any) => {\n if (getJourneyData?.success) {\n console.log(`INFO Journey details page for ${code} loaded`);\n if (getJourneyData?.execution?.assignedDriverId) {\n setAssignedToAnotherDriver(true);\n }\n\n if (getJourneyData?.driverCode) {\n // We need to check if this journey is already added to this driver\n if (cachedJourneysData?.items?.length) {\n checkJourneyStatus(getJourneyData, cachedJourneysData?.items);\n setJourney(getJourneyData);\n setFlightInfo({\n ...getJourneyData.flightInfo,\n updatedOn: new Date().toISOString(),\n });\n setLoading(false);\n }\n // If no cached journeys but access token exists, fetch associated journeys\n else if (cachedProfileData?.accessToken) {\n getAssociatedJourneys({}, (data: any) => {\n const journeysData = data?.items;\n\n if (journeysData?.length) {\n checkJourneyStatus(getJourneyData, journeysData);\n }\n\n setJourney(getJourneyData);\n setFlightInfo({\n ...getJourneyData.flightInfo,\n updatedOn: new Date().toISOString(),\n });\n\n setLoading(false);\n });\n }\n else {\n setJourney(getJourneyData);\n setFlightInfo({\n ...getJourneyData.flightInfo,\n updatedOn: new Date(),\n });\n // setJourneyStatus(getJourneyData.status);\n setLoading(false);\n }\n }\n trackEvent({\n event: 'journey-opened',\n driverCode: getJourneyData?.driverCode,\n journeyCode: getJourneyData?.journeyCode,\n });\n addAction('journey-opened', {\n driverCode,\n journeyCode,\n });\n }\n else {\n setApiError(true);\n }\n });\n };\n\n const checkStatusChange = () => {\n getAssociatedJourneys(\n {\n ...JourneyFiltersDefault,\n includedStatuses: Object.values(filterStatuses).flatMap((statusArray) => statusArray),\n textSearch: code,\n },\n (data: any) => {\n if (data?.success) {\n const allJourneys = data?.items;\n const currentJourney = allJourneys[0];\n checkJourneyStatus(currentJourney, allJourneys);\n }\n },\n );\n };\n\n useEffect(() => {\n if (onMyWayButtonProgress) {\n buttonTimeout = setTimeout(() => {\n if (journeyStatus === JourneyStatus.UNDERWAY_TO_PICKUP) {\n handleGetDriverLocation(handleArrivedAtPickup);\n }\n else if (journeyStatus === JourneyStatus.ARRIVED_AT_PICKUP) {\n handleGetDriverLocation(handleJourneyInProgress);\n }\n else if (journeyStatus === JourneyStatus.JOURNEY_IN_PROGRESS) {\n handleGetDriverLocation(handleArrivedAtDropOff);\n }\n else {\n handleStartJourney();\n }\n\n if (buttonTimeout) {\n clearTimeout(buttonTimeout);\n }\n setOnMyWayButtonProgress(false);\n }, 4200);\n }\n else if (buttonTimeout) {\n clearTimeout(buttonTimeout);\n }\n }, [onMyWayButtonProgress]);\n\n useEffect(() => {\n const journeyStarted =\n journeyStatus === JourneyStatus.JOURNEY_IN_PROGRESS ||\n journeyStatus === JourneyStatus.UNDERWAY_TO_PICKUP ||\n journeyStatus === JourneyStatus.ARRIVED_AT_PICKUP;\n\n const refDate = Date.now() - 1000 * 60 * 60 * 3;\n const date = journey?.execution?.pickupDate;\n\n const is24Hours = before24Hours(new Date(date!));\n if (is24Hours) setDisabledAtPickup(false);\n if (date && journeyStarted && new Date(date) < new Date(refDate)) {\n setShowIcon(true);\n }\n if (journeyStarted) {\n setTrackDriverPosition(true);\n }\n }, [journey]);\n\n useEffect(() => {\n if (uploadErrorMessage) {\n setTimeout(() => {\n setUploadErrorMessage(false);\n setFileSizeError(false);\n getJourneyActions();\n }, 2000);\n }\n }, [uploadErrorMessage]);\n\n useEffect(() => {\n const loadActions =\n journeyStatus === JourneyStatus.PLANNED ||\n journeyStatus === JourneyStatus.UNDERWAY_TO_PICKUP ||\n journeyStatus === JourneyStatus.ARRIVED_AT_PICKUP ||\n journeyStatus === JourneyStatus.JOURNEY_IN_PROGRESS ||\n journeyStatus === JourneyStatus.COMPLETED;\n\n if (journey?.id && loadActions) {\n getJourneyActions();\n }\n }, [journey, journeyStatus]);\n\n useEffect(() => {\n console.log(`INFO Loading journey details page for journey ${code}...`);\n\n const getConfig = async () => {\n const response = await fetch(`${baseURL}/configs`);\n const configs: any = await response.json();\n setGoogleApiKey(configs.googleApiKey);\n };\n\n // When adding a journey from overview page show success notification\n if (location?.state?.notification) {\n window.history.replaceState({}, document.title);\n\n if (location.state.notification === 'addJourneySuccess') {\n setJourneyAdded(true);\n setAlreadyAssociated(true);\n setAvailableForStarting(true);\n\n setTimeout(() => {\n setJourneyAdded(false);\n }, 2000);\n }\n }\n\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(\n // success callback\n getPhone,\n // error callback (position will be undefined)\n getPhone,\n );\n }\n\n getConfig();\n }, []);\n\n useEffect(() => {\n if (code) {\n // When URL query param is driver code\n if (code.length >= 6) {\n // Check if driver code is valid\n getJourneyByDriverCode(code);\n\n const intervalFunction = () => {\n console.log('DEBUG Checking for journey status change...');\n checkStatusChange();\n };\n const intervalID = setInterval(intervalFunction, 60000);\n return () => {\n clearInterval(intervalID);\n };\n }\n // When other routes mistakenly get appended as a driver code redirect to them\n\n console.log('INFO JourneyPage page > route got appended as a query param by mistake - ', code);\n navigate(`/${code}`);\n }\n }, [code]);\n\n if (loading) {\n return ;\n }\n\n return (\n
\n {loadingStatus && }\n
\n }\n iconPosition=\"left\"\n textColor=\"asphalt6\"\n onClick={() => {\n console.log('DEBUG User clicked on \"Overview\" button, navigating to journeys overview page...');\n navigate('/journeys');\n }}\n className=\"back-button\"\n />\n\n setShowProgresBarStatus(!showProgresBarStatus)}\n />\n {showProgresBarStatus && (\n \n )}\n
\n\n
\n \n {journey?.execution?.durationInSeconds !== 0 && (\n
\n \n \n {`${Number(Number(journey?.execution?.durationInSeconds) / 60).toPrecision(2)} min`}\n \n
\n )}\n
\n\n {journey && (\n {\n console.log('DEBUG User clicked on \"Journey Issues\" button, opening journey issues drawer...');\n setJourneyIssuesDrawer(true);\n }}\n traveller={journey.traveller}\n addons={journey.addons || []}\n actions={actions}\n dangerIcon={showIcon}\n availableForStarting={alreadyAssociated}\n travellerPosition={travellerPosition}\n scrollToTravellerPosition={() => scrollToLocation()}\n />\n )}\n\n {journey ? (\n
\n \n .\n \n\n \n .\n \n\n \n .\n \n\n \n .\n \n\n {flags?.showFlightTracker && journey.traveller.flightNumber && (\n \n )}\n\n {journey?.traveller?.shipName && (\n }\n />\n )}\n\n \n\n {travellerPosition?.position &&\n (journeyStatus === JourneyStatus.UNDERWAY_TO_PICKUP || journeyStatus === JourneyStatus.ARRIVED_AT_PICKUP)\n && (\n
\n \n
\n )}\n\n {!alreadyAssociated && !assignedToAnotherDriver && (\n
\n }\n iconPosition=\"left\"\n onClick={handleAddToMyJourney}\n />\n
\n )}\n {/*\n * Driver added a journey, no other driver started it yet\n * So this driver can start a journey\n */}\n {alreadyAssociated && availableForStarting && journeyStatus !== 'NO_LONGER_AVAILABLE' && (\n
\n {journeyAdded && (\n
\n \n
\n )}\n }\n iconPosition=\"left\"\n onClick={() => {\n console.log('DEBUG User clicked \"On my way to pickup\" button');\n if (disabledAtPickup) {\n console.log('INFO User can not start journey');\n setCanNotStartJourneyDrawer(true);\n return;\n }\n setTrackDriverPosition(true);\n console.log('INFO Starting journey, loading driver information page...');\n setOnMyWayButtonProgress(!onMyWayButtonProgress);\n }}\n progress={onMyWayButtonProgress}\n />\n
\n )}\n {journeyStatus === JourneyStatus.UNDERWAY_TO_PICKUP && (\n
\n }\n iconPosition=\"left\"\n onClick={() => {\n console.log('DEBUG User clicked \"Arrived at pickup\" button');\n setOnMyWayButtonProgress(!onMyWayButtonProgress);\n }}\n progress={onMyWayButtonProgress}\n // Check if we can use the same button\n />\n
\n )}\n {journeyStatus === JourneyStatus.ARRIVED_AT_PICKUP && (\n
\n }\n iconPosition=\"left\"\n onClick={() => {\n console.log('DEBUG User clicked \"On my way to drop off\" button');\n setOnMyWayButtonProgress(!onMyWayButtonProgress);\n }}\n progress={onMyWayButtonProgress}\n // Check if we can use the same button\n />\n
\n )}\n {journeyStatus === JourneyStatus.JOURNEY_IN_PROGRESS && (\n
\n }\n iconPosition=\"left\"\n onClick={() => {\n console.log('DEBUG User clicked \"Arrived at drop off\" button');\n setOnMyWayButtonProgress(!onMyWayButtonProgress);\n }}\n progress={onMyWayButtonProgress}\n // Check if we can use the same button\n />\n
\n )}\n {completedMessage && (\n
\n \n
\n )}\n {completedError && (\n
\n \n
\n )}\n {completedMessage && (\n
\n \n
\n )}\n {uploadErrorMessage ||\n (fileSizeError && (\n
\n {\n setUploadErrorMessage(false);\n setFileSizeError(false);\n }}\n />\n
\n ))}\n\n setCompleteJourneyDrawer(false)}\n >\n <>\n }\n iconPosition=\"left\"\n fullWidth\n className=\"m-b-32\"\n onClick={confirmArrivedAtDropOff}\n />\n }\n iconPosition=\"left\"\n fullWidth\n onClick={() => setCompleteJourneyDrawer(false)}\n className=\"m-b-10\"\n />\n \n \n setJourneyIssuesDrawer(false)}\n >\n {\n getJourneyActions();\n setJourneyIssuesDrawer(false);\n setSubmitProofSuccess(true);\n }}\n actions={actions}\n />\n \n\n {\n setSingleIssueDrawer(null);\n }}\n goBack={() => {\n setSingleIssueDrawer(null);\n setJourneyIssuesDrawer(true);\n }}\n callTransferCompany={callTransferCompany}\n callCustomerService={callCustomerService}\n openSubmitProofDrawer={openSubmitProofDrawer}\n journeyId={journey.id}\n getActions={getJourneyActions}\n actions={actions}\n journeyCode={journeyCode}\n driverCode={driverCode}\n />\n setSubmitProofDrawer(false)}\n goBack={() => {\n setSubmitProofDrawer(false);\n openSingleIssueDrawer('cannot_find_traveller');\n }}\n >\n <>\n {!locationPicture ? (\n }\n />\n ) : (\n \n )}\n {/* handleUploadFileMine} /> */}\n
\n \n {otherProof?.length ? translate('additional_proof') : translate('other_proof_text')}\n \n
\n }\n />\n
\n {!!otherProof.length && (\n
\n {otherProof.map((item: FileType, index: number) => (\n
\n deleteFile(item)} />\n
\n ))}\n
\n )}\n
\n : }\n iconPosition=\"left\"\n fullWidth\n data-testid=\"submit_no-show-proof\"\n disabled={(!locationPicture && !otherProof.length) || fileSizeError}\n onClick={submitProof}\n />\n \n \n setSubmitProofSuccess(false)}\n >\n {otherProof.length === 0 && (\n
\n }\n iconPosition=\"left\"\n fullWidth\n onClick={() => setSubmitProofSuccess(false)}\n />\n
\n )}\n
\n {translate('submit_more_proof_question')}\n
\n
\n }\n />\n
\n {!!otherProof.length &&\n ((\n
\n {otherProof.map((item: FileType, index: number) => (\n
\n deleteFile(item)} />\n
\n ))}\n
\n ) as any)}\n {!!otherProof.length && (\n
\n }\n iconPosition=\"left\"\n fullWidth\n disabled={!locationPicture && !otherProof.length}\n onClick={submitProof}\n />\n
\n )}\n \n setCanNotStartJourneyDrawer(false)}\n >\n }\n iconPosition=\"left\"\n fullWidth\n onClick={() => setCanNotStartJourneyDrawer(false)}\n />\n \n
\n ) : (\n
\n {translate('Oops')}\n {translate('info_not_available')}\n
\n )}\n
\n );\n};\n\nexport default withLDConsumer()(JourneyPage);\n","import { gql } from '@apollo/client';\n\nexport const CAPTCHA_TOKEN = gql`\n query CaptchaToken {\n captchaToken {\n token\n }\n }\n`;\n","import { useLazyQuery } from '@apollo/client';\n\nimport { CAPTCHA_TOKEN } from '../../captchaTypeDefs';\n\nexport const useQueryCaptchaToken = (): any => {\n const [\n getCaptchaToken,\n ] = useLazyQuery(\n CAPTCHA_TOKEN,\n {\n fetchPolicy: 'no-cache',\n },\n );\n\n const handleNewData = (\n res: any,\n callback: (data: any) => void,\n ) => {\n if (callback) callback(res?.data?.captchaToken);\n };\n\n return (callback: (data: any) => void) => getCaptchaToken({})\n .then((res) => {\n handleNewData(res, callback);\n });\n};\n","import { gql } from '@apollo/client';\n\nexport const IP_ADDRESS_INFO = gql`\n query IpAddressInfo {\n ipAddressInfo {\n countryPhonePrefix\n }\n }\n`;\n","import { useQuery } from '@apollo/client';\n\nimport { IP_ADDRESS_INFO } from '../../geoTypeDefs';\n\nexport const useQueryIPAddressInfo = (options?: any): any => (\n useQuery(IP_ADDRESS_INFO, options)\n);\n","import { useQuery } from '@apollo/client';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { Button } from '@transferz/fe-component-library/button';\nimport Input from '@transferz/fe-component-library/input';\nimport Loader from '@transferz/fe-component-library/loader';\nimport Notification from '@transferz/fe-component-library/notification';\nimport PhoneIcon from '@transferz/fe-component-library/phone-icon';\nimport DialPhoneDropdown from '@transferz/fe-component-library/phone-input';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { withLDConsumer } from 'launchdarkly-react-client-sdk';\nimport { useLocalize } from 'localize-react';\nimport React, { ReactElement, useEffect, useState } from 'react';\nimport { GoogleReCaptcha, GoogleReCaptchaProvider } from 'react-google-recaptcha-v3';\nimport { SubmitHandler, useForm } from 'react-hook-form';\nimport { useNavigate } from 'react-router-dom';\nimport * as yup from 'yup';\n\nimport { GetCacheProfile } from '../models/graphql';\nimport { useQueryCaptchaToken } from '../queries/captcha/hooks/captcha/useGetCaptchaToken';\nimport { useQueryIPAddressInfo } from '../queries/geo/hooks/ip/useQueryIPAddressInfo';\nimport { useSetCacheProfile } from '../services/apolloCacheHooks';\nimport { useAssociateJourney, useLoginEmail, useSendOTP } from '../services/apolloNetworkHooks';\nimport { routes } from '../services/constant';\n\ninterface Props {\n loginType: string;\n flags?: any;\n}\n\ntype FormFields = {\n email: string;\n password: string;\n phone: string;\n};\n\nconst Login: (props: Props) => ReactElement = function ({ loginType, flags }) {\n const classBase = 'login-page';\n const [error, setError] = useState('');\n const [captchaRequired, setCaptchaRequired] = useState(false);\n const [loginAttempted, setLoginAttempted] = useState(true);\n const [captchaError, setCaptchaError] = useState(false);\n const [rateLimitError, setRateLimitError] = useState(false);\n const [loading, setLoading] = useState(false);\n const [captchaKey, setCaptchaKey] = React.useState('');\n const setCacheProfile = useSetCacheProfile();\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n const associateJourney = useAssociateJourney();\n const loginWithEmail = useLoginEmail();\n const sendOTP = useSendOTP();\n const getCaptchaToken = useQueryCaptchaToken();\n const { translate } = useLocalize();\n const { data: ipAddressData, loading: IPInfoLoading } = useQueryIPAddressInfo();\n\n const validations = yup.object().shape(\n loginType === 'email'\n ? {\n email: yup.string().email(translate('must_be_valide')).required(translate('email_is_required')),\n password: yup.string().required(translate('password_is_required')),\n }\n : {\n phone: yup.string().optional(),\n },\n );\n const {\n register,\n watch,\n handleSubmit,\n formState: { errors },\n } = useForm({ resolver: yupResolver(validations) });\n\n const passwordValue = watch('password');\n const emailValue = watch('email');\n\n const [phoneNumber, setPhoneNumber] = React.useState('');\n const navigate = useNavigate();\n\n const handleLoginSuccess = (): void => {\n setCaptchaRequired(false);\n setLoginAttempted(true);\n setCaptchaError(false);\n setRateLimitError(false);\n navigate(routes.login.pin);\n };\n\n const handleCaptchaIsRequiredError = (): void => {\n setCaptchaRequired(true);\n if (!captchaKey) {\n getCaptchaToken((token: any) => {\n setCaptchaKey(token?.token);\n });\n }\n setLoginAttempted(false);\n setCaptchaError(false);\n setRateLimitError(false);\n };\n\n const handleCaptchaIsIncorrectError = (): void => {\n setCaptchaError(true);\n setRateLimitError(false);\n };\n\n const handleRateLimitError = (): void => {\n setCaptchaError(false);\n setRateLimitError(true);\n };\n\n const requestOTP = (captchaToken?: string) => {\n setLoading(true);\n setLoginAttempted(true);\n sendOTP({ phoneNumber, captchaToken }, (data) => {\n if (data?.success) {\n handleLoginSuccess();\n }\n else {\n switch (data.errorCode) {\n case 'CAPTCHA_CHALLENGE_REQUIRED':\n handleCaptchaIsRequiredError();\n break;\n case 'CAPTCHA_CHALLENGE_INCORRECT':\n handleCaptchaIsIncorrectError();\n break;\n case 'RATE_LIMIT_EXCEEDED':\n handleRateLimitError();\n break;\n default:\n // do nothing\n }\n }\n\n setLoading(false);\n });\n };\n\n const onSubmit: SubmitHandler = ({ email, password }) => {\n console.log(`DEBUG User clicked on ${loginType === 'email' ? translate('log_in') : translate('send_sms')} button`);\n if (loginType === 'email') {\n setLoading(true);\n\n loginWithEmail(email, password, (driverData: any) => {\n if (driverData?.success) {\n const code = cachedProfileData?.lastJourneyView;\n\n // When logging in check if user clicked on add to my journeys\n // and upon logging associate that journey\n if (code) {\n associateJourney(\n code,\n () => {\n setCacheProfile({\n lastJourneyView: '',\n }).then(() => {\n navigate(`${routes.journey}/${code}`);\n });\n },\n driverData,\n true,\n );\n }\n else {\n navigate(routes.journeys);\n }\n }\n else {\n setError(translate('wrong_email_password'));\n }\n\n setLoading(false);\n });\n }\n else if (phoneNumber) {\n // Enter phone and redirect to driver name page\n setCacheProfile({\n driverId: 0,\n phone: phoneNumber,\n }).then(() => {\n console.log('INFO Sending OTP password, Loading Pin Screen...');\n requestOTP();\n });\n }\n };\n\n const handleInputFocus = () => {\n setError('');\n };\n\n useEffect(() => {\n console.log('INFO Login page loaded');\n }, []);\n\n if (loading || IPInfoLoading) {\n return ;\n }\n\n return (\n
\n
\n {translate('login_title')}\n
\n
\n {translate('login_subtitle')}\n
\n
\n \n {loginType === 'email' ? translate('email_login') : translate('phone_login')}\n \n
\n
\n {loginType === 'email' && flags.emailLogin && (\n
\n
\n \n
\n\n
\n \n
\n
\n )}\n\n
\n {captchaRequired && captchaKey?.length && (\n \n {\n if (!loginAttempted && phoneNumber) {\n requestOTP(token);\n }\n }}\n />\n \n )}\n
\n\n {loginType === 'phone' && (\n
\n setPhoneNumber(phone)}\n label={translate('mobile_number')}\n initialValue={ipAddressData?.ipAddressInfo?.countryPhonePrefix || ''}\n className=\"custom-phone-input\"\n path={`${window.location.origin}/flags/4x3`}\n />\n
\n )}\n {flags.emailLogin && (\n
\n \n {loginType === 'email' ? translate('login_phone') : translate('login_email')}\n {\n navigate(loginType === 'email' ? routes.login.phone : routes.login.email);\n }}\n >\n {translate('click')}\n \n \n
\n )}\n\n {!!error && (\n
\n \n
\n )}\n {captchaError && (\n
\n \n
\n )}\n {rateLimitError && (\n
\n \n
\n )}\n
\n : undefined}\n iconPosition=\"left\"\n type=\"submit\"\n />\n
\n
\n
\n );\n};\n\nexport default withLDConsumer()(Login);\n","import { useQuery } from '@apollo/client';\nimport { Button } from '@transferz/fe-component-library/button';\nimport Loader from '@transferz/fe-component-library/loader';\nimport Notification from '@transferz/fe-component-library/notification';\nimport PhoneRingIcon from '@transferz/fe-component-library/phone-ring-icon';\nimport { PinInput } from '@transferz/fe-component-library/pin-input';\nimport { PinSingleInput } from '@transferz/fe-component-library/pin-single-input';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { useLocalize } from 'localize-react';\nimport React, {\n ReactElement, useEffect, useRef,\n useState,\n} from 'react';\nimport { GoogleReCaptcha, GoogleReCaptchaProvider } from 'react-google-recaptcha-v3';\nimport { useNavigate } from 'react-router-dom';\n\nimport { GetCacheProfile } from '../models/graphql';\nimport { useQueryCaptchaToken } from '../queries/captcha/hooks/captcha/useGetCaptchaToken';\nimport { useSetCacheProfile } from '../services/apolloCacheHooks';\nimport {\n useAssociateJourney,\n useGetPhoneByCountry,\n useGetPhoneByLocation,\n useLoginPhone,\n useSendOTP,\n} from '../services/apolloNetworkHooks';\nimport { routes } from '../services/constant';\nimport { storeTokenExpirationTime } from '../services/store';\n\nconst LOGIN_ATTEMPTS_INTERVAL = 60;\n\ninterface Props {\n flags?: any;\n onLoginSuccess: (data: any) => void;\n}\n\nconst PinScreen: (props: Props) => ReactElement = function ({ onLoginSuccess }) {\n const classBase = 'pin-page';\n const [invalidPin, setPinInvalid] = useState(false);\n const [loading, setLoading] = useState(true);\n const [captchaRequired, setCaptchaRequired] = useState(false);\n const [loginAttempted, setLoginAttempted] = useState(true);\n const [captchaError, setCaptchaError] = useState(false);\n const [rateLimitError, setRateLimitError] = useState(false);\n const [timerIsOn, setTimerIsOn] = React.useState(false);\n const [seconds, setSeconds] = React.useState(LOGIN_ATTEMPTS_INTERVAL);\n const [captchaKey, setCaptchaKey] = React.useState('');\n const setCacheProfile = useSetCacheProfile();\n const associateJourney = useAssociateJourney();\n const navigate = useNavigate();\n const { translate } = useLocalize();\n const { data: cachedProfileData, loading: loadingProfileData } = useQuery(GetCacheProfile);\n const sendOTP = useSendOTP();\n const loginWithPhone = useLoginPhone();\n const getPhoneByCountry = useGetPhoneByCountry();\n const getPhoneByLocation = useGetPhoneByLocation();\n\n const [pinCode, setPinCode] = useState('');\n const [notificationError, setNotificationError] = useState(false);\n const [lockedAccount, setLockedAccount] = useState(false);\n const [customerServicePhone, setCustomerServicePhone] = useState('');\n const callLinkRef = useRef();\n const intervalRef = useRef();\n const getCaptchaToken = useQueryCaptchaToken();\n const isMobileSafari = /iP(ad|od|hone)/i.test(window.navigator.userAgent) && !!navigator.userAgent.match(/Version\\/[\\d.]+.*Safari/);\n\n const handleInput = (pin: string) => {\n setPinCode(pin);\n };\n\n const countDown = () => {\n setSeconds((sec: number) => sec - 1);\n if (seconds === 0) {\n setTimerIsOn(false);\n setSeconds(LOGIN_ATTEMPTS_INTERVAL);\n }\n };\n\n const startTimer = (): void => {\n setTimerIsOn(true);\n };\n\n useEffect(() => {\n // start timer on page load\n startTimer();\n }, []);\n\n useEffect(() => {\n setPinInvalid(false);\n setLoading(false);\n\n if (pinCode.length === 6) {\n setLoading(true);\n console.log('DEBUG User entered pin code,Authorizing...');\n\n loginWithPhone(cachedProfileData.phone, pinCode, (data: any) => {\n if (data?.success) {\n console.log('INFO Login success');\n // set token expiration time\n onLoginSuccess(data.expiresInSeconds);\n storeTokenExpirationTime(data.expiresInSeconds.toString());\n\n // If driver is newly created redirect him to update his name\n if (!data.name) {\n setTimeout(() => {\n navigate(`${routes.login.welcome}`);\n\n setLoading(false);\n }, isMobileSafari ? 1000 : 0);\n return;\n }\n\n if (cachedProfileData?.lastJourneyView) {\n const code = cachedProfileData?.lastJourneyView;\n\n associateJourney(\n code,\n () => {\n setCacheProfile({\n lastJourneyView: '',\n }).then(() => {\n setTimeout(() => {\n setLoading(false);\n\n navigate(`${routes.journey}/${code}`, { state: { notification: 'addJourneySuccess' } });\n }, 250);\n });\n },\n data,\n true,\n );\n }\n else {\n setTimeout(() => {\n setLoading(false);\n\n navigate(routes.journeys);\n }, isMobileSafari ? 1000 : 250);\n }\n }\n else if (!data.success && data.message === 'FORBIDDEN') {\n setLockedAccount(true);\n }\n else {\n setPinInvalid(true);\n setNotificationError(true);\n\n setTimeout(() => {\n setNotificationError(false);\n }, 2000);\n }\n\n setLoading(false);\n });\n }\n }, [pinCode]);\n\n useEffect(() => {\n if (!loadingProfileData && !cachedProfileData?.phone) {\n navigate(routes.login.phone);\n }\n }, [loadingProfileData]);\n\n useEffect(() => {\n if (timerIsOn) {\n intervalRef.current = setInterval(() => {\n countDown();\n }, 1000);\n }\n return () => {\n clearInterval(intervalRef.current);\n };\n }, [timerIsOn, seconds]);\n\n const getPhone = (position: any) => {\n if (position.coords) {\n getPhoneByLocation(\n 'DRIVER',\n String(position.coords.latitude),\n String(position.coords.longitude),\n '',\n (data: any) => {\n if (data?.success) {\n setCustomerServicePhone(data?.phone);\n }\n },\n );\n }\n else {\n getPhoneByCountry('US', 'DRIVER', '', (data: any) => {\n if (data?.success) {\n setCustomerServicePhone(data?.phone);\n }\n });\n }\n };\n\n useEffect(() => {\n if (lockedAccount) {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(\n // success callback\n getPhone,\n // error callback (position will be undefined)\n getPhone,\n );\n }\n }\n }, [lockedAccount]);\n\n const handleLoginSuccess = (): void => {\n startTimer();\n setCaptchaRequired(false);\n setLoginAttempted(true);\n setCaptchaError(false);\n setRateLimitError(false);\n };\n\n const handleCaptchaIsRequiredError = (): void => {\n if (!captchaKey) {\n getCaptchaToken((token: any) => {\n setCaptchaKey(token?.token);\n });\n }\n setCaptchaRequired(true);\n setLoginAttempted(false);\n setCaptchaError(false);\n setRateLimitError(false);\n };\n\n const handleCaptchaIsIncorrectError = (): void => {\n setCaptchaError(true);\n setRateLimitError(false);\n startTimer();\n };\n\n const handleRateLimitError = (): void => {\n startTimer();\n setCaptchaError(false);\n setRateLimitError(true);\n };\n\n const sendAccessCode = (captchaToken?: string) => {\n if (timerIsOn) {\n return;\n }\n setLoginAttempted(true);\n sendOTP({ phoneNumber: cachedProfileData?.phone, captchaToken }, (data: any) => {\n if (data?.success) {\n console.log('INFO Display to the user that SMS is sent again');\n handleLoginSuccess();\n }\n else {\n switch (data.errorCode) {\n case 'CAPTCHA_CHALLENGE_REQUIRED':\n setCaptchaRequired(true);\n handleCaptchaIsRequiredError();\n break;\n case 'CAPTCHA_CHALLENGE_INCORRECT':\n handleCaptchaIsIncorrectError();\n break;\n case 'RATE_LIMIT_EXCEEDED':\n handleRateLimitError();\n break;\n default:\n startTimer();\n }\n }\n });\n };\n\n const closeNotification = () => {\n setLockedAccount(false);\n };\n\n if (loading) {\n return ;\n }\n\n return (\n
\n
\n {translate('access_code')}\n
\n
\n
\n {/* @ts-ignore */}\n {isMobileSafari ?\n :\n }\n
\n {notificationError && (\n
\n \n
\n )}\n
\n {captchaRequired && captchaKey?.length && (\n \n {\n if (!loginAttempted) {\n sendAccessCode(token);\n }\n }}\n />\n \n )}\n
\n {lockedAccount && (\n
\n }\n iconPosition=\"left\"\n fullWidth\n onClick={() => {\n callLinkRef?.current?.click();\n }}\n />\n )}\n />\n {/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}\n \n .\n \n
\n )}\n
\n {translate('question_about_receive')}\n
\n\n
\n \n
\n {captchaError && (\n
\n \n
\n )}\n {rateLimitError && (\n
\n \n
\n )}\n
\n
\n );\n};\n\nexport default PinScreen;\n","import { useQuery } from '@apollo/client';\nimport AvatarImageUpload from '@transferz/fe-component-library/avatar-image-upload';\nimport BottomDrawer from '@transferz/fe-component-library/bottom-drawer';\nimport { Button } from '@transferz/fe-component-library/button';\nimport PlusCircleIcon from '@transferz/fe-component-library/circle-plus-icon';\nimport Input from '@transferz/fe-component-library/input';\nimport Loader from '@transferz/fe-component-library/loader';\nimport LogoutIcon from '@transferz/fe-component-library/logout-icon';\nimport Notification from '@transferz/fe-component-library/notification';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { useLocalize } from 'localize-react';\nimport React, { FunctionComponent, useEffect, useState } from 'react';\nimport { useLocation, useNavigate } from 'react-router-dom';\n\nimport StickyBackButton from '../components/StickyBackButton';\nimport Vehicle from '../components/Vehicle';\nimport { CacheDriverVehicle } from '../models/CacheDriverVehicles';\nimport { CacheProfileEmpty } from '../models/CacheProfile';\nimport { GetCacheProfile } from '../models/graphql';\nimport { useSetCacheProfile } from '../services/apolloCacheHooks';\nimport { useGetDriverData, useGetDriverVehicles, useSetDriverPhoto } from '../services/apolloNetworkHooks';\nimport { routes } from '../services/constant';\nimport { NotificationType } from '../types/global';\n\nconst ProfilePage: FunctionComponent = () => {\n const location: { [key: string]: any } = useLocation();\n const navigate = useNavigate();\n const { translate } = useLocalize();\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n\n const [vehicles, setVehicles] = useState([]);\n const [displayPage, setDisplayPage] = useState(false);\n const [logoutBottomDrawer, setLogoutBottomDrawer] = useState(false);\n const [loading, setLoading] = useState(true);\n const [notification, showNotification] = useState();\n\n const setCacheProfile = useSetCacheProfile();\n const getDriverVehicles = useGetDriverVehicles();\n const getDriverData = useGetDriverData();\n const updateDriverPhoto = useSetDriverPhoto();\n\n const handleLogout = () => {\n console.log('DEBUG User clicked on logout, login out...');\n setCacheProfile(CacheProfileEmpty).then(() => {\n navigate('/');\n });\n };\n\n const handleAddNewVehicle = () => {\n navigate(routes.newVehicle, { state: { route: 'profile' } });\n };\n\n const handleUploadPhoto = (e: React.ChangeEvent) => {\n console.log('DEBUG User clicked on upload photo');\n const file = (e.target as HTMLInputElement).files![0];\n setLoading(true);\n\n updateDriverPhoto(file, (data: any) => {\n if (data?.data?.uploadDriverPhoto?.success) {\n console.log(`INFO Successfully changed photo to: ${file?.name} file size: ${file?.size} `);\n if (!data?.url) {\n showNotification({ text: translate('uploaded_photo'), variant: 'success' });\n }\n else {\n showNotification({ text: translate('changed_photo'), variant: 'success' });\n }\n setLoading(false);\n }\n else {\n showNotification({ text: translate('could_not_save'), variant: 'error' });\n }\n });\n };\n\n useEffect(() => {\n if (cachedProfileData?.email) {\n setDisplayPage(true);\n\n getDriverVehicles((newVehicles: CacheDriverVehicle[]) => {\n newVehicles.sort((a, b) => Date.parse(b.updated) - Date.parse(a.updated));\n setVehicles(newVehicles);\n setLoading(false);\n });\n }\n // If user is driver with driverId (without email) fetch driver data\n else if (cachedProfileData?.driverId && !displayPage) {\n getDriverData(() => {\n setLoading(false);\n\n getDriverVehicles((newVehicles: CacheDriverVehicle[]) => {\n newVehicles.sort((a, b) => Date.parse(b.updated) - Date.parse(a.updated));\n setVehicles(newVehicles);\n setLoading(false);\n });\n\n setDisplayPage(true);\n });\n }\n if (notification) {\n setTimeout(() => {\n showNotification(undefined);\n }, 20000);\n }\n }, [cachedProfileData, notification]);\n\n useEffect(() => {\n console.log('INFO Profile page loaded');\n if (location?.state?.notification) {\n window.history.replaceState({}, document.title);\n\n switch (location?.state?.notification) {\n case 'updateProfile':\n showNotification({ text: translate('settings_updated'), variant: 'success' });\n break;\n case 'delete':\n showNotification({ text: translate('deleted_vehicle'), variant: 'success' });\n break;\n case 'update':\n showNotification({ text: translate('changed_details'), variant: 'success' });\n break;\n case 'create':\n showNotification({ text: translate('add_new_vehicle'), variant: 'success' });\n break;\n default:\n return;\n }\n\n setTimeout(() => {\n showNotification(undefined);\n }, 2000);\n }\n }, []);\n\n if (loading) {\n return ;\n }\n\n return (\n
\n {\n console.log('DEBUG User clicked back button, navigating to journey overview page...');\n navigate('/journeys');\n }}\n />\n\n {!displayPage ? (\n {translate('loading')}\n ) : (\n
\n
\n \n {translate('your_profile')}\n \n\n \n
\n\n
\n \n navigate(`${routes.editProfile}/name`)}>\n \n {translate('edit')}\n \n \n
\n\n
\n \n\n navigate(`${routes.editProfile}/phone`)}>\n \n {translate('edit')}\n \n \n
\n\n
\n {translate('your_vehicles')}\n\n {!!vehicles.length &&\n vehicles.map((vehicle: CacheDriverVehicle) => (\n
\n \n
\n ))}\n\n
\n \n \n \n {translate('new_vehicle')}\n \n
\n
\n
\n\n {!notification ? (\n
\n setLogoutBottomDrawer(true)}\n data-testid=\"button_logout\"\n >\n \n {translate('log_out')}\n \n
\n
\n ) : (\n
\n \n
\n )}\n
\n )}\n\n setLogoutBottomDrawer(false)}\n >\n }\n fullWidth\n />\n \n
\n );\n};\n\nexport default ProfilePage;\n","import { Button } from '@transferz/fe-component-library/button';\nimport PhoneRingIcon from '@transferz/fe-component-library/phone-ring-icon';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { useLocalize } from 'localize-react';\nimport React, { useEffect, useRef, useState } from 'react';\n\nimport { useGetPhoneByCountry, useGetPhoneByLocation } from '../../services/apolloNetworkHooks';\n\nconst Contact = () => {\n const { translate } = useLocalize();\n const [customerServicePhone, setCustomerServicePhone] = useState('');\n const getPhoneByCountry = useGetPhoneByCountry();\n const getPhoneByLocation = useGetPhoneByLocation();\n const callLinkRef = useRef();\n\n const getPhone = (position: any) => {\n if (position.coords) {\n getPhoneByLocation(\n 'DRIVER',\n String(position.coords.latitude),\n String(position.coords.longitude),\n '',\n (data: any) => {\n if (data?.success) {\n setCustomerServicePhone(data?.phone);\n }\n },\n );\n }\n else {\n getPhoneByCountry(\n 'US',\n 'DRIVER',\n '',\n (data: any) => {\n if (data?.success) {\n setCustomerServicePhone(data?.phone);\n }\n },\n );\n }\n };\n\n useEffect(() => {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(\n // success callback\n getPhone,\n // error callback (position will be undefined)\n getPhone,\n );\n }\n }, []);\n return (\n
\n \n {translate('contact_us')}\n \n }\n iconPosition=\"left\"\n onClick={() => {\n callLinkRef?.current?.click();\n }}\n className=\"m-t-32 mb-20\"\n />\n {/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}\n \n .\n \n
\n );\n};\n\nexport default Contact;\n","import Accordion from '@transferz/fe-component-library/accordion';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { useLocalize } from 'localize-react';\nimport React, { FunctionComponent } from 'react';\n\ntype FAQType = {\n title: string;\n text: string;\n}\n\nconst FAQ: FunctionComponent = () => {\n const { translate } = useLocalize();\n\n const faqs: FAQType[] = [\n {\n title: translate('FAQ_title1'),\n text: translate('FAQ_text1'),\n },\n {\n title: translate('FAQ_title2'),\n text: translate('FAQ_text2'),\n },\n {\n title: translate('faq_no_show_title'),\n text: translate('faq_no_show_text'),\n },\n {\n title: translate('faq_running_late_title'),\n text: translate('faq_running_late_text'),\n },\n ];\n return (\n
\n \n {translate('asked_questions')}\n \n {faqs.map((faqItem: FAQType, idx: number) => (\n \n ))}\n
\n );\n};\n\nexport default FAQ;\n","import { useQuery } from '@apollo/client';\nimport Dropdown from '@transferz/fe-component-library/dropdown';\nimport Typography from '@transferz/fe-component-library/typography';\nimport VideoCard from '@transferz/fe-component-library/video-card';\nimport { useLocalize } from 'localize-react';\nimport React, { useState } from 'react';\nimport { Controller, useForm } from 'react-hook-form';\n\nimport { GetCacheProfile } from '../../models/graphql';\nimport { useSetCacheProfile } from '../../services/apolloCacheHooks';\nimport InstructionalVideo from '../InstructionalVideo';\n\nexport type InstructionalVideoType = {\n title: string;\n videoId: string;\n duration: number;\n cover: string;\n}\n\nexport type VideoListType = {\n [key: string]: InstructionalVideoType[];\n}\n\nconst InstructionalVideos = () => {\n const { translate } = useLocalize();\n const setCacheProfile = useSetCacheProfile();\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n const [videoId, setVideoId] = useState('');\n\n const languages = [\n { value: 'en', label: `${translate('english')} (EN)`, icon: 'gb' },\n { value: 'it', label: `${translate('italian')} (IT)`, icon: 'it' },\n { value: 'es', label: `${translate('spanish')} (ES)`, icon: 'es' },\n { value: 'pt', label: `${translate('portuguese')} (PT)`, icon: 'pt' },\n { value: 'de', label: `${translate('german')} (DE)`, icon: 'de' },\n ];\n\n const { control, watch } = useForm({\n defaultValues: { language: cachedProfileData.videoLang || 'en' },\n });\n\n const videos: VideoListType = {\n en: [\n {\n title: 'How to execute a journey using the transferz Driver app',\n videoId: 'Dn_K9-wqVpo',\n duration: 260,\n cover: 'taxi',\n },\n {\n title: 'How to add driver codes using the transferz Driver app',\n videoId: '6pKXSAv4J8g',\n duration: 83,\n cover: 'phone',\n },\n {\n title: 'How to edit your profile in the transferz Driver app',\n videoId: 'qHRRLscAJHo',\n duration: 106,\n cover: '',\n },\n {\n title: 'How to report pickup issues',\n videoId: 'TOlNTUpvrd8',\n duration: 186,\n cover: 'issues',\n },\n ],\n it: [\n {\n title: \"Come eseguire un trasferimento utilizzando l'applicazione di Transferz per conducenti\",\n videoId: 'f3CvSpI4-2Y',\n duration: 347,\n cover: 'taxi',\n },\n {\n title: \"Come aggiungere i codici per conducenti utilizzando l'applicazione di Transferz per conducenti\",\n videoId: 'xpidbqj1O8s',\n duration: 91,\n cover: 'phone',\n },\n {\n title: \"Come modificare il tuo profilo nell'applicazione di Transferz per conducenti\",\n videoId: 'CoJp_yvIS5g',\n duration: 96,\n cover: '',\n },\n {\n title: 'Come segnalare un problema alla presa in carico del cliente',\n videoId: 'rNqylQkKAdQ',\n duration: 159,\n cover: 'issues',\n },\n ],\n es: [\n {\n title: 'Cómo realizar un viaje usando la aplicación Transferz Driver',\n videoId: 'PF4WyxlZmgM',\n duration: 342,\n cover: 'taxi',\n },\n {\n title: 'Cómo agregar códigos de conductor usando la aplicación Transferz Driver',\n videoId: 'F8fztwfVuRM',\n duration: 84,\n cover: 'phone',\n },\n {\n title: 'Cómo editar tu perfil en la aplicación Transferz Driver',\n videoId: 'BW_ItBlDsyU',\n duration: 98,\n cover: '',\n },\n {\n title: 'Cómo reportar problemas de recogida',\n videoId: 's6b5_6qYEZs',\n duration: 169,\n cover: 'issues',\n },\n ],\n pt: [\n {\n title: \"Como executar uma viagem usando o 'Driver App' da Transferz\",\n videoId: 'VYUWkuuysyQ',\n duration: 331,\n cover: 'taxi',\n },\n {\n title: \"Como adicionar códigos de motorista usando o 'Driver App' da Transferz\",\n videoId: 'ls1BCJTURdk',\n duration: 162,\n cover: 'phone',\n },\n {\n title: \"Como editar seu perfil no 'Driver App' da Transferz\",\n videoId: '4ESlyjtUNts',\n duration: 104,\n cover: '',\n },\n {\n title: 'Como relatar problemas de recolha',\n videoId: '5hWQ66TbIdM',\n duration: 219,\n cover: 'issues',\n },\n ],\n de: [\n {\n title: 'So führen Sie eine Fahrt mit der transferz Driver App durch',\n videoId: 'SxyF8dddM1s',\n duration: 345,\n cover: 'taxi',\n },\n {\n title: 'Hinzufügen von Fahrercodes mit der transferz Driver App',\n videoId: 'RPi4M4zooPc',\n duration: 119,\n cover: 'phone',\n },\n {\n title: 'So bearbeiten Sie Ihr Profil in der transferz Driver App',\n videoId: '-stfkS1WYzg',\n duration: 176,\n cover: '',\n },\n {\n title: 'Wie melde ich Probleme bei der Abholung',\n videoId: 'mG8pganrG-E',\n duration: 222,\n cover: 'issues',\n },\n ],\n };\n\n const openVideo = (id: string) => {\n setVideoId(id);\n };\n\n const currentLanguage = watch('language');\n\n return (\n
\n \n {translate('instructional_videos')}\n \n (\n {\n // @ts-ignore\n setCacheProfile({ videoLang: lang.value }).then(() => {\n console.log(cachedProfileData, lang);\n onChange(lang.value);\n });\n }}\n onBlur={onBlur}\n className=\"m-b-24\"\n noValidation\n isSearchable\n />\n )}\n />\n {videos[currentLanguage].map((video: InstructionalVideoType, idx: number) => (\n openVideo(video.videoId)}\n cover={video.cover as any}\n className=\"m-b-24\"\n key={idx}\n />\n ))}\n setVideoId('')} />\n
\n );\n};\n\nexport default InstructionalVideos;\n","import PhoneRingIcon from '@transferz/fe-component-library/phone-ring-icon';\nimport PlayIcon from '@transferz/fe-component-library/play-icon';\nimport QuestionMarkIcon from '@transferz/fe-component-library/question-mark-icon';\nimport Tabs from '@transferz/fe-component-library/tabs';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { useLocalize } from 'localize-react';\nimport React, { FunctionComponent, useState } from 'react';\n\nimport StickyBackButton from '../../components/StickyBackButton';\nimport Contact from './Contact';\nimport FAQ from './FAQ';\nimport InstructionalVideos from './Videos';\n\nconst Support: FunctionComponent = () => {\n const [activeTab, setActiveTab] = useState('videos');\n const { translate } = useLocalize();\n\n const tabs = [\n {\n label: translate('videos'),\n icon: ,\n active: activeTab === 'videos',\n tab: 'videos',\n },\n {\n label: translate('faq'),\n icon: ,\n active: activeTab === 'faq',\n tab: 'faq',\n },\n {\n label: translate('contact'),\n icon: ,\n active: activeTab === 'contact',\n tab: 'contact',\n },\n ];\n\n const handleTabClick = (tab: string) => {\n console.log(`DEBUG User clicked on tab: ${tab}`);\n setActiveTab(tab);\n };\n\n return (\n
\n \n
\n \n {translate('help')}\n \n
\n
\n \n
\n
\n {activeTab === 'contact' && }\n {activeTab === 'videos' && }\n {activeTab === 'faq' && }\n
\n
\n );\n};\n\nexport default Support;\n","import { useQuery } from '@apollo/client';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport BottomDrawer from '@transferz/fe-component-library/bottom-drawer';\nimport { Button } from '@transferz/fe-component-library/button';\nimport CarIcon from '@transferz/fe-component-library/car-icon';\nimport Dropdown from '@transferz/fe-component-library/dropdown';\nimport Input from '@transferz/fe-component-library/input';\nimport Loader from '@transferz/fe-component-library/loader';\nimport TrashIcon from '@transferz/fe-component-library/trash-icon';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { useLocalize } from 'localize-react';\nimport React, { useEffect, useState } from 'react';\nimport { Controller, useForm } from 'react-hook-form';\nimport { useLocation, useNavigate } from 'react-router';\nimport * as yup from 'yup';\n\nimport StickyBackButton from '../components/StickyBackButton';\nimport { CacheVehicleMake } from '../models/CacheVehicleMakes';\nimport { GetCacheProfile, GetCacheVehicleMakes } from '../models/graphql';\nimport {\n useAddVehicle,\n useDeleteVehicle,\n useEditVehicle,\n useGetVehicleMakes,\n useGetVehicleSeries,\n} from '../services/apolloNetworkHooks';\nimport { IData } from './DriverInformation';\n\ninterface VehicleProps {\n vehicleType: string;\n}\n\nconst VehiclePage = ({ vehicleType }: VehicleProps) => {\n const navigate = useNavigate();\n const { translate } = useLocalize();\n const location: any = useLocation();\n const prevRoute = location?.state?.route;\n const vehicleParamMakeName = location?.state?.carBrand;\n const vehicleParamSerieName = location?.state?.carType;\n\n const [deleteBottomDrawer, setDeleteBottomDrawer] = useState(false);\n const [carMakes, setCarMakes] = useState([]);\n const [carSeriesDropdown, setCarSeriesDropdown] = useState([]);\n\n const { data: cachedVehicleMakes } = useQuery(GetCacheVehicleMakes);\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n\n const getVehicleMakes = useGetVehicleMakes();\n const getVehicleSeries = useGetVehicleSeries();\n const deleteVehicle = useDeleteVehicle();\n const addVehicle = useAddVehicle();\n const editVehicle = useEditVehicle();\n\n const validations = yup.object().shape({\n license: yup.string().required(translate('field_required')),\n carBrand: yup.number().required(translate('field_required')),\n carType: yup.number().required(translate('field_required')),\n });\n\n const {\n register, handleSubmit, setValue, control, watch, reset,\n } = useForm({\n resolver: yupResolver(validations),\n defaultValues: {\n license: location?.state?.license,\n carBrand: 0,\n carType: 0,\n },\n });\n\n const licenseValue = watch('license');\n const carBrandValue = watch('carBrand');\n const carTypeValue = watch('carType');\n\n const handleDeleteVehicleById = () => {\n console.log('DEBUG User clicked on delete vehicle button');\n deleteVehicle(location?.state?.vehicleID, () => {\n console.log('INFO Vehicle deleted');\n navigate(`/${prevRoute}`, { state: { notification: 'delete' } });\n });\n };\n\n const handleAddOrUpdateVehicle = () => {\n console.log('DEBUG User clicked on add or update vehicle button');\n if (vehicleType === 'update-car') {\n editVehicle(location?.state?.vehicleID, carTypeValue, licenseValue, () => {\n console.log('INFO Vehicle updated');\n navigate(`/${prevRoute}`, { state: { notification: 'update' } });\n });\n }\n else if (vehicleType === 'new-car') {\n addVehicle(cachedProfileData?.driverId, carTypeValue, licenseValue, () => {\n console.log('INFO Vehicle added');\n navigate(`/${prevRoute}`, { state: { notification: 'create' } });\n });\n }\n };\n\n useEffect(() => {\n if (carBrandValue === 0) return;\n\n if (!carTypeValue && vehicleParamSerieName && carSeriesDropdown?.length && vehicleType === 'update-car') {\n const vehicleSerieId = carSeriesDropdown.filter((serie: any) => serie.label === vehicleParamSerieName)[0];\n\n if (vehicleSerieId?.value) setValue('carType', vehicleSerieId.value);\n }\n else {\n getVehicleSeries(carBrandValue, (series: any) => {\n if (series) {\n setCarSeriesDropdown(series);\n\n setValue('carType', 0);\n }\n else {\n console.log('Something went wrong');\n }\n });\n }\n }, [carBrandValue]);\n\n useEffect(() => {\n if (!carBrandValue && vehicleParamMakeName && carMakes?.length && vehicleType === 'update-car') {\n const vehicleMakeId = carMakes.filter((make: any) => make.label === vehicleParamMakeName)[0];\n\n if (vehicleMakeId?.value) {\n getVehicleSeries(vehicleMakeId.value, (series: any) => {\n if (series) {\n setCarSeriesDropdown(series);\n\n setValue('carBrand', vehicleMakeId.value);\n }\n else {\n console.log('Something went wrong');\n }\n });\n }\n }\n }, [carMakes]);\n\n useEffect(() => {\n console.log('INFO Vehicle page loaded');\n // If no cached vehicle makes, fetch them all for a dropdown\n if (!cachedVehicleMakes?.makes?.length) {\n getVehicleMakes((vehicleMakes: CacheVehicleMake[]) => {\n if (vehicleMakes?.length) {\n setCarMakes(vehicleMakes);\n }\n else {\n // @TODO write some kind of an error to the user\n }\n });\n }\n else {\n setCarMakes(cachedVehicleMakes.makes);\n }\n }, []);\n\n if (!carMakes?.length) {\n return ;\n }\n\n // useEffect(() => {\n // if(deleteBottomDrawer) {\n\n // }\n // }, [deleteBottomDrawer])\n\n return (\n
\n \n setDeleteBottomDrawer(false)}\n >\n }\n iconPosition=\"left\"\n fullWidth\n onClick={handleDeleteVehicleById}\n className=\"m-b-10\"\n />\n \n\n \n {vehicleType === 'new-car' ? translate('new_vehicle') : translate('change_details')}\n \n = 3}\n upperCase\n label={translate('your_plate_number')}\n placeholder={translate('plate_number')}\n className=\"m-b-24 repetitive\"\n defaultValue={licenseValue}\n data-testid=\"input_edit-license\"\n iconLeft={}\n />\n (\n {\n onChange(brand.value);\n }}\n onBlur={onBlur}\n confirmed={!!carBrandValue}\n isSearchable\n />\n )}\n />\n\n (\n {\n onChange(type.value);\n }}\n onBlur={onBlur}\n confirmed={!!carTypeValue}\n isSearchable\n />\n )}\n />\n {vehicleType === 'update-car' && (\n
\n setDeleteBottomDrawer(true)}\n >\n \n \n {translate('delete_vehicle')}\n \n
\n
\n )}\n
\n \n
\n
\n );\n};\n\nexport default VehiclePage;\n","import { useQuery } from '@apollo/client';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { Button } from '@transferz/fe-component-library/button';\nimport CameraIcon from '@transferz/fe-component-library/camera-icon';\nimport CarIcon from '@transferz/fe-component-library/car-icon';\nimport CarRightIcon from '@transferz/fe-component-library/car-right-icon';\nimport CircleCheckIcon from '@transferz/fe-component-library/circle-check-icon';\nimport Dropdown from '@transferz/fe-component-library/dropdown';\nimport Input from '@transferz/fe-component-library/input';\nimport Loader from '@transferz/fe-component-library/loader';\nimport LogoIcon from '@transferz/fe-component-library/logo-icon';\nimport Notification from '@transferz/fe-component-library/notification';\nimport PhoneIcon from '@transferz/fe-component-library/phone-icon';\nimport DialPhoneDropdown from '@transferz/fe-component-library/phone-input';\nimport ProfileIcon from '@transferz/fe-component-library/profile-icon';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { withLDConsumer } from 'launchdarkly-react-client-sdk';\nimport { useLocalize } from 'localize-react';\nimport React, { ReactElement, useEffect, useState } from 'react';\nimport { Controller, SubmitHandler, useForm } from 'react-hook-form';\nimport { useNavigate } from 'react-router-dom';\nimport * as yup from 'yup';\n\nimport FileUpload from '../components/fileUpload/fileUpload';\nimport { CacheVehicleMake } from '../models/CacheVehicleMakes';\nimport { GetCacheProfile } from '../models/graphql';\nimport { useSetCacheProfile } from '../services/apolloCacheHooks';\nimport {\n useAddVehicle,\n useAssociateJourney,\n useEditDriverData,\n useGetDriverVehicles,\n useGetVehicleMakes,\n useGetVehicleSeries,\n useLoginEmail,\n useSendOTP,\n useSetDriverPhoto,\n} from '../services/apolloNetworkHooks';\nimport { routes } from '../services/constant';\n\ntype FormFields = {\n name: string;\n photo: string;\n licence: string;\n carBrand: number;\n carType: number;\n};\n\ntype FileType = {\n file: File | null,\n url: string,\n}\ninterface IData {\n value: number;\n label: string;\n}\n\nconst WelcomePage: () => ReactElement = function () {\n console.log('Debug loading welcome page');\n const classBase = 'welcome-page';\n const [error, setError] = useState('');\n const [loading, setLoading] = useState(false);\n const setCacheProfile = useSetCacheProfile();\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n const associateJourney = useAssociateJourney();\n const loginWithEmail = useLoginEmail();\n const sendOTP = useSendOTP();\n const { translate } = useLocalize();\n const [screen, setScreen] = useState('welcome');\n const [profilePicture, setProfilePicture] = useState();\n const [carMakes, setCarMakes] = useState([]);\n const [carSeriesDropdown, setCarSeriesDropdown] = useState([]);\n const getVehicleMakes = useGetVehicleMakes();\n const getVehicleSeries = useGetVehicleSeries();\n const addVehicle = useAddVehicle();\n const updateDriverPhoto = useSetDriverPhoto();\n const updateDriver = useEditDriverData();\n\n const {\n register,\n watch,\n handleSubmit,\n control,\n formState: { errors },\n } = useForm();\n const licenceValue = watch('licence');\n const carBrandValue = watch('carBrand');\n const carTypeValue = watch('carType');\n const driverName = watch('name');\n\n const changeScreen = (nextScreen: string) => {\n setScreen(nextScreen);\n };\n\n const navigate = useNavigate();\n\n const uploadPhoto = (e: React.ChangeEvent) => {\n const file: any = (e.target as HTMLInputElement).files![0];\n const url = URL.createObjectURL(file);\n updateDriverPhoto(file, (data: any) => {\n if (data?.data?.uploadDriverPhoto?.success) {\n setProfilePicture({\n file,\n url,\n });\n }\n });\n };\n\n const handleInputFocus = () => {\n setError('');\n };\n\n const handleAddVehicle = () => {\n addVehicle(\n cachedProfileData?.driverId,\n carTypeValue,\n licenceValue,\n () => {\n changeScreen('completed');\n },\n );\n };\n\n const startJourney = () => {\n console.log('Debug start journey');\n setLoading(true);\n\n const driverData = { ...cachedProfileData };\n\n driverData.name = driverName;\n\n updateDriver(\n driverData.id,\n driverData.phone,\n driverData.name,\n () => {\n console.log('Debug start journey 22');\n if (cachedProfileData?.lastJourneyView) {\n const code = cachedProfileData?.lastJourneyView;\n associateJourney(code, () => {\n setCacheProfile({\n lastJourneyView: '',\n }).then(() => {\n setTimeout(() => {\n setLoading(false);\n\n navigate(\n `${routes.journey}/${code}`,\n { state: { notification: 'addJourneySuccess' } },\n );\n }, 250);\n });\n }, driverData, true);\n }\n else {\n console.log('Debug start journey 33');\n setTimeout(() => {\n setLoading(false);\n\n navigate(routes.journeys);\n }, 250);\n }\n },\n );\n };\n\n useEffect(() => {\n console.log('Debug car brand');\n if (!carBrandValue) return;\n // @ts-ignore\n const value = carBrandValue.value ? carBrandValue.value : carBrandValue;\n getVehicleSeries(value, (data) => {\n setCarSeriesDropdown(data);\n });\n }, [carBrandValue]);\n\n useEffect(() => {\n console.log('Debug getVehicleMakes');\n getVehicleMakes((vehicleMakes: CacheVehicleMake[]) => {\n if (vehicleMakes?.length) {\n setCarMakes(vehicleMakes);\n }\n else {\n console.log('Debug error no vehicles');\n // @TODO write some kind of an error to the user\n }\n });\n }, []);\n\n if (loading) {\n console.log('Debug loading');\n return (\n \n );\n }\n\n return (\n \n {screen !== 'welcome' && (\n
\n \n \n {translate('driver_app')}\n \n
\n )}\n\n
\n {screen === 'welcome' && }\n {screen === 'name' && }\n {screen === 'photo' && !profilePicture ? :\n screen === 'photo' && profilePicture && \"profilePicture\"}\n {screen === 'vehicle' && }\n {screen === 'completed' && }\n
\n\n
\n \n {screen === 'welcome' && translate('welcome_app_title')}\n {screen === 'name' && translate('whats_your_name')}\n {screen === 'photo' && !profilePicture ? translate('picture_time_title') :\n screen === 'photo' && profilePicture && `${translate('you_look_great')}, ${driverName}!`}\n {screen === 'vehicle' && translate('onboarding_your_vehicle_title')}\n {screen === 'completed' && translate('onboarding_awesome_title')}\n\n \n
\n\n {screen !== 'name' && screen !== 'vehicle' && (\n
\n \n {screen === 'welcome' && translate('enjoy_the_app')}\n {screen === 'photo' && !profilePicture && translate('take_picture')}\n {screen === 'completed' && translate('set_for_first_journey')}\n\n \n
\n )}\n\n
\n {screen === 'welcome' && (\n changeScreen('name')}\n data-testid=\"button_lets-start\"\n fullWidth\n />\n )}\n {screen === 'name' && (\n
\n
\n \n
\n changeScreen('photo')}\n data-testid=\"button_your-name-next\"\n fullWidth\n />\n
\n )}\n\n {screen === 'photo' && !profilePicture ? (\n \n ) : screen === 'photo' && profilePicture && (\n
\n
\n \n
\n changeScreen('vehicle')}\n className=\"m-t-16\"\n />\n
\n\n )}\n\n {screen === 'vehicle' && (\n <>\n }\n confirmed={licenceValue?.length >= 3}\n data-testid=\"input_license-number\"\n />\n\n (\n {\n onChange(brand.value);\n }}\n onBlur={onBlur}\n confirmed={!!carBrandValue}\n isSearchable\n />\n )}\n />\n (\n {\n onChange(type.value);\n }}\n onBlur={onBlur}\n confirmed={!!carTypeValue}\n isSearchable\n />\n )}\n />\n \n
\n changeScreen('completed')}\n />\n
\n\n \n )}\n\n {screen === 'completed' && (\n \n )}\n\n
\n\n \n );\n};\n\nexport default withLDConsumer()(WelcomePage);\n","import '@transferz/fe-component-library/style';\nimport './style/main.scss';\n\nimport { useQuery } from '@apollo/client';\nimport { datadogLogs } from '@datadog/browser-logs';\nimport { datadogRum } from '@datadog/browser-rum';\nimport ErrorScreen from '@transferz/fe-component-library/error-screen';\nimport Loader from '@transferz/fe-component-library/loader';\nimport Typography from '@transferz/fe-component-library/typography';\nimport { LocalizationConsumer, LocalizationProvider } from 'localize-react';\nimport React, {\n useCallback, useContext, useEffect, useState,\n} from 'react';\nimport {\n Navigate, Route, Routes, useLocation,\n useNavigate,\n} from 'react-router-dom';\n\nimport { LanguageContext } from './language/LanguageContext';\nimport { translations } from './language/translations';\nimport MainLayout from './layout/MainLayout';\nimport { GetCacheProfile } from './models/graphql';\nimport GetCacheApiError from './models/graphql/GetCacheApiError';\nimport DriverInformation from './pages/DriverInformation';\nimport DriverName from './pages/DriverName';\nimport EditProfile from './pages/EditProfile';\nimport JourneyOverview from './pages/JourneyOverview';\nimport JourneyPage from './pages/JourneyPage';\nimport Login from './pages/LogIn';\nimport PinScreen from './pages/PinScreen';\nimport ProfilePage from './pages/Profile';\nimport Support from './pages/Support';\nimport VehiclePage from './pages/VehiclePage';\nimport WelcomePage from './pages/WelcomePage';\nimport { useSetApiError, useSetCacheProfile } from './services/apolloCacheHooks';\nimport { useRetrieveSession, useValidateAccessToken } from './services/apolloNetworkHooks';\nimport { useNewSession } from './services/apolloNetworkHooks/useNewSession';\nimport { routes } from './services/constant';\nimport {\n checkStorageAndCookies,\n getAccessToken,\n getRefreshToken,\n getSessionToken,\n getTokenExpirationTime,\n} from './services/store';\nimport useOnlineStatus from './utils/useOnlineStatus';\n\nconst App = () => {\n const navigate = useNavigate();\n const [storageStatus, setStorageStatus] = useState('');\n const [authorizationInProgress, setAuthorizationInProgress] = useState(false);\n const [authenticatedUser, setAuthenticatedUser] = useState(false);\n const { data: cachedProfileData } = useQuery(GetCacheProfile);\n const { data: getCacheApiErrorData } = useQuery(GetCacheApiError);\n const location: { [key: string]: any } = useLocation();\n const { language } = useContext(LanguageContext);\n const isOnline = useOnlineStatus();\n const [tokenRefreshTime, setTokenRefreshTime] = useState(0);\n const newSession = useNewSession();\n const validateAccessToken = useValidateAccessToken();\n const setCacheProfile = useSetCacheProfile();\n const setApiError = useSetApiError();\n const retrieveSession = useRetrieveSession();\n const tokenExpirationTime = getTokenExpirationTime();\n const refreshTimeInMilliseconds = tokenExpirationTime ? (Number(tokenExpirationTime) - 60) * 1000 : 0;\n\n const offlineOverlay = (\n
\n {\n if (!isOnline) alert('You are not online still, sorry. :(');\n }}\n />\n
\n );\n\n const handleNewSession = () => {\n if (authorizationInProgress) return;\n\n newSession(() => {\n setAuthorizationInProgress(false);\n });\n };\n\n useEffect(() => {\n // User is authenticated\n if (cachedProfileData?.token && cachedProfileData?.refreshToken && cachedProfileData?.driverId) {\n setAuthenticatedUser(true);\n const { driverId, name, email } = cachedProfileData;\n datadogRum.setUser({\n name, email, id: driverId,\n });\n datadogLogs.setUser({\n name, email, id: driverId,\n });\n }\n // User is un-authenticated\n else if (authenticatedUser) {\n if (!cachedProfileData?.token) handleNewSession();\n\n setAuthenticatedUser(false);\n }\n }, [cachedProfileData]);\n\n const validateToken = useCallback(() => {\n const availableStore: string = checkStorageAndCookies();\n setStorageStatus(availableStore);\n\n if (availableStore && availableStore !== 'unavailable') {\n const sessionToken = getSessionToken();\n const refreshToken = getRefreshToken();\n const accessToken = getAccessToken();\n\n setAuthorizationInProgress(true);\n setCacheProfile({\n token: sessionToken || '',\n refreshToken: refreshToken || '',\n accessToken: accessToken || '',\n }).then((newCacheProfile: any) => {\n validateAccessToken(newCacheProfile, (response: any) => {\n if (!response && location.pathname === '/') {\n navigate('/');\n }\n setAuthorizationInProgress(false);\n if (response?.driverId) {\n setTokenRefreshTime(refreshTimeInMilliseconds);\n }\n });\n });\n }\n else {\n navigate('/');\n }\n }, []);\n\n const handleRefreshToken = () => {\n const sessionToken = getSessionToken();\n const refreshToken = getRefreshToken();\n const accessToken = getAccessToken();\n setCacheProfile({\n token: sessionToken || '',\n refreshToken: refreshToken || '',\n accessToken: accessToken || '',\n }).then((newCacheProfile: any) => {\n retrieveSession(newCacheProfile.token, newCacheProfile.refreshToken, (response: any) => {\n if (!response && location.pathname === '/') {\n navigate('/');\n }\n const refreshTimeMilliseconds = response?.expiresInSeconds ? (response.expiresInSeconds - 60) * 1000 : 0;\n setTokenRefreshTime(refreshTimeMilliseconds);\n });\n });\n };\n\n useEffect(() => {\n // Immediately validate the token on component mount\n validateToken();\n if (tokenRefreshTime > 0 && refreshTimeInMilliseconds > 0) {\n const intervalId = setInterval(handleRefreshToken, tokenRefreshTime || refreshTimeInMilliseconds);\n return () => clearInterval(intervalId);\n }\n }, [tokenRefreshTime, refreshTimeInMilliseconds]);\n\n const removeApiError = () => {\n const pathname = location.pathname;\n\n if (pathname !== '/journeys' || pathname !== '') {\n navigate(-1);\n }\n\n setApiError(false);\n };\n\n // If localStorage and cookies aren't available don't render the application.\n if (storageStatus === 'unavailable') {\n return (\n \n \n
\n \n {({ translate }) => translate('localStorage_cookies')}\n \n
\n
\n
\n );\n }\n\n // While waiting for localStorage and cookies availability check don't load the application.\n if (!storageStatus) {\n return (\n \n \n
\n \n {({ translate }) => translate('checking_settings')}\n \n
\n
\n
\n );\n }\n\n // While waiting for sessionToken to be created don't load the application.\n if (!cachedProfileData?.token || authorizationInProgress) {\n return (\n \n \n {({ translate }) => translate('please_wait')}}\n fullScreen\n />\n \n \n );\n }\n /* ROUTES FOR UN-AUTHENTICATED USERS */\n if (!authenticatedUser) {\n return (\n \n \n \n {/* ROOT ROUTES */}\n } />\n } />\n\n {/* SUPPORT */}\n } />\n\n {/* LOGIN ROUTES */}\n } />\n } />\n setTokenRefreshTime(expiration)} />}\n />\n } />\n\n {/* JOURNEY ROUTES */}\n } />\n \n\n {getCacheApiErrorData.status && }\n\n {!isOnline && offlineOverlay}\n \n \n );\n }\n\n /* ROUTES FOR AUTHENTICATED USERS */\n return (\n \n \n \n {/* ROOT ROUTES */}\n }>\n } />\n \n\n {/* SUPPORT */}\n } />\n\n } />\n } />\n } />\n\n {/* JOURNEY ROUTES */}\n } />\n }>\n } />\n \n\n {/* PROFILE ROUTES */}\n } />\n } />\n } />\n\n {/* VEHICLE ROUTES */}\n } />\n } />\n \n\n {getCacheApiErrorData.status && }\n\n {!isOnline && offlineOverlay}\n \n \n );\n};\n\nexport default App;\n","import { useEffect } from 'react';\nimport { useLocation } from 'react-router-dom';\n\nexport default function ScrollToTop() {\n const { pathname } = useLocation();\n\n useEffect(() => {\n window.scrollTo(0, 0);\n }, [pathname]);\n\n return null;\n}\n","import React, { useEffect, useMemo, useState } from 'react';\n\nimport { getLanguage, storeLanguage } from '../services/store';\nimport { LanguageContext } from './LanguageContext';\nimport { fetchTranslations } from './translations';\n\nconst WithLanguage = ({ children }: {children: JSX.Element[] | JSX.Element}) => {\n const [language, setLanguage] = useState('');\n const browserLanguage: string = navigator?.language?.split('-')[0];\n\n useEffect(() => {\n const storedLanguage = getLanguage();\n\n const lng = storedLanguage || browserLanguage;\n\n setLanguage(lng);\n fetchTranslations(lng);\n }, []);\n\n // useEffect(() => {\n // fetchTranslations(language);\n // storeLanguage(language);\n // }, [language]);\n\n const contextObj = useMemo(() => ({ language, setLanguage }), [language]);\n\n return { children };\n};\n\nexport default WithLanguage;\n","import {\n ApolloClient, ApolloLink, InMemoryCache, NormalizedCacheObject,\n} from '@apollo/client';\nimport { createUploadLink } from 'apollo-upload-client';\n\nimport { CacheProfileEmpty } from '../models/CacheProfile';\nimport {\n GetCacheDriverVehicles,\n GetCacheJourneys, GetCacheProfile, GetCacheVehicleMakes,\n} from '../models/graphql';\nimport GetCacheNotifications from '../models/graphql/GetCacheApiError';\nimport { baseURL } from './constant';\n\nconst uploadLink = createUploadLink({ uri: baseURL });\nlet Client: ApolloClient | null = null;\n\nexport const setInitialCache:\n (client: ApolloClient) => ApolloClient =\n (client: ApolloClient) => {\n client.writeQuery({\n query: GetCacheProfile,\n data: CacheProfileEmpty,\n });\n\n client.writeQuery({\n query: GetCacheJourneys,\n data: {\n success: 0,\n message: '',\n currentPage: 0,\n pageSize: 0,\n totalPages: 0,\n totalResults: 0,\n items: [],\n },\n });\n\n client.writeQuery({\n query: GetCacheVehicleMakes,\n data: {\n makes: [],\n },\n });\n\n client.writeQuery({\n query: GetCacheDriverVehicles,\n data: {\n vehicles: [],\n },\n });\n // Ovdje sad ide samo state za notifikacije za api error-e\n client.writeQuery({\n query: GetCacheNotifications,\n data: {\n status: false,\n },\n });\n\n return client;\n };\n\nexport const initializeClient: () => ApolloClient = () => {\n Client = new ApolloClient({\n link: ApolloLink.from([uploadLink]),\n cache: new InMemoryCache(),\n });\n\n Client = setInitialCache(Client);\n\n return Client;\n};\n","import { ApolloProvider } from '@apollo/client';\nimport { datadogLogs } from '@datadog/browser-logs';\nimport { datadogRum } from '@datadog/browser-rum';\nimport { asyncWithLDProvider } from 'launchdarkly-react-client-sdk';\nimport React, { useEffect, useState } from 'react';\nimport ReactDOM from 'react-dom';\nimport { GoogleReCaptchaProvider } from 'react-google-recaptcha-v3';\nimport { BrowserRouter } from 'react-router-dom';\n\nimport App from './App';\nimport ScrollToTop from './components/ScrollToTop';\nimport { getAllLanguageCodes } from './language/translations';\nimport WithLanguage from './language/WithLanguage';\nimport { initializeClient } from './services/apollo';\nimport { baseURL } from './services/constant';\nimport { OnlineStatusProvider } from './utils/useOnlineStatus';\n\n(async () => {\n function LaunchDarklyApp() {\n const [element, setElement] = useState(
);\n\n const initializeLD = async () => {\n try {\n const response = await fetch(`${baseURL}/configs`);\n const configs: any = await response.json();\n\n const LDProvider = await asyncWithLDProvider({\n clientSideID: configs?.launchDarklyId,\n user: {\n key: 'DRIVER_APP_USER',\n },\n options: {\n streaming: false,\n },\n });\n\n // @ts-ignore\n window.tzGlobalConfigs = configs;\n\n datadogRum.init({\n applicationId: configs.datadogApplicationId,\n clientToken: configs.datadogClientToken,\n site: 'datadoghq.eu',\n service: 'driver-web',\n allowedTracingUrls: [/https:\\/\\/(staging\\.|test\\.|)transferz\\.taxi/],\n // excludedActivityUrls: [/^https:\\/\\/events\\.launchdarkly\\.com/],\n // allowedTracingUrls: [/^https?:\\/\\/.*$/],\n sessionSampleRate: 100,\n sessionReplaySampleRate: 100,\n trackResources: true,\n trackLongTasks: true,\n trackInteractions: true,\n trackFrustrations: true,\n trackUserInteractions: true,\n defaultPrivacyLevel: 'mask-user-input',\n env: configs.env,\n version: `${process.env.REACT_APP_COMMIT}`,\n } as any);\n\n datadogLogs.init({\n clientToken: configs.datadogClientToken,\n site: 'datadoghq.eu',\n forwardErrorsToLogs: true,\n sessionSampleRate: 100,\n service: 'driver-web',\n forwardConsoleLogs: 'all',\n env: configs.env,\n version: `${process.env.REACT_APP_COMMIT}`,\n });\n\n setElement(\n \n \n ,\n );\n }\n catch (e: any) {\n console.log('Fetching API configs failed. Error - ', e);\n\n setElement();\n }\n };\n\n useEffect(() => {\n initializeLD();\n }, []);\n\n return element;\n }\n\n await getAllLanguageCodes();\n\n ReactDOM.render(\n \n \n \n \n \n \n \n \n \n \n \n ,\n document.getElementById('root'),\n );\n})();\n"],"names":["Header","flags","navigate","useNavigate","location","useLocation","translate","useLocalize","data","cachedProfileData","useQuery","GetCacheProfile","useSetCacheProfile","isMenuOpen","setIsMenuOpen","useState","buttonRef","useRef","language","setLanguage","useContext","LanguageContext","languages","setLanguages","showMenu","pathname","routes","login","phone","email","name","pin","toggleMenu","log","profile","photo","className","src","alt","ProfileIcon","color","menuItems","label","icon","ListIcon","onClick","QuestionMarkIcon","availableLanguages","enabledLangs","Object","keys","filter","key","substring","map","filteredKey","length","toLowerCase","lang","currentLang","langs","find","curr","code","toUpperCase","value","flag","sortedLanguages","useMemo","sort","a","b","labelA","labelB","children","LogoIcon","Typography","variant","support","hamburgerMenu","ref","XIcon","width","MenuIcon","PopUp","isOpen","togglePopUp","items","langSelect","langOptions","langValue","onLanguageChange","then","withLDConsumer","MainLayout","StickyBackButton","buttonText","isSticky","setIsSticky","onPageScroll","e","window","scrollY","addEventListener","removeEventListener","Button","priority","ChevronIcon","direction","height","iconPosition","textColor","Vehicle","vehicle","handleClick","selected","nonEditable","handleEditVehicle","vehicleID","license","carBrand","carType","updateVehicle","state","route","id","makeName","modelName","CarIcon","fill","licensePlate","seriesName","PING_RESOURCE","TIMEOUT_TIME_MS","onlinePollingInterval","ONLINE_STATUS","online","queries","timeout","time","promise","Promise","resolve","reject","Error","checkOnlineStatus","controller","AbortController","signal","navigator","onLine","fetch","method","error","abort","OnlineStatusContext","React","createContext","OnlineStatusProvider","onlineStatus","setOnlineStatus","checkStatus","forEach","query","setInterval","Provider","useOnlineStatus","getVehiclesByDriverIdQuery","createVehicle","createVehicleQuery","isJwtExpired","useCreateAction","createAction","createActionQuery","parseDate","date","newDate","Date","day","getDate","month","getMonth","year","getFullYear","monthNames","daysInMonth","tomorrowOrToday","nowDate","todayOrTomorrow","journeyDate","timeDifference","getTime","dateNowDate","dateJourneyDate","betw","before24Hours","is24Hours","parseString","string","newString","replace","charAt","slice","standardizePhoneNumber","phoneParts","split","phonePrefix","phoneNumber","String","searchActions","SearchActionsQuery","latestSelectedVehicleId","DriverInformation","trackEvent","useDataLayer","addAction","useAddAction","loading","setLoading","selectedVehicleId","setSelectedVehicleId","vehicles","setVehicles","carMakes","setCarMakes","carSeriesDropdown","setCarSeriesDropdown","notification","showNotification","locationServices","setLocationServices","LocationServices","UNKNOWN","showButtonLoading","setShowButtonLoading","cachedVehicleMakes","GetCacheVehicleMakes","cachedJourneysData","GetCacheJourneys","loadingProfileData","getAssociatedJourneys","useGetAssociatedJourneys","getVehicleMakes","useGetVehicleMakes","getVehicleSeries","useGetVehicleSeries","getDriverVehicles","useGetDriverVehicles","updateDriverPhoto","useSetDriverPhoto","assignJourney","useAssignJourney","assignVehicle","useAssignVehicle","setJourneyStatus","useSetJourneyStatus","addVehicle","useAddVehicle","register","handleSubmit","control","watch","useForm","licenseValue","carBrandValue","carTypeValue","selectVehicle","getJourneys","driverCode","lastJourneyView","journey","handleSubmitAndStartJourney","position","handleJourneyStatusChange","lastJourneyId","coords","latitude","longitude","success","handleVehicleAssign","handleDriverAssign","cachedJourney","execution","assignedDriverId","assignedDriverVehicleId","event","journeyCode","handleLocationErrorCases","PERMISSION_DENIED","text","DISABLED","POSITION_UNAVAILABLE","TIMEOUT","handleGetDriverLocation","geolocation","timeoutId","setTimeout","getCurrentPosition","ENABLED","onSubmit","driverId","newVehicle","newVehicles","handleAddNewVehicle","handleUploadPhoto","file","target","files","uploadDriverPhoto","size","url","renderLocationColor","undefined","parse","updated","makes","vehicleMakes","history","replaceState","document","title","Loader","fullScreen","Input","hasValue","type","defaultValue","ImageUpload","onChange","existingPhotoText","newPhotoText","PlusCircleIcon","_Fragment","upperCase","placeholder","iconLeft","confirmed","Controller","render","field","onBlur","Dropdown","brand","isSearchable","disabled","Notification","message","isSnackBar","fullWidth","spinner","DriverName","setCacheProfile","associateJourney","useAssociateJourney","updateDriver","useEditDriverData","defaultValues","driverName","driverData","journeys","required","ArrowIcon","EditProfile","path","useParams","phoneInput","setPhoneInput","isNameValid","setIsNameValid","PhoneInput","initialValue","origin","CircleCheckIcon","JourneyFilters","filterJourneys","setIsOpen","showFlags","setShowFlags","setValue","reset","useFormContext","filters","JourneyStatus","AVAILABLE","UNDERWAY_TO_PICKUP","ARRIVED_AT_PICKUP","JOURNEY_IN_PROGRESS","clearDates","pickupDateAfter","pickupDateBefore","onResetFilters","includedStatuses","filterStatuses","upcoming","textSearch","clearStatus","clearSearch","search","clearButtonShow","clear","autoComplete","SortSizeIcon","circle","BottomDrawer","onClose","RangeDatePicker","startDateValue","endDateValue","onRangeChange","start","end","onClear","PenIcon","StatusIndicator","status","withoutLabel","isCancelledOrCompleted","CANCELLED","COMPLETED","NO_LONGER_AVAILABLE","REASSIGNED_TRANSFER_COMPANY","REASSIGNED_DRIVER","CircleIcon","JourneyStatusStrings","JourneyHeaderBox","dangerIcon","DangerIcon","JourneyAddons","icons","BOOSTER_SEAT","BoosterSeatIcon","PETS","PetsIcon","BABY_SEAT","ChildSeatIcon","CHILD_SEAT","BabySeatIcon","SPECIAL_LUGGAGE","LuggageIcon","EXTRA_STOP","LocationIcon","MEET_GREET","MeetAndGreetIcon","JourneyInfoAddons","addons","CirclePlusIcon","addon","addonType","amount","JourneyInfoDetail","rightIcon","dataTestId","JourneyOverviewBox","handleDelete","pickupDate","startLocation","endLocation","startLocationHub","endLocationHub","flightNumber","estimatedTime","scheduledTime","delay","flightStatus","shipName","parts","match","splittedDriverCode","join","showIcon","setShowIcon","isCancelled","isCompleted","canDelete","PLANNED","renderIcon","PlaneIcon","SeaportIcon","TrainIcon","PointOfInterestIcon","journeyStarted","refDate","now","role","ev","stopPropagation","TrashIcon","showFlightTracker","FlightTracker","FlightStatusEnum","updatedOn","card","closeIcon","ShipIcon","CalendarNewIcon","ClockIcon","Divider","InstructionalVideo","videoId","onVideoReady","playVideo","YouTube","onReady","onEnd","opts","innerHeight","playerVars","autoplay","iv_load_policy","modestbranding","playsinline","JourneyFiltersDefault","JourneyOverview","getJourneyByCode","useGetJourneyByCode","deleteJourney","useDeleteJourney","pruneJourneys","usePruneJourneys","codeInputError","setCodeInputError","isCodeValid","setIsCodeValid","activeTab","setActiveTab","setJourneys","helpDrawer","setHelpDrawer","setVideoId","setApiError","useSetApiError","uncompletedJourneysNotification","setUncompletedJourneysNotification","deleteJourneyDrawer","setDeleteJourneyDrawer","pruneJourneysDrawer","setPruneJourneysDrawer","deleteJourneyCode","setDeleteJourneyCode","loadingJourneys","setLoadingJourneys","methods","videoLang","tabs","active","tab","CircleXIcon","videos","en","duration","cover","it","es","pt","de","codeValue","currentLanguage","sortUpcomingJourneys","currentDate","delayed","onTime","sortedJourneys","addJourney","handleFailedResponse","getJourneyData","associateJourneyData","info","handleTabClick","toggleHelpDrawer","navigateToSupportVideos","openDeleteJourneyDrawer","handleDeleteJourney","deleteJourneyData","openPruneJourneysDrawer","handlePruneJourneys","statuses","pruneJourneysData","noMargins","Boolean","trim","maxLength","style","Tabs","FormProvider","NoResultsIcon","additionalText","originLocation","address","formattedAddress","destinationLocation","hubInfo","hubType","traveller","flightInfo","noValidation","VideoCard","onCardClick","FilePreview","deleteFile","FileUpload","secondary","htmlFor","FileUploadSecond","useIsIos","isIos","setIsIos","iOS","includes","platform","userAgent","useIsMobile","isMobile","setIsMobile","check","test","substr","vendor","opera","MeetSign","RemoveScroll","JourneyInfo","meetAndGreetSignText","passengerCount","luggageCount","vehicleCategory","isIMobile","showSignText","setShowSignText","isAirport","openMap","mapLocation","originalAddress","open","encodeURIComponent","startedJourney","indexOf","renderAddressHeader","MapIcon","meetingPoint","MeetingPoint","trainNumber","CalendarIcon","toString","PersonIcon","BriefcaseIcon","CarRightIcon","MeetingPointIcon","EyeIcon","HashtagIcon","firstName","lastName","JourneyInfoBoxButtons","setJourneyIssuesDrawer","travellerPhone","notYetStarted","availableForStarting","callLinkRef","smsLinkRef","whatsAppLinkRef","current","click","PhoneRingIcon","WhatsAppIcon","SmsIcon","display","href","JourneyInfoBox","actions","travellerPosition","scrollToTravellerPosition","infoMessage","actionsCount","showDivider","driverComments","reportedIssues","action","index","createdDateString","created","createdDate","hours","getHours","minutes","getMinutes","JourneyActionTitles","phoneVerificationInfo","formattedPhone","Accordion","NotesIcon","nodeElement","PickupIssues","openSingleIssue","callCustomerService","openSuccessPage","isDisabled","travelerNoShowSubmited","item","JourneyActionTypeEnum","TRAVELLER_NO_SHOW","driverLeftSubmitted","DRIVER_LEFT_PICKUP","additionalNoShowProofSubmitted","ADDITIONAL_PROOF_TRAVELLER_NO_SHOW","reportTravelerNoShow","getDriverLeftLabel","PlusPersonIcon","driverIssues","driverLeft","SadFaceIcon","SingleIssueDrawer","issue","goBack","callTransferCompany","openSubmitProofDrawer","getActions","journeyId","reportedDelayDrawer","setReportedDelayDrawer","isChecked","setIsChecked","setPosition","reportDriverDelayed","DRIVER_DELAYED","reportedDriverDelayed","reportedDriverLeft","onCheckboxChange","PickupIssuesEnum","cannot_find_traveller","pos","lat","lng","renderContent","infoText","Checkbox","MinusPersonIcon","ProgressBarStatus","journeyStatus","assignedToAnotherDriver","currentStatus","toLocaleLowerCase","ProgressBarStatusButton","setShowProgresBarStatus","GeoPoint","props","center","zoom","draggable","googleApiKey","positionId","setPositionId","userPosition","setUserPosition","markerRef","userPositionIconRef","travellerPositionIconRef","mapRef","mapsRef","haversineDistance","pos1","pos2","R","rlat1","PI","rlat2","difflat","difflon","Math","asin","sqrt","sin","cos","addUserIcon","setMap","google","maps","Marker","anchor","Point","addMarker","markerPos","userPos","bounds","LatLngBounds","extend","fitBounds","watchPosition","handleApiLoaded","addTravellerIcon","svg","optimized","scaledSize","Size","clearWatch","GeoMap","apiKey","options","disableDefaultUI","TravellerInfo","forwardRef","timeStr","inputTime","currentTime","deltaMs","currentTimeUTC","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","totalMinutes","floor","travellerPositionIcon","viewBox","cx","cy","r","stroke","strokeWidth","attributeName","from","to","dur","begin","repeatCount","recordedAt","getFlightInfo","getFlightInfoQuery","buttonTimeout","completedMessageTimeout","JourneyPage","classBase","onMyWayButtonProgress","setOnMyWayButtonProgress","showProgresBarStatus","setJourney","alreadyAssociated","setAlreadyAssociated","setAvailableForStarting","loadingStatus","setLoadingStatus","completedMessage","setCompletedMessage","completedError","setCompletedError","setAssignedToAnotherDriver","journeyAdded","setJourneyAdded","completeJourneyDrawer","setCompleteJourneyDrawer","journeyIssuesDrawer","singleIssueDrawer","setSingleIssueDrawer","customerServicePhone","setCustomerServicePhone","submitProofDrawer","setSubmitProofDrawer","locationPicture","setLocationPicture","otherProof","setOtherProof","submitProofSuccess","setSubmitProofSuccess","setGoogleApiKey","setActions","disabledAtPickup","setDisabledAtPickup","canNotStartJourneyDrawer","setCanNotStartJourneyDrawer","setFlightInfo","flightInfoLoading","setFlightInfoLoading","driverPosition","setDriverPosition","uploadErrorMessage","setUploadErrorMessage","loadingButton","setLoadingButton","setTravellerPosition","intervalRef","locationElementRef","changeJourneyStatus","getPhoneByCountry","useGetPhoneByCountry","getPhoneByLocation","useGetPhoneByLocation","uploadAttachment","useUploadAttachment","useSearchActions","useGetFlightInfo","updateDriverPosition","useUpdateDriverPosition","getTravellerPosition","useGetTravellerPosition","customerServiceLinkRef","transferCompanyLinkRef","driverLoggedIn","executionCode","fileSizeError","setFileSizeError","trackDriverPosition","setTrackDriverPosition","fetchTravellerPosition","intervalID","intervalFunction","handleUpdateDriverPosition","scrollToLocation","top","getBoundingClientRect","scrollTo","behavior","handleAddToMyJourney","handleStartJourney","information","callback","enableHighAccuracy","maximumAge","handleArrivedAtPickup","handleJourneyInProgress","handleArrivedAtDropOff","confirmArrivedAtDropOff","getPhone","getJourneyActions","issues","too_many_travellers","too_many_suitcases","missing_addons","im_too_late","blockage_at_pickup_point","refuses_to_get_in_car","openSingleIssueDrawer","uploadLocationPhoto","filesize","URL","createObjectURL","lastModifiedDate","uploadMoreProof","findIndex","lastModified","submitProof","push","issueType","actionData","uploadedCount","res","prevState","originAddress","destinationAddress","onFlightInfoRefresh","destination","hub","hubIataCode","details","detail","flightDate","decodeURIComponent","airportIataCode","directionality","toISOString","checkJourneyStatus","newJourney","allJourneys","associatedJourney","getJourneyByDriverCode","journeyDriverCode","accessToken","journeysData","checkStatusChange","values","flatMap","statusArray","currentJourney","loadActions","getConfig","configs","response","baseURL","json","GeoDirection","Number","keyboardShortcuts","durationInSeconds","TimerIcon","toPrecision","transferCompany","supportPhone","airline","city","onRefresh","isRefreshLoading","progress","CameraIcon","Login","loginType","setError","captchaRequired","setCaptchaRequired","loginAttempted","setLoginAttempted","captchaError","setCaptchaError","rateLimitError","setRateLimitError","captchaKey","setCaptchaKey","loginWithEmail","useLoginEmail","sendOTP","useSendOTP","getCaptchaToken","useQueryCaptchaToken","ipAddressData","IPInfoLoading","useQueryIPAddressInfo","validations","yup","shape","password","optional","formState","errors","resolver","yupResolver","passwordValue","emailValue","setPhoneNumber","handleLoginSuccess","handleCaptchaIsRequiredError","token","handleCaptchaIsIncorrectError","handleRateLimitError","requestOTP","captchaToken","errorCode","handleInputFocus","emailLogin","onFocus","GoogleReCaptchaProvider","reCaptchaKey","GoogleReCaptcha","onVerify","DialPhoneDropdown","ipAddressInfo","countryPhonePrefix","PhoneIcon","LOGIN_ATTEMPTS_INTERVAL","PinScreen","onLoginSuccess","invalidPin","setPinInvalid","timerIsOn","setTimerIsOn","seconds","setSeconds","loginWithPhone","useLoginPhone","pinCode","setPinCode","notificationError","setNotificationError","lockedAccount","setLockedAccount","isMobileSafari","handleInput","countDown","sec","startTimer","expiresInSeconds","welcome","sendAccessCode","closeNotification","PinSingleInput","PinInput","button","ProfilePage","displayPage","setDisplayPage","logoutBottomDrawer","setLogoutBottomDrawer","getDriverData","useGetDriverData","handleLogout","CacheProfileEmpty","AvatarImageUpload","editProfile","LogoutIcon","Contact","FAQ","faqs","faqItem","idx","InstructionalVideos","openVideo","video","Support","PlayIcon","VehiclePage","vehicleType","prevRoute","vehicleParamMakeName","vehicleParamSerieName","deleteBottomDrawer","setDeleteBottomDrawer","deleteVehicle","useDeleteVehicle","editVehicle","useEditVehicle","handleDeleteVehicleById","handleAddOrUpdateVehicle","vehicleSerieId","serie","series","vehicleMakeId","make","WelcomePage","screen","setScreen","profilePicture","setProfilePicture","licenceValue","changeScreen","nextScreen","uploadPhoto","handleAddVehicle","startJourney","App","storageStatus","setStorageStatus","authorizationInProgress","setAuthorizationInProgress","authenticatedUser","setAuthenticatedUser","getCacheApiErrorData","GetCacheApiError","isOnline","tokenRefreshTime","setTokenRefreshTime","newSession","useNewSession","validateAccessToken","useValidateAccessToken","retrieveSession","useRetrieveSession","tokenExpirationTime","getTokenExpirationTime","refreshTimeInMilliseconds","offlineOverlay","ErrorScreen","buttonLabel","handleNewSession","refreshToken","setUser","validateToken","useCallback","availableStore","checkStorageAndCookies","sessionToken","getSessionToken","getRefreshToken","getAccessToken","newCacheProfile","handleRefreshToken","refreshTimeMilliseconds","intervalId","clearInterval","removeApiError","LocalizationProvider","disableCache","locale","translations","LocalizationConsumer","Routes","Route","element","Navigate","expiration","WithLanguage","browserLanguage","storedLanguage","getLanguage","contextObj","GetCacheNotifications","setElement","initializeLD","LDProvider","asyncWithLDProvider","clientSideID","launchDarklyId","user","streaming","tzGlobalConfigs","init","applicationId","datadogApplicationId","clientToken","datadogClientToken","site","service","allowedTracingUrls","sessionSampleRate","sessionReplaySampleRate","trackResources","trackLongTasks","trackInteractions","trackFrustrations","trackUserInteractions","defaultPrivacyLevel","env","version","forwardErrorsToLogs","forwardConsoleLogs","getAllLanguageCodes","StrictMode","ApolloProvider","client","initializeClient","BrowserRouter","ScrollToTop","LaunchDarklyApp","getElementById"],"mappings":"08CAAA,KAAM,IAAI,UAAoB,CAC1B,KAAM,GAAU,SAAS,cAAc,QAAQ,QAC/C,GAAI,GAAW,EAAQ,UAAY,EAAQ,SAAS,iBAChD,OAEJ,SAAW,KAAQ,UAAS,iBAAiB,6BACzC,EAAe,GAEnB,GAAI,kBAAiB,AAAC,GAAc,CAChC,SAAW,KAAY,GACnB,GAAI,EAAS,OAAS,YAGtB,SAAW,KAAQ,GAAS,WACxB,AAAI,EAAK,UAAY,QAAU,EAAK,MAAQ,iBACxC,EAAe,KAG5B,QAAQ,SAAU,CAAE,UAAW,GAAM,QAAS,KACjD,WAAsB,EAAQ,CAC1B,KAAM,GAAY,GAClB,MAAI,GAAO,WACP,GAAU,UAAY,EAAO,WAC7B,EAAO,gBACP,GAAU,eAAiB,EAAO,gBACtC,AAAI,EAAO,cAAgB,kBACvB,EAAU,YAAc,UACvB,AAAI,EAAO,cAAgB,YAC5B,EAAU,YAAc,OAExB,EAAU,YAAc,cACrB,EAEX,WAAwB,EAAM,CAC1B,GAAI,EAAK,GAEL,OACJ,EAAK,GAAK,GAEV,KAAM,GAAY,EAAa,GAC/B,MAAM,EAAK,KAAM,KAEvB,AAAoB,UCnCT,IAAkB,GAAM,cAAgC,CACnE,SAAU,OACV,YAAa,SCTF,GAAkB,IAElB,GAAU,OACV,EAAS,CACpB,MAAO,CACL,MAAO,SACP,MAAO,SACP,IAAK,OACL,KAAM,QACN,QAAS,YAEX,SAAU,YACV,QAAS,WACT,QAAS,WACT,YAAa,eACb,WAAY,eACZ,cAAe,kBACf,YAAa,gBACb,QAAS,WACT,MAAO,UAGI,GAAa,CACxB,QAAS,mCACT,MAAO,4BAGI,GAAa,CAAC,MAAO,MAAO,MAAO,MAAO,M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