{"version":3,"sources":["constants/config.ts","components/SearchBar/SearchBar.module.css","assets/global/Override.ts","redux/constants/index.ts","assets/global/ThemeVariable.ts","assets/global/Typography.ts","assets/global/Shadows.ts","layouts/FullLayout/customizer/ThemeSettings.js","constants/pagination.ts","constants/HTTP.ts","types/button.ts","constants/settings/finacial.ts","constants/pages.ts","constants/resetPassword/form.ts","constants/resetPassword/page.ts","constants/signIn/page.ts","constants/signIn/form.ts","constants/colors.ts","utils/apiRequest/useApiRequest.ts","utils/helpers.ts","resources/price/api/priceApi.ts","resources/promo/api/promoApi.ts","resources/location/api/locationApi.ts","resources/size/api/sizeApi.ts","resources/device/api/deviceApi.ts","resources/transaction/api/transactionsApi.ts","resources/org/api/organizationApi.ts","resources/user/api/userApi.ts","resources/financial/api/financialApi.ts","resources/dashboard/api/index.ts","redux/message/Action.ts","resources/auth/hooks/useAuth.ts","resources/member/api/memberApi.ts","resources/membership/api/membershipApi.ts","resources/group/api/groupApi.ts","resources/report/api/reportApi.ts","resources/settings/api/settingsApi.ts","resources/issues/api/IssueApi.ts","hooks/useDialog.tsx","pages/Dashboard/components/CustomDateRange.tsx","pages/Dashboard/helper.tsx","components/Buttons/Button.tsx","components/Buttons/IconButton/IconButton.tsx","components/Buttons/SubmitButton/SubmitButton.tsx","components/Buttons/SubmitCancelBtns/SubmitCancelBtns.tsx","components/SideBar/SideBar.tsx","components/SideBar/styles.ts","components/Form/Form.tsx","components/Form/components/TextField/TextField.tsx","components/Form/components/ErrorMessage/ErrorMessage.tsx","components/Form/components/SelectField/SelectField.tsx","components/Form/components/DateField/DateField.tsx","components/Form/components/MapField/MapField.tsx","components/Form/components/AutocompleteField/AutocompleteField.tsx","components/Form/components/ToggleField/ToggleField.tsx","components/Form/ResetPasswordForm/ResetPasswordForm.tsx","components/Form/ResetPasswordForm/styles.ts","components/Form/ResetPasswordForm/components/ResetPasswordFields/ResetPasswordFields.tsx","components/PasswordStrength/PasswordStrength.tsx","hooks/usePasswordStrength.tsx","components/Form/SetNewPasswordForm/SetNewPasswordForm.tsx","components/Form/SetNewPasswordForm/styles.ts","components/Form/SignInForm/SignInForm.tsx","components/Form/SignInForm/styles.ts","components/container/PageContainer.js","components/Toolbar/Toolbar.tsx","components/Dialog/Dialog.tsx","components/Dialog/ConfirmDialog/ConfirmDialog.tsx","components/Dialog/NotificationDialog/NotificationDialog.tsx","components/Dialog/DeleteDialog/DeleteDialog.tsx","components/SearchBar/SearchBar.tsx","components/Spinner/Spinner.tsx","components/Table/Table.tsx","components/Table/components/TableHead/TableHead.tsx","components/Table/components/TableBody/TableBody.tsx","components/Table/components/TableRow/TableRow.tsx","components/Table/components/TableCell/TableCell.tsx","components/Table/components/TablePagination/TablePagination.tsx","components/Table/components/TablePagination/styles.ts","components/QRGenerator/QRGenerator.ts","components/Authenticated/Authenticated.tsx","components/ProfileDropdown/ProfileDropdown.tsx","components/Tabs/Tabs.tsx","components/Tabs/components/TabList/TabList.tsx","components/Tabs/components/TabContext/TabContext.tsx","components/Tabs/components/TabPanel/TabPanel.tsx","components/Image/Image.tsx","constants/image.specfications.ts","components/PDFGenerator/PDFGenerator.tsx","components/BarCodeGenerator/BarCodeGenerator.ts","pages/Dashboard/constants.ts","components/Toolbar/components/ToolbarControls.tsx","hooks/useLoadingState.tsx","hooks/useLocations.tsx","pages/Dashboard/components/DashboardFilters.tsx","pages/Dashboard/components/WelcomeCard.tsx","pages/Dashboard/components/MetricCard.tsx","pages/Dashboard/components/TopUsers.tsx","components/SummarizedText/SummarizedText.tsx","pages/Dashboard/components/TopLocations.tsx","pages/Dashboard/components/DashboardContent.tsx","pages/Dashboard/Dashboard.tsx","components/Table/components/TableHead/SortableTableHead.tsx","hooks/useColumnFiltering.tsx","hooks/useSortableHeader.tsx","pages/Reporting/components/ReportRow.tsx","components/Form/components/FormActions/FormActions.tsx","components/Help/Help.tsx","components/Form/components/FormWrapper/FormWrapper.tsx","pages/Reporting/constants.ts","pages/Reporting/components/ReportForm.tsx","models/Price.ts","models/Device.ts","models/Transaction.ts","models/Subscription.ts","components/Table/components/MultiSelectToolbar/constants.ts","components/Table/components/MultiSelectToolbar/MultiSelectToolbar.tsx","assets/images/backgrounds/no-data.png","components/PageBase/NoData.tsx","components/Table/components/LoadingTableData/LoadingTableData.tsx","components/Toolbar/components/Filters.tsx","components/Toolbar/components/ToolbarSearchbar.tsx","pages/Reporting/Reporting.tsx","assets/images/backgrounds/fallback.png","assets/images/logos/koloni-logo-white.png","pages/SignIn/SignIn.tsx","pages/SignIn/styles.ts","assets/images/backgrounds/login-bg.png","pages/SignUp/SignUp.tsx","pages/Error/Error.tsx","pages/ResetPassword/ResetPassword.tsx","pages/ResetPassword/styles.ts","pages/SetNewPassword/SetNewPassword.tsx","pages/SetNewPassword/styles.ts","pages/Pricing/components/promos/ItemRow.tsx","pages/Pricing/constants.ts","pages/Doors/constants.ts","hooks/useHardwareTypes.tsx","resources/product/api/productApi.ts","resources/reservations/api/reservationApi.ts","components/BulkUploadEntity/BulkUploadEntity.tsx","pages/Pricing/components/promos/PromoForm.tsx","pages/Pricing/components/promos/Promo.tsx","pages/Pricing/components/prices/ItemRow.tsx","pages/Pricing/components/prices/PriceForm.tsx","pages/Pricing/components/prices/Price.tsx","redux/currency/Action.ts","pages/Pricing/components/financial/Financial.tsx","pages/Pricing/components/memberships/ItemRow.tsx","components/ToggleSwitch/ToggleSwitch.tsx","components/PageBase/LoadingFormData.tsx","pages/Pricing/components/memberships/MembershipForm.tsx","pages/Pricing/components/memberships/Membership.tsx","pages/Doors/components/devices/DeviceRow.tsx","pages/Doors/components/devices/RentalModeFields.tsx","pages/Doors/components/devices/HardwareTypeFields.tsx","pages/Doors/helper.ts","hooks/useIsSuperTenantOrg.tsx","components/ImageUploader/ImageUploader.tsx","pages/Doors/components/sizes/Canvas3DPreview.tsx","pages/Doors/components/sizes/SizeForm.tsx","hooks/useDeviceModes.tsx","pages/People/components/users/UserHistoryItem.tsx","pages/People/components/users/UserHistory.tsx","pages/Products/components/inventory/ProductTracking.tsx","pages/Products/components/inventory/ProductForm.tsx","resources/product-group/api/productGroupApi.ts","pages/Locations/helper.ts","pages/Locations/context.ts","pages/Locations/components/GeneralTab.tsx","pages/Locations/components/SettingsTab.tsx","pages/Locations/components/LocationForm.tsx","pages/Doors/components/devices/DeviceLog.tsx","pages/Doors/components/devices/DeviceHistory.tsx","pages/Doors/components/devices/DeviceForm.tsx","pages/Doors/components/devices/UnlockByLocationDialog.tsx","pages/Doors/components/devices/MultiEditForm.tsx","pages/Doors/components/devices/Devices.tsx","pages/Doors/components/sizes/SizeRow.tsx","pages/Doors/components/sizes/Sizes.tsx","pages/People/components/users/BulkUploadEntity.tsx","hooks/useOrgSettings.ts","pages/People/components/users/UserForm.tsx","pages/People/components/users/UserRow.tsx","pages/People/components/users/Users.tsx","pages/People/components/groups/GroupForm.tsx","pages/People/components/groups/GroupRow.tsx","pages/People/components/groups/Groups.tsx","pages/People/components/team-members/ResendPassword.tsx","pages/People/components/team-members/TeamMemberRow.tsx","pages/People/constants.ts","pages/People/components/team-members/TeamMemberForm.tsx","pages/People/components/team-members/MultiEditForm.tsx","pages/People/components/team-members/TeamMembers.tsx","pages/Settings/constants.ts","redux/customizer/Action.ts","pages/Settings/tabs/Theme/ThemeCustomizer.tsx","pages/Settings/tabs/General/SettingsForm.tsx","resources/apikeys/api/apikeysApi.ts","pages/Settings/tabs/APIKeys/APIKeys.tsx","pages/Settings/tabs/Defaults/DefaultsForm.tsx","redux/user-session/Action.ts","hooks/useUserSession.ts","pages/Settings/tabs/Profile/ChangePassword.tsx","pages/Settings/tabs/Profile/Profile.tsx","pages/Settings/Settings.tsx","pages/Issues/constants.ts","pages/Issues/components/IssueRow.tsx","pages/Issues/components/IssueForm.tsx","pages/Issues/helpers.ts","pages/Issues/Issues.tsx","services/notificationServiceApi.ts","resources/notification/api/notificationApi.ts","pages/Notifications/constants.ts","pages/Notifications/components/NotificationRow.tsx","pages/Notifications/components/NotificationsForm.tsx","pages/Notifications/components/NotificationDefaultSettings.tsx","pages/Notifications/helper.ts","redux/notification/Action.ts","pages/Notifications/Notifications.tsx","pages/Locations/components/LocationRow.tsx","pages/Locations/components/Map/MapView.tsx","pages/Locations/Locations.tsx","pages/Products/constants.ts","pages/Products/components/inventory/MultiEditProductForm.tsx","pages/Products/components/inventory/ProductRow.tsx","pages/Products/components/inventory/Inventory.tsx","pages/Products/components/product-groups/ProductGroupForm.tsx","pages/Products/components/product-groups/ProductGroupRow.tsx","pages/Products/components/product-groups/ProductGroups.tsx","layouts/BlankLayout/BlankLayout.tsx","assets/images/icons/pricing-set-up.svg","assets/images/icons/pay-per.svg","assets/images/icons/memberships.svg","assets/images/icons/promo-code.svg","assets/images/icons/inventory.svg","assets/images/icons/product-groups.svg","layouts/FullLayout/sidebar/SideMenuItems.tsx","layouts/FullLayout/sidebar/GettingStartedItems.js","layouts/FullLayout/sidebar/TourItem.tsx","hooks/useOrgFeaturePages.tsx","layouts/FullLayout/sidebar/Sidebar.js","constants/help.docs.ts","layouts/FullLayout/header/HelpItems.tsx","layouts/FullLayout/header/constants.ts","resources/feedback/api/feedbackApi.ts","layouts/FullLayout/header/FeedbackForm.tsx","layouts/FullLayout/header/Header.tsx","layouts/FullLayout/footer/Footer.tsx","layouts/FullLayout/FullLayout.tsx","assets/images/logos/koloni-logo-black.png","resources/auth/guards/permission/PermissionGuard.tsx","resources/locker-wall/api/lockerWallApi.ts","pages/LockerWall/components/LockerWallForm.tsx","pages/LockerWall/constants.ts","pages/LockerWall/components/Locker.tsx","pages/LockerWall/components/AssignLockerDialog.tsx","pages/LockerWall/components/Detail.tsx","pages/LockerWall/components/LockerDetails.tsx","pages/LockerWall/components/Wall.tsx","pages/LockerWall/components/ColorLegends.tsx","pages/LockerWall/components/WallDetails.tsx","pages/LockerWall/components/WallToolbar.tsx","pages/LockerWall/LockerWall.tsx","redux/locker-wall/Action.ts","resources/condition/api/conditionApi.ts","pages/Products/components/conditions/ConditionForm.tsx","pages/Products/components/conditions/ConditionRow.tsx","pages/Products/components/conditions/Conditions.tsx","pages/Events/constants.ts","pages/Events/components/reservations/ReservationForm.tsx","pages/Events/components/reservations/ReservationRow.tsx","pages/Events/components/reservations/ReservationSettingsForm.tsx","pages/Events/components/reservations/Reservations.tsx","templates/ServicePDF/styles.ts","templates/ServicePDF/ServicePDF.tsx","pages/Events/components/ChargeDialog.tsx","pages/Events/components/DropoffDialog.tsx","pages/Events/components/PickUpDialog.tsx","pages/Events/components/RefundDialog.tsx","pages/Events/components/EndDialog.tsx","pages/Events/components/PenaltyDialog.tsx","pages/Events/components/transactions/TransactionRow.tsx","pages/Events/components/transactions/TransactionLog.tsx","pages/Events/components/transactions/TransactionHistory.tsx","pages/Events/components/transactions/TransactionForm.tsx","pages/Events/components/transactions/Transactions.tsx","pages/Organization/components/OrganizationForm.tsx","pages/Organization/components/OrganizationRow.tsx","pages/Organization/constants.ts","pages/Organization/Organization.tsx","pages/Toolbox/API's/APIs.tsx","assets/images/apps-widgets/signin.png","assets/images/apps-widgets/multiple-rentals.png","assets/images/apps-widgets/payment.png","assets/images/apps-widgets/photo-end-rental.png","pages/Toolbox/Apps&Widgets/LiteAppSettings.tsx","assets/images/apps-widgets/reservation-widget.png","pages/Toolbox/Apps&Widgets/ReservationWidgetSettings.tsx","pages/Toolbox/Apps&Widgets/AppsAndWidgets.tsx","pages/Toolbox/Integrations/TwilioSidebar.tsx","pages/Toolbox/Integrations/IntegrationCard.tsx","pages/Toolbox/Integrations/IntegrationsBlock.tsx","pages/Toolbox/Integrations/Integrations.tsx","pages/Toolbox/Integrations/images/sclogic.png","pages/Toolbox/Integrations/images/packagex.png","pages/Toolbox/Integrations/images/trax.png","pages/Toolbox/Integrations/images/send.png","pages/Toolbox/Integrations/images/aftership.png","pages/Toolbox/Integrations/images/stripe.png","pages/Toolbox/Integrations/images/adyen.png","pages/Toolbox/Integrations/images/twilio.png","pages/Toolbox/Integrations/images/zendesk.png","pages/Toolbox/Integrations/images/servicenow.png","routes/ErrorBoundary.tsx","routes/Router.tsx","App.tsx","redux/customizer/CustomizerReducer.ts","redux/locker-wall/lastLocationReducer.ts","redux/message/messageReducer.ts","redux/currency/currencyReducer.ts","redux/notification/lastModeFilterReducer.ts","redux/user-session/userSessionReducer.ts","redux/reducers.ts","serviceWorker.js","reportWebVitals.js","index.js","redux/Store.ts"],"names":["GOOGLE_API_KEY","_process","process","_process$env","REACT_APP_GOOGLE_API_KEY","API_URL","_process2","_process2$env","REACT_APP_API_URL","RENTAL_URL","_process3","_process3$env","REACT_APP_NOTIFICATION_API_URL","_process4","_process4$env","REACT_APP_RENTAL_URL","PUBLIC_API_URL","_process5","_process5$env","REACT_APP_PUBLIC_API_URL","AWS_PROJECT_REGION","AWS_COGNITO_REGION","HOST","window","location","hostname","PROJECT_VERSION","_process6","_process6$env","REACT_APP_TWILIO_CONNECT_APP_SID","module","exports","Override","customizer","useSelector","state","CustomizerReducer","components","MuiCssBaseline","styleOverrides","boxSizing","html","height","width","backgroundColor","activeMode","borderRadius","body","margin","padding","transform","position","right","top","alignSelf","borderRight","backgroundPosition","MuiContainer","root","paddingLeft","paddingRight","maxWidth","MuiButton","textTransform","boxShadow","fontSize","MuiListItem","MuiCard","MuiListItemIcon","minWidth","MuiGridItem","paddingTop","MuiLinearProgress","MuiMenuItem","MuiChip","fontWeight","MuiTableCell","textAlign","whiteSpace","head","backgroundImage","DARK_THEME","THEME_COLOR","NAVBAR_BG","SIDEBAR_BG","baseTheme","direction","palette","primary","main","light","dark","secondary","success","contrastText","danger","info","error","warning","text","grey","A100","A200","A400","A700","cancel","action","disabledBackground","hoverOpacity","hover","shape","mixins","toolbar","color","minHeight","status","typography","fontFamily","body1","h1","lineHeight","h2","h3","h4","h5","h6","button","subtitle1","subtitle2","shadows","themesOptions","name","ThemeSettings","theme","config","themeOptions","find","base","baseMode","mode","background","default","paper","breakpoints","values","xs","sm","md","lg","xl","MuiInput","console","warn","Error","createTheme","_","merge","document","documentElement","style","setProperty","BuildTheme","activeDir","activeTheme","useEffect","dir","ITEMS_PER_PAGE","DEVICES_PER_PAGE","HTTP_CODES","BUTTON_VARIANT","contained","PAGES","ORG_FILTERS_IDENTFIER","RESET_PASSWORD_FORM_FIELDS","USERNAME","NAME","LABEL","PLACEHOLDER","RULES","required","pattern","value","message","CODE","PASSWORD","CONFIRM_PASSWORD","RESET_PASSWORD_FORM","RESET_PASSWORD_PAGE","SIGN_IN_PAGE","SIGN_IN_FORM_FIELDS","EMAIL","SIGN_IN_FORM","SUCCESS_DIALOG","useApiRequest","getJwtToken","useAuth","fetchEndpoint","async","endpoint","method","headers","_ref2","jwtToken","fetch","Authorization","fetchPartnerEndpoint","_ref","fetchEndpointUnauthorized","_ref3","getCookie","cookieName","cookies","cookie","split","i","length","trim","startsWith","substring","getDeviceStatusColor","device_status","lock_status","parseCurrency","currency","capitalizeWords","str","splitter","arguments","undefined","separator","map","word","charAt","toUpperCase","slice","join","capitalizeFirstLetter","getUserRole","role","JSON","parse","localStorage","getItem","getCurrentOrgProperty","property","prop","getSettingsProperty","getRandomInt","min","max","Math","floor","random","average","data","reduce","prev","current","getErrorMessage","Array","isArray","errorMessage","forEach","err","msg","detail","stringify","parseSnakeCaseToTitleCase","snake","replace","c","getOrganizationFromHost","organization","REACT_APP_DEFAULT_ORG","validateIntegerField","newValue","String","validateFloatingField","parseHexToRGB","hex","opacity","match","r","g","b","k","parseInt","openDoc","link","callback","open","getPaginatedSlice","currentPage","rowsPerPage","array","start","end","LABEL_MAP","getLabelForKey","key","char","formatLabel","generateFilters","response","activeFilters","sortableFilters","filters","processedKeys","Set","hasResponseKey","Object","prototype","hasOwnProperty","call","isSortable","includes","push","label","active","sortable","add","keys","has","getStoredTableFilters","storageKey","priceApi","getMany","page","size","search","URLSearchParams","toString","ok","json","create","price","uploadCSV","FormData","append","file","update","priceId","remove","ids","promoApi","promo","promoId","locationApi","id","id_location","locationId","result","patch","getDevices","unlockByLocation","getSizesByLocation","by_mode","by_status","sizeApi","image","imageEndpoint","imagePayload","imageResponse","sizeId","deviceApi","device","deviceId","id_devices","setMaintenanceMode","disable","getDeviceModes","getHardwareTypes","unlockAll","devices","getDeviceHistory","transactionsApi","itemsPerPage","transactionType","getByIdPublic","transactionId","service","step","weight","endBy","cancel_at","refund","amount","penalize","reason","deliveryStart","phoneNumber","_ref4","encodeURIComponent","deliveryComplete","_ref5","sendCode","idEvent","email","phone_number","getEventStatuses","getEventByInvoiceId","invoiceId","getEventsByUserId","idUser","endMany","getTransactionHistory","organizationApi","getOrgDetailsPublic","orgName","getOrgs","archive","orgId","restore","newOrg","getSelfOrg","patchOrgFeatures","orgFeatures","userApi","by_phone","by_email","by_first_name","by_user_id","by_last_name","by_address","deleteUser","updateUser","assign","userId","resourceId","type","resource_id","assigned","unassign","financialApi","createStripeAccount","country","stripeLink","getStripeAccount","deleteStripeAccount","getMyself","_JSON$parse$signInUse","_JSON$parse$signInUse2","CURRENT_USER","TOKEN","signInUserSession","idToken","setMessage","payload","navigate","useNavigate","dispatch","useDispatch","RESPONSE_MESSAGES","configureAmplify","userPoolId","clientId","currentUser","userObject","pool","publicOrgData","user_pool","client_id","aws_project_region","aws_cognito_region","aws_user_pools_id","aws_user_pools_web_client_id","Amplify","configure","authResponse","signIn","password","org","user","Auth","logo","app_logo","oem_logo","isSuperTenant","super_tenant","shared_locations","setItem","challengeName","session","href","forgotPassword","username","forgotPasswordSubmit","code","completePassword","newPassword","oldPassword","completeNewPassword","removeItem","currentSession","getIdToken","_userObject$signInUse","_userObject$signInUse2","idTokenKey","cognitoUser","currentAuthenticatedUser","customTitle","titleColor","titleText","memberApi","member","memberId","verify","getSelf","user_ids","resendPasswordLink","membershipApi","subscribed","membership","membershipId","groupApi","postGroup","group","deleteGroup","assignUser","removeUser","groupId","updateGroup","groupName","GET_ERRORS","reportApi","createReport","updateReport","reportId","downloadReport","blob","getAllReports","targetOrg","target_org","getEarnings","getUserGrowth","interval","getDoorHealth","getIssueRate","fromDate","toDate","locations","from_date","toISOString","to_date","getOccupancyRate","getNewTransactionRate","getTransactionsPerLocker","start_date","end_date","getTotalTransactions","date","getTransactionTimeAverage","startDate","endDate","getTotalUsers","getTotalLocations","getAverageRevenuePerTransaction","getTotalDoors","getUsers","getTransactions","getTopUsers","getLocations","getReports","settingsApi","getSettings","createSettings","settings","updateSettings","getFilters","updateFilters","newFilters","getWhiteLabel","updateWhiteLabel","whiteLabel","updateOrgWhiteLabel","patchWhiteLabel","confirmEmail","updateProfileSettings","user_id","first_name","last_name","changePassword","refresh_token","new_password","pwd","new_pwd","IssueApi","deleteMany","issue","eventId","issueId","useDialog","dialog","setDialog","useState","isOpen","displayMessage","closeDialog","CustomDateRange","onClose","selectedRange","setFilters","from","setFrom","to","setTo","handleReset","_jsxs","Dialog","children","_jsx","DialogTitle","sx","Typography","variant","IconButton","onClick","CloseIcon","DialogContent","marginTop","display","gap","FormControl","DatePicker","onChange","renderInput","props","TextField","disableFuture","DialogActions","alignItems","justifyContent","Button","handleSelectDateRange","previousFilters","getPercentajeWithColor","percentaje","toFixed","parseTransactionTimeAverageValue","transactionTimeAverage","seconds","roundedSeconds","round","hours","minutes","remainingSeconds","padStart","secondsToTimeFormat","parseOptionToDateRange","getTodayStart","today","Date","setHours","getThisWeekStart","currentWeek","setDate","getDate","getDay","getThisMonthStart","currentMonth","getFullYear","getMonth","getThisQuarterStart","quarterNumber","year","currentQuarter","getThisYearStart","currentYear","disabled","MUIButton","MUIIconButton","SubmitButton","SubmitCancelBtns","SideBar","SX","SideBarStyles","Drawer","anchor","PaperProps","DRAWER","Box","CONTAINER","useMediaQuery","down","overflowY","Form","onSubmit","handleSubmit","useFormContext","placeholder","rules","multiline","defaultValue","onChangeProp","onBlur","isReadOnly","ref","helperText","onlyInteger","isNumeric","tooltip","register","control","formState","errors","fullWidth","Controller","render","field","MUITextField","_Fragment","Tooltip","placement","arrow","title","Help","InputProps","readOnly","InputLabelProps","shrink","ErrorMessage","HookformErrorMessage","SelectField","items","onOpen","useTheme","InputLabel","Select","inputProps","MenuProps","item","MenuItem","note","fontStyle","DateField","minDate","maxDate","disablePast","DateTimePicker","MapField","currentPosition","setCurrentPosition","address","setAddress","maps","setMaps","searchBox","setSearchBox","searchParams","setSearchParams","clearErrors","isLoaded","loadError","useLoadScript","googleMapsApiKey","libraries","className","marginBottom","StandaloneSearchBox","onLoad","handleLoad","onPlacesChanged","places","getPlaces","nextMarkers","place","index","_place$geometry","geometry","formatted_address","nextCenter","get","lat","lng","e","target","GoogleMap","options","mapId","mapContainerStyle","zoom","center","Marker","onDragEnd","_data$results$","_data$results$2","latLng","results","onMarkerDragEnd","draggable","AutocompleteField","Autocomplete","params","ToggleField","checked","FormControlLabel","Checkbox","event","currentUserData","isFirstLogin","ResetPasswordForm","loading","setLoading","resetingPassword","setResetingPassword","setError","isCodeSent","setIsCodeSent","STYLES","ResetPasswordFormStyles","p","TITLE","DESCRIPTION","mt","FIELDS_CONTAINER","flexDirection","BUTTONS_CONTAINER","BACK_BUTTON","textDecoration","methods","useForm","TITLE_LABEL","BUTTON_LABEL","FormProvider","challengeParam","userAttributes","toLowerCase","ArrowBackIosIcon","ResetPasswordFields","NotificationDialog","watch","validate","PasswordStrength","mr","LinearProgress","MEDIUM_REGEX","STRONG_REGEX","usePasswordStrength","useMemo","test","strengthLabel","element","SetNewPassword","inputValues","setInputValues","confirmPassword","SetNewPasswordFormStyles","passwordStrength","handleInputChange","passwordsMatch","preventDefault","Alert","severity","SignInForm","onSignIn","defaultValues","newLogin","PageContainer","description","Helmet","content","Toolbar","controls","query","amountControls","filter","isMenu","Card","smDown","MUIDialog","ConfirmDialog","onClickConfirm","onClickCancel","confirmText","cancelText","buttonText","getTypeColor","DeleteDialog","rule","confirm","setConfirm","component","SearchBar","onSearch","DebounceInput","minLength","debounceTimeout","styles","debounceInput","debounceInputLight","Spinner","loadingText","CircularProgress","Table","TableContainer","maxHeight","MUITable","stickyHeader","TableHead","handleSelectAll","MUITableHead","TableRow","header","TableCell","TableBody","MUITableBody","isHover","setIsHover","MUITableRow","onMouseEnter","onMouseLeave","colSpan","MUITableCell","TablePagination","totalItems","setCurrentPage","setItemsPerPage","rowsPerPageOptions","TablePaginationStyles","MUITablePagination","count","onPageChange","handleChangePage","newPage","onRowsPerPageChange","PAGINATION","marginRight","QRGenerator","generateQRCode","QRCode","toDataURL","then","fileData","onClickDownload","fileName","createElement","download","click","generateQRCodePDF","Authenticated","USER_DATA","Navigate","ProfileDropdown","pb","ml","MailOutlineOutlined","Divider","Link","NavLink","underline","SettingsOutlined","Tabs","tabs","currentTab","handleChange","TabContext","borderBottom","borderColor","TabList","TabPanel","MUITabList","tab","showDisabled","Tab","MUITabContext","MuiTabPanel","Image","src","alt","isLogo","setOpen","objectFit","getWidth","getHeight","cursor","PDFGenerator","icon","pageSize","pageContent","MyDocument","Document","MyPage","Page","PDF","pageMode","PDFDownloadLink","url","BarcodeGenerator","generateBarcode","canvas","JsBarcode","format","lineColor","displayValue","generateBarcodeDataURL","DATE_RANGES_OPTIONS","TOP_USERS_HEADERS","align","TOP_LOCATIONS_HEADERS","ToolbarControls","Grid","container","columnGap","gridTemplateColumns","useLoadingState","initialValue","useLocations","setLocations","locationsOptions","setLocationsOptions","loadingLocations","setLoadingLocations","fetchLocations","searchTerm","buildLocationsOptions","sort","a","DashboardFilters","setOpenCustomDateRangeSelector","subOrgs","selectedSubOrg","setSelectedLocation","setSelectedSubOrg","filteredLocations","id_org","organizationOptions","option","disablePortal","handleSelectOrganization","o","handleSelectLocation","WelcomeCard","ORG_DATA","ORG_NAME","setData","fileInput","useRef","whitelabelData","setWhitelabelData","React","whiteLabelData","_json$users$data$","_json$users$data$2","_json$users$data$3","_json$users$data$4","_json$transactions$da","_json$transactions$da2","_json$top_users$","_json$top_users$2","_json$top_users$3","_json$top_users$4","_json$top_users$5","_json$top_users$6","_json$top_users$7","_json$top_users$8","_json$top_locations$","_json$top_locations$2","_json$top_locations$3","_json$top_locations$4","parsedData","earnings_earnings","earnings","earnings_currency","users_total","users","total","users_month_1","month","users_count_1","users_month_2","users_count_2","transactions_total","transactions","transactions_month_1","transactions_count_1","top_users_User_id","top_users","top_users_User_created_at","created_at","top_users_User_name","top_users_User_email","top_users_User_phone_number","top_users_User_active","top_users_location","top_users_purchases","purchases","top_locations_Location_id","top_locations","top_locations_Location_name","top_locations_Location_address","top_locations_count","parseJSONToCSVFormat","fetchData","elevation","borderWidth","selectedFile","files","formData","res","catch","accept","CardContent","zIndex","gutterBottom","Skeleton","animation","CSVLink","filename","marginLeft","MetricCard","metric","cardsLength","buildMetricObject","metricsOptions","setCurrentFetchingMetric","addNewMetricCard","removeNewMetricCard","metricCookie","fetchSavedMetrics","shouldShowAdd","Add","Remove","expirationDate","toUTCString","handleSelectMetric","legend","TopUsers","topUsers","setTopUsers","currencyReducer","fetchTopUsers","CardHeader","overflow","row","SummarizedText","charLimit","TopLocations","topLocations","setTopLocations","fetchTopLocations","DashboardContent","visibleMetrics","metricOptions","currentFetchingMetric","spacing","_metric$metric","defaultFilters","createMetricObject","Dashboard","setVisibleMetrics","Number","setSubOrgs","openCustomDateRangeSelector","setSelectedRange","selectedLocation","metricsData","MoneyIcon","accesor","parseFunction","earningsObject","parseEarningsValue","fetchFunction","PersonAddIcon","newUserGrowth","percentage","parseNewUserGrowthValue","parseOptionToInterval","SensorDoorIcon","parseDoorHealthValue","doorHealth","_doorHealth$find","location_id","health_percentage","WarningAmberIcon","reportedIssuesRate","issue_rate","parseReportedIssuesRateValue","PieChartIcon","parseOccupancyRateValue","occupancyRate","_occupancyRate$find","occupancy_rate","SyncAltIcon","newTransaction","new_transaction_percentage","parseNewTransactionsValue","transactionsPerLocker","avg_transactions_per_locker","parseTransactionPerLockerValue","parseTotalTransactionsValue","totalTransactions","breakdown","organization_total","AccessTimeIcon","PeopleIcon","parseTotalUsersValue","totalUsers","PlaceIcon","totalLocations","main_org_total_locations","parseTotalLocationsValue","averageRevenuePerTransaction","avg_revenue_per_transaction","parseAverageRevenuePerTransactionValue","parseTotalDoorsValue","totalDoors","main_org","door_counts_by_location","main_org_total_doors","m","metricKey","metricDef","responseonse","fetchSubOrgs","newFrom","newTo","_prev$from","_prev$from$getTime","_newFrom$getTime","_prev$to","_prev$to$getTime","sameFrom","getTime","sameTo","toFetch","_m$metric","Promise","all","newMetricData","slot","slotId","newVisible","old","found","refreshMetrics","handleCloseCustomDateDialog","SortIcon","order","isActive","ArrowDropUpRoundedIcon","bottom","ArrowDropDownRoundedIcon","SortableTableHead","orderBy","onRequestSort","sortDirection","TableSortLabel","IconComponent","useColumnFiltering","filteredColumns","setFilteredColumns","getDefaultFilters","pathname","useSortableHeader","defaultOrder","defaultOrderBy","entity","nestedProps","setOrder","setOrderBy","getValueFromNestedKey","object","path","accumulator","currentValue","parseValue","comparator","nestedKey","columnValue","itemA","itemB","valueA","valueB","handleRequestSort","newOrder","getVisibleRowsSorted","dataBackup","comparatorFn","ReportRow","report","handleSelectRow","selected","handleEditReport","confirmationMessage","setConfirmationMessage","findIndex","contents","assignees","last_sent","toLocaleString","day","hour","minute","getElementById","HTMLAnchorElement","setAttribute","URL","createObjectURL","revokeObjectURL","DownloadIcon","DeleteForever","FormActions","submitText","disableSubmit","LoadingButton","loadingPosition","helpText","setHover","HelpOutlineRoundedIcon","FormWrapper","isDialog","METRICS","DAYS","MONTHS","WHEN_OPTIONS","ReportForm","members","metrics","setMetrics","defaultMetrics","setDefaultMetrics","some","membersOptions","setMembersOptions","defaultMembers","setDefaultMembers","assign_to","recurrence","setRecurrence","selectedMembers","setSelectedMembers","sendTime","setSendTime","setUTCHours","send_time","setUTCMinutes","buildMembersOptions","sortedOptions","when","weekday","resetField","getUTCHours","getUTCMinutes","newReport","multiple","disableCloseOnSelect","getOptionLabel","renderOption","CheckBoxOutlineBlankIcon","checkedIcon","CheckBoxIcon","handleToggleMetrics","handleMemberSelection","membersSelected","FormGroup","TimePicker","PriceTypes","DeviceType","DeviceMode","TransactionType","TransactionStatus","BillingPeriod","SUBSCRIPTION_TYPES","replaceCommaWithSpace","setHardwareDetails","obj","linka","mac_address","spintly","integration_id","ojmar","locker_udn","user_code","master_code","gantner","gantner_id","harbor","harbor_tower_id","harbor_locker_id","dclocker","dclock_terminal_no","dclock_box_no","kerong","ip","circuit_unit","board_unit","hook_port","headleader","headboard","port","hardware_type","DeviceColumnValues","_obj$location","_obj$price","_obj$size","id_price","id_size","custom_identifier","item_description","locker_number","price_required","DeviceHeaders","DeviceLabels","ProductColumnValues","_obj$devices","_obj$devices$","_obj$devices2","_obj$devices2$","_obj$devices2$$locati","product_name","serial_number","assigned_locker","assigned_location","cost","sale_price","sales_price","sku","msrp","groups","id_product_group","ProductHeaders","ProductLabels","EventColumnValues","invoice_id","order_id","user_name","user_phone","user_email","device_name","event_status","started_at","ended_at","duration","image_url","EventHeaders","EventLabels","SizeColumnValues","depth","SizeHeaders","SizeLabels","LocationColumnValues","_obj$devices3","no_of_devices","hidden","LocationHeaders","LocationLabels","ProductGroupColumnValues","_obj$size2","_obj$products","group_name","locker_size","no_of_products","products","ProductGroupHeaders","ProductGroupLabels","ConditionColumnValues","_obj$products2","products_assigned","auto_report_issue","auto_report","auto_maintenance","ConditionHeaders","ConditionLabels","UserColumnValues","user_pin_code","pin_code","require_auth","UserHeaders","UserLabels","GroupColumnValues","_obj$users","GroupHeaders","GroupLabels","MemberColumnValues","MemberHeaders","MemberLabels","ReservationColumnValues","_obj$location2","_obj$size3","_obj$user","_obj$device","_obj$product","tracking_number","product","recurring","monday","tuesday","wednesday","thursday","friday","saturday","sunday","from_time","to_time","ReservationHeaders","ReservationLabels","MembershipColumnValues","billing_type","billing_period","number_of_payments","membership_type","stripe_product_id","stripe_price_id","card_on_file","MembershipHeaders","MembershipLabels","IssueColumnValues","_obj$team_member","pictures","issue_id","id_user","id_event","team_member_id","team_member","IssueHeaders","IssueLabels","MultiSelectToolbar","itemsSelectedData","itemsSelected","handleAction","setAction","actionsAllowed","show","model","totalQty","getAllExportData","notificationMessage","setNotificationMessage","convertArrayOfObjectsToCSV","arrayData","labels","setDetailsHelper","csvRows","csvHeaderLabels","ParsedData","csvBlob","csvRaw","csvData","Papa","unparse","Blob","createCsvBlob","saveAs","handleExportItems","itemsToExport","handleExportDevices","handleExportProduct","handleExportEvents","handleExportSize","handleExportLocation","handleExportProductGroup","handleExportCondition","handleExportUser","handleExportGroup","handleExportMember","handleExportReservation","handleExportMembership","handleExportIssues","Stack","editAction","deleteAction","maintenanceAction","endAction","onConfirm","NoData","condition","noDataImg","LoadingTableData","isLoading","Filters","anchorEl","setAnchorEl","displayFilters","Boolean","currentTarget","FilterListIcon","Menu","keepMounted","handleClose","bgcolor","transformOrigin","horizontal","vertical","anchorOrigin","ToolbarSearchbar","handleSearch","enableFilters","onlySortable","local","storedColumns","columnsToShow","col","column","Switch","toggled","activeColumnsClone","existingFilters","handleToggle","Reporting","reports","setReports","pages","reportsBackup","setReportsBackup","setMembers","openSidebar","setOpenSidebar","setRowsPerPage","setSearch","selectedRows","setSelectedRows","currentReport","setCurrentReport","loadingSubOrgs","setLoadingSubOrgs","handleCloseSidebar","previousValue","rowId","fetchReports","showNewestFirst","visibleRows","fetchMembers","SignIn","SignInStyles","GRID_CONTAINER","GRID_ITEM","RESET_LINK_CONTAINER","BOX_LOGO","BOX_WELCOME","BOX_IMAGE_CONTAINER","BOX_IMAGE","RESET_LINK","IMG","setErr","setOrg","initAmplify","orgData","fetchPublicOrgData","Koloni","CancelIcon","clear","SignUp","img1","htmlFor","mb","pt","Container","disableElevation","ResetPassword","SetNewPasswordForm","ItemRow","setCurrentItem","confirmDialog","setConfirmDialog","deletePromo","_discount_type","_discount_type2","discount_type","toLocaleDateString","end_time","navigator","clipboard","writeText","CopyAll","dataMap","Map","set","WEIGHT_UNITS","TIME_UNITS","PRICE_TYPES","PROMO_DISCOUNT","COUNTRY_OPTIONS","PRICE_CURRENCIES","PROMO_DEFAULTS","SUBSCRIPTION_DEFAULTS","PRICE_DEFAULTS","DEVICE_STATUSES","DEVICE_MODE_TYPES","DEVICE_TYPES","useHardwareTypes","orgHardware","setOrgHardware","isLoadingHardware","setIsLoadingHardware","selfOrg","deviceTypes","fetchOrgHardwareTypes","productApi","by_location","clone","id_product","productId","productData","id_products","reservationApi","reservation","reservationId","getReservationSettings","updateReservationSettings","reservationSettings","checkUniqueTrackingNumber","trackingNumber","BulkUploadEntity","renderSuccessMessage","successForm","uploadPayPerCSV","uploadMembershipsCSV","uploadPromosCSV","uploadLocationsCSV","uploadDevicesCSV","uploadSizesCSV","uploadUsersCSV","uploadMembersCSV","uploadProductsCSV","uploadReservationsCSV","hardwareTypeSelect","setHardwareTypeSelect","setCsvData","csvFile","setCsvFile","isOjmarOrg","currentOrg","uploadingRows","handleFileUpload","reader","FileReader","onload","parseCSV","readAsText","csvText","_rows$shift","rows","headerRow","shift","file_list","rowData","_rowData$index","cleanKey","cleanValue","successRows","errorRows","labelId","hw","downloadCSVTemplate","_deviceTemplates$find","csvString","tpl","onDragOver","onDrop","dataTransfer","border","left","PromoForm","setCurrentTab","PromoFormElement","newPromo","handleTabChange","Promo","setDataBackup","currentItem","openForm","setOpenForm","getPromos","log","useCallback","fetchPromos","firstItem","generatedColumns","storedFilters","loadTableFilters","deletePrice","Chip","price_type","unit_amount","_unit","_unit2","unit","prorated","PriceForm","defaultPriceExists","setAmount","cardOnFile","setCardOnFile","setUnitAmount","priceDisplayStr","setPriceDisplayStr","defaultPrice","setDefaultPrice","pay_per_time","priceType","isNaN","parseUnit","PriceFormElement","newPrice","setValue","reset","inputMode","parseFloat","pay_per_weight","Pricing","getPrices","fetchPrices","fetchedData","handleOpenForm","setCurrency","Financial","isStripeEnabled","setIsStripeEnabled","account","setAccount","defaultCountry","setDefaultCountry","getAccount","stripe_enabled","getSettingsFn","fetchStripeData","details_submitted","default_currency","Backdrop","drawer","deleteMembership","_membership_type","_membership_type2","_billing_period","_billing_period2","ToggleSwitch","leftItem","rightItem","mx","handleClickLeftItem","handleClickRightItem","LoadingFormData","MembershipForm","assignedLocations","setAssignedLocations","locationsToAdd","setLocationsToAdd","locationsToRemove","setLocationsToRemove","billingType","setBillingType","MembershipFormElement","locationsArr","newMembership","snakeCase","flexWrap","onDelete","handleLocationSelect","prevState","deleteIcon","DeleteIcon","filterSelectedOptions","MUITexField","locationsSelected","Membership","selectedRowData","setSelectedRowData","getSubscriptions","fetchSubscriptions","dialogButtonText","onCloseDialogHandler","defaultConfirmation","DeviceRow","_device$location","_device$location2","_device$size","_device$size2","_device$size3","_device$size4","_device$product","handleEdit","openLocationForm","setCurrentLocation","handleUnlockButtonState","maintenanceMessage","handleConfirmAction","_response$message2","handleMaintenanceMode","handleDelete","_response$message","handleUnlock","handleSelectedDevice","selectedDevices","d","splice","handleQRCode","QrCode","Build","RentalModeFields","allowEdit","productsOptions","selectedProduct","handleProductSelection","handleProductsListClick","openAddProductDialog","setProductData","handleLoadProductDescriptions","rental","vending","_createElement","HardwareTypeFields","isGantnerOrg","loadDefaultHardware","orgSettings","hardwareOptions","setHardwareOptions","hardwareType","default_device_hardware","dclock","formatDevicePayload","ada_compliance","require_image","useIsSuperTenantOrg","VisuallyHiddenInput","styled","clip","clipPath","ImageUploader","inputId","tabIndex","startIcon","CloudUploadIcon","_document$getElementB","isValidCoordinate","x","y","isFinite","createSafeGradient","ctx","x1","y1","x2","y2","createLinearGradient","Canvas3DPreview","canvasRef","getContext","clearRect","centerX","centerY","angleX","PI","angleY","maxDimension","scale","project","z","isoX","cos","isoY","sin","points","ftl","ftr","fbl","fbr","btl","btr","bbl","bbr","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","drawFaces","lineWidth","lineJoin","lineCap","backGradient","addColorStop","fillStyle","beginPath","moveTo","lineTo","closePath","fill","strokeStyle","stroke","leftGradient","bottomGradient","rightGradient","topGradient","frontGradient","SizeForm","setImage","imagePreview","setImagePreview","showPreview","setShowPreview","validateDimension","SizeFormElement","outline","_event$target$files","readAsDataURL","_e$target","previewUrl","useDeviceModes","modes","setModes","isLoadingModes","setIsLoadingModes","enabledModes","fetchDeviceModes","HistoryLine","UserHistoryItem","_device$product$condi","_transaction$device","_transaction$device$p","transaction","total_time","formattedStartDate","formattedEndDate","UserHistory","goBackCallback","userTransactions","setUserTransactions","fetchUserTransactions","Accordion","defaultExpanded","AccordionSummary","expandIcon","ExpandMoreIcon","AccordionDetails","overflowX","Timeline","TimelineItem","TimelineSeparator","TimelineDot","TimelineConnector","TimelineContent","ProductTracking","selectedUser","setSelectedUser","buildLogText","creationLog","product_tracking","logs","_log$user","flex","ProductForm","previewImage","groupsOptions","setGroupsOptions","selectedGroup","setSelectedGroup","groupsLoading","setGroupsLoading","buildGroupsOptions","newProduct","_event$target","handleGroupSelection","productGroupApi","resolve","LocationsContext","createContext","useLocationsContext","context","useContext","General","goToDevicesTab","isRestricted","setIsRestricted","restriction","restrictedTo","setRestrictedTo","restriction_type","setUsers","setGroups","usersToAdd","setUsersToAdd","groupsToAdd","setGroupsToAdd","resourcesToDelete","setResourcesToDelete","setOptions","isFirstRender","setIsFirstRender","loadingResources","setLoadingResources","isShared","setIsShared","shared","isHidden","setIsHidden","SharedLocationsAllowed","setSharedLocationsAllowed","isSuperTenantOrg","setIsSuperTenantOrg","customerSupportSelection","setCustomerSupportSelection","contact_email","default_support_email","contact_phone","default_support_phone","assignUserToLocation","getUsersFromLocation","removeUserFromLocation","assignGroupToLocation","getGroups","getGroupsFromLocation","removeGroupFromLocation","getFormTitle","handleRadioCustomerSupport","handleRestrictionChange","newRestriction","_location$restriction3","_location$restriction4","handleSelect","assignUsers","promises","assignGroups","unassignUsers","unassignGroups","updateOrCreateLocation","formattedLocation","latitude","longitude","assignment_type","formatLocationFormData","newLocation","buildUserOptions","_location$restriction","u","buildGroupOptions","_location$restriction2","fetchUsers","fetchGroups","_location$latitude","_location$longitude","phone","_methods$watch","_methods$watch2","superTenant","CanShowSharedLocations","TenantData","selectedResources","noOptionsText","DoneIcon","RadioGroup","Radio","SettingsTab","currentDevice","setCurrentDevice","sizes","setSizes","prices","setPrices","assignedDevices","setAssignedDevices","setDevices","devicesToDelete","setDevicesToDelete","devicesToAdd","setDevicesToAdd","isLoadingDevices","setIsLoadingDevices","isSubOrg","setIsSubOrg","useDefaultSupportInformation","setUseDefaultSupportInformation","updateDevice","getSizes","sizeOptions","priceOptions","locationOptions","buildOptions","fetchDevices","fetchSizes","fetchAssignedDevices","updatedLocation","finalMessage","_device$locker_number","failed","promise","f","successMessage","devicesSelected","DeviceForm","LocationForm","creatingLocation","currentLocation","DeviceLog","_log$event","log_type","DeviceHistory","deviceHistory","setDeviceHistory","history","fetchDeviceHistory","_device$restriction","_device$image","_device$restriction7","_device$restriction8","allDevices","openSizesSidebar","setOpenSizesSidebar","openProductsSidebar","setOpenProductsSidebar","openLocationsSidebar","setOpenLocationsSidebar","productGroups","setProductGroups","wrongPriceTypeForService","setWrongPriceTypeForServiceError","assignType","setAssignType","priceRequired","setPriceRequired","adaCompliance","setAdaCompliance","setPriceType","setProducts","setProductsOptions","setSelectedProduct","assignedProduct","setAssignedProduct","assignGroup","assignedGroup","unassignGroup","getProducts","getProductGroups","isLoadingLocations","isLoadingProducts","setIsLoadingProducts","default_id_size","lockerNumbers","fetchProducts","_device$restriction$i","_device$restriction4","_device$restriction2","_device$restriction3","buildProductsOptions","autoCompleteOptions","fetchProductGroups","filteredPrice","lockerNumberExists","hasFormErrors","noUsersAdded","noGroupsAdded","noAssignmentsAdded","isAssignmentMissing","DeviceFormElement","newDevice","deviceResult","_device$restriction5","_device$restriction6","validateLockerNumber","defaultChecked","HandleAddProduct","toLocaleLowerCase","rowCount","UnlockByLocationDialog","setOpenUnlockByLocation","openMessageDialog","setOpenMessageDialog","messageDialog","setMessageDialog","Paper","unlockResponse","handleCheckboxClick","MultiEditForm","Devices","devicesBackup","setDevicesBackup","openDeviceSidebar","setOpenDeviceSidebar","setOpenLocationForm","openUnlockByLocation","setSelectedRowsData","openMultiEditForm","setOpenMultiEditForm","selectedStatus","setSelectedStatus","disableUnlockAllButton","setUnlockAllButton","unlockDevices","selectedDevice","handleItemColumnVisibility","backgroundReloadDevices","setTimeout","noItemRowColumns","fc","handleUnlockAllClick","reload","unlockSelectedDevices","deviceUUIDs","SizeRow","handleEditSize","Sizes","sizesBackup","setSizesBackup","currentSize","setCurrentSize","selectedRowsData","useOrgSettings","setOrgSettings","fetchOrgSettings","whitelabel","terms_condition","terms_condition_2nd","terms_name_2nd","UserForm","assignedGroups","setAssignedGroups","groupsToRemove","setGroupsToRemove","isLoadingGroups","setIsLoadingGroups","userGroups","getGoupsAssignedToUser","isEmailDefault","default_notification","isPhoneDefault","emailRules","phoneNumberRules","phoneLabel","emailLabel","UserFormContent","_data$phone_number","_data$email","_data$phone_number2","_data$email2","groupsSelected","UserRow","onEdit","PersonOffIcon","PersonIcon","moment","access_code","is_deleted","handleConfirm","activateUser","deactivateUser","Users","usersBackup","setUsersBackup","setCurrentUser","handleOpen","GroupForm","usersToRemove","setUsersToRemove","loadingUsers","setLoadingUsers","usersSelected","GroupRow","handleEditGroup","Groups","groupsBackup","setGroupsBackup","currentGroup","setCurrentGroup","badgeStyles","ResendPassword","openConfirmDialog","setOpenConfirmDialog","setStatus","pending","badge","CheckCircleOutlinedIcon","CancelOutlinedIcon","ForwardToInbox","MemberRow","ROLES","MemberForm","send_reported_issues","MemberFormElement","TeamMembers","membersBackup","setMembersBackup","currentMember","setCurrentMember","valueOf","SETTINGS_TABS","COUNTRIES_OPTIONS","ORGANIZATION_TABLE_HEADERS","PARCEL_EXPIRATION_UNITS","setTheme","setDarkMode","ThemeCustomizer","bgColor","disp","thcolor","Fab","handleThemeColorChange","CheckIcon","SettingsForm","unlimited","setUnlimited","default_max_reservations","secondTermsAndConditions","setSecondTermsAndConditions","expiredParcels","setExpiredParcels","parcel_expiration","parcel_expiration_unit","secondContact","setSecondContact","new_contact_notification_enabled","verificationEmailSent","setVerificationEmailSent","emailVerified","setEmailVerified","new_contact_notification_email_verified","reservations","newLocker","updatedSettings","invoice_prefix","apikeysApi","createApiKey","APIKeysForm","getApiKeys","apiKey","setApiKey","copied","setCopied","_response$","handleGenerateAPIKey","handleCopyToClipboard","DefaultsForm","new_contact_notification_email","default_notification_email","getValues","default_notification_phone","ArrowForwardIcon","viewBox","xmlns","fillRule","clipRule","CheckCircleIcon","setUserSession","useUserSession","userSessionReducer","userSession","getSession","isHelpDesk","ChangePassword","passwordStrengthElement","showChangePassword","toggleShowChangePassword","Profile","show_change_password","confirm_password","refreshToken","token","newSession","Settings","welcomeMessage","TABS","ProfileForm","ISSUE_STATUSES","IssueRow","_issue$user","_issue$user2","_issue$user3","_issue$event","_issue$event2","handleEditIssue","reporter_user_name","reporter_user_email","reporter_user_phone","IssueForm","_issue$event6","_issue$pictures","teamMembers","usersOptions","setUserOptions","loadingUserTransactions","setLoadingUserTransactions","invoiceIdOptions","setInvoiceIdOptions","selectedInvoiceId","setSelectedInvoiceId","selectedTeamMember","setSelectedTeamMember","foundTeamMember","images","setImages","imagesPreviews","setImagesPreviews","isValidInvoiceID","setIsValidInvoiceID","buildUsersOptions","_issue$event3","_issue$event4","_issue$event5","events","buildInvoiceIdOptions","newIssue","delete","picture","fileArray","preview","handleUserSelection","handleInvoiceIdSelection","handleTeamMemberSelection","maxLength","Issues","issues","setIssues","issuesBackup","setIssuesBackup","currentIssue","setCurrentIssue","setTeamMembers","getTeamMembers","fetchIssues","fetchTeamMembers","useNotificationApi","uploadImagesToNotification","notificationId","header_image","body_image","footer_image","notificationApi","notification","footer","uploadError","getNotificationTypes","EVENTS_DEFAULT_NOTIFICATIONS","on_start","on_service_dropoff","on_service_pickup","on_service_charge","on_reservation","on_complete","storage","delivery","non_locker_delivery","on_expired","NOTIFICATION_TYPES_BY_MODE","NOTIFICATION_EVENTS_BY_MODE","MESSAGE_AT_LOCATION_RESTRICTIONS","NotificationRow","setCurrentNotification","is_template","handleClone","isDefaultNotification","is_default","notification_type","getNotificationTypeLabel","withSpaces","snakeCaseToHumanReadable","ContentCopy","NotificationForm","_notification$is_defa","_notification$email","_notification$sms","_MESSAGE_AT_LOCATION_","notificationTypes","filteredNotificationTypes","setFilteredNotificationTypes","filteredEvents","setFilteredEvents","teamMembersOptions","setTeamMembersOptions","id_member","before","setBefore","after","setAfter","isDefault","setIsDefault","loadingTeamMembers","setLoadingTeamMembers","message_email","location_message","member_message","timeUnit","notificationType","nameVal","timeAmountVal","l","headerImage","setHeaderImage","footerImage","setFooterImage","bodyImage","setBodyImage","setEmail","sms","setSms","headerImageSuccess","setHeaderImageSuccess","header_s3_url","bodyImageSuccess","setBodyImageSuccess","body_s3_url","footerImageSuccess","setFooterImageSuccess","footer_s3_url","hideMessageAtLocation","filterMode","filteredTypes","initializeSelectedMember","ShowAssignTeamMember","ShowEmailTemplate","timingPhrase","numericValue","eventNameFormatted","notificationDescription","showLocationsMessage","messageTooltip","_EVENTS_DEFAULT_NOTIF","defaultMessage","TabForm","cleanTimeAmount","time_amount","newNotification","NotificationDefaultSettings","defaultNotificationSettings","setDefaultNotificationSettings","handleDefaultSettingsChange","channel","stateObj","defaultSettings","setLastModeFilter","Notifications","_notifications$totals","notifications","setNotifications","totals","page_size","total_pages","currentNotification","setNotificationTypes","defaultNotificationsDialog","setDefaultNotificationsDialog","lastModeFilter","lastModeFilterReducer","fetchNotifications","filterByMode","withSteps","addStepsToAssetNotifications","addStepsToServiceNotifications","addStepsToDeliveryNotifications","addStepsToStorageNotifications","capitalizedTypes","getAllNotificationTypes","storedMode","settingsRes","getOrgSettings","LocationRow","_location$devices","setCreatingLocation","handleDeleteLocation","handleHideLocation","MapView","closeControls","locationToDelete","setLocationToDelete","selectedMarker","setSelectedMarker","showHeatmap","setShowHeatmap","showFakeHeatmap","setShowFakeHeatmap","viewport","setViewport","tooltipInfo","setTooltipInfo","activeId","showSubTooltip","setShowSubTooltip","closeToolTip","openToolTip","geoJsonData","features","properties","intensity","coordinates","getElementsByClassName","classList","MapGL","mapStyle","accessToken","onViewportChange","Source","Layer","source","maxZoom","paint","backgroundSize","pointerEvents","_tooltipInfo$data","_tooltipInfo$data2","_tooltipInfo$data$dev","_tooltipInfo$data3","_tooltipInfo$data3$de","_tooltipInfo$data4","_tooltipInfo$data5","_tooltipInfo$data5$de","_tooltipInfo$data6","_tooltipInfo$data7","_tooltipInfo$data8","_tooltipInfo$data9","_tooltipInfo$data9$de","_tooltipInfo$data10","_tooltipInfo$data11","_tooltipInfo$data12","_tooltipInfo$data13","_tooltipInfo$data13$d","_tooltipInfo$data14","_tooltipInfo$data15","bind","cx","cy","filterUnits","colorInterpolationFilters","floodOpacity","in","dy","stdDeviation","in2","operator","Popup","closeOnClick","offset","acc","modeItem","hardwareItem","sizeName","sizeItem","ArrowDropUp","ArrowDropDown","Locations","mapView","setMapView","showControls","setShowControls","Provider","RETURN_TO_OPTIONS","PRODUCT_DEFAULTS","PRODUCT_SHORT_DEFAULTS","MultiEditProductForm","ProductRow","handleEditProduct","productToClone","setProductToClone","BarCodeGenerator","handleBarcode","_product$devices3","_product$devices3$","_product$devices4","_product$devices4$","_product$devices4$$lo","_groups$find","version","getRowBackground","_product$devices","_product$devices$","_product$devices$$loc","_product$devices2","_product$devices2$","Inventory","productsBackup","setProductsBackup","currentProduct","setCurrentProduct","selectedProducts","setSelectedProducts","openMultiEdit","setOpenMultiEdit","handleCloseMultiEdit","_data$items","_data$total","_data$pages","ProductGroupForm","_group$size","productsToAdd","setProductsToAdd","productsToRemove","setProductsToRemove","activateCharging","setActivateCharging","charging_time","returnTo","setReturnTo","one_to_one","selectedSize","setSelectedSize","productsLoading","setProductsLoading","sizesLoading","setSizesLoading","formatProductGroupPayload","total_inventory","transaction_number","auto_repair","localeCompare","autoRepair","newProducts","newGroup","_e$target$files","productsSelected","ProductGroupRow","ProductGroups","productGroupsBackup","setProductGroupsBackup","BlankLayout","_path","_path2","_path3","_path4","_path5","_path6","Outlet","_extends","apply","this","SvgPricingSetUp","svgRef","titleId","ForwardRef","SvgPayPer","_path7","SvgMemberships","SvgPromoCode","SvgInventory","SvgProductGroups","MenuItems","featureName","EqualizerOutlinedIcon","FlagIcon","CreditCard","SvgIcon","PricingSetUp","PayPer","Memberships","PromoCode","PlaceOutlined","MapOutlined","ViewModuleOutlinedIcon","SensorDoorOutlinedIcon","SquareFootOutlinedIcon","CategoryIcon","ProductGroup","RuleIcon","GroupsIcon","PersonOutline","Diversity1","EventAvailableOutlinedIcon","PublishedWithChanges","BookmarkAddedOutlinedIcon","SubscriptionsIcon","WarningOutlined","AccountTreeOutlinedIcon","HomeRepairServiceOutlinedIcon","ApiOutlinedIcon","WidgetsOutlinedIcon","IntegrationInstructionsOutlinedIcon","AttachMoneyOutlined","desc","nextPath","sideBarIndex","parentIndex","child","RoomOutlined","SquareFootOutlined","DevicesOutlined","InventoryOutlined","Inventory2Outlined","DashboardOutlined","TourItem","tour","borderTop","GettingStartedItems","Circle","ArrowForwardOutlined","useOrgFeaturePages","orgFeaturePages","setOrgFeaturePages","isLoadingFeaturePages","setIsLoadingFeaturePages","fetchOrgFeaturePagesTypes","Sidebar","isMobileSidebarOpen","onSidebarClose","isSidebarOpen","setLogo","currentTour","setCurrentTour","useLocation","useSearchParams","pathDirect","pathWithoutLastPart","lastIndexOf","lgUp","up","handleClick","prevopen","handleTourOnClose","isFeaturePageEnabled","tourFound","fetchLogo","SidebarContent","List","Fragment","ListItem","ListItemIcon","ListItemText","ExpandLessIcon","Collapse","timeout","unmountOnExit","childrenIndex","svg","disablePadding","API_DOCS_LINK","HelpItems","setFeedbackFormOpen","handleGettingStartedClick","helpItems","ListRounded","InterestsOutlined","MonitorOutlined","CodeOutlined","rel","HelpOutline","QuestionAnswerOutlined","StarOutlineOutlined","ListItemButton","DEPARTMENTS","feedbackApi","feedback","FeedbackForm","devicesOptions","setDevicesOptions","setUsersOptions","setLocationId","setDeviceId","setUserId","buildDevicesOptions","department","notes","handleLocationSelection","handleDeviceSelection","Header","customClass","toggleSidebar","toggleMobileSidebar","anchorEl4","setAnchorEl4","helpSideBarOpen","setHelpSideBarOpen","feedbackFormOpen","pageTitle","handleClose4","toggleHelpSideBar","handleThemeChange","AppBar","edge","MenuIcon","flexGrow","DarkModeIcon","LightModeIcon","QuestionMark","Person","KeyboardArrowDown","pl","pr","handleLogout","Footer","MainWrapper","experimentalStyled","PageWrapper","FullLayout","setSidebarOpen","setMobileSidebarOpen","ProtectedRoute","restricted","lockerWallApi","getLockerWallsByLocation","lockerWalls","lockerWall","imageEndopoint","lockerWallId","LockerWallForm","setLockerWall","devicesForLocation","wall","qty_tall","columns","qty_wide","kioskRow","kioskColumn","lockers","kioskLocker","locker","kiosk","kioskPosition","is_kiosk","newKioskPosition","newKiosk","j","custom_id","buildMatrix","updatedWall","assignedIds","newWall","lockerColors","Locker","_lockerColors$find","_locker$device2","setSwapLocker","setHoverLocker","isKiosk","isUnassigned","_locker$device","onDragStart","CardActions","AssignLockerDialog","handleAssignLocker","reassigningLocker","setSelectedDevice","Detail","LockerDetails","_locker$device3","_locker$device4","_locker$device5","_locker$device5$size","_locker$device6","_locker$device7","_locker$device8","handleReassignLocker","handleUnassignLocker","successOperation","operationMessage","closeAlert","icons","Edit","Wall","wallMatrix","locationWalls","openAssignLockerDialog","setOpenAssignLockerDialog","openLockerDetailsDialog","setOpenLockerDetailsDialog","selectedLocker","setSelectedLocker","setSuccessOperation","setOperationMessage","setReassigningLocker","swapLocker","movingKiosk","setMovingKiosk","hoverLocker","isMobile","handleCloseAssignDialog","handleCloseLockerDetailsDialog","_selectedLocker$devic3","deviceUpdated","wallClone","moveKiosk","rowIndex","columnIndex","heigth","handleLockerClick","newLockers","newLockerWall","_selectedLocker$devic","_selectedLocker$devic2","ColorLegends","_lockerWall$devices","_lockerWall$devices2","WallDetails","WallToolbar","selectedLocationValue","selectedWallValue","lockerWallOptions","handleSelectWall","setMode","LockerWall","lastLocation","setSelectedLocationValue","setSelectedWallValue","lockerWallMatrix","setLockerWallMatrix","setLocationWalls","setIsLoading","getDevicesAPI","_selectedLocation$dev","_selectedLocation$dev2","generateMatrix","matrix","lockerDevice","fetchLockerWalls","w","conditionApi","conditionId","ConditionForm","devicesToRemove","setDevicesToRemove","devicesLoading","setDevicesLoading","newDevices","newCondition","ConditionRow","_condition$products","handleDeleteCondition","handleMaintenance","handleReport","Conditions","conditions","setConditions","conditionsBackup","setConditionsBackup","currentCondition","setCurrentCondition","fetchConditions","TRANSACTION_TYPES","DETAIL_PAGE_LIST_ITEMS","abbreviation","RESERVATION_SETTINGS_PERIODS","PENALTY_REASONS","EVENT_DEFAULTS","EVENT_SHORT_DEFAULTS","EVENT_STATUS_OPTIONS","ReservationForm","_reservation$product","_reservation$size","_reservation$device","_reservation$user2","_reservation$user3","_reservation$user4","_lockerNumbers$2","daySelectionCriteria","setDaySelectionCriteria","allDays","durationCriteria","setDurationCriteria","_reservation$user","selectedDays","setSelectedDays","sizesByLocation","setSizesByLocation","loadingSizes","setLoadingSizes","id_device","_reservation$device2","_reservation$device3","filteredOptions","locationsByMode","filterOptions","days","Avatar","handleToggleCustomDay","handleToggleDayCriteria","handleToggleDurationCriteria","sizesAtLocation","parsedSizes","available_devices","s","_reservation$size2","_reservation$size4","_reservation$size3","fetchSizesAtLocation","_lockerNumbers$","_reservation$location","defaultMode","reservationDetails","reservationMode","locationName","sizeLabel","lockerNumber","DeliverForm","isSubmitted","OtherModesForm","RentalModeForm","_ref6","FormRender","newReservation","_newReservation$phone","sender_details","buildDeliveryPayload","buildPayload","ReservationRow","ReservationSettingsForm","toggleTransactionBufferTime","setTransactionBufferTimeEnabled","toggleLockerBufferTime","setLockerBufferTimeEnabled","handleTransactionBufferTimeToggle","handleLockerBufferTimeToggle","fetchReservationSettings","max_rental_time","max_rental_time_period","max_reservation_time","max_reservation_time_period","transaction_buffer_time_period","transaction_buffer_time","locker_buffer_time_period","locker_buffer_time","reservationSettingsForm","Reservations","setReservations","reservationsBackup","setReservationsBackup","currentReservation","setCurrentReservation","openSettings","setOpenSettings","loadingDevices","setLoadingDevices","fetchReservations","StyleSheet","QR","marginVertical","marginHorizontal","TRANSACTION_DETAILS_CONTAINER","TRANSACTION_DETAILS","ServicePDF","_transaction$invoice_","_transaction$device$l","_transaction$device2","_transaction$user","_transaction$user2","_transaction$user3","qr","setQr","View","Text","ChargeDialog","_transaction$device2$","_transaction$device3","_transaction$device3$","hasUnit","onCharge","weight_value","DropoffDialog","availableServiceDevices","deviceList","newDropoff","onDropoff","PickUpDialog","_transaction$device$n","onPickup","RefundDialog","transactionCurrency","newRefund","onRefund","EndDialog","calculateDuration","selectedDate","date1","date2","abs","getDifferenceInHours","getDifferenceInDays","getDifferenceInWeeks","getDifferenceInMinutes","newEnd","onEnd","event_type","calculateChargeAmount","PenaltyDialog","newCharge","onChargePenalty","CustomBadge","Badge","badgeColor","TransactionRow","setCurrentTransaction","fetchTransactions","openRefundDialog","setOpenRefundDialog","openPickupDialog","setOpenPickupDialog","openChargeDialog","setOpenChargeDialog","openDropoffDialog","setOpenDropoffDialog","openEndDialog","setOpenEndDialog","openPenaltyDialog","setOpenPenaltyDialog","codeDeliveryStatus","setCodeDeliveryStatus","ojmarDialogMsj","handleSendCode","previousState","sms_success","email_success","default_country","updateLocale","meridiem","getBadgeContent","getTooltip","_getBadgeContent","_getBadgeContent2","_getBadgeContent3","_getBadgeContent4","awaiting_user_pickup","badgeContent","ForwardToInboxIcon","SendToMobileIcon","in_progress","AddCardOutlinedIcon","awaiting_service_pickup","UnarchiveOutlinedIcon","awaiting_service_dropoff","ArchiveOutlinedIcon","finished","canceled","refunded","CreditCardOutlinedIcon","_transaction$user4","_transaction$user5","_transaction$user6","_transaction$device4","_transaction$device4$","_transaction$device5","_transaction$device6","default_date_format","MoneyOff","_transaction$device7","_transaction$device7$","_transaction$device8","_transaction$device8$","expired","TransactionLog","TransactionHistory","transactionHistory","setTransactionHistory","fetchTransactionHistory","TransactionForm","location_name","canceled_at","refunded_amount","penalize_charge","notification_status","utc","notification_status_date","courier_pin_code","paddingBottom","Close","signature_url","Transactions","setTransactions","transactionsBackup","setTransactionsBackup","setTransactionType","currentTransaction","setOrgId","filtered","t","fetchOrgId","handleSelectStatus","isDataLoadedAndEmpty","cancellableRows","handleCancelMany","handleSetMaintenanceMany","my","OrganizationForm","_selectedOrg$white_la","_selectedOrg$white_la2","_selectedOrg$white_la3","_selectedOrg$white_la4","_selectedOrg$white_la5","_selectedOrg$white_la7","_selectedOrg$white_la8","_selectedOrg$white_la9","_selectedOrg$white_la10","_selectedOrg$white_la11","_selectedOrg$white_la12","setShowSidebar","selectedOrg","orgsNames","isNameUnique","setIsNameUnique","isValidOrgName","setIsValidOrgName","selectAllModes","setSelectAllModes","every","selectAllHardwares","setSelectAllHardwares","hardware","selectedModes","setSelectedModes","rental_mode","storage_mode","delivery_mode","service_mode","vending_mode","selectedHardwares","setSelectedHardwares","linka_hardware","ojmar_hardware","gantner_hardware","harbor_hardware","dclock_hardware","spintly_hardware","kerong_hardware","headleader_hardware","white_label","organization_owner","app_name","primary_color","secondary_color","pricing","multi_tenant","toolbox","lite_app_enabled","handleOrgModesLoad","handleOrgHardwareLoad","parsedOrgNames","formattedName","_selectedOrg$white_la6","request","orgFeaturesPayload","buildOrgFeaturesPayload","verticalAlign","input","freeSolo","CheckBoxOutlineBlank","CheckBoxOutlined","handleSelectModes","newState","PaperComponent","paperProps","restPaperProps","onMouseDown","py","previousModes","handleSelectHardwares","previousHardwareTypes","hardwares","OrganizationRow","_organization$white_l","_organization$white_l2","myOrg","handleEditOrganization","expanded","setExpanded","InfoOutlined","RefreshRounded","HistoryIcon","handleExpand","sub_orgs","subOrg","_subOrg$white_label","ORG_FILTERS","Organization","orgs","setOrgs","showSidebar","setSelectedOrg","currentFilter","setCurrentFilter","setMyOrg","loadingSelfOrg","setLoadingSelfOrg","loadingOrgs","setLoadingOrgs","fetchOrgs","fetchSelfOrg","handleLocalCloseDialog","APIs","isCopied","setIsCopied","fetchApiKey","endAdornment","InputAdornment","ClickAwayListener","onClickAway","disableFocusListener","disableHoverListener","disableTouchListener","ContentCopyIcon","LiteAppSettings","currentImage","setCurrentImage","signInScreen","signInMethod","setSignInMethod","primaryColor","setPrimaryColor","secondaryColor","setSecondaryColor","mdDown","handleSignInMethod","multipleRentals","photoEndRental","payment","ReservationWidgetSettings","reservationWidgetUrl","setReservationWidgetUrl","setBackgroundColor","reservationWidget","AppsAndWidgets","TwilioSidebar","integration","IntegrationCard","IntegrationsBlock","integrations","gridAutoRows","blocks","Integrations","renderIntegrations","block","ErrorBoundary","Component","constructor","componentDidCatch","setState","Router","lastLocationReducer","lastLocationId","exact","Price","App","routing","useRoutes","messageReducer","themeMode","themeColor","fetchCurrency","ThemeProvider","CssBaseline","LocalizationProvider","dateAdapter","AdapterDayjs","INIT_STATE","activeNavbarBg","activeSidebarBg","SidebarWidth","initialState","enabled","id_locations","user_status","RootReducers","combineReducers","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","queryClient","QueryClient","InitialState","createRoot","store","createStore","composeWithDevTools","applyMiddleware","thunk","BrowserRouter","QueryClientProvider","client","serviceWorker","ready","registration","unregister"],"mappings":"2bAAO,MAAMA,EAAwB,QAAVC,EAAGC,SAAO,IAAAD,GAAK,QAALE,EAAPF,inBAAY,IAAAE,OAAL,EAAPA,EAAcC,yBAC/BC,EAAiB,QAAVC,EAAGJ,SAAO,IAAAI,GAAK,QAALC,EAAPD,inBAAY,IAAAC,OAAL,EAAPA,EAAcC,kBAExBC,GAD8B,QAAVC,EAAGR,SAAO,IAAAQ,GAAK,QAALC,EAAPD,inBAAY,IAAAC,GAAZA,EAAcC,+BACjB,QAAVC,EAAGX,SAAO,IAAAW,GAAK,QAALC,EAAPD,inBAAY,IAAAC,OAAL,EAAPA,EAAcC,sBAC3BC,EAAwB,QAAVC,EAAGf,SAAO,IAAAe,GAAK,QAALC,EAAPD,inBAAY,IAAAC,OAAL,EAAPA,EAAcC,yBAC/BC,EAAqB,YACrBC,EAAqB,YACrBC,EAAOC,OAAOC,SAASC,SAIvBC,GAFJ,QAD0BC,EACjCzB,SAAO,IAAAyB,GAAK,QAALC,EAAPD,inBAAY,IAAAC,GAAZA,EAAcC,iCAEe,M,yCCV/BC,EAAOC,QAAU,CAAC,MAAQ,yBAA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AACugC,GAAM,OAIb,CACE3X,KAAM,iBACNra,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAAC8gC,GAAa,OAIpB,CACElY,KAAM,UACNra,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACwO,GAAc,OAIrB,CAAEoa,KAAM,IAAKra,QAASvO,eAAC2U,IAAQ,CAACjV,GAAG,iBAGvC,CACEkpB,KAAM,IACNra,QACEvO,eAACyU,GAAa,CAAA1U,SACZC,eAACmzE,GAAU,MAGfpzE,SAAU,CACR,CACE6oB,KAAM,QACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAAC0hB,GAAS,OAIhB,CACEkH,KAAM,aACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAAC49B,GAAS,OAIhB,CACEhV,KAAM,kBACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAAC2qC,GAAS,SAKlB,CACE/hB,KAAM,WACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAACm1F,GAAK,SAKd,CACEvsE,KAAM,iBACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAAC4tC,GAAU,SAKnB,CACEhlB,KAAM,eACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAAC2nC,GAAK,SAKd,CACE/e,KAAM,aACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAACkkE,GAAS,SAKlB,CACEt7C,KAAM,WACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAACmnD,GAAO,SAKhB,CACEv+B,KAAM,SACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAAC8oD,GAAK,SAKd,CACElgC,KAAM,aACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAAC+lE,GAAS,SAKlB,CACEn9C,KAAM,kBACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAACyoE,GAAa,SAKtB,CACE7/C,KAAM,cACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAAC27E,GAAU,SAKnB,CACE/yD,KAAM,SACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAAC2rD,GAAK,SAKd,CACE/iC,KAAM,UACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAACwsD,GAAM,SAKf,CACE5jC,KAAM,gBACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAAC4tD,GAAW,SAKpB,CACEhlC,KAAM,gBACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACsqF,GAAY,OAInB,CACE1hE,KAAM,gBACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAACuhF,GAAY,SAKrB,CACE34D,KAAM,eACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAAC4tC,GAAU,SAKnB,CACEhlB,KAAM,YACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAAC2yD,GAAQ,SAKjB,CACE/pC,KAAM,eACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAAC65E,GAAU,CAACC,aAAcA,SAKlC,CACElxD,KAAM,UACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAAC81D,GAAM,SAKf,CACEltC,KAAM,iBACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,WAAlB5qF,KAA2BoX,SACrDC,eAACs9D,GAAa,SAKtB,CACE10C,KAAM,gBACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CAACC,WAA8B,UAAlB5qF,KAA0BoX,SACpDC,eAACgxF,GAAY,SAKrB,CACEpoE,KAAM,QACNssE,OAAO,EACP3mF,QACEvO,eAAC00F,GAAa,CAAA30F,SACZC,eAACszE,GAAc,CACbC,WACoB,WAAlB5qF,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GACPG,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAQN,EAAY,GAExB,E,sBCAF,MAAMO,GAAc,IAAIC,KAElB5+E,GAAY50B,SAASgnC,eAAe,QCNnC,IAAwBysE,GDOlBC,qBAAW9+E,IAEnBtS,OACHjG,eAACukE,IAAQ,CAAC+yB,MCTIC,uBACZf,GACAY,GACAI,+BAAoBC,2BAAgBC,QDMJ33F,SAChCC,eAAC23F,IAAa,CAAA53F,SACZC,eAAC43F,KAAmB,CAACC,OAAQX,GAAYn3F,SACvCC,eAACo1F,GAAG,WFoHN,kBAAmB1zD,WACrBA,UAAUo2D,cAAcC,MACrB9jF,MAAM+jF,IACLA,EAAaC,YAAY,IAE1Bx5E,OAAO1+B,IACNsD,QAAQtD,MAAMA,EAAMqF,QAAQ,IE9GpCsxG,I","file":"static/js/main.4709a2f3.chunk.js","sourcesContent":["export const GOOGLE_API_KEY = process?.env?.REACT_APP_GOOGLE_API_KEY\nexport const API_URL = process?.env?.REACT_APP_API_URL\nexport const NOTIFICATION_API_URL = process?.env?.REACT_APP_NOTIFICATION_API_URL\nexport const RENTAL_URL = process?.env?.REACT_APP_RENTAL_URL\nexport const PUBLIC_API_URL = process?.env?.REACT_APP_PUBLIC_API_URL\nexport const AWS_PROJECT_REGION = 'us-east-1'\nexport const AWS_COGNITO_REGION = 'us-east-1'\nexport const HOST = window.location.hostname\nexport const TWILIO_CONNECT_APP_SID =\n process?.env?.REACT_APP_TWILIO_CONNECT_APP_SID\n\nexport const PROJECT_VERSION = '1.0'\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"label\":\"SearchBar_label__3cqEl\",\"debounceInput\":\"SearchBar_debounceInput__24SR-\",\"debounceInputLight\":\"SearchBar_debounceInputLight__1EgXh\"};","import { useSelector, RootStateOrAny } from 'react-redux'\n\nconst Override = () => {\n const customizer = useSelector(\n (state: RootStateOrAny) => state.CustomizerReducer,\n )\n\n const components = {\n MuiCssBaseline: {\n styleOverrides: {\n '*': {\n boxSizing: 'border-box',\n },\n html: {\n height: '100%',\n width: '100%',\n '& ::-webkit-scrollbar': {\n width: '10px',\n height: '10px',\n backgroundColor:\n customizer.activeMode === 'dark' ? '#3b3f45' : '#efeff2',\n borderRadius: '10px',\n },\n '& ::-webkit-scrollbar-track': {\n borderRadius: '10px',\n },\n '& ::-webkit-scrollbar-thumb': {\n backgroundColor:\n customizer.activeMode === 'dark' ? '#2d2f34' : '#bababf',\n borderRadius: '10px',\n },\n '& ::-webkit-scrollbar-thumb:hover': {},\n },\n body: {\n height: '100%',\n margin: 0,\n padding: 0,\n },\n '#root': {\n height: '100%',\n },\n \"*[dir='rtl'] .buyNowImg\": {\n transform: 'scaleX(-1)',\n },\n\n '.buyNowImg': {\n position: 'absolute',\n right: '-44px',\n top: '-18px',\n width: '143px',\n height: '175px',\n },\n '.MuiCardHeader-action': {\n alignSelf: 'center !important',\n },\n '.scrollbar-container': {\n borderRight: '0 !important',\n },\n \"*[dir='rtl'] .welcomebg:before\": {\n backgroundPosition: 'top -24px left -9px !important',\n },\n },\n },\n MuiContainer: {\n styleOverrides: {\n root: {\n paddingLeft: '15px !important',\n paddingRight: '15px !important',\n maxWidth: '1600px',\n },\n },\n },\n\n MuiButton: {\n styleOverrides: {\n root: {\n textTransform: 'none',\n boxShadow: 'none',\n fontSize: '15px',\n '&:hover': {\n boxShadow: 'none',\n },\n },\n },\n },\n\n MuiListItem: {\n styleOverrides: {\n root: {\n borderRadius: '9px',\n },\n },\n },\n\n MuiCard: {\n styleOverrides: {\n root: {\n borderRadius: '20px',\n padding: '14px',\n margin: '15px',\n boxShadow: '0px 7px 30px 0px rgba(90, 114, 123, 0.11)',\n },\n },\n },\n\n MuiListItemIcon: {\n styleOverrides: {\n root: {\n minWidth: '40px',\n },\n },\n },\n\n MuiGridItem: {\n styleOverrides: {\n root: {\n paddingTop: '30px',\n paddingLeft: '30px !important',\n },\n },\n },\n MuiLinearProgress: {\n styleOverrides: {\n root: {\n backgroundColor: '#ecf0f2',\n borderRadius: '6px',\n },\n },\n },\n MuiMenuItem: {\n styleOverrides: {\n root: {\n borderRadius: '0',\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n fontWeight: '500',\n fontSize: '0.75rem',\n },\n },\n },\n MuiTableCell: {\n styleOverrides: {\n root: {\n padding: '10px 5px',\n height: '70px',\n textAlign: 'center',\n whiteSpace: 'nowrap',\n },\n head: {\n backgroundColor:\n customizer.activeMode === 'dark' ? '#282C34;' : '#fafbfb',\n backgroundImage:\n 'linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05))',\n },\n },\n },\n }\n return { components }\n}\nexport default Override\n","// Layout and colors CONSTANTS\nexport const LIGHT_THEME = 'LIGHT_THEME'\nexport const DARK_THEME = 'DARK_THEME'\nexport const THEME_COLOR = 'THEME_COLOR'\nexport const NAVBAR_BG = 'NAVBAR_BG'\nexport const SIDEBAR_BG = 'SIDEBAR_BG'\nexport const BLUE_THEME = 'BLUE_THEME'\nexport const GREEN_THEME = 'GREEN_THEME'\nexport const RED_THEME = 'RED_THEME'\nexport const BLACK_THEME = 'BLACK_THEME'\nexport const PURPLE_THEME = 'PURPLE_THEME'\nexport const INDIGO_THEME = 'INDIGO_THEME'\nexport const ORANGE_THEME = 'ORANGE_THEME'\n","/* eslint-disable no-unused-vars */\nimport _ from 'lodash'\nimport { createTheme } from '@mui/material/styles'\nimport { useSelector, RootStateOrAny } from 'react-redux'\nimport typography from './Typography'\nimport Override from './Override'\nimport shadows from './Shadows'\n\n// ##############################import {\nimport {\n BLUE_THEME,\n GREEN_THEME,\n RED_THEME,\n BLACK_THEME,\n PURPLE_THEME,\n INDIGO_THEME,\n ORANGE_THEME,\n} from '../../redux/constants'\n// // // Global Variables\n// ##############################\n\nconst SidebarWidth = 265\nconst TopbarHeight = 70\n\nconst baseTheme = {\n direction: 'ltr',\n palette: {\n primary: {\n main: '#1a97f5',\n light: '#e6f4ff',\n dark: '#1682d4',\n },\n secondary: {\n main: '#1e4db7',\n light: '#ddebff',\n dark: '#173f98',\n },\n\n success: {\n main: '#00c292',\n light: '#ebfaf2',\n dark: '#00964b',\n contrastText: '#ffffff',\n },\n danger: {\n main: '#e46a76',\n light: '#fdf3f5',\n },\n info: {\n main: '#0bb2fb',\n light: '#a7e3f4',\n },\n error: {\n main: '#e46a76',\n light: '#fdf3f5',\n dark: '#e45a68',\n },\n warning: {\n main: '#fec90f',\n light: '#fff4e5',\n dark: '#dcb014',\n contrastText: '#ffffff',\n },\n text: {\n secondary: '#777e89',\n danger: '#fc4b6c',\n },\n grey: {\n A100: '#ecf0f2',\n A200: '#99abb4',\n A400: '#767e89',\n A700: '#e6f4ff',\n },\n cancel: {\n main: '#616161',\n },\n action: {\n disabledBackground: 'rgba(73,82,88,0.12)',\n hoverOpacity: 0.02,\n hover: 'rgba(0, 0, 0, 0.03)',\n },\n },\n\n shape: {\n borderRadius: 5,\n },\n mixins: {\n toolbar: {\n color: '#949db2',\n '@media(min-width:1280px)': {\n minHeight: TopbarHeight,\n padding: '0 30px',\n },\n '@media(max-width:1280px)': {\n minHeight: '64px',\n },\n },\n },\n status: {\n danger: '#e53e3e',\n },\n typography,\n shadows,\n}\n\nconst themesOptions = [\n {\n name: BLUE_THEME,\n palette: {\n primary: {\n main: '#1a97f5',\n light: '#e6f4ff',\n dark: '#1682d4',\n },\n secondary: {\n main: '#1e4db7',\n light: '#ddebff',\n dark: '#173f98',\n },\n },\n },\n {\n name: GREEN_THEME,\n palette: {\n primary: {\n main: '#00cec3',\n light: '#d7f8f6',\n dark: '#02b3a9',\n contrastText: '#ffffff',\n },\n secondary: {\n main: '#066a73',\n },\n },\n },\n {\n name: PURPLE_THEME,\n palette: {\n primary: {\n main: '#7352ff',\n light: '#e5e0fa',\n dark: '#5739d6',\n },\n secondary: {\n main: '#402e8d',\n },\n },\n },\n {\n name: INDIGO_THEME,\n palette: {\n primary: {\n main: '#1e4db7',\n light: '#e6f4ff',\n dark: '#0c399e',\n },\n secondary: {\n main: '#11397b',\n },\n },\n },\n {\n name: ORANGE_THEME,\n palette: {\n primary: {\n main: '#fb9678',\n light: '#e1876c',\n dark: '#e79f89',\n contrastText: '#ffffff',\n },\n secondary: {\n main: '#fb9678',\n light: '#e1876c',\n dark: '#e79f89',\n contrastText: '#ffffff',\n },\n },\n },\n {\n name: RED_THEME,\n palette: {\n primary: {\n main: '#ff5c8e',\n light: '#fce6ed',\n dark: '#d43653',\n contrastText: '#ffffff',\n },\n secondary: {\n main: '#5e244d',\n },\n },\n },\n {\n name: BLACK_THEME,\n palette: {\n primary: {\n main: '#1c2025',\n },\n },\n },\n]\n\ndeclare module '@mui/material/styles' {\n interface Palette {\n cancel: Palette['primary']\n }\n\n // allow configuration using `createTheme`\n interface PaletteOptions {\n cancel?: PaletteOptions['primary']\n }\n}\n\n// Update the Button's color prop options\ndeclare module '@mui/material/Button' {\n interface ButtonPropsColorOverrides {\n cancel: true\n }\n}\n\nexport const BuildTheme = (config) => {\n let themeOptions = themesOptions.find((theme) => theme.name === config.theme)\n const customizer = useSelector(\n (state: RootStateOrAny) => state.CustomizerReducer,\n )\n const { components } = Override()\n\n const base = { ...baseTheme }\n\n const baseMode = {\n palette: {\n mode: customizer.activeMode,\n background: {\n default: customizer.activeMode === 'dark' ? '#20232a' : '#fafbfb',\n dark: customizer.activeMode === 'dark' ? '#1c2025' : '#ffffff',\n paper: customizer.activeMode === 'dark' ? '#282C34' : '#ffffff',\n },\n text: {\n primary:\n customizer.activeMode === 'dark' ? '#e6e5e8' : 'rgba(0, 0, 0, 0.87)',\n secondary: customizer.activeMode === 'dark' ? '#adb0bb' : '#777e89',\n },\n },\n breakpoints: {\n values: {\n xs: 0,\n sm: 700,\n md: 1000,\n lg: 1300,\n xl: 1636,\n },\n },\n components: {\n ...components,\n MuiInput: {\n styleOverrides: {\n root: {\n '& .MuiInputBase-input .MuiOutlinedInput-input': {\n '-webkit-box-shadow': 'none !important',\n '-webkit-text-fill-color': 'none !important',\n },\n },\n },\n },\n },\n }\n\n if (!themeOptions) {\n console.warn(new Error(`The theme ${config.theme} is not valid`))\n ;[themeOptions] = themesOptions\n }\n\n function setCSSVariables() {\n document.documentElement.style.setProperty(\n '--palete-primary-main',\n theme.palette.primary.main,\n )\n document.documentElement.style.setProperty(\n '--palete-background-default',\n theme.palette.background.paper,\n )\n document.documentElement.style.setProperty(\n '--palete-text-primary',\n theme.palette.text.primary,\n )\n document.documentElement.style.setProperty(\n '--palete-text-primary',\n theme.palette.text.primary,\n )\n }\n\n const theme = createTheme(\n _.merge({}, base, baseMode, themeOptions, {\n direction: config.direction,\n }),\n )\n setCSSVariables()\n return theme\n}\n\nexport { TopbarHeight, SidebarWidth, baseTheme }\n","const typography = {\n fontFamily: \"'DM Sans', sans-serif\",\n body1: {\n fontWeight: 400, // or 'bold'\n },\n h1: {\n fontWeight: 500,\n fontSize: '1.875rem',\n lineHeight: '1.5',\n },\n h2: {\n fontWeight: 500,\n fontSize: '1.5rem',\n lineHeight: '1.5',\n },\n h3: {\n fontWeight: 500,\n fontSize: '1.3125rem',\n lineHeight: '1.5',\n },\n h4: {\n fontWeight: 500,\n fontSize: '1.125rem',\n lineHeight: '1.5',\n },\n h5: {\n fontWeight: 500,\n fontSize: '1rem',\n lineHeight: '1.5',\n },\n h6: {\n fontWeight: 500,\n fontSize: '0.875rem',\n lineHeight: '1.5',\n },\n button: {\n textTransform: 'none',\n fontWeight: '400',\n },\n subtitle1: {\n fontSize: '1rem',\n fontWeight: '400',\n },\n subtitle2: {\n fontSize: '0.875rem',\n fontWeight: '400',\n },\n}\n\nexport default typography\n","const shadows = [\n 'none',\n '0px 2px 3px rgba(0,0,0,0.10)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 2px 2px -2px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 3px 4px -2px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 3px 4px -2px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 4px 6px -2px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 4px 6px -2px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 4px 8px -2px rgba(0,0,0,0.25)',\n '1px 2px 10px rgba(0,0,0,0.08)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 6px 12px -4px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 7px 12px -4px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 6px 16px -4px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 7px 16px -4px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 8px 18px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 9px 18px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 10px 20px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 11px 20px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 12px 22px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 13px 22px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 14px 24px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 16px 28px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 18px 30px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 20px 32px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 22px 34px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 24px 36px -8px rgba(0,0,0,0.25)',\n]\n\nexport default shadows\n","import { useEffect } from 'react'\nimport { useSelector } from 'react-redux'\nimport { BuildTheme } from '../../../assets/global/ThemeVariable'\n\nconst ThemeSettings = () => {\n const customizer = useSelector((state) => state.CustomizerReducer)\n const theme = BuildTheme({\n direction: customizer.activeDir,\n theme: customizer.activeTheme,\n })\n useEffect(() => {\n document.dir = customizer.activeDir\n }, [customizer])\n\n return theme\n}\nexport default ThemeSettings\n","export const ITEMS_PER_PAGE: number = 25\nexport const TRANSACTIONS_PER_PAGE: number = 50\nexport const DEVICES_PER_PAGE: number = 50\nexport const DEFAULT_PAGE: number = 0\n","export const HTTP_CODES: { [key: string]: number } = {\n CONTINUE: 100,\n SWITCHING_PROTOCOLS: 101,\n PROCESSING: 102,\n EARLY_HINTS: 103,\n OK: 200,\n CREATED: 201,\n ACCEPTED: 202,\n NON_AUTHORITATIVE_INFORMATION: 203,\n NO_CONTENT: 204,\n RESET_CONTENT: 205,\n PARTIAL_CONTENT: 206,\n MULTI_STATUS: 207,\n ALREADY_REPORTED: 208,\n IM_USED: 226,\n MULTIPLE_CHOICES: 300,\n MOVED_PERMANENTLY: 301,\n FOUND: 302,\n SEE_OTHER: 303,\n NOT_MODIFIED: 304,\n USE_PROXY: 305,\n SWITCH_PROXY: 306,\n TEMPORARY_REDIRECT: 307,\n PERMANENT_REDIRECT: 308,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n PAYMENT_REQUIRED: 402,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n METHOD_NOT_ALLOWED: 405,\n NOT_ACCEPTABLE: 406,\n PROXY_AUTHENTICATION_REQUIRED: 407,\n REQUEST_TIMEOUT: 408,\n CONFLICT: 409,\n GONE: 410,\n LENGTH_REQUIRED: 411,\n PRECONDITION_FAILED: 412,\n PAYLOAD_TOO_LARGE: 413,\n URI_TOO_LONG: 414,\n UNSUPPORTED_MEDIA_TYPE: 415,\n RANGE_NOT_SATISFIABLE: 416,\n EXPECTATION_FAILED: 417,\n I_AM_A_TEAPOT: 418,\n MISDIRECTED_REQUEST: 421,\n UNPROCESSABLE_ENTITY: 422,\n LOCKED: 423,\n FAILED_DEPENDENCY: 424,\n TOO_EARLY: 425,\n UPGRADE_REQUIRED: 426,\n PRECONDITION_REQUIRED: 428,\n TOO_MANY_REQUESTS: 429,\n REQUEST_HEADER_FIELDS_TOO_LARGE: 431,\n UNAVAILABLE_FOR_LEGAL_REASONS: 451,\n INTERNAL_SERVER_ERROR: 500,\n NOT_IMPLEMENTED: 501,\n BAD_GATEWAY: 502,\n SERVICE_UNAVAILABLE: 503,\n GATEWAY_TIMEOUT: 504,\n HTTP_VERSION_NOT_SUPPORTED: 505,\n VARIANT_ALSO_NEGOTIATES: 506,\n INSUFFICIENT_STORAGE: 507,\n LOOP_DETECTED: 508,\n NOT_EXTENDED: 510,\n NETWORK_AUTHENTICATION_REQUIRED: 511,\n}\n","import { ButtonProps } from 'components'\n\n/* eslint-disable no-unused-vars */\nexport enum BUTTON_VARIANT {\n text = 'text',\n outlined = 'outlined',\n contained = 'contained',\n}\n\nexport interface IButton\n extends Pick {}\n\nexport interface ISubmitButton extends Exclude {}\n\nexport type FormButtons = {\n SUBMIT: ISubmitButton\n CANCEL: IButton\n}\n","import { IButton, BUTTON_VARIANT } from 'types/button'\n\nexport const STRIPE_BUTTONS: { [key: string]: IButton } = {\n CONNECT: {\n children: 'Create Stripe Account',\n name: 'createStripeAccount',\n variant: BUTTON_VARIANT.contained,\n },\n LINK: {\n children: 'Link Stripe Account',\n name: 'linkStripeAccount',\n variant: BUTTON_VARIANT.contained,\n },\n}\n","export enum PAGES {\n '/home' = 'Dashboard',\n '/reporting' = 'Reporting',\n '/settings' = 'Settings',\n '/pricing' = 'Pricing',\n '/pay-per' = 'Pay-per',\n '/subscriptions' = 'Subscriptions',\n '/promo-codes' = 'Promo codes',\n '/locations' = 'Locations',\n '/locker-wall' = 'Locker Wall',\n '/devices' = 'Devices',\n '/sizes' = 'Sizes',\n '/transactions' = 'Transactions',\n '/reservations' = 'Reservations',\n '/users' = 'Users',\n '/team-members' = 'Team Members',\n '/groups' = 'Groups',\n '/issues' = 'Issues',\n '/notifications' = 'Notifications',\n '/inventory' = 'Inventory',\n '/product-groups' = 'Product Groups',\n '/conditions' = 'Conditions',\n '/subscribers' = 'Subscribers',\n '/multi-tenant' = 'Multi-Tenant',\n '/apis' = `API's`,\n '/apps-widgets' = 'Apps & Widgets',\n '/integrations' = 'Integrations',\n}\n\nexport enum ORG_FILTERS_IDENTFIER {\n '/reporting' = 'reporting',\n '/pay-per' = 'pay-per',\n '/subscriptions' = 'subscriptions',\n '/promo-codes' = 'promo-codes',\n '/locations' = 'locations',\n '/devices' = 'devices',\n '/sizes' = 'sizes',\n '/transactions' = 'transactions',\n '/reservations' = 'reservations',\n '/users' = 'users',\n '/team-members' = 'members',\n '/groups' = 'groups',\n '/issues' = 'issues',\n '/notifications' = 'notifications',\n '/inventory' = 'inventory',\n '/product-groups' = 'product-groups',\n '/conditions' = 'conditions',\n '/subscribers' = 'subscribers',\n}\n\nexport const ORG_FEATURE_PAGES = [\n 'pricing',\n 'product',\n 'toolbox',\n 'multi_tenant',\n 'notifications',\n]\n","import { FormField } from 'types'\n\nexport const RESET_PASSWORD_FORM_FIELDS: { [key: string]: FormField } = {\n USERNAME: {\n NAME: 'username',\n LABEL: 'Email',\n PLACEHOLDER: 'Email',\n RULES: {\n required: 'Email required',\n pattern: {\n value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}$/i,\n message: 'Invalid email address',\n },\n },\n },\n CODE: {\n NAME: 'code',\n LABEL: 'Verification code',\n PLACEHOLDER: 'Verification code',\n RULES: {\n required: 'Code required',\n },\n },\n PASSWORD: {\n NAME: 'password',\n LABEL: 'New password',\n PLACEHOLDER: 'New password',\n RULES: {\n required: 'New password required',\n },\n },\n CONFIRM_PASSWORD: {\n NAME: 'confirmPassword',\n LABEL: 'Confirm password',\n PLACEHOLDER: 'Confirm password',\n RULES: {\n required: 'Confirm password required',\n },\n },\n}\n\nexport const RESET_PASSWORD_FORM: { [key: string]: string } = {\n FORGOT_TITLE: ' Forgot your password?',\n RESET_TITLE: 'Reset your password',\n DESCRIPTION:\n 'Please enter the email address associated with your account and we will email you a code to verify your account.',\n SEND_CODE_BUTTON_LABEL: 'Send Code',\n SUBMIT_BUTTON_LABEL: 'Change Password',\n BACK_BUTTON: 'Back to Login',\n}\n","export const RESET_PASSWORD_PAGE: { [key: string]: string } = {\n TITLE: 'Reset Password',\n DESCRIPTION: 'This is the Reset Password page',\n CODE_MESSAGE: 'Verification code sent to your email',\n PASSWORD_MESSAGE: 'Password changed successfully',\n}\n","export const SIGN_IN_PAGE: { [key: string]: string } = {\n TITLE: 'Login',\n DESCRIPTION: 'This is Login page',\n WELCOME: 'Welcome to ',\n FORGOT_PASSWORD: 'Forgot your password? ',\n CHANGE_PASSWORD: 'Change it',\n}\n","import { FormField } from 'types'\n\nexport const SIGN_IN_FORM_FIELDS: { [key: string]: FormField } = {\n EMAIL: {\n NAME: 'email',\n LABEL: 'Email',\n PLACEHOLDER: 'Email',\n RULES: {\n required: 'Email required',\n pattern: {\n value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}$/i,\n message: 'Invalid email address',\n },\n },\n },\n PASSWORD: {\n NAME: 'password',\n LABEL: 'Password',\n PLACEHOLDER: 'Password',\n RULES: {\n required: 'Password required',\n },\n },\n}\n\nexport const SIGN_IN_FORM: { [key: string]: string } = {\n SUBMIT_BUTTON_LABEL: 'Sign In',\n}\n","export const SUCCESS_DIALOG = '#44c94b'\nexport const ERROR_DIALOG = '#f50029'\nexport const WARNING_DIALOG = '#ed710c'\nexport const INFO_DIALOG = '#0288d1'\n","import { IFetchEndpoint } from 'utils'\nimport { API_URL, PUBLIC_API_URL } from '../../constants'\nimport { Auth } from 'aws-amplify'\nimport { useAuth } from 'resources'\n\nconst useApiRequest = () => {\n const { getJwtToken } = useAuth()\n\n const fetchPartnerEndpoint = async ({\n endpoint,\n method,\n body,\n headers,\n }: IFetchEndpoint) => {\n try {\n const jwtToken = await getJwtToken()\n const response = await fetch(`${API_URL}${endpoint}`, {\n method,\n body,\n headers: { ...headers, Authorization: `Bearer ${jwtToken}` },\n })\n return response\n } catch (error) {\n throw new Error(\n `An error has occured while processing your request. Please try again later or contact customer support. ${\n (error as Error).message\n }`,\n )\n }\n }\n\n const fetchEndpoint = async ({\n endpoint,\n method,\n body,\n headers,\n }: IFetchEndpoint) => {\n try {\n const jwtToken = await getJwtToken()\n const response = await fetch(`${PUBLIC_API_URL}${endpoint}`, {\n method,\n body,\n headers: { ...headers, Authorization: `Bearer ${jwtToken}` },\n })\n return response\n } catch (error) {\n throw new Error(\n `An error has occured while processing your request. Please try again later or contact customer support. ${\n (error as Error).message\n }`,\n )\n }\n }\n\n const fetchEndpointUnauthorized = async ({\n endpoint,\n method,\n body,\n headers,\n }: IFetchEndpoint) => {\n try {\n const response = await fetch(`${PUBLIC_API_URL}${endpoint}`, {\n method,\n body,\n headers,\n })\n return response\n } catch (error) {\n throw new Error(\n `An error has occured while processing your request. Please try again later or contact customer support. ${\n (error as Error).message\n }`,\n )\n }\n }\n\n return {\n fetchEndpoint,\n fetchPartnerEndpoint,\n fetchEndpointUnauthorized,\n }\n}\n\nexport default useApiRequest\n","import Papa from 'papaparse'\nimport { Filter } from 'models'\n\nexport const getCookie = (cookieName) => {\n const cookies = document.cookie.split(';')\n for (let i = 0; i < cookies.length; i++) {\n const cookie = cookies[i].trim()\n if (cookie.startsWith(cookieName + '=')) {\n return cookie.substring(cookieName.length + 1)\n }\n }\n return null\n}\n\nexport const getDeviceStatusColor = (\n device_status: string,\n lock_status: string,\n) => {\n if (\n (device_status == 'available' && lock_status == 'offline') ||\n (device_status == 'reserved' && lock_status == 'offline')\n ) {\n return 'gray'\n }\n\n switch (device_status) {\n case 'available':\n return '#12BEC9'\n case 'maintenance':\n return '#FB4671'\n case 'reserved':\n return '#4A42EA'\n default:\n return '#12BEC9'\n }\n}\n\nexport const parseCurrency = (currency: string) => {\n switch (currency) {\n case 'usd':\n return '$'\n case 'eur':\n return '€'\n case 'gbp':\n return '£'\n case 'aud':\n return 'AU$'\n case 'cad':\n return 'CA$'\n default:\n return '$'\n }\n}\n\nexport const parseUnit = (unit: string) => {\n switch (unit) {\n case 'minute':\n return 'Min'\n case 'kg':\n return 'Kg'\n case 'lb':\n return 'Lb'\n default:\n return unit.charAt(0).toUpperCase() + unit.slice(1)\n }\n}\n\nexport const parseRole = (role: string) =>\n role === 'admin'\n ? 'Administrator'\n : role.charAt(0).toUpperCase() + role.slice(1)\n\nexport const capitalizeWords = (\n str: string,\n splitter: string = ' ',\n separator: string = ' ',\n) => {\n const wordsArray = str.split(splitter)\n\n const capitalizedWordsArray = wordsArray.map(\n (word) => word.charAt(0).toUpperCase() + word.slice(1),\n )\n\n const capitalizedString = capitalizedWordsArray.join(separator)\n\n return capitalizedString\n}\n\nexport const capitalizeFirstLetter = (word: string) => {\n return word?.charAt(0).toUpperCase() + word?.slice(1)\n}\n\nexport const getUserRole = () => {\n const { role } = JSON.parse(localStorage.getItem('userSession') || '{}')\n return role ? role : null\n}\n\nexport const getCurrentUserProperty = (property: string) => {\n const user = JSON.parse(localStorage.getItem('userSession') || '{}')\n const prop = user[property]\n return prop ? prop : null\n}\n\nexport const getCurrentOrgProperty = (property: string) => {\n const org = JSON.parse(localStorage.getItem('currentOrg') || '{}')\n const prop = org[property]\n return prop ? prop : null\n}\n\nexport const getSettingsProperty = (property: string) => {\n const settings = JSON.parse(localStorage.getItem('settings') || '{}')\n const prop = settings[property]\n return prop ? prop : null\n}\n\nexport const isSuperTenant = () => {\n const isSuperTenant = getCurrentOrgProperty('isSuperTenant')\n return isSuperTenant\n}\n\nexport const parseJwt = (token: string) => {\n try {\n return JSON.parse(atob(token.split('.')[1]))\n } catch (error) {\n return null\n }\n}\n\nexport const getWebSocketUrl = (\n API_URL: string | undefined,\n orgId: string,\n): string => {\n if (!API_URL || !orgId) return ''\n let replacedProtocol = API_URL?.replace('https://', 'wss://').replace(\n // For local development, in case we're pointing to\n // http://localhost:5002 (LockersAPI)\n 'http://',\n 'wss://',\n )\n let newUrl = new URL(replacedProtocol).origin\n return `${newUrl}/v3/events/listener/${orgId}`\n}\n\nexport const getRandomInt = (min: number, max: number): number => {\n return Math.floor(Math.random() * (max - min + 1)) + min\n}\n\nexport const average = (data: number[]): number => {\n if (data.length < 1) {\n return 0\n }\n return data.reduce((prev, current) => prev + current) / data.length\n}\n\nexport const secondsToTimeFormat = (seconds: number): string => {\n const roundedSeconds = Math.round(seconds)\n const hours = Math.floor(roundedSeconds / 3600)\n const minutes = Math.floor((roundedSeconds % 3600) / 60)\n const remainingSeconds = roundedSeconds % 60\n if (hours > 0) {\n return `${hours}h ${String(minutes).padStart(2, '0')}m ${String(\n remainingSeconds,\n ).padStart(2, '0')}s`\n } else if (minutes > 0) {\n return `${String(minutes).padStart(2, '0')}m ${String(\n remainingSeconds,\n ).padStart(2, '0')}s`\n } else {\n return `${String(remainingSeconds).padStart(2, '0')}s`\n }\n}\n\nexport const getErrorMessage = (error: any): string => {\n if (error && Array.isArray(error)) {\n let errorMessage = ''\n error.forEach((err: any) => {\n errorMessage += `${err.msg} `\n })\n return errorMessage\n } else if (error && typeof error === 'string') {\n return error\n } else if (error && error.detail) {\n return JSON.stringify(error.detail)\n } else {\n return 'An unexpected error has ocurred. Please try again later or contact customer support.'\n }\n}\n\nexport const createCsvBlob = (csvRaw: string) => {\n // This function is used to create a Blob object from a plain string.\n // This also assumes the string passed is of valid CSV format.\n const csvData = Papa.unparse(Papa.parse(csvRaw).data)\n const blob = new Blob([csvData], { type: 'text/csv' })\n return blob\n}\n\nexport const parseSnakeCaseToTitleCase = (snake: string) =>\n snake\n .replace(/^[-_]*(.)/, (_, c) => c.toUpperCase())\n .replace(/[-_]+(.)/g, (_, c) => ' ' + c.toUpperCase())\n\nexport const getOrganizationFromHost = (): string => {\n const host: string = window.location.hostname\n const organization: string = host.split('.')[0]\n\n if (organization === 'localhost' || organization === 'koloni') {\n return process.env.REACT_APP_DEFAULT_ORG || 'demo-org'\n }\n\n return organization\n}\n\nexport const validateIntegerField = (value: string | number) => {\n const newValue = String(value).replace(/\\D/g, '')\n if (!newValue) return newValue\n return newValue\n}\n\nexport const validatePhoneNumberFIeld = (value: string) =>\n value.replace(/(?!^)\\+/g, '').replace(/[^0-9+]/g, '')\n\nexport const validateFloatingField = (value: string) => {\n const newValue = String(value).replace(/[^0-9.]/g, '')\n if (!newValue) return newValue\n return newValue\n}\n\nexport const parseHexToRGB = (hex: string, opacity: string = '1') => {\n // Use a regular expression to extract the individual color values from the hex string\n const values = hex.match(/\\w\\w/g)\n\n if (values) {\n // Convert the hex color values to decimal values using parseInt() and store them in r, g, and b\n const [r, g, b] = values.map((k) => parseInt(k, 16))\n\n // Create the rgba string using the decimal values and opacity\n const rgba = `rgba( ${r}, ${g}, ${b}, ${opacity})`\n return rgba\n }\n}\n\nexport const openDoc = (link: string, callback: Function | null = null) => {\n window.open(link, '_blank')\n callback?.()\n}\n\nexport const imageUrlToFile = async (url: string, fileName: string) => {\n const response = await fetch(url)\n const blob = await response.blob()\n const reader = new FileReader()\n reader.readAsDataURL(blob)\n const file = new File([blob], fileName, {\n type: blob.type,\n })\n return file\n}\n\nexport const snakeCaseToHumanReadable = (snakeCase: string) => {\n // Replace underscores with spaces\n const withSpaces = snakeCase.replace(/_/g, ' ')\n\n // Capitalize the first letter of each word\n const capitalized = withSpaces[0].toUpperCase() + withSpaces.slice(1)\n\n return capitalized\n}\n\nexport const getDifferenceInMinutes = (date1, date2) => {\n const msInMinute = 1000 * 60\n return Math.abs((date2 - date1) / msInMinute)\n}\n\nexport const getDifferenceInHours = (date1, date2) => {\n const msInHour = 1000 * 60 * 60\n return Math.abs((date2 - date1) / msInHour)\n}\n\nexport const getDifferenceInDays = (date1, date2) => {\n const msInDay = 1000 * 60 * 60 * 24\n return Math.abs((date2 - date1) / msInDay)\n}\n\nexport const getDifferenceInWeeks = (date1, date2) => {\n const msInWeek = 1000 * 60 * 60 * 24 * 7\n return Math.abs((date2 - date1) / msInWeek)\n}\n\nexport const getPaginatedSlice = (\n currentPage: number,\n rowsPerPage: number,\n array: Array,\n): Array => {\n const start = currentPage * rowsPerPage\n const end = start + rowsPerPage\n return array.slice(start, end)\n}\n\nexport const formatLabel = (key: string) => {\n return key.replace(/_/g, ' ').replace(/\\b\\w/g, (char) => char.toUpperCase())\n}\n\nconst LABEL_MAP: Record = {\n name: 'First name',\n}\n\nfunction getLabelForKey(key: string) {\n return LABEL_MAP[key] || formatLabel(key)\n}\n\nexport const generateFilters = (\n response: Record = {},\n activeFilters: string[] = [],\n sortableFilters: string[] = [],\n): Filter[] => {\n const filters: Filter[] = []\n\n const processedKeys = new Set()\n\n for (const key of activeFilters) {\n const hasResponseKey = Object.prototype.hasOwnProperty.call(response, key)\n const isSortable =\n sortableFilters.includes(key) ||\n (hasResponseKey && typeof response[key] !== 'object')\n\n filters.push({\n value: key,\n label: getLabelForKey(key),\n active: true,\n sortable: isSortable,\n })\n\n processedKeys.add(key)\n }\n\n for (const key of Object.keys(response)) {\n if (processedKeys.has(key)) continue\n\n const isSortable =\n sortableFilters.includes(key) || typeof response[key] !== 'object'\n\n filters.push({\n value: key,\n label: getLabelForKey(key),\n active: false,\n sortable: isSortable,\n })\n }\n return filters\n}\n\nexport const getStoredTableFilters = (storageKey: string) => {\n const allFilters = JSON.parse(localStorage.getItem('tableFilters') || '{}')\n return allFilters[storageKey]\n}\n","import { IPriceList } from 'models'\nimport { useApiRequest } from 'utils'\nimport { HTTP_CODES } from 'constants/HTTP'\nimport { getErrorMessage } from 'utils/helpers'\n\nconst priceApi = () => {\n const { fetchPartnerEndpoint } = useApiRequest()\n\n const getMany = async (\n page: number,\n size: number,\n search: string = '',\n ): Promise => {\n const urlParams = new URLSearchParams({\n page: page.toString(),\n size: size.toString(),\n search,\n })\n\n const endpoint = `prices?${urlParams.toString()}`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const create = async (price) => {\n const endpoint = `prices`\n const method = 'POST'\n const headers = { 'Content-Type': 'application/json' }\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: JSON.stringify(price),\n headers,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const update = async (priceId, price) => {\n const endpoint = `prices/${priceId}`\n const method = 'PUT'\n const headers = { 'Content-Type': 'application/json' }\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: JSON.stringify(price),\n headers,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const remove = async (ids: string[]) => {\n const endpoint = `prices`\n const method = 'DELETE'\n const headers = {\n 'Content-Type': 'application/json',\n }\n const body = JSON.stringify(ids)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const uploadCSV = async (file: File) => {\n const endpoint = `prices/csv`\n const method = 'POST'\n const body = new FormData()\n\n body.append('file', file)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return { getMany, create, uploadCSV, update, remove }\n}\nexport default priceApi\n","import { useApiRequest } from 'utils'\nimport { IPromoList, IPromo } from 'models'\nimport { HTTP_CODES } from 'constants/HTTP'\nimport { getErrorMessage } from 'utils/helpers'\nconst GET_ERRORS = {\n [HTTP_CODES.NOT_FOUND]: 'No prices found',\n [HTTP_CODES.INTERNAL_SERVER_ERROR]: 'An internal server error has occurred',\n}\nconst promoApi = () => {\n const { fetchPartnerEndpoint } = useApiRequest()\n\n const getMany = async (\n page: number,\n size: number,\n search: string = '',\n ): Promise => {\n const urlParams = new URLSearchParams({\n page: page.toString(),\n size: size.toString(),\n search,\n })\n const endpoint = `promos?${urlParams.toString()}`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const create = async (promo) => {\n const endpoint = `promos`\n const method = 'POST'\n const body = JSON.stringify(promo)\n const headers = { 'Content-Type': 'application/json' }\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body,\n headers,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const update = async (promoId: string, promo: IPromo) => {\n const endpoint = `promos/${promoId}`\n const method = 'PUT'\n const body = JSON.stringify(promo)\n const headers = { 'Content-Type': 'application/json' }\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body,\n headers,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const remove = async (ids: string[]) => {\n const endpoint = `promos`\n const method = 'DELETE'\n const headers = {\n 'Content-Type': 'application/json',\n }\n const body = JSON.stringify(ids)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const uploadCSV = async (file: File) => {\n const endpoint = `promos/csv`\n const method = 'POST'\n const body = new FormData()\n\n body.append('file', file)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return { getMany, create, update, remove, uploadCSV }\n}\nexport default promoApi\n","import { useApiRequest } from 'utils'\nimport { DeviceMode, ILocation, ILocationList } from 'models'\nimport { getErrorMessage } from 'utils/helpers'\n\nconst locationApi = () => {\n const { fetchPartnerEndpoint } = useApiRequest()\n\n const getMany = async (\n page: number,\n size: number,\n search: string = '',\n id?: string,\n ): Promise => {\n const urlParams = new URLSearchParams({\n page: page.toString(),\n size: size.toString(),\n ...(id && { id_location: id ?? '' }),\n search,\n })\n\n const endpoint = `locations?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const create = async (location: FormData) => {\n const endpoint = `locations`\n const method = 'POST'\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: location,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const update = async (locationId: string, location: FormData) => {\n const endpoint = `locations/${locationId}`\n const method = 'PUT'\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: location,\n })\n if (!response.ok) {\n const result = await response.json()\n throw new Error((result as Error).message)\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const patch = async (locationId: string, location: Partial) => {\n const endpoint = `location/${locationId}`\n const method = 'PATCH'\n const headers = { 'Content-Type': 'application/json' }\n const body = JSON.stringify(location)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const remove = async (ids: string[]) => {\n const endpoint = `locations`\n const method = 'DELETE'\n const headers = {\n 'Content-Type': 'application/json',\n }\n const body = JSON.stringify(ids)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return {\n status: response.status,\n message: await response.json(),\n }\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getDevices = async (locationId: string) => {\n const endpoint = `locations/${locationId}/devices`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const unlockByLocation = async (locationId: string) => {\n const endpoint = `location/${locationId}/unlock`\n const method = 'PATCH'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const uploadCSV = async (file: File) => {\n const endpoint = `locations/csv`\n const method = 'POST'\n const body = new FormData()\n\n body.append('file', file)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getSizesByLocation = async (\n locationId: string,\n mode?: DeviceMode | null,\n status?: string | null,\n ) => {\n const urlParams = new URLSearchParams({\n ...(mode && { by_mode: mode }),\n ...(status && { by_status: status }),\n })\n\n const endpoint = `locations/${locationId}/sizes?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return {\n getMany,\n create,\n update,\n patch,\n remove,\n getDevices,\n unlockByLocation,\n uploadCSV,\n getSizesByLocation,\n }\n}\nexport default locationApi\n","import { useApiRequest } from 'utils'\nimport { ISize, ISizeList } from 'models'\nimport { HTTP_CODES } from 'constants/HTTP'\nimport { getErrorMessage } from 'utils/helpers'\n\nconst sizeApi = () => {\n const { fetchPartnerEndpoint } = useApiRequest()\n\n const getMany = async (\n page: number,\n size: number,\n search: string = '',\n ): Promise => {\n const urlParams = new URLSearchParams({\n page: page.toString(),\n size: size.toString(),\n search,\n })\n const endpoint = `sizes?${urlParams.toString()}`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const create = async (size: ISize, image: File | null = null) => {\n const endpoint = `sizes`\n const method = 'POST'\n\n try {\n if (image) {\n const imageEndpoint = `images`\n const imagePayload = new FormData()\n imagePayload.append('image', image)\n\n const imageResponse = await fetchPartnerEndpoint({\n endpoint: imageEndpoint,\n method: 'POST',\n body: imagePayload,\n })\n if (!imageResponse.ok) {\n const result = await imageResponse.json()\n throw result.detail\n }\n const result = await imageResponse.json()\n size.image = result.detail\n }\n\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: JSON.stringify(size),\n headers: { 'Content-Type': 'application/json' },\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const update = async (\n sizeId: string,\n size: ISize,\n image: File | null = null,\n ) => {\n const endpoint = `sizes/${sizeId}`\n const method = 'PUT'\n\n try {\n if (image) {\n const imageEndpoint = `images`\n const imagePayload = new FormData()\n imagePayload.append('image', image)\n\n const imageResponse = await fetchPartnerEndpoint({\n endpoint: imageEndpoint,\n method: 'POST',\n body: imagePayload,\n })\n if (!imageResponse.ok) {\n const result = await imageResponse.json()\n throw result.detail\n }\n const result = await imageResponse.json()\n size.image = result.detail\n }\n\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: JSON.stringify(size),\n headers: { 'Content-Type': 'application/json' },\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const remove = async (ids: string[]) => {\n const endpoint = `sizes`\n const method = 'DELETE'\n const headers = {\n 'Content-Type': 'application/json',\n }\n const body = JSON.stringify(ids)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const uploadCSV = async (file: File) => {\n const endpoint = `sizes/csv`\n const method = 'POST'\n const body = new FormData()\n\n body.append('file', file)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return { getMany, create, update, remove, uploadCSV }\n}\nexport default sizeApi\n","import { useApiRequest } from 'utils'\r\nimport { IDevice, IDeviceList, IDeviceLog } from 'models'\r\nimport { getErrorMessage } from 'utils/helpers'\r\nimport { DropdownOption } from 'types'\r\n\r\nconst deviceApi = () => {\r\n const { fetchPartnerEndpoint, fetchEndpoint } = useApiRequest()\r\n\r\n const getMany = async (\r\n page: number,\r\n size: number,\r\n search: string = '',\r\n by_status: string = '',\r\n id_location: string = '',\r\n ): Promise => {\r\n const urlParams = new URLSearchParams({\r\n page: page.toString(),\r\n size: size.toString(),\r\n search,\r\n ...(by_status !== '' && { by_status }),\r\n ...(id_location !== '' && {\r\n id_location,\r\n }),\r\n })\r\n\r\n const endpoint = `devices?${urlParams.toString()}`\r\n const method = 'GET'\r\n try {\r\n const response = await fetchPartnerEndpoint({ endpoint, method })\r\n if (!response.ok) {\r\n const result = await response.json()\r\n throw result.detail\r\n }\r\n return response.json()\r\n } catch (error) {\r\n throw new Error('Something went wrong! ' + getErrorMessage(error))\r\n }\r\n }\r\n\r\n const create = async (device) => {\r\n const endpoint = `devices`\r\n const method = 'POST'\r\n\r\n try {\r\n const response = await fetchPartnerEndpoint({\r\n endpoint,\r\n method,\r\n body: device,\r\n })\r\n if (!response.ok) {\r\n const result = await response.json()\r\n throw result.detail\r\n }\r\n return {\r\n status: response.status,\r\n result: await response.json(),\r\n }\r\n } catch (error) {\r\n throw new Error('Something went wrong! ' + getErrorMessage(error))\r\n }\r\n }\r\n\r\n const update = async (device, deviceId) => {\r\n const endpoint = `devices/${deviceId}`\r\n const method = 'PUT'\r\n\r\n try {\r\n const response = await fetchPartnerEndpoint({\r\n endpoint,\r\n method,\r\n body: device,\r\n })\r\n if (!response.ok) {\r\n const result = await response.json()\r\n throw result.detail\r\n }\r\n return {\r\n status: response.status,\r\n result: await response.json(),\r\n }\r\n } catch (error) {\r\n throw new Error('Something went wrong! ' + getErrorMessage(error))\r\n }\r\n }\r\n\r\n const patch = async (ids: string[], device: IDevice) => {\r\n const endpoint = `devices`\r\n const method = 'PATCH'\r\n const headers = {\r\n 'Content-Type': 'application/json',\r\n }\r\n const body = JSON.stringify({\r\n id_devices: ids,\r\n device,\r\n })\r\n\r\n try {\r\n const response = await fetchPartnerEndpoint({\r\n endpoint,\r\n method,\r\n headers,\r\n body,\r\n })\r\n if (!response.ok) {\r\n const result = await response.json()\r\n throw result.detail\r\n }\r\n return {\r\n status: response.status,\r\n result: await response.json(),\r\n }\r\n } catch (error) {\r\n throw new Error('Something went wrong! ' + getErrorMessage(error))\r\n }\r\n }\r\n\r\n const remove = async (ids: string[]): Promise => {\r\n const endpoint = `devices`\r\n const method = 'DELETE'\r\n const headers = {\r\n 'Content-Type': 'application/json',\r\n }\r\n const body = JSON.stringify(ids)\r\n\r\n try {\r\n const response = await fetchPartnerEndpoint({\r\n endpoint,\r\n method,\r\n headers,\r\n body,\r\n })\r\n if (!response.ok) {\r\n const result = await response.json()\r\n throw result.detail\r\n }\r\n return {\r\n status: response.status,\r\n message: await response.json(),\r\n }\r\n } catch (error) {\r\n throw new Error('Something went wrong! ' + getErrorMessage(error))\r\n }\r\n }\r\n\r\n const unlockAll = async (devices: string[]): Promise => {\r\n const endpoint = `devices/unlock`\r\n const method = 'PATCH'\r\n\r\n try {\r\n const response = await fetchPartnerEndpoint({\r\n endpoint,\r\n method,\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n body: JSON.stringify(devices),\r\n })\r\n if (!response.ok) {\r\n const result = await response.json()\r\n throw result.detail\r\n }\r\n return {\r\n status: response.status,\r\n message: await response.json(),\r\n }\r\n } catch (error) {\r\n throw new Error('Something went wrong! ' + getErrorMessage(error))\r\n }\r\n }\r\n\r\n const setMaintenanceMode = async (\r\n ids: string[],\r\n disable: boolean,\r\n ): Promise => {\r\n const endpoint = `devices/maintain-all?disable=${disable}`\r\n const method = 'PATCH'\r\n\r\n try {\r\n const response = await fetchPartnerEndpoint({\r\n endpoint,\r\n method,\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n body: JSON.stringify(ids),\r\n })\r\n if (!response.ok) {\r\n const result = await response.json()\r\n throw result.detail\r\n }\r\n return {\r\n status: response.status,\r\n message: await response.json(),\r\n }\r\n } catch (error) {\r\n throw new Error('Something went wrong! ' + getErrorMessage(error))\r\n }\r\n }\r\n\r\n const getDeviceModes = async (): Promise => {\r\n const endpoint = `types/device/mode`\r\n const method = 'GET'\r\n try {\r\n const response = await fetchEndpoint({ endpoint, method })\r\n if (!response.ok) {\r\n const result = await response.json()\r\n throw result.detail\r\n }\r\n return response.json()\r\n } catch (error) {\r\n throw new Error('Something went wrong! ' + getErrorMessage(error))\r\n }\r\n }\r\n\r\n const getHardwareTypes = async (): Promise<\r\n { key: string; value: string }[]\r\n > => {\r\n const endpoint = `types/device/hardware`\r\n const method = 'GET'\r\n try {\r\n const response = await fetchEndpoint({ endpoint, method })\r\n if (!response.ok) {\r\n const result = await response.json()\r\n throw result.detail\r\n }\r\n return response.json()\r\n } catch (error) {\r\n throw new Error('Something went wrong! ' + getErrorMessage(error))\r\n }\r\n }\r\n\r\n const uploadCSV = async (file: File) => {\r\n const endpoint = `devices/csv`\r\n const method = 'POST'\r\n const body = new FormData()\r\n\r\n body.append('file', file)\r\n\r\n try {\r\n const response = await fetchPartnerEndpoint({\r\n endpoint,\r\n method,\r\n body,\r\n })\r\n if (!response.ok) {\r\n const result = await response.json()\r\n throw result.detail\r\n }\r\n return response.json()\r\n } catch (error) {\r\n throw new Error('Something went wrong! ' + getErrorMessage(error))\r\n }\r\n }\r\n\r\n const getDeviceHistory = async (deviceId: string): Promise => {\r\n const endpoint = `device-logs/${deviceId}`\r\n const method = 'GET'\r\n try {\r\n const response = await fetchPartnerEndpoint({ endpoint, method })\r\n if (!response.ok) {\r\n const result = await response.json()\r\n throw result.detail\r\n }\r\n return response.json()\r\n } catch (error) {\r\n throw new Error('Something went wrong! ' + getErrorMessage(error))\r\n }\r\n }\r\n\r\n return {\r\n getMany,\r\n create,\r\n update,\r\n remove,\r\n patch,\r\n setMaintenanceMode,\r\n getDeviceModes,\r\n getHardwareTypes,\r\n unlockAll,\r\n uploadCSV,\r\n getDeviceHistory,\r\n }\r\n}\r\nexport default deviceApi\r\n","import { useApiRequest } from 'utils'\nimport { API_URL, PUBLIC_API_URL } from '../../../constants'\nimport {\n ICreateDelivery,\n ICompleteDelivery,\n ITransactionList,\n PublicTransactionDTO,\n ITransaction,\n PenaltyReason,\n ITransactionLog,\n CodeDeliveryResponse,\n} from 'models'\nimport { getErrorMessage } from 'utils/helpers'\nimport { DropdownOption } from 'types'\n\nconst transactionsApi = () => {\n const { fetchPartnerEndpoint } = useApiRequest()\n\n const getMany = async (\n currentPage: number,\n itemsPerPage: number,\n transactionType: string,\n search = '',\n ): Promise => {\n const type = transactionType === 'all' ? '' : `&by_type=${transactionType}`\n const endpoint = `events?${type}&page=${currentPage}&size=${itemsPerPage}&search=${search}`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getByIdPublic = async (\n transactionId: string,\n ): Promise => {\n if (transactionId) {\n const endpoint = `${API_URL}event/${transactionId}/public`\n const method = 'GET'\n try {\n const response = await fetch(endpoint, { method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n return null\n }\n\n const service = async ({\n transactionId,\n step,\n deviceId,\n weight,\n }: {\n transactionId: string\n step: string\n deviceId?: string\n weight?: number\n }): Promise<{\n status: number\n message: ITransaction | { detail: string }\n }> => {\n let endpoint = `events/${transactionId}/service?step=${step}`\n const method = 'PATCH'\n\n if (step === 'charge') {\n endpoint += `&weight=${weight}`\n }\n if (step === 'dropoff') {\n endpoint += `&id_device=${deviceId}`\n }\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const endBy = async (\n transactionId: string,\n cancel_at: Date | undefined,\n ): Promise<{\n status: number\n message: ITransaction | { detail: string }\n }> => {\n const endpoint = `events/${transactionId}/cancel${\n cancel_at ? `?cancel_at=${cancel_at}` : ''\n }`\n const method = 'PATCH'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const refund = async ({\n transactionId,\n amount,\n }: {\n transactionId: string\n amount: number\n }) => {\n const endpoint = `events/${transactionId}/refund?amount=${amount}`\n const method = 'PATCH'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const search = async ({\n currentPage,\n itemsPerPage,\n search,\n }: {\n currentPage: number\n itemsPerPage: number\n search: string\n }): Promise => {\n const endpoint = `events?search=${search}&page=${currentPage}&size=${itemsPerPage}`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const penalize = async (\n transactionId: string,\n amount: number,\n reason: PenaltyReason,\n ) => {\n const endpoint = `events/${transactionId}/penalize?amount=${amount}&reason=${reason}`\n const method = 'PATCH'\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const deliveryStart = async ({\n phoneNumber,\n deviceId,\n }: ICreateDelivery): Promise<{\n status: number\n message: ITransaction | { detail: string }\n }> => {\n const endpoint = `event/delivery?id_device=${encodeURIComponent(\n deviceId,\n )}&phone_number=${encodeURIComponent(phoneNumber)}`\n\n const method = 'POST'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return {\n status: response.status,\n message: await response.json(),\n }\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const deliveryComplete = async ({\n transactionId,\n deviceId,\n }: ICompleteDelivery): Promise<{\n status: number\n message: ITransaction | { detail: string }\n }> => {\n const endpoint = `${PUBLIC_API_URL}delivery/${transactionId}/complete?id_device=${deviceId}`\n const method = 'PATCH'\n\n try {\n const response = await fetch(endpoint, { method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return {\n status: response.status,\n message: await response.json(),\n }\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const sendCode = async (\n idEvent: string,\n phoneNumber: string | null = null,\n email: string | null = null,\n ): Promise => {\n const urlParams = new URLSearchParams({\n ...(phoneNumber && { phone_number: phoneNumber }),\n ...(email && { email }),\n })\n\n const endpoint = `events/${idEvent}/share?${urlParams.toString()}`\n const method = 'POST'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw error\n }\n }\n\n const getEventStatuses = async (): Promise => {\n const endpoint = `events/statuses`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getEventByInvoiceId = async (\n invoiceId: string,\n ): Promise => {\n const endpoint = `events?key=invoice_id&value=${invoiceId}`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n return null\n }\n return response.json()\n } catch (error) {\n return null\n }\n }\n\n const getEventsByUserId = async (\n idUser: string,\n onlyActive: boolean = true,\n ): Promise => {\n const urlParams = new URLSearchParams({\n active: onlyActive.toString(),\n })\n\n const endpoint = `events_by_user/${idUser}?${urlParams.toString()}`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const endMany = async (ids: string[]) => {\n const endpoint = 'events'\n const method = 'PATCH'\n const headers = {\n 'Content-Type': 'application/json',\n }\n const body = JSON.stringify(ids)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getTransactionHistory = async (\n transactionId: string,\n ): Promise => {\n const endpoint = `event-logs/${transactionId}`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return {\n getMany,\n getByIdPublic,\n service,\n endBy,\n refund,\n search,\n penalize,\n deliveryStart,\n deliveryComplete,\n sendCode,\n getEventStatuses,\n getEventByInvoiceId,\n getEventsByUserId,\n endMany,\n getTransactionHistory,\n }\n}\nexport default transactionsApi\n","import { useApiRequest } from 'utils'\nimport { IOrganization, IOrganizationList, PublicOrg } from 'models'\nimport { getErrorMessage } from 'utils/helpers'\n\nconst organizationApi = () => {\n const { fetchEndpointUnauthorized, fetchPartnerEndpoint } = useApiRequest()\n\n const getOrgs = async (\n page: number,\n size: number,\n search: string = '',\n ): Promise => {\n const urlParams = new URLSearchParams({\n page: page.toString(),\n size: size.toString(),\n search,\n })\n const endpoint = `organizations?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const restore = async (orgId: string): Promise<{ detail: string }> => {\n const endpoint = `organizations/${orgId}/cancel`\n const method = 'DELETE'\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const archive = async (orgId: string): Promise<{ detail: string }> => {\n const endpoint = `organizations/${orgId}`\n const method = 'DELETE'\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const create = async (newOrg): Promise => {\n const endpoint = `organizations`\n const method = 'POST'\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: newOrg,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getOrgDetailsPublic = async (orgName: string): Promise => {\n const endpoint = `organization?name=${orgName}`\n const method = 'GET'\n\n try {\n const response = await fetchEndpointUnauthorized({\n endpoint,\n method,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getSelfOrg = async (): Promise => {\n const endpoint = `organizations/self`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const patchOrgFeatures = async (\n orgId: string,\n orgFeatures: any,\n ): Promise => {\n const endpoint = `organizations/${orgId}`\n const method = 'PATCH'\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n headers: {\n 'Content-Type': 'application/json',\n },\n method,\n body: JSON.stringify(orgFeatures),\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return {\n getOrgDetailsPublic,\n getOrgs,\n archive,\n restore,\n create,\n getSelfOrg,\n patchOrgFeatures,\n }\n}\nexport default organizationApi\n","import { IUserList, IUser } from 'models'\nimport { useApiRequest } from 'utils'\nimport { HTTP_CODES } from 'constants/HTTP'\nimport { getErrorMessage } from 'utils/helpers'\n\nconst userApi = () => {\n const { fetchPartnerEndpoint, fetchEndpoint } = useApiRequest()\n\n const create = async (data: any): Promise => {\n const endpoint = 'users'\n const method = 'POST'\n const headers = { 'Content-Type': 'application/json' }\n const body = JSON.stringify(data)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getMany = async (\n page: number = 1,\n size: number = 10,\n search: string = '',\n by_phone: boolean = true,\n by_email: boolean = true,\n by_first_name: boolean = true,\n by_user_id: boolean = true,\n by_last_name: boolean = true,\n by_address: boolean = true,\n ): Promise => {\n const urlParams = new URLSearchParams({\n page: page.toString(),\n size: size.toString(),\n search,\n by_phone: by_phone.toString(),\n by_email: by_email.toString(),\n by_first_name: by_first_name.toString(),\n by_user_id: by_user_id.toString(),\n by_last_name: by_last_name.toString(),\n by_address: by_address.toString(),\n })\n\n const endpoint = `users?${urlParams.toString()}`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const search = async (\n page: number,\n size: number,\n search: string = '',\n ): Promise => {\n const urlParams = new URLSearchParams({\n page: page.toString(),\n size: size.toString(),\n search,\n })\n const endpoint = `users/search?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const deleteUser = async (ids: string[]): Promise => {\n const endpoint = 'users'\n const method = 'DELETE'\n const headers = { 'Content-Type': 'application/json' }\n const body = JSON.stringify(ids)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n const updateUser = async (id: string, data: any): Promise => {\n const endpoint = `users/${id}`\n const method = 'PUT'\n const headers = { 'Content-Type': 'application/json' }\n const body = JSON.stringify(data)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const assign = async (\n userId: string,\n resourceId: string | undefined,\n type: string,\n ): Promise => {\n const endpoint = `resources/${resourceId}/assign-user?id_user=${userId}&resource_type=${type}`\n const method = 'PATCH'\n const body = {\n resource_id: resourceId,\n }\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method, body })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const assigned = async (id, type) => {\n const endpoint = `resources/${id}/users?resource_type=${type}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const unassign = async (\n userId: string,\n resourceId: string,\n type: string,\n ): Promise => {\n const endpoint = `resources/${resourceId}/remove-user?id_user=${userId}&resource_type=${type}`\n const method = 'PATCH'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const uploadCSV = async (file: File) => {\n const endpoint = `users/csv`\n const method = 'POST'\n const body = new FormData()\n\n body.append('file', file)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return {\n getMany,\n search,\n deleteUser,\n updateUser,\n assign,\n assigned,\n unassign,\n create,\n uploadCSV,\n }\n}\n\nexport default userApi\n","import { IStripeAccount } from 'models'\nimport { useApiRequest } from 'utils'\nimport { getErrorMessage } from 'utils/helpers'\n\nconst financialApi = () => {\n const { fetchPartnerEndpoint } = useApiRequest()\n\n const createStripeAccount = async (\n country: string = 'US',\n ): Promise<{ stripeLink: string }> => {\n const urlParams = new URLSearchParams({\n country: country,\n })\n const endpoint = `stripe?${urlParams.toString()}`\n const method = 'POST'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return { stripeLink: await response.json() }\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getStripeAccount = async (): Promise => {\n const endpoint = `stripe/account`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const deleteStripeAccount = async (): Promise<{\n detail: string\n }> => {\n const endpoint = `stripe`\n const method = 'DELETE'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return {\n createStripeAccount,\n getStripeAccount,\n deleteStripeAccount,\n }\n}\nexport default financialApi\n","import { ISession } from 'models/Session'\nimport { API_URL, PUBLIC_API_URL } from '../../../constants'\n\nexport const getMyself = async (): Promise => {\n const CURRENT_USER: string | null = localStorage.getItem('currentUser')\n\n const TOKEN: string = CURRENT_USER\n ? JSON.parse(CURRENT_USER).signInUserSession?.idToken?.jwtToken\n : undefined\n\n if (!TOKEN) {\n throw new Error('No token found')\n }\n\n const response = await fetch(API_URL + 'members/self', {\n headers: { Authorization: `Bearer ${TOKEN}` },\n })\n\n return response.json()\n}\n\nexport const loadSession = async () => {\n const session = await getMyself()\n return session\n}\n","export const setMessage = (payload) => ({\n type: 'setMessage',\n payload,\n})\n","import { IChangePassword, IForgotPassword, Org, PublicOrg } from 'models'\nimport {\n AWS_COGNITO_REGION,\n AWS_PROJECT_REGION,\n HTTP_CODES,\n} from '../../../constants'\nimport { Amplify, Auth } from 'aws-amplify'\nimport { useNavigate } from 'react-router-dom'\nimport { CognitoUser } from 'amazon-cognito-identity-js'\nimport { getMyself } from 'resources/dashboard'\nimport { getOrganizationFromHost, getUserRole } from 'utils/helpers'\nimport { organizationApi } from 'resources/org'\nimport { useDispatch } from 'react-redux'\nimport { setMessage } from 'redux/message/Action'\n\nconst useAuth = () => {\n const navigate = useNavigate()\n const dispatch = useDispatch()\n\n const RESPONSE_MESSAGES = {\n [HTTP_CODES.OK]: (data) => data,\n [HTTP_CODES.BAD_REQUEST]: (data: string) => data,\n [HTTP_CODES.INTERNAL_SERVER_ERROR]: () => 'Server error',\n }\n\n const authResponse = (status: number, data: string): string => {\n return RESPONSE_MESSAGES[status](data)\n }\n\n const configureAmplify = async (): Promise => {\n let userPoolId: string,\n clientId: string = ''\n const currentUser: string | null = localStorage.getItem('currentUser')\n if (currentUser) {\n const userObject = JSON.parse(currentUser)\n userPoolId = userObject.pool.userPoolId\n clientId = userObject.pool.clientId\n } else {\n const { getOrgDetailsPublic } = organizationApi()\n const orgName = getOrganizationFromHost()\n const publicOrgData = await getOrgDetailsPublic(orgName)\n userPoolId = publicOrgData.user_pool\n clientId = publicOrgData.client_id\n }\n\n const config = {\n aws_project_region: AWS_PROJECT_REGION,\n aws_cognito_region: AWS_COGNITO_REGION,\n aws_user_pools_id: userPoolId,\n aws_user_pools_web_client_id: clientId,\n }\n Amplify.configure(config)\n }\n\n const signIn = async (\n email: string,\n password: string,\n org: PublicOrg | undefined,\n ): Promise => {\n try {\n const user: CognitoUser = await Auth.signIn(email, password)\n const organization = {\n name: org?.name,\n logo: org?.app_logo,\n oem_logo: org?.oem_logo || null,\n isSuperTenant: org?.super_tenant,\n shared_locations: org?.shared_locations,\n }\n localStorage.setItem('currentOrg', JSON.stringify(organization))\n localStorage.setItem('currentUser', JSON.stringify(user))\n if (user.challengeName === 'NEW_PASSWORD_REQUIRED') {\n localStorage.setItem('oldPassword', password)\n navigate('/auth/welcome')\n } else {\n const session = await getMyself()\n localStorage.setItem('userSession', JSON.stringify(session))\n const isFirstTimeLogin =\n localStorage.getItem('firstTimeLogin') === 'true'\n if (isFirstTimeLogin && getUserRole() === 'admin') {\n navigate('/settings')\n } else {\n window.location.href = '/'\n }\n }\n } catch (error) {\n throw new Error(`${(error as Error).message}`)\n }\n }\n const completePassword = async ({\n email,\n newPassword,\n }: {\n email: string\n newPassword: string\n }): Promise => {\n try {\n const oldPassword: string | null = localStorage.getItem('oldPassword')\n if (!oldPassword) {\n throw new Error('User not found')\n }\n const user: CognitoUser = await Auth.signIn(email, oldPassword)\n if (user) {\n await Auth.completeNewPassword(user, newPassword)\n localStorage.removeItem('oldPassword')\n navigate('/')\n }\n } catch (error) {\n throw new Error(`${(error as Error).message}`)\n }\n }\n\n const forgotPassword = async ({\n username,\n }: IForgotPassword): Promise => {\n try {\n return await Auth.forgotPassword(username)\n } catch (error) {\n throw new Error(`${(error as Error).message}`)\n }\n }\n\n const forgotPasswordSubmit = async ({\n username,\n code,\n password,\n }: IChangePassword): Promise => {\n try {\n return await Auth.forgotPasswordSubmit(username, code, password)\n } catch (error) {\n throw new Error(`${(error as Error).message}`)\n }\n }\n\n const getJwtToken = async () => {\n try {\n configureAmplify()\n const currentSession = await Auth.currentSession()\n const idToken = currentSession.getIdToken()\n const jwtToken = idToken.getJwtToken()\n\n const currentUser: string | null = localStorage.getItem('currentUser')\n if (\n currentUser &&\n JSON.parse(currentUser).challengeName !== 'NEW_PASSWORD_REQUIRED'\n ) {\n const userObject = JSON.parse(currentUser)\n const idTokenKey = Object.keys(localStorage).find((key) =>\n key.includes('idToken'),\n )\n if (\n idTokenKey &&\n localStorage[idTokenKey] !==\n userObject.signInUserSession?.idToken?.jwtToken\n ) {\n const cognitoUser = await Auth.currentAuthenticatedUser()\n localStorage.removeItem('currentUser')\n localStorage.setItem('currentUser', JSON.stringify(cognitoUser))\n }\n\n return jwtToken\n }\n } catch (error) {\n localStorage.removeItem('currentUser')\n dispatch(\n setMessage({\n message: 'Your session has expired. Please log in again.',\n customTitle: {\n titleColor: '#ff3535',\n titleText: 'Alert!',\n },\n }),\n )\n navigate('/auth/login')\n }\n }\n\n return {\n authResponse,\n configureAmplify,\n signIn,\n forgotPassword,\n forgotPasswordSubmit,\n completePassword,\n getJwtToken,\n }\n}\n\nexport default useAuth\n","import { useApiRequest } from 'utils'\nimport { ReponseDetail } from 'types'\nimport { IMemberList, IMember } from 'models'\nimport { HTTP_CODES } from 'constants/HTTP'\nimport { getErrorMessage } from 'utils/helpers'\n\nconst memberApi = () => {\n const { fetchPartnerEndpoint } = useApiRequest()\n\n const getMany = async (\n page: number,\n size: number,\n search: string = '',\n ): Promise => {\n const urlParams = new URLSearchParams({\n page: page.toString(),\n size: size.toString(),\n search,\n })\n const endpoint = `members?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getSelf = async (): Promise => {\n const endpoint = `members/self`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const update = async (\n member: Partial,\n memberId: string,\n ): Promise => {\n const endpoint = `members/${memberId}`\n const method = 'PUT'\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(member),\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const create = async (member: Partial): Promise => {\n const endpoint = `members?email=${member.email}`\n const method = 'POST'\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(member),\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const remove = async (ids: string[]): Promise => {\n const endpoint = `members`\n const method = 'DELETE'\n const headers = {\n 'Content-Type': 'application/json',\n }\n const body = JSON.stringify(ids)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const status = async ({ memberId }: { memberId: string }) => {\n const endpoint = `members/${memberId}/status`\n const method = 'PATCH'\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const verify = async ({ memberId }: { memberId: string }) => {\n const endpoint = `members/${memberId}/verify`\n const method = 'PATCH'\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const uploadCSV = async (file: File) => {\n const endpoint = `members/csv`\n const method = 'POST'\n const body = new FormData()\n\n body.append('file', file)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const patch = async (ids: string[], member: IMember) => {\n const endpoint = `members/`\n const method = 'PATCH'\n const headers = {\n 'Content-Type': 'application/json',\n }\n const body = JSON.stringify({\n user_ids: ids,\n member,\n })\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const resendPasswordLink = async (member: IMember) => {\n const endpoint = `members/resend-password-email`\n const method = 'POST'\n const headers = {\n 'Content-Type': 'application/json',\n }\n const body = JSON.stringify({\n email: member.email,\n })\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return {\n getMany,\n update,\n create,\n remove,\n status,\n verify,\n getSelf,\n uploadCSV,\n patch,\n resendPasswordLink,\n }\n}\nexport default memberApi\n","import { ISubscriptionList } from 'models'\nimport { useApiRequest } from 'utils'\nimport { getErrorMessage } from 'utils/helpers'\n\nconst membershipApi = () => {\n const { fetchPartnerEndpoint } = useApiRequest()\n\n const getMany = async (\n page: number,\n size: number,\n search: string = '',\n subscribed: boolean = false,\n ): Promise => {\n const urlParams = new URLSearchParams({\n page: page.toString(),\n size: size.toString(),\n search,\n subscribed: subscribed.toString(),\n })\n const endpoint = `memberships?${urlParams.toString()}`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const create = async (membership) => {\n const endpoint = `memberships`\n const method = 'POST'\n const headers = { 'Content-Type': 'application/json' }\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: JSON.stringify(membership),\n headers,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const update = async (membershipId, membership) => {\n const endpoint = `memberships/${membershipId}`\n const method = 'PUT'\n const headers = { 'Content-Type': 'application/json' }\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: JSON.stringify(membership),\n headers,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const remove = async (ids: string[]) => {\n const endpoint = `memberships`\n const method = 'DELETE'\n const headers = {\n 'Content-Type': 'application/json',\n }\n const body = JSON.stringify(ids)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const uploadCSV = async (file: File) => {\n const endpoint = `memberships/csv`\n const method = 'POST'\n const body = new FormData()\n\n body.append('file', file)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return { getMany, create, update, remove, uploadCSV }\n}\nexport default membershipApi\n","import { IGroupList, IGroup } from 'models'\nimport { useApiRequest } from 'utils'\nimport { HTTP_CODES } from 'constants/HTTP'\nimport { getErrorMessage } from 'utils/helpers'\n\nconst GET_ERRORS = {\n [HTTP_CODES.NOT_FOUND]: 'No groups found',\n [HTTP_CODES.INTERNAL_SERVER_ERROR]: 'An internal error occurred',\n}\n\nconst groupApi = () => {\n const { fetchPartnerEndpoint } = useApiRequest()\n\n const getMany = async (\n page: number = 1,\n size: number = 10000,\n search: string = '',\n ): Promise => {\n const urlParams = new URLSearchParams({\n page: page.toString(),\n size: size.toString(),\n search,\n })\n const endpoint = `groups?${urlParams.toString()}`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const postGroup = async (group: { name: string }): Promise => {\n const endpoint = `groups?name=${group.name}`\n const method = 'POST'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const deleteGroup = async (ids: string[]): Promise => {\n const endpoint = `groups`\n const method = 'DELETE'\n const headers = {\n 'Content-Type': 'application/json',\n }\n const body = JSON.stringify(ids)\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const assignUser = async (id: string, userId: string): Promise => {\n const endpoint = `groups/${id}/assign-user?id_user=${userId}`\n const method = 'PATCH'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const removeUser = async (id: string, userId: string): Promise => {\n const endpoint = `groups/${id}/remove-user?id_user=${userId}`\n const method = 'PATCH'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const assign = async (\n id: string | undefined,\n groupId: string,\n type,\n ): Promise => {\n const endpoint = `groups/${groupId}/assign?id_resource=${id}&resource_type=${type}`\n const method = 'PATCH'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const updateGroup = async (id, groupName) => {\n const endpoint = `groups/${id}?name=${groupName}`\n const method = 'PUT'\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const assigned = async (id, type) => {\n const endpoint = `resources/${id}/groups?resource_type=${type}`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const unassign = async (resourceId, groupId, type) => {\n const endpoint = `groups/${groupId}}/remove?id_resource=${resourceId}&resource_type=${type}`\n const method = 'PATCH'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return {\n getMany,\n postGroup,\n deleteGroup,\n assignUser,\n removeUser,\n assign,\n assigned,\n unassign,\n updateGroup,\n }\n}\n\nexport default groupApi\n","import { useApiRequest } from 'utils'\nimport { HTTP_CODES } from 'constants/HTTP'\nimport {\n IAverageRevenuePerTransaction,\n IDoorHealth,\n IEarnings,\n INewUserGrowth,\n IOccupancyRate,\n IReportedIssueRate,\n ITotalDoors,\n ITotalLocations,\n ITotalTransactions,\n ITransactionRate,\n ITransactionsPerLocker,\n} from 'models/Analytics'\nimport { getErrorMessage } from 'utils/helpers'\nimport { IReport, IReportList } from 'models/Report'\n\nconst GET_ERRORS = {\n [HTTP_CODES.NOT_FOUND]: 'No users found',\n [HTTP_CODES.INTERNAL_SERVER_ERROR]: 'An internal error occurred',\n}\n\nconst reportApi = () => {\n const { fetchPartnerEndpoint } = useApiRequest()\n\n const createReport = async (data: Partial): Promise => {\n const endpoint = 'reports'\n const method = 'POST'\n const headers = { 'Content-Type': 'application/json' }\n const body = JSON.stringify(data)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const updateReport = async (\n reportId: string,\n data: Partial,\n ): Promise => {\n const endpoint = `reports/${reportId}`\n const method = 'PUT'\n const headers = { 'Content-Type': 'application/json' }\n const body = JSON.stringify(data)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const downloadReport = async (reportId: string): Promise => {\n const endpoint = `reports/download/${reportId}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.blob()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const remove = async (ids: string[]): Promise => {\n const endpoint = `reports`\n const method = 'DELETE'\n const headers = { 'Content-Type': 'application/json' }\n const body = JSON.stringify(ids)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getAllReports = async (\n page: number,\n size: number,\n search: string = '',\n targetOrg: string | null = null,\n ): Promise => {\n const urlParams = new URLSearchParams({\n page: page.toString(),\n size: size.toString(),\n search,\n ...(targetOrg && {\n target_org: targetOrg,\n }),\n })\n const endpoint = `reports/all?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const usersJSON = await response.json()\n return usersJSON\n }\n throw new Error(\n (await response.json()).detail ||\n 'An unknown or unexpected error has occurred',\n )\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getEarnings = async (\n targetOrg?: string,\n ): Promise => {\n const urlParams = new URLSearchParams({\n ...(targetOrg && { target_org: targetOrg }),\n })\n const endpoint = `reports/earnings?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const usersJSON = await response.json()\n return usersJSON\n }\n // throw new Error(GET_ERRORS[response.status])\n return 'No data found'\n // throw new Error(\n // (await response.json()).detail ||\n // 'An unknown or unexpected error has occurred',\n // )\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getUserGrowth = async (\n interval?: string,\n targetOrg?: string,\n ): Promise => {\n const urlParams = new URLSearchParams({\n ...(interval && { interval }),\n ...(targetOrg && { target_org: targetOrg }),\n })\n const endpoint = `reports/user_growth?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const reportData = await response.json()\n return reportData\n }\n return 'No data found'\n // throw new Error(\n // (await response.json()).detail ||\n // 'An unknown or unexpected error has occurred',\n // )\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getDoorHealth = async (\n targetOrg?: string,\n ): Promise => {\n const urlParams = new URLSearchParams({\n ...(targetOrg && { target_org: targetOrg }),\n })\n const endpoint = `reports/door_health?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const reportData = await response.json()\n return reportData\n }\n return 'No data found'\n // throw new Error(\n // (await response.json()).detail ||\n // 'An unknown or unexpected error has occurred',\n // )\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getIssueRate = async (\n fromDate?: Date,\n toDate?: Date,\n locations?: string[],\n targetOrg?: string,\n ): Promise => {\n const urlParams = new URLSearchParams({\n ...(fromDate && { from_date: fromDate.toISOString() }),\n ...(toDate && { to_date: toDate.toISOString() }),\n ...(locations &&\n locations?.length > 0 && { locations: JSON.stringify(locations) }),\n ...(targetOrg && { target_org: targetOrg }),\n })\n const endpoint = `reports/issue_rate?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const reportData = await response.json()\n return reportData\n }\n return 'No data found'\n // throw new Error(\n // (await response.json()).detail ||\n // 'An unknown or unexpected error has occurred',\n // )\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getOccupancyRate = async (\n fromDate?: Date,\n toDate?: Date,\n targetOrg?: string,\n ): Promise => {\n const urlParams = new URLSearchParams({\n ...(fromDate && { from_date: fromDate.toISOString() }),\n ...(toDate && { to_date: toDate.toISOString() }),\n ...(targetOrg && { target_org: targetOrg }),\n })\n const endpoint = `reports/occupancy_rate?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const reportData = await response.json()\n return reportData\n }\n return 'No data found'\n // throw new Error(\n // (await response.json()).detail ||\n // 'An unknown or unexpected error has occurred',\n // )\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getNewTransactionRate = async (\n fromDate?: Date,\n toDate?: Date,\n targetOrg?: string,\n ): Promise => {\n const urlParams = new URLSearchParams({\n ...(fromDate && { from_date: fromDate.toISOString() }),\n ...(toDate && { to_date: toDate.toISOString() }),\n ...(targetOrg && { target_org: targetOrg }),\n })\n const endpoint = `reports/transaction_rate?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const reportData = await response.json()\n return reportData\n }\n return 'No data found'\n // throw new Error(\n // (await response.json()).detail ||\n // 'An unknown or unexpected error has occurred',\n // )\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getTransactionsPerLocker = async (\n locationId?: string,\n fromDate?: Date,\n toDate?: Date,\n targetOrg?: string,\n ): Promise => {\n const urlParams = new URLSearchParams({\n ...(locationId && { id_location: locationId }),\n ...(fromDate && { start_date: fromDate.toISOString() }),\n ...(toDate && { end_date: toDate.toISOString() }),\n ...(targetOrg && { target_org: targetOrg }),\n })\n const endpoint = `reports/transactions_per_locker?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const reportData = await response.json()\n return reportData\n }\n return 'No data found'\n // throw new Error(\n // (await response.json()).detail ||\n // 'An unknown or unexpected error has occurred',\n // )\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getTotalTransactions = async (\n locationId?: string,\n date?: Date,\n targetOrg?: string,\n ): Promise => {\n const urlParams = new URLSearchParams({\n ...(locationId && { id_location: locationId }),\n ...(date && { date: date.toISOString() }),\n ...(targetOrg && { target_org: targetOrg }),\n })\n const endpoint = `reports/total_transactions?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const reportData = await response.json()\n return reportData\n }\n return 'No data found'\n // throw new Error(\n // (await response.json()).detail ||\n // 'An unknown or unexpected error has occurred',\n // )\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getTransactionTimeAverage = async (\n startDate?: Date,\n endDate?: Date,\n targetOrg?: string,\n ): Promise => {\n const urlParams = new URLSearchParams({\n ...(startDate && { start_date: startDate.toISOString() }),\n ...(endDate && { end_date: endDate.toISOString() }),\n ...(targetOrg && { target_org: targetOrg }),\n })\n const endpoint = `reports/avg_transaction_time?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const reportData = await response.json()\n return reportData\n }\n return 'No data found'\n // throw new Error(\n // (await response.json()).detail ||\n // 'An unknown or unexpected error has occurred',\n // )\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getTotalUsers = async (\n targetOrg?: string,\n ): Promise => {\n const urlParams = new URLSearchParams({\n ...(targetOrg && { target_org: targetOrg }),\n })\n const endpoint = `reports/total_users?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const reportData = await response.json()\n return reportData\n }\n return 'No data found'\n // throw new Error(\n // (await response.json()).detail ||\n // 'An unknown or unexpected error has occurred',\n // )\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getTotalLocations = async (\n targetOrg?: string,\n ): Promise => {\n const urlParams = new URLSearchParams({\n ...(targetOrg && { target_org: targetOrg }),\n })\n const endpoint = `reports/total_locations?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const reportData = await response.json()\n return reportData\n }\n return 'No data found'\n // throw new Error(\n // (await response.json()).detail ||\n // 'An unknown or unexpected error has occurred',\n // )\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getAverageRevenuePerTransaction = async (\n targetOrg?: string,\n ): Promise => {\n const urlParams = new URLSearchParams({\n ...(targetOrg && { target_org: targetOrg }),\n })\n const endpoint = `reports/avg_revenue_per_transaction?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const reportData = await response.json()\n return reportData\n }\n return 'No data found'\n // throw new Error(\n // (await response.json()).detail ||\n // 'An unknown or unexpected error has occurred',\n // )\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getTotalDoors = async (\n locationId?: string,\n targetOrg?: string,\n ): Promise => {\n const urlParams = new URLSearchParams({\n ...(locationId && { id_location: locationId }),\n ...(targetOrg && { target_org: targetOrg }),\n })\n const endpoint = `reports/door_counts?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const reportData = await response.json()\n return reportData\n }\n return 'No data found'\n // throw new Error(\n // (await response.json()).detail ||\n // 'An unknown or unexpected error has occurred',\n // )\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getUsers = async (): Promise => {\n const endpoint = `reports/users`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const usersJSON = await response.json()\n return usersJSON\n }\n throw new Error(GET_ERRORS[response.status])\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getTransactions = async (): Promise => {\n const endpoint = `reports/transactions`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const usersJSON = await response.json()\n return usersJSON\n }\n throw new Error(GET_ERRORS[response.status])\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getTopUsers = async (targetOrg?: string): Promise => {\n const urlParams = new URLSearchParams({\n ...(targetOrg && { target_org: targetOrg }),\n })\n const endpoint = `reports/top_users?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const usersJSON = await response.json()\n return usersJSON\n }\n throw new Error(GET_ERRORS[response.status])\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getLocations = async (targetOrg?: string): Promise => {\n const urlParams = new URLSearchParams({\n ...(targetOrg && { target_org: targetOrg }),\n })\n const endpoint = `reports/locations?${urlParams.toString()}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const locationsJSON = await response.json()\n return locationsJSON\n }\n throw new Error(GET_ERRORS[response.status])\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getReports = async (): Promise => {\n const endpoint = `reports`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const reportsJSON = await response.json()\n return reportsJSON\n }\n throw new Error(GET_ERRORS[response.status])\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getReport = async (reportType: string): Promise => {\n const endpoint = `reports/${reportType}`\n const method = 'GET'\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (response.ok) {\n const reportData = await response.json()\n return reportData\n }\n throw new Error(\n (await response.json()).detail ||\n 'An unknown or unexpected error has occurred',\n )\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return {\n createReport,\n updateReport,\n downloadReport,\n getAllReports,\n remove,\n getEarnings,\n getUserGrowth,\n getDoorHealth,\n getIssueRate,\n getOccupancyRate,\n getNewTransactionRate,\n getTransactionsPerLocker,\n getTotalTransactions,\n getTransactionTimeAverage,\n getTotalUsers,\n getTotalLocations,\n getAverageRevenuePerTransaction,\n getTotalDoors,\n //old endpoints below\n getUsers,\n getTransactions,\n getTopUsers,\n getLocations,\n getReports,\n }\n}\n\nexport default reportApi\n","import { useApiRequest } from 'utils'\nimport { HTTP_CODES } from 'constants/HTTP'\nimport { ISettings, IWhiteLabel } from 'models/Settings'\nimport { getErrorMessage } from 'utils/helpers'\nimport { IProfileSettings } from 'models/ProfileSettings'\n\nconst GET_ERRORS = {\n [HTTP_CODES.NOT_FOUND]: 'Not found',\n [HTTP_CODES.INTERNAL_SERVER_ERROR]: 'An internal error occurred',\n}\n\nconst settingsApi = () => {\n const { fetchPartnerEndpoint, fetchEndpoint } = useApiRequest()\n\n const getSettings = async (): Promise => {\n const endpoint = 'settings'\n const method = 'GET'\n const headers = {\n 'Content-Type': 'application/json',\n }\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method, headers })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const createSettings = async (settings: any): Promise => {\n const endpoint = 'settings'\n const method = 'POST'\n const headers = {\n 'Content-Type': 'application/json',\n }\n const body = JSON.stringify(settings)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const updateSettings = async (settings: any): Promise => {\n const endpoint = 'settings'\n const method = 'PUT'\n const headers = {\n 'Content-Type': 'application/json',\n }\n const body = JSON.stringify(settings)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getFilters = async (page: string) => {\n const endpoint = `filters/${page}`\n const method = 'GET'\n const headers = {\n 'Content-Type': 'application/json',\n }\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method, headers })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const updateFilters = async (page: string, newFilters: any) => {\n const endpoint = `filters/${page}`\n const method = 'PUT'\n const body = JSON.stringify(newFilters)\n const headers = {\n 'Content-Type': 'application/json',\n }\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body,\n headers,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getWhiteLabel = async (): Promise => {\n const endpoint = 'white-label'\n const method = 'GET'\n const headers = {\n 'Content-Type': 'application/json',\n }\n\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method, headers })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const updateWhiteLabel = async (whiteLabel: FormData): Promise => {\n const endpoint = 'white-label'\n const method = 'PUT'\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: whiteLabel,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const updateOrgWhiteLabel = async (\n orgId: string,\n whiteLabel: FormData,\n ): Promise => {\n const endpoint = `white-label/${orgId}`\n const method = 'PUT'\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: whiteLabel,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const confirmEmail = async (email: any): Promise => {\n const endpoint = `notification-contact/verify?email=${email}`\n const method = 'POST'\n const headers = {\n 'Content-Type': 'application/json',\n }\n\n try {\n const response = await fetchEndpoint({\n endpoint,\n method,\n headers,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const patchWhiteLabel = async (\n payload: Partial,\n ): Promise => {\n const endpoint = `white-label`\n const method = 'PATCH'\n const headers = {\n 'Content-Type': 'application/json',\n }\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: JSON.stringify(payload),\n headers,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const updateProfileSettings = async ({\n user_id,\n first_name,\n last_name,\n }: IProfileSettings): Promise => {\n const endpoint = `members/${user_id}`\n const method = 'PATCH'\n const headers = {\n 'Content-Type': 'application/json',\n }\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: JSON.stringify({\n name: `${first_name} ${last_name}`,\n last_name,\n first_name,\n }),\n headers,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const changePassword = async (\n client_id: string,\n refresh_token: string,\n { password, new_password }: IProfileSettings,\n ): Promise => {\n const endpoint = `members/change-password`\n const method = 'POST'\n const headers = {\n 'Content-Type': 'application/json',\n }\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: JSON.stringify({\n pwd: password,\n new_pwd: new_password,\n client_id,\n refresh_token,\n }),\n headers,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return {\n getSettings,\n createSettings,\n updateSettings,\n getFilters,\n updateFilters,\n getWhiteLabel,\n updateWhiteLabel,\n updateOrgWhiteLabel,\n patchWhiteLabel,\n confirmEmail,\n updateProfileSettings,\n changePassword,\n }\n}\n\nexport default settingsApi\n","import { IIssue, IIssueList } from 'models'\nimport { useApiRequest } from 'utils'\nimport { HTTP_CODES } from 'constants/HTTP'\nimport { getErrorMessage } from 'utils/helpers'\n\nconst IssueApi = () => {\n const { fetchPartnerEndpoint } = useApiRequest()\n\n const create = async (issue: FormData, eventId: string): Promise => {\n const endpoint = `issues?id_event=${eventId}`\n const method = 'POST'\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: issue,\n })\n\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const update = async (issueId: string, issue: FormData): Promise => {\n const endpoint = `issues/${issueId}`\n const method = 'PUT'\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: issue,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getMany = async (\n page: number,\n size: number,\n search: string,\n ): Promise => {\n const urlParams = new URLSearchParams({\n page: page.toString(),\n size: size.toString(),\n search,\n })\n const endpoint = `issues?${urlParams.toString()}`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const deleteMany = async (ids: string[]): Promise => {\n const endpoint = `issues`\n const method = 'DELETE'\n const headers = {\n 'Content-Type': 'application/json',\n }\n const body = JSON.stringify(ids)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const patch = async (id: string, status): Promise => {\n const urlParams = new URLSearchParams({\n status,\n })\n const endpoint = `issues/${id}?${urlParams.toString()}`\n const method = 'PATCH'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return {\n getMany,\n deleteMany,\n patch,\n create,\n update,\n }\n}\n\nexport default IssueApi\n","import { ICustomTitle, IDialogType } from 'components'\nimport { useState } from 'react'\n\ninterface IDialog {\n isOpen: boolean\n message: string | JSX.Element\n type?: IDialogType\n customTitle?: ICustomTitle | null\n}\n\nconst useDialog = () => {\n const [dialog, setDialog] = useState({\n isOpen: false,\n message: '',\n type: '',\n customTitle: null,\n })\n\n const displayMessage = (\n message: string | JSX.Element,\n type: IDialogType = '',\n customTitle: ICustomTitle | null = null,\n ) => {\n setDialog({\n isOpen: true,\n message,\n type,\n customTitle,\n })\n }\n\n const closeDialog = () => {\n setDialog({ isOpen: false, message: '', type: '', customTitle: null })\n }\n\n return {\n dialog,\n displayMessage,\n closeDialog,\n }\n}\n\nexport default useDialog\n","import {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n FormControl,\n IconButton,\n TextField,\n Typography,\n} from '@mui/material'\nimport { DatePicker } from '@mui/x-date-pickers'\nimport { IAnalyticsFilters } from 'models/Analytics'\nimport { Dispatch, useEffect, useState } from 'react'\nimport CloseIcon from '@mui/icons-material/Close'\n\ninterface ICustomDateRange {\n isOpen: boolean\n onClose: () => void\n selectedRange: string\n filters: IAnalyticsFilters\n setFilters: Dispatch>\n}\n\nconst CustomDateRange = ({\n isOpen,\n onClose,\n selectedRange,\n filters,\n setFilters,\n}: ICustomDateRange) => {\n const [from, setFrom] = useState(filters.from || null)\n const [to, setTo] = useState(filters.to || null)\n\n const handleFromChange = (date) => {\n setFrom(date)\n }\n\n const handleToChange = (date) => {\n setTo(date)\n }\n\n const handleSelectDateRange = () => {\n setFilters((previousFilters) => ({ ...previousFilters, from, to }))\n onClose()\n }\n\n const handleReset = () => {\n setFrom(null)\n setTo(null)\n }\n\n useEffect(() => {\n if (\n (!isOpen && !filters.from && !filters.to) ||\n selectedRange !== 'custom'\n ) {\n handleReset()\n }\n }, [isOpen, selectedRange])\n\n return (\n \n \n \n Select a date range to display data\n \n \n theme.palette.grey[500],\n }}\n >\n \n \n \n \n
\n }\n label=\"From\"\n disableFuture={true}\n />\n
\n \n
\n }\n label=\"To\"\n disableFuture={true}\n />\n
\n \n \n \n Select\n \n \n \n
\n )\n}\n\nexport default CustomDateRange\n","import { Typography } from '@mui/material'\nimport { ILocation } from 'models'\nimport {\n IAverageRevenuePerTransaction,\n IDoorHealth,\n IEarnings,\n INewUserGrowth,\n IOccupancyRate,\n IReportedIssueRate,\n ITotalDoors,\n ITotalLocations,\n ITotalTransactions,\n ITransactionRate,\n ITransactionsPerLocker,\n} from 'models/Analytics'\nimport { average, parseCurrency, secondsToTimeFormat } from 'utils/helpers'\n\nexport const parseEarningsValue = (earningsObject: IEarnings) => {\n if (typeof earningsObject !== 'string') {\n const { currency, earnings } = earningsObject\n return `${parseCurrency(currency)} ${earnings}`\n }\n return 'No data found'\n}\n\nexport const getPercentajeWithColor = (percentaje: number): JSX.Element => {\n return percentaje < 0 ? (\n {percentaje.toFixed(2)}%\n ) : percentaje > 0 ? (\n +{percentaje.toFixed(2)}%\n ) : (\n {percentaje.toFixed(2)}%\n )\n}\n\nexport const parseNewUserGrowthValue = (newUserGrowth: INewUserGrowth) => {\n if (typeof newUserGrowth !== 'string') {\n const { percentage } = newUserGrowth\n return getPercentajeWithColor(percentage)\n }\n return 'No data found'\n}\n\nexport const parseDoorHealthValue = (\n doorHealth: IDoorHealth[],\n selectedLocation?: string,\n) => {\n if (typeof doorHealth !== 'string') {\n if (selectedLocation) {\n const percentage = doorHealth.find(\n (location) => location.location_id === selectedLocation,\n )?.health_percentage\n return `${percentage?.toFixed(2)}%`\n } else {\n const averageValue = average(\n doorHealth.map((location) => location.health_percentage),\n )\n return `${averageValue.toFixed(2)}%`\n }\n }\n return 'No data found'\n}\n\nexport const parseReportedIssuesRateValue = (\n reportedIssuesRate: IReportedIssueRate,\n) => {\n if (typeof reportedIssuesRate !== 'string') {\n const { issue_rate } = reportedIssuesRate\n return `${issue_rate.toFixed(2)}%`\n }\n return 'No data found'\n}\n\nexport const parseOccupancyRateValue = (\n occupancyRate: IOccupancyRate[],\n selectedLocation?: string,\n) => {\n if (typeof occupancyRate !== 'string') {\n if (selectedLocation) {\n const percentage = occupancyRate.find(\n (location) => location.id === selectedLocation,\n )?.occupancy_rate\n return `${percentage?.toFixed(2) || '0.00'}%`\n } else {\n const averageValue = average(\n occupancyRate.map((item) => item.occupancy_rate),\n )\n return `${averageValue.toFixed(2)}%`\n }\n }\n return 'No data found'\n}\n\nexport const parseNewTransactionsValue = (newTransaction: ITransactionRate) => {\n if (typeof newTransaction !== 'string') {\n const { new_transaction_percentage } = newTransaction\n return getPercentajeWithColor(new_transaction_percentage)\n }\n return 'No data found'\n}\n\nexport const parseTransactionPerLockerValue = (\n transactionsPerLocker: ITransactionsPerLocker,\n) => {\n if (typeof transactionsPerLocker !== 'string') {\n const { avg_transactions_per_locker } = transactionsPerLocker\n return `${avg_transactions_per_locker.toFixed(2) || '0.00'}%`\n }\n return 'No data found'\n}\n\nexport const parseTotalTransactionsValue = (\n totalTransactions: ITotalTransactions,\n) => {\n if (typeof totalTransactions !== 'string') {\n return `${totalTransactions.breakdown.organization_total}`\n }\n return 'No data found'\n}\n\nexport const parseTransactionTimeAverageValue = (\n transactionTimeAverage: number | string,\n) => {\n if (typeof transactionTimeAverage !== 'string') {\n return `${secondsToTimeFormat(transactionTimeAverage as number)}`\n }\n return 'No data found'\n}\n\nexport const parseAverageRevenuePerTransactionValue = (\n averageRevenuePerTransaction: IAverageRevenuePerTransaction,\n) => {\n if (typeof averageRevenuePerTransaction !== 'string') {\n const { avg_revenue_per_transaction } = averageRevenuePerTransaction\n return `${avg_revenue_per_transaction.toFixed(2)}%`\n }\n return 'No data found'\n}\n\nexport const parseTotalUsersValue = (totalUsers: number | string) => {\n if (typeof totalUsers !== 'string') {\n return `${totalUsers}`\n }\n return 'No data found'\n}\n\nexport const parseTotalLocationsValue = (totalLocations: ITotalLocations) => {\n if (typeof totalLocations !== 'string') {\n const { main_org_total_locations } = totalLocations\n return `${main_org_total_locations}`\n }\n return 'No data found'\n}\n\nexport const parseTotalDoorsValue = (\n totalDoors: ITotalDoors,\n selectedLocation?: string,\n) => {\n if (typeof totalDoors !== 'string') {\n if (selectedLocation && selectedLocation !== 'all') {\n return `${totalDoors.main_org.door_counts_by_location[selectedLocation]}`\n }\n return `${totalDoors.main_org.main_org_total_doors}`\n }\n return 'No data found'\n}\n\nexport const getTodayStart = (): Date => {\n const today = new Date()\n today.setHours(0, 0, 0, 0)\n return today\n}\n\nexport const getThisWeekStart = (): Date => {\n const today = new Date()\n const currentWeek = new Date(today.setDate(today.getDate() - today.getDay()))\n currentWeek.setHours(0, 0, 0, 0)\n return currentWeek\n}\n\nexport const getThisMonthStart = (): Date => {\n const today = new Date()\n const currentMonth = new Date(today.getFullYear(), today.getMonth(), 1)\n currentMonth.setHours(0, 0, 0, 0)\n return currentMonth\n}\n\nexport const getThisQuarterStart = (): Date => {\n const today = new Date()\n const quarterNumber = Math.floor(today.getMonth() / 3)\n const year = today.getFullYear()\n const currentQuarter = new Date(year, quarterNumber * 3, 1)\n currentQuarter.setHours(0, 0, 0, 0)\n return currentQuarter\n}\n\nexport const getThisYearStart = (): Date => {\n const today = new Date()\n const currentYear = today.getFullYear()\n const firstDay = new Date(currentYear, 0, 1)\n return firstDay\n}\n\nexport const parseOptionToDateRange = (selectedRange: string): Date | null => {\n switch (selectedRange) {\n case 'today':\n return getTodayStart()\n case 'this_week':\n return getThisWeekStart()\n case 'this_month':\n return getThisMonthStart()\n case 'this_quarter':\n return getThisQuarterStart()\n case 'this_year':\n return getThisYearStart()\n default:\n return null\n }\n}\n\nexport const parseOptionToInterval = (selectedRange: string): string => {\n switch (selectedRange) {\n case 'today':\n return 'day'\n case 'this_week':\n return 'week'\n case 'this_month':\n return 'month'\n case 'this_quarter':\n return 'month'\n case 'this_year':\n return 'year'\n default:\n return ''\n }\n}\n","import { Button as MUIButton } from '@mui/material'\nimport { ButtonProps } from 'components'\n\nexport const Button = ({\n name,\n disabled,\n onClick,\n variant,\n children,\n color,\n sx,\n type,\n}: ButtonProps) => {\n return (\n \n {children}\n \n )\n}\nexport default Button\n","import { IconButton as MUIIconButton } from '@mui/material'\nimport { IIconButtonProps } from 'components'\n\nconst IconButton = ({ onClick, disabled, children, sx }: IIconButtonProps) => {\n return (\n \n {children}\n \n )\n}\nexport default IconButton\n","import { Button } from 'components'\nimport { SubmitButtonProps } from './SubmitButton.model'\n\nexport const SubmitButton = ({\n name,\n disabled,\n variant,\n children,\n sx,\n}: SubmitButtonProps) => {\n return (\n \n {children}\n \n )\n}\nexport default SubmitButton\n","import { Box } from '@mui/material'\nimport { SubmitButton, Button, ISubmitCancelBtnsProps } from 'components'\n\nconst SubmitCancelBtns = ({\n submitBtnLbl,\n cancelBtnLbl,\n cancelBtnOnClick,\n}: ISubmitCancelBtnsProps) => {\n return (\n \n {submitBtnLbl}\n \n \n )\n}\nexport default SubmitCancelBtns\n","import { ISideBarProps, SideBarStyles } from 'components'\nimport { Box, Drawer } from '@mui/material'\n\nconst SideBar = ({ open, onClose, children }: ISideBarProps) => {\n const { SX } = SideBarStyles()\n return (\n \n {children}\n \n )\n}\nexport default SideBar\n","import { Theme, useMediaQuery } from '@mui/material'\nimport { ISx } from 'types'\n\nexport const SideBarStyles = (): { SX: ISx } => {\n const SM: boolean = useMediaQuery((theme: Theme) =>\n theme.breakpoints.down('sm'),\n )\n\n const SX: ISx = {\n DRAWER: SM ? { width: '400px' } : { width: '500px' },\n CONTAINER: {\n height: '100%',\n width: '100%',\n padding: '1.25rem',\n overflowY: 'auto',\n },\n }\n\n return { SX }\n}\n","import { IFormProps } from 'components'\nimport { useFormContext } from 'react-hook-form'\n\nconst Form = ({ children, onSubmit }: IFormProps) => {\n const { handleSubmit } = useFormContext()\n\n return
{children}
\n}\nexport default Form\n","import { TextField as MUITextField, FormControl, Tooltip } from '@mui/material'\r\nimport { Controller, useFormContext } from 'react-hook-form'\r\nimport { ITextFieldProps, ErrorMessage } from 'components'\r\nimport { validateFloatingField, validateIntegerField } from 'utils/helpers'\r\nimport { Help } from '@mui/icons-material'\r\n\r\nconst TextField = ({\r\n name,\r\n placeholder,\r\n label,\r\n disabled,\r\n rules,\r\n multiline,\r\n type,\r\n required = false,\r\n defaultValue = null,\r\n value,\r\n onChange: onChangeProp,\r\n onBlur,\r\n error,\r\n isReadOnly = false,\r\n ref = null,\r\n helperText = '',\r\n onlyInteger = false, // only int\r\n isNumeric = false, // int and float\r\n id,\r\n tooltip,\r\n}: ITextFieldProps & { readOnly?: boolean; id?: string }) => {\r\n const {\r\n register,\r\n control,\r\n formState: { errors },\r\n } = useFormContext()\r\n\r\n return (\r\n \r\n (\r\n \r\n {label}\r\n {tooltip && (\r\n \r\n \r\n \r\n )}\r\n \r\n }\r\n placeholder={placeholder}\r\n multiline={multiline}\r\n type={type}\r\n {...(onChange && {\r\n onChange: (...args) => {\r\n onChange(...args)\r\n if (onChangeProp) onChangeProp(...args)\r\n },\r\n })}\r\n {...(onBlur && { onBlur: onBlur })}\r\n error={error}\r\n defaultValue={defaultValue}\r\n value={\r\n value === undefined\r\n ? undefined\r\n : onlyInteger\r\n ? validateIntegerField(value)\r\n : isNumeric\r\n ? validateFloatingField(value)\r\n : String(value).replace(',', '')\r\n }\r\n required={required}\r\n InputProps={{\r\n readOnly: isReadOnly,\r\n }}\r\n InputLabelProps={{ shrink: true }}\r\n helperText={helperText}\r\n id={id}\r\n />\r\n )}\r\n />\r\n\r\n \r\n \r\n )\r\n}\r\nexport default TextField\r\n","import { Typography } from '@mui/material'\nimport { IErrorMessageProps } from 'components'\nimport { ErrorMessage as HookformErrorMessage } from '@hookform/error-message'\n\nconst ErrorMessage = ({ name, errors }: IErrorMessageProps) => {\n return (\n (\n \n {message}\n \n )}\n />\n )\n}\nexport default ErrorMessage\n","import {\n FormControl,\n InputLabel,\n Select,\n MenuItem,\n useTheme,\n Box,\n} from '@mui/material'\nimport { useFormContext, Controller } from 'react-hook-form'\nimport { ISelectFieldProps, ErrorMessage } from 'components'\n\nconst SelectField = ({\n name,\n label,\n items,\n disabled,\n rules,\n required = false,\n isReadOnly = false,\n onOpen = undefined,\n defaultValue = undefined,\n id,\n}: ISelectFieldProps) => {\n const {\n control,\n formState: { errors },\n register,\n } = useFormContext()\n\n const theme = useTheme()\n\n return (\n \n {label}\n (\n \n {items.map((item) => (\n \n {item.label}\n\n {item.note && (\n \n {item.note}\n \n )}\n \n ))}\n \n )}\n rules={rules}\n />\n \n \n )\n}\nexport default SelectField\n","import { TextField } from '@mui/material'\nimport { DateTimePicker } from '@mui/x-date-pickers'\nimport { useFormContext, Controller } from 'react-hook-form'\nimport { ErrorMessage, IDateFieldProps } from 'components'\n\nconst DateField = ({\n name,\n label,\n rules,\n minDate,\n maxDate,\n disablePast,\n defaultValue = null,\n}: IDateFieldProps) => {\n const {\n control,\n formState: { errors },\n } = useFormContext()\n\n return (\n <>\n (\n onChange(data?.toISOString())}\n renderInput={(props) => }\n label={label}\n />\n )}\n />\n \n \n )\n}\nexport default DateField\n","/* eslint-disable */\n/* prettier-ignore */\nimport { useEffect, useState} from 'react'\nimport { Box, TextField } from '@mui/material'\nimport {\n GoogleMap,\n Marker,\n StandaloneSearchBox,\n useLoadScript,\n} from '@react-google-maps/api'\nimport _ from 'lodash'\nimport { IMapFieldProps } from 'components'\nimport './MapField.css'\nimport { GOOGLE_API_KEY } from '../../../../constants'\nimport { useFormContext } from 'react-hook-form'\n\nconst MapField = ({\n currentPosition,\n setCurrentPosition,\n address,\n setAddress,\n isReadOnly = false,\n}: IMapFieldProps) => {\n const [maps, setMaps] = useState()\n const [searchBox, setSearchBox] = useState<\n google.maps.places.SearchBox | undefined\n >()\n const [searchParams, setSearchParams] = useState(address || '')\n\n const { clearErrors, register } = useFormContext()\n\n const { isLoaded, loadError } = useLoadScript({\n id: 'google-map-script',\n googleMapsApiKey: GOOGLE_API_KEY || '',\n libraries: ['places'],\n })\n\n const onPlacesChanged = () => {\n const places = searchBox?.getPlaces()\n\n const nextMarkers = places?.map((place, index) => ({\n position: place?.geometry?.location,\n address: place.formatted_address,\n index,\n }))\n const nextCenter = _.get(nextMarkers, '0.position', currentPosition)\n setCurrentPosition({ lat: nextCenter.lat(), lng: nextCenter.lng() })\n if (nextMarkers?.length === 1) setAddress(nextMarkers[0].address)\n }\n\n const onMarkerDragEnd = async (e) => {\n const lat = e.latLng.lat()\n const lng = e.latLng.lng()\n await setCurrentPosition({ lat, lng })\n // fetching the currentAddress\n\n const response = await fetch(\n `https://maps.googleapis.com/maps/api/geocode/json?latlng=${lat},${lng}&key=${GOOGLE_API_KEY}`,\n )\n const data = await response.json()\n await setAddress(\n data.results[0]?.formatted_address\n ? data.results[0]?.formatted_address\n : '',\n )\n }\n\n const handleLoad = (ref) => {\n setSearchBox(ref)\n }\n\n useEffect(() => {\n if (address) {\n clearErrors('address')\n }\n }, [address])\n\n return (\n \n {isLoaded && (\n \n \n {!isReadOnly && (\n handleLoad(ref)}\n onPlacesChanged={onPlacesChanged}\n >\n {\n setAddress(e.target.value)\n }}\n type=\"text\"\n placeholder=\"Search the address\"\n disabled={isReadOnly}\n />\n \n )}\n {isReadOnly && (\n {\n setAddress(e.target.value)\n }}\n type=\"text\"\n placeholder=\"Search the address\"\n required\n disabled={isReadOnly}\n />\n )}\n \n setMaps(ref)}\n options={{ mapId: '730db22e84fe0212' }}\n mapContainerStyle={{ height: '38vh', width: '100%' }}\n zoom={10}\n center={currentPosition}\n >\n onMarkerDragEnd(e)}\n draggable\n />\n \n \n )}\n \n )\n}\n\nexport default MapField\n","import { Autocomplete, TextField } from '@mui/material'\nimport { useFormContext, Controller } from 'react-hook-form'\nimport { ErrorMessage, IAutocompleteFieldProps } from 'components'\n\nconst AutocompleteField = ({\n name,\n label,\n options,\n rules,\n}: IAutocompleteFieldProps) => {\n const {\n control,\n formState: { errors },\n } = useFormContext()\n\n return (\n <>\n (\n }\n onChange={(_, item) => onChange(item?.value)}\n />\n )}\n name={name}\n control={control}\n rules={rules}\n />\n \n \n )\n}\nexport default AutocompleteField\n","import { Checkbox, FormControlLabel, FormControl } from '@mui/material'\r\nimport { useFormContext, Controller } from 'react-hook-form'\r\nimport { IToggleFieldProps, ErrorMessage } from 'components'\r\n\r\nconst ToggleField = ({ name, label, disabled, checked }: IToggleFieldProps) => {\r\n const {\r\n control,\r\n formState: { errors },\r\n } = useFormContext()\r\n\r\n return (\r\n \r\n (\r\n onChange(event.target.checked)}\r\n disabled={disabled}\r\n />\r\n }\r\n label={label}\r\n />\r\n )}\r\n />\r\n \r\n \r\n )\r\n}\r\nexport default ToggleField\r\n","import { ReactElement, useState } from 'react'\nimport { IChangePassword, IForgotPassword } from 'models'\nimport { Box, Typography } from '@mui/material'\nimport { ResetPasswordFormStyles } from './styles'\nimport {\n RESET_PASSWORD_FORM_FIELDS,\n RESET_PASSWORD_FORM,\n} from '../../../constants'\nimport {\n Form,\n TextField,\n Button,\n ResetPasswordFields,\n NotificationDialog,\n} from 'components'\nimport { FormProvider, SubmitHandler, useForm } from 'react-hook-form'\nimport useDialog from 'hooks/useDialog'\nimport { useNavigate } from 'react-router-dom'\nimport { useAuth } from 'resources'\nimport ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos'\nconst currentUserData = localStorage.getItem('currentUser')\nconst isFirstLogin = localStorage.getItem('firstTimeLogin') === 'true'\n\nconst ResetPasswordForm = (): ReactElement => {\n const [loading, setLoading] = useState(false)\n const [resetingPassword, setResetingPassword] = useState(false)\n const [error, setError] = useState()\n const [isCodeSent, setIsCodeSent] = useState(false)\n\n const { SX, STYLES } = ResetPasswordFormStyles()\n const navigate = useNavigate()\n\n const methods = useForm()\n const { dialog, displayMessage, closeDialog } = useDialog()\n const { forgotPassword, forgotPasswordSubmit, completePassword } = useAuth()\n\n const sendCode = async ({ username }: IForgotPassword): Promise => {\n try {\n await forgotPassword({ username })\n displayMessage('Verification code bas been sent to your email')\n setIsCodeSent(true)\n } catch (error) {\n setError(`${(error as Error).message}`)\n displayMessage(`${(error as Error).message}`)\n }\n }\n\n const changePassword = async ({\n username,\n code,\n password,\n }: IChangePassword): Promise => {\n try {\n if (code === '') {\n await completePassword({ email: username, newPassword: password })\n } else {\n await forgotPasswordSubmit({ username, code, password })\n displayMessage('Password changed successfully')\n }\n } catch (error) {\n setError(`${(error as Error).message}`)\n displayMessage(`${(error as Error).message}`)\n }\n }\n\n const onSubmit: SubmitHandler = (newPassword): void => {\n if (error) {\n setError('')\n }\n setLoading(true)\n try {\n if (isFirstLogin && currentUserData) {\n const email =\n JSON.parse(currentUserData).challengeParam.userAttributes.email\n changePassword({\n username: email.toLowerCase().trim(),\n code: '',\n password: newPassword.password,\n })\n return\n }\n if (isCodeSent) {\n setResetingPassword(true)\n changePassword({\n username: newPassword.username.toLowerCase().trim(),\n code: newPassword.code,\n password: newPassword.password,\n })\n } else {\n sendCode({ username: newPassword.username })\n }\n } catch (error) {\n setError(`${(error as Error).message}`)\n displayMessage(`${(error as Error).message}`)\n } finally {\n setLoading(false)\n }\n }\n\n const TITLE_LABEL: string = isCodeSent\n ? RESET_PASSWORD_FORM.FORGOT_TITLE\n : RESET_PASSWORD_FORM.RESET_TITLE\n\n const BUTTON_LABEL: string =\n isCodeSent || isFirstLogin\n ? RESET_PASSWORD_FORM.SUBMIT_BUTTON_LABEL\n : RESET_PASSWORD_FORM.SEND_CODE_BUTTON_LABEL\n\n return (\n \n
\n \n {\n navigate('/login')\n }}\n >\n \n back\n \n {TITLE_LABEL}\n \n {RESET_PASSWORD_FORM.DESCRIPTION}\n \n \n {!isFirstLogin && (\n \n )}\n \n \n \n \n \n \n
\n {\n closeDialog()\n if (!error && resetingPassword) {\n navigate('/login')\n }\n }}\n />\n
\n )\n}\nexport default ResetPasswordForm\n","import { CSSProperties } from 'react'\nimport { SxProps } from '@mui/material'\nimport { useTheme } from '@mui/material/styles'\n\nexport const ResetPasswordFormStyles = () => {\n const theme = useTheme()\n\n const SX: { [key: string]: SxProps } = {\n CONTAINER: {\n p: 4,\n },\n TITLE: {\n fontSize: theme.typography.h2,\n fontWeight: 700,\n },\n DESCRIPTION: {\n mt: 2,\n fontSize: theme.typography.h5,\n fontWeight: 400,\n color: theme.palette.text.secondary,\n },\n FIELDS_CONTAINER: {\n display: 'flex',\n flexDirection: 'column',\n gap: '2rem',\n mt: 4,\n },\n BUTTONS_CONTAINER: {\n display: 'flex',\n gap: '0 15px',\n justifyContent: 'center',\n mt: 4,\n },\n BACK_BUTTON: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n },\n }\n\n const STYLES: { [key: string]: CSSProperties } = {\n BACK_BUTTON: {\n textDecoration: 'none',\n color: theme.palette.text.primary,\n },\n }\n return { SX, STYLES }\n}\n","import { ReactElement } from 'react'\nimport { useFormContext } from 'react-hook-form'\nimport { TextField, IResetPasswordFieldsProps } from 'components'\nimport { RESET_PASSWORD_FORM_FIELDS } from '../../../../../constants'\n\nconst ResetPasswordFields = ({\n isCodeSent,\n isFirstLogin,\n}: IResetPasswordFieldsProps): ReactElement => {\n const { watch } = useFormContext()\n\n const PASSWORD: string = watch('password')\n\n return (\n <>\n {(isCodeSent || isFirstLogin) && (\n <>\n {isCodeSent && (\n \n )}\n \n \n value === PASSWORD || 'The passwords do not match',\n }}\n />\n \n )}\n \n )\n}\nexport default ResetPasswordFields\n","import { Box, LinearProgress, Typography } from '@mui/material'\n\nconst PasswordStrength = ({\n value,\n label,\n color,\n}: {\n value: number\n label: string\n color: 'success' | 'warning' | 'error'\n}) => {\n return (\n \n \n \n \n \n \n {label}\n \n \n \n )\n}\n\nexport default PasswordStrength\n","import { PasswordStrength } from 'components/PasswordStrength'\nimport { useMemo } from 'react'\n\nconst MEDIUM_REGEX =\n /^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{8,})./\n\nconst STRONG_REGEX = /^(?=.*\\d)(?=.*[!@#$%^&*])(?=.*[a-z])(?=.*[A-Z]).{12,}$/\n\nexport const usePasswordStrength = (password: string) =>\n useMemo(() => {\n if (!password)\n return {\n strengthLabel: 'Weak',\n element: null,\n }\n if (STRONG_REGEX.test(password)) {\n return {\n strengthLabel: 'Strong',\n element: (\n \n ),\n }\n }\n if (MEDIUM_REGEX.test(password)) {\n return {\n strengthLabel: 'Strong',\n element: ,\n }\n }\n\n return {\n strengthLabel: 'Weak',\n element: ,\n }\n }, [password])\n","import { Alert, Box, Typography } from '@mui/material'\nimport { CognitoUser } from 'amazon-cognito-identity-js'\nimport { Auth } from 'aws-amplify'\nimport { ReactElement, useState } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { FormControl, TextField as MUITextField } from '@mui/material'\nimport { Button, NotificationDialog } from 'components'\nimport { SetNewPasswordFormStyles } from './styles'\n\nimport { usePasswordStrength } from 'hooks/usePasswordStrength'\nimport { useAuth } from 'resources'\n\nconst SetNewPassword = (): ReactElement => {\n const [inputValues, setInputValues] = useState({\n newPassword: '',\n confirmPassword: '',\n })\n const [dialog, setDialog] = useState<{\n isOpen: boolean\n message: string\n }>({\n isOpen: false,\n message: '',\n })\n const [error, setError] = useState('')\n const { SX } = SetNewPasswordFormStyles()\n const navigate = useNavigate()\n const { configureAmplify } = useAuth()\n\n const currentUser = JSON.parse(localStorage.getItem('currentUser') || '{}')\n const oldPassword = localStorage.getItem('oldPassword') || ''\n\n const passwordStrength = usePasswordStrength(inputValues.newPassword)\n\n const handleInputChange = (event: React.ChangeEvent) => {\n setInputValues({\n ...inputValues,\n [event.target.name]: event.target.value,\n })\n }\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault()\n\n if (error) {\n setError('')\n }\n\n const user: CognitoUser = await Auth.signIn(\n currentUser.challengeParam.userAttributes.email.toLowerCase().trim(),\n oldPassword,\n )\n\n if (user) {\n try {\n await Auth.completeNewPassword(user, inputValues.newPassword)\n setDialog({\n isOpen: true,\n message: 'Password reset was successful. Please login',\n })\n localStorage.removeItem('oldPassword')\n localStorage.setItem('firstTimeLogin', 'true')\n } catch (error) {\n setDialog({ isOpen: true, message: (error as Error).message })\n setError((error as Error).message)\n }\n }\n }\n\n const passwordsMatch =\n inputValues.newPassword === inputValues.confirmPassword &&\n inputValues.newPassword !== ''\n\n const initAmplify = () => {\n configureAmplify()\n }\n\n initAmplify()\n\n return (\n
\n \n Reset your password\n \n Before continuing, please reset your password.\n \n\n \n Your password needs to have at least 8 characters, contain at least\n one uppercase letter, one lowercase letter, one number and one special\n character.\n \n\n \n \n \n \n \n {passwordStrength.element && (\n {passwordStrength.element}\n )}\n\n \n \n \n \n {!passwordsMatch &&\n inputValues.newPassword !== '' &&\n inputValues.confirmPassword !== '' && (\n \n \n Passwords do not match!\n \n \n )}\n {passwordsMatch && (\n \n \n Passwords match!\n \n \n )}\n \n \n \n Reset Password\n \n {\n setInputValues({\n newPassword: '',\n confirmPassword: '',\n })\n }}\n >\n Clear\n \n \n \n {\n setDialog({\n isOpen: false,\n message: '',\n })\n if (!error) {\n navigate('/home')\n }\n }}\n message={dialog.message}\n />\n \n )\n}\n\nexport default SetNewPassword\n","import { CSSProperties } from 'react'\nimport { SxProps } from '@mui/material'\nimport { useTheme } from '@mui/material/styles'\n\nexport const SetNewPasswordFormStyles = () => {\n const theme = useTheme()\n\n const SX: { [key: string]: SxProps } = {\n CONTAINER: {\n p: 4,\n },\n TITLE: {\n fontSize: theme.typography.h2,\n fontWeight: 700,\n },\n DESCRIPTION: {\n mt: 2,\n fontSize: theme.typography.h5,\n fontWeight: 400,\n color: theme.palette.text.secondary,\n },\n FIELDS_CONTAINER: {\n display: 'flex',\n flexDirection: 'column',\n gap: '2rem',\n mt: 4,\n },\n BUTTONS_CONTAINER: {\n display: 'flex',\n gap: '0 15px',\n justifyContent: 'center',\n alignItems: 'center',\n mt: 4,\n },\n }\n\n const STYLES: { [key: string]: CSSProperties } = {\n BACK_BUTTON: {\n textDecoration: 'none',\n color: theme.palette.text.primary,\n },\n }\n return { SX, STYLES }\n}\n","import { SIGN_IN_FORM_FIELDS, SIGN_IN_FORM } from '../../../constants'\nimport { Box } from '@mui/material'\nimport { SignInFormtyles } from './styles'\nimport { FormProvider, SubmitHandler, useForm } from 'react-hook-form'\nimport { ISignInFormProps, Form, TextField, Button } from 'components'\nimport { ISignIn } from 'models'\nimport { ReactElement } from 'react'\n\nconst SignInForm = ({ children, onSignIn }: ISignInFormProps): ReactElement => {\n const { SX } = SignInFormtyles()\n\n const methods = useForm({\n defaultValues: {\n email: '',\n password: '',\n },\n })\n\n const onSubmit: SubmitHandler = (newLogin): void => {\n onSignIn({ email: newLogin.email, password: newLogin.password })\n }\n\n return (\n \n
\n \n \n \n \n {children}\n \n \n \n \n \n
\n
\n )\n}\nexport default SignInForm\n","import { ISx } from 'types'\n\nexport const SignInFormtyles = (): { SX: ISx } => {\n const SX: ISx = {\n CONTAINER: {\n p: 4,\n },\n FIELDS_CONTAINER: {\n display: 'flex',\n flexDirection: 'column',\n gap: '2rem',\n mt: 4,\n },\n BUTTONS_CONTAINER: {\n display: 'flex',\n gap: '0 15px',\n justifyContent: 'center',\n mt: 4,\n },\n }\n\n return { SX }\n}\n","import PropTypes from 'prop-types'\nimport { Helmet } from 'react-helmet'\n\nconst PageContainer = ({ title, description, children }) => (\n
\n \n {title}\n \n \n {children}\n
\n)\n\nPageContainer.propTypes = {\n title: PropTypes.string,\n description: PropTypes.string,\n children: PropTypes.node,\n}\n\nexport default PageContainer\n","import { Card, useMediaQuery } from '@mui/material'\nimport { PropsWithChildren } from 'react'\nimport { ToolbarControl } from 'types'\n\ninterface IToolbarProps {\n controls: ToolbarControl[]\n}\n\nconst Toolbar = ({ children, controls }: PropsWithChildren) => {\n const query = useMediaQuery(`(max-width:900px)`)\n const amountControls = controls.filter(\n (control) =>\n control.display && (control.isMenu === undefined || !control.isMenu),\n ).length\n return (\n 1 ? 'column' : 'row',\n justifyContent: amountControls > 0 ? 'space-between' : 'flex-end',\n alignItems: 'center',\n borderRadius: '5px',\n gap: '1rem',\n padding: '1rem',\n whiteSpace: 'nowrap',\n }}\n >\n {children}\n \n )\n}\n\nexport default Toolbar\n","import { DialogProps, IconButton } from 'components'\nimport { Close as CloseIcon } from '@mui/icons-material'\nimport { Dialog as MUIDialog, Box, useMediaQuery, Theme } from '@mui/material'\n\nconst Dialog = ({ open, onClose, children, type = 'success' }: DialogProps) => {\n const smDown = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'))\n\n return (\n \n \n \n onClose()}>\n \n \n \n \n {children}\n \n \n \n )\n}\n\nexport default Dialog\n","import { Box, Theme, Typography, useMediaQuery, useTheme } from '@mui/material'\nimport { Dialog, Button, IConfirmDialogProps } from 'components'\n\nconst ConfirmDialog = ({\n open,\n onClose,\n title,\n message,\n onClickConfirm,\n onClickCancel,\n confirmText = 'Yes',\n cancelText = 'No',\n}: IConfirmDialogProps) => {\n const smDown = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'))\n\n const theme = useTheme()\n return (\n \n \n {title && (\n \n {title}\n \n )}\n {message}\n \n onClickConfirm()}\n >\n {confirmText}\n \n onClickCancel()}\n color={theme.palette.mode === 'dark' ? 'cancel' : 'inherit'}\n >\n {cancelText}\n \n \n \n \n )\n}\nexport default ConfirmDialog\n","import { Box, Theme, Typography, useMediaQuery, useTheme } from '@mui/material'\nimport { Dialog, Button, INotificationDialogProps } from 'components'\nimport {\n ERROR_DIALOG,\n INFO_DIALOG,\n SUCCESS_DIALOG,\n WARNING_DIALOG,\n} from '../../../constants'\nimport { capitalizeFirstLetter } from 'utils/helpers'\n\nconst NotificationDialog = ({\n open,\n onClose,\n message,\n buttonText = 'Ok',\n type = '',\n customTitle = null,\n}: INotificationDialogProps) => {\n const theme = useTheme()\n\n const smDown = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'))\n\n const getTypeColor = () => {\n switch (type) {\n case 'success':\n return SUCCESS_DIALOG\n case 'error':\n return ERROR_DIALOG\n case 'warning':\n return WARNING_DIALOG\n case 'info':\n return INFO_DIALOG\n case 'welcome':\n return theme.palette.primary.main\n default:\n return ''\n }\n }\n\n return (\n \n \n {type && !customTitle && (\n \n {capitalizeFirstLetter(type)}\n \n )}\n {customTitle && (\n \n {customTitle.titleText}\n \n )}\n {message}\n \n onClose()}\n >\n {buttonText}\n \n \n \n \n )\n}\nexport default NotificationDialog\n","import React, { useState } from 'react'\nimport { Box, Typography, TextField } from '@mui/material'\nimport { Dialog, Button, IDeleteDialogProps } from 'components'\nimport { a } from 'react-spring'\n\nconst DeleteDialog = ({\n title,\n description,\n rule,\n onClickCancel,\n onClickConfirm,\n open,\n onClose,\n}: IDeleteDialogProps) => {\n const [confirm, setConfirm] = useState('')\n const [error, setError] = useState(false)\n\n const handleConfirm = () => {\n if (confirm === rule) {\n setError(false)\n onClickConfirm()\n setConfirm('')\n } else {\n setError(true)\n }\n }\n\n return (\n \n \n \n {title}\n \n\n \n {description}\n \n\n \n Write "{rule}" to confirm\n \n\n setConfirm(e.target.value)}\n type=\"text\"\n placeholder={`Write ${rule} to confirm`}\n error={error ? true : false}\n />\n\n \n \n onClickCancel()}\n color=\"cancel\"\n >\n Cancel\n \n \n \n \n )\n}\nexport default DeleteDialog\n","import { Box, Theme, useMediaQuery } from '@mui/material'\nimport styles from './SearchBar.module.css'\nimport { ISearchBarProps } from 'components'\nimport { DebounceInput } from 'react-debounce-input'\nimport { useSelector, RootStateOrAny } from 'react-redux'\n\nconst SearchBar = ({ placeholder, onSearch }: ISearchBarProps) => {\n const customizer = useSelector(\n (state: RootStateOrAny) => state.CustomizerReducer,\n )\n\n return (\n \n \n \n )\n}\nexport default SearchBar\n","import { CircularProgress, Typography } from '@mui/material'\n\ninterface ISpinnerProps {\n size?: number\n loadingText?: string | null\n}\n\nconst Spinner = ({ size = 80, loadingText = null }: ISpinnerProps) => {\n return (\n <>\n \n {loadingText && (\n \n {loadingText}...\n \n )}\n \n )\n}\n\nexport default Spinner\n","import { ITableProps } from 'components'\nimport { Table as MUITable, TableContainer, Card } from '@mui/material'\n\nimport { Spinner } from 'components/Spinner'\nconst Table = ({ children, loading }: ITableProps) => {\n return (\n <>\n {loading ? (\n \n \n \n ) : (\n <>\n \n \n {children}\n \n \n \n )}\n \n )\n}\nexport default Table\n","import {\n Box,\n Checkbox,\n TableHead as MUITableHead,\n TableRow,\n Tooltip,\n Typography,\n} from '@mui/material'\nimport { ITableHeadProps, TableCell } from 'components'\nimport { getUserRole } from 'utils/helpers'\n\nconst TableHead = ({ headers, handleSelectAll }: ITableHeadProps) => {\n const role = getUserRole()\n return (\n \n \n {headers.map((header) => (\n \n \n {header.label === 'Select' ? (\n \n \n \n ) : (\n <>{header.label}\n )}\n \n \n ))}\n \n \n )\n}\nexport default TableHead\n","import { TableBody as MUITableBody } from '@mui/material'\nimport { ITableBodyProps } from 'components'\n\nconst TableBody = ({ children }: ITableBodyProps) => {\n return {children}\n}\nexport default TableBody\n","import { TableRow as MUITableRow, TableRowProps, useTheme } from '@mui/material'\nimport { useState } from 'react'\nimport { parseHexToRGB } from 'utils/helpers'\n\ninterface ITableRowProps extends TableRowProps {}\n\nconst TableRow = ({ children, sx }: ITableRowProps) => {\n const [isHover, setIsHover] = useState(false)\n\n const theme = useTheme()\n\n return (\n setIsHover(true)}\n onMouseLeave={() => setIsHover(false)}\n >\n {children}\n \n )\n}\nexport default TableRow\n","import { TableCell as MUITableCell } from '@mui/material'\nimport { ITableCellProps } from 'components'\n\nconst TableCell = ({ children, colSpan }: ITableCellProps) => {\n return {children}\n}\nexport default TableCell\n","import { MouseEvent, ChangeEvent } from 'react'\nimport { ITablePaginationProps, TablePaginationStyles } from 'components'\nimport { TablePagination as MUITablePagination } from '@mui/material'\n\nconst TablePagination = ({\n totalItems,\n currentPage,\n setCurrentPage,\n itemsPerPage,\n setItemsPerPage,\n rowsPerPageOptions,\n}: ITablePaginationProps) => {\n const { SX } = TablePaginationStyles()\n\n const handleChangePage = (\n event: MouseEvent | null,\n newPage: number,\n ) => {\n setCurrentPage(newPage)\n }\n\n const handleChangeRowsPerPage = (\n event: ChangeEvent,\n ) => {\n setCurrentPage(0)\n setItemsPerPage(parseInt(event.target.value, 10))\n }\n\n return (\n \n )\n}\n\nexport default TablePagination\n","import { Theme, useMediaQuery } from '@mui/material'\nimport { ISx } from 'types'\n\nexport const TablePaginationStyles = (): { SX: ISx } => {\n const SM: boolean = useMediaQuery((theme: Theme) =>\n theme.breakpoints.down('sm'),\n )\n\n const SX: ISx = {\n PAGINATION: SM\n ? {\n '& .MuiToolbar-root': { padding: '0px' },\n '& .MuiInputBase-root': { marginRight: '10px' },\n }\n : {},\n }\n\n return { SX }\n}\n","import QRCode from 'qrcode'\n\nconst QRGenerator = () => {\n const onClickDownload = (fileName, fileData): void => {\n const link = document.createElement('a')\n link.href = fileData\n link.download = `${fileName}-QR.png`\n link.click()\n }\n\n const generateQRCode = (name, data): void => {\n QRCode.toDataURL(data).then((fileData) => {\n onClickDownload(name, fileData)\n })\n }\n\n const generateQRCodePDF = async (data): Promise => {\n return await QRCode.toDataURL(data)\n }\n\n return { generateQRCode, generateQRCodePDF }\n}\n\nexport default QRGenerator\n","import { Navigate } from 'react-router-dom'\nimport { IAuthenticatedProps } from 'components'\n\nconst Authenticated = ({ children }: IAuthenticatedProps) => {\n const USER_DATA = localStorage.getItem('currentUser')\n\n if (USER_DATA) {\n const isLoggedIn =\n JSON.parse(USER_DATA).challengeName !== 'NEW_PASSWORD_REQUIRED'\n\n return isLoggedIn ? children : \n }\n\n return \n}\nexport default Authenticated\n","import { Box, Typography, Avatar, Divider, Link } from '@mui/material'\nimport { MailOutlineOutlined, SettingsOutlined } from '@mui/icons-material'\nimport { NavLink } from 'react-router-dom'\nimport { parseRole } from 'utils/helpers'\nimport { ISession } from 'models/Session'\n\nconst ProfileDropdown = ({\n onClose,\n session,\n}: {\n onClose: () => void\n session: ISession\n}) => {\n return (\n <>\n {session.email && (\n \n \n \n \n \n {`${\n session.email.includes('helpdesk') && !session.name\n ? 'Helpdesk'\n : session.name || session.first_name\n }`}\n \n\n \n {parseRole(session.role)}\n \n\n \n theme.palette.grey.A200,\n mr: 1,\n }}\n >\n \n \n \n {session.email}\n \n \n \n \n \n \n {session?.role === 'admin' && (\n \n Settings\n \n )}\n \n \n )}\n \n )\n}\nexport default ProfileDropdown\n","import { Box } from '@mui/material'\nimport { ITabsProps, TabList, TabContext, TabPanel } from 'components'\n\nconst Tabs = ({ tabs, currentTab, handleChange }: ITabsProps) => {\n return (\n \n \n \n \n \n \n )\n}\nexport default Tabs\n","import { Tab } from '@mui/material'\nimport { TabList as MUITabList } from '@mui/lab'\nimport { ITabListProps } from 'components'\n\nconst TabList = ({ onChange, tabs }: ITabListProps) => {\n return (\n \n {tabs.map(\n (tab) =>\n (!tab.disabled || tab.showDisabled) && (\n \n ),\n )}\n \n )\n}\nexport default TabList\n","import { TabContext as MUITabContext } from '@mui/lab'\nimport { ITabContextProps } from 'components'\n\nconst TabContext = ({ value, children }: ITabContextProps) => {\n return {children}\n}\n\nexport default TabContext\n","import { TabPanel as MuiTabPanel } from '@mui/lab'\nimport { ITabPanelProps } from 'components'\n\nconst TabPanel = ({ tabs }: ITabPanelProps) => {\n return (\n <>\n {tabs.map((tab) => (\n \n {tab.children}\n \n ))}\n \n )\n}\n\nexport default TabPanel\n","import { CSSProperties, ReactElement, useState } from 'react'\nimport { Dialog } from '@mui/material'\nimport {\n LOGO_DISPLAY_WIDTH,\n IMAGE_DEFAULT_DISPLAY_WIDTH,\n LOGO_DISPLAY_HEIGHT,\n IMAGE_DEFAULT_DISPLAY_HEIGHT,\n} from '../../constants'\n\nexport interface IImageProps {\n src: string\n alt: string\n style?: CSSProperties\n isLogo?: boolean\n}\n\nconst Image = ({\n src,\n alt,\n style,\n isLogo = false,\n}: IImageProps): ReactElement => {\n const [open, setOpen] = useState(false)\n\n const getWidth = () => {\n const { width } = style || {}\n if (isLogo) {\n return style && width ? width : LOGO_DISPLAY_WIDTH\n } else {\n return style && width ? width : IMAGE_DEFAULT_DISPLAY_WIDTH\n }\n }\n\n const getHeight = () => {\n const { height } = style || {}\n if (isLogo) {\n return style && height ? height : LOGO_DISPLAY_HEIGHT\n } else {\n return style && height ? height : IMAGE_DEFAULT_DISPLAY_HEIGHT\n }\n }\n\n return (\n <>\n setOpen(false)}>\n \n \n \n alt !== 'bg' && setOpen(true)}\n />\n \n \n )\n}\n\nexport default Image\n","export const LOGO_DISPLAY_WIDTH = 136\nexport const LOGO_DISPLAY_HEIGHT = 85\nexport const IMAGE_DEFAULT_DISPLAY_WIDTH = 60\nexport const IMAGE_DEFAULT_DISPLAY_HEIGHT = 60\n","import { ReactElement } from 'react'\nimport { Page, Document, PDFDownloadLink } from '@react-pdf/renderer'\nimport { IPDFGeneratorProps } from 'components'\nimport { CircularProgress, Link } from '@mui/material'\n\nconst PDFGenerator = ({\n fileName,\n icon,\n pageSize,\n pageContent,\n}: IPDFGeneratorProps) => {\n const MyDocument: any = Document\n const MyPage: any = Page\n\n const PDF: ReactElement = (\n \n \n {pageContent}\n \n \n )\n\n return (\n \n \n {({ blob, url, loading, error }) => icon ?? 'Download now!'}\n \n \n )\n}\nexport default PDFGenerator\n","import JsBarcode from 'jsbarcode'\n\nconst BarcodeGenerator = () => {\n const onClickDownload = (fileName, fileData) => {\n const link = document.createElement('a')\n link.href = fileData\n link.download = `${fileName}-Barcode.png`\n link.click()\n }\n\n const generateBarcode = (name, data) => {\n const canvas = document.createElement('canvas')\n JsBarcode(canvas, data, {\n format: 'CODE128',\n lineColor: '#000000',\n width: 2,\n height: 100,\n displayValue: true,\n })\n const fileData = canvas.toDataURL('image/png')\n onClickDownload(name, fileData)\n }\n\n const generateBarcodeDataURL = async (data) => {\n const canvas = document.createElement('canvas')\n JsBarcode(canvas, data, {\n format: 'CODE128',\n lineColor: '#000000',\n width: 2,\n height: 100,\n displayValue: true,\n })\n return canvas.toDataURL('image/png')\n }\n\n return { generateBarcode, generateBarcodeDataURL }\n}\n\nexport default BarcodeGenerator\n","export const DATE_RANGES_OPTIONS = [\n {\n value: 'today',\n label: 'Today',\n },\n {\n value: 'this_week',\n label: 'This Week',\n },\n {\n value: 'this_month',\n label: 'This Month',\n },\n {\n value: 'this_quarter',\n label: 'This Quarter',\n },\n {\n value: 'this_year',\n label: 'This year',\n },\n {\n value: 'custom',\n label: 'Custom Range',\n },\n]\n\nexport const CRITERIAS_OPTIONS = [\n {\n value: 'locations',\n label: 'Locations',\n },\n {\n value: 'devices',\n label: 'Devices',\n },\n {\n value: 'users',\n label: 'Users',\n },\n {\n value: 'products',\n label: 'Products',\n },\n {\n value: 'transactions',\n label: 'Transactions',\n },\n {\n value: 'all',\n label: 'All',\n },\n]\n\nexport const CRITERIAS_METRICS = {\n locations: [\n 'doorHealth',\n 'reportedIssuesRate',\n 'occupancyRate',\n 'totalLocations',\n 'totalDoors',\n 'totalTransactions',\n 'transactionsPerLocker',\n ],\n devices: ['doorHealth', 'transactionsPerLocker', 'totalDoors'],\n users: ['totalUsers', 'newUserGrowth'],\n products: ['', ''],\n transactions: [\n 'earnings',\n 'newTransaction',\n 'transactionsPerLocker',\n 'totalTransactions',\n 'transactionTimeAverage',\n 'averageRevenuePerTransaction',\n ],\n all: [\n 'earnings',\n 'newUserGrowth',\n 'doorHealth',\n 'reportedIssuesRate',\n 'occupancyRate',\n 'newTransaction',\n 'transactionsPerLocker',\n 'totalTransactions',\n 'transactionTimeAverage',\n 'totalUsers',\n 'totalLocations',\n 'averageRevenuePerTransaction',\n 'totalDoors',\n ],\n}\n\nexport const TOP_USERS_HEADERS: {\n label: string\n align: any\n}[] = [\n { label: 'User', align: 'left' },\n { label: 'Location', align: 'center' },\n { label: 'Purchases', align: 'right' },\n]\n\nexport const TOP_LOCATIONS_HEADERS: {\n label: string\n align: any\n}[] = [\n { label: 'Location Name', align: 'left' },\n { label: 'Address', align: 'center' },\n { label: 'Transactions', align: 'right' },\n]\n\nexport const METRICS = [\n {\n label: 'Earnings',\n value: 'earnings',\n },\n {\n label: 'User Growth',\n value: 'user_growth',\n },\n {\n label: 'System Health',\n value: 'system_health',\n },\n {\n label: 'Issue Rate',\n value: 'issue_rate',\n },\n {\n label: 'Occupancy Rate',\n value: 'occupancy_rate',\n },\n {\n label: 'Transaction Rate',\n value: 'transaction_rate',\n },\n {\n label: 'Users',\n value: 'users',\n },\n {\n label: 'Top Users',\n value: 'top_users',\n },\n {\n label: 'Top Locations',\n value: 'top_locations',\n },\n]\n","import { Grid, useMediaQuery } from '@mui/material'\nimport { ToolbarControl } from 'types'\n\ninterface IToolbarControlsProps {\n controls: ToolbarControl[]\n}\n\nconst ToolbarControls = ({ controls }: IToolbarControlsProps) => {\n const query = useMediaQuery(`(max-width:900px)`)\n\n return (\n \n control.display &&\n (control.isMenu === undefined || !control.isMenu),\n ).length === 1\n ? '120px'\n : '200px'\n }, 1fr))`,\n }}\n >\n {controls.map((control) => control.display && control.render)}\n \n )\n}\n\nexport default ToolbarControls\n","import { useState } from 'react'\n\nconst useLoadingState = (initialValue: boolean = false) => {\n const [loading, setLoading] = useState(initialValue)\n\n return {\n loading,\n setLoading,\n }\n}\n\nexport default useLoadingState\n","import { ILocation } from 'models'\nimport { useEffect, useState } from 'react'\nimport useLoadingState from './useLoadingState'\nimport { locationApi } from 'resources'\nimport { DropdownOption } from 'types'\n\nconst useLocations = () => {\n const [locations, setLocations] = useState([])\n const [locationsOptions, setLocationsOptions] = useState([])\n\n const { getMany: getLocations } = locationApi()\n const { loading: loadingLocations, setLoading: setLoadingLocations } =\n useLoadingState()\n\n const fetchLocations = async (\n searchTerm: string = '',\n id?: string,\n ): Promise => {\n try {\n setLoadingLocations(true)\n const locations = await getLocations(1, 10000, searchTerm, id)\n if (locations?.items) {\n setLocations(locations.items)\n } else {\n setLocations([locations])\n }\n } catch (error) {\n // displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoadingLocations(false)\n }\n }\n\n const buildLocationsOptions = () => {\n if (locations.length > 0) {\n const autoCompleteOptions = locations\n .map((location) => ({\n label: location.name,\n value: location.id,\n }))\n .sort((a, b) => (a.label < b.label ? -1 : a.label > b.label ? 1 : 0))\n return autoCompleteOptions\n }\n return []\n }\n\n useEffect(() => {\n setLocationsOptions(buildLocationsOptions())\n }, [locations])\n\n useEffect(() => {\n fetchLocations()\n }, [])\n\n return {\n locations,\n loadingLocations,\n locationsOptions,\n setLocations,\n setLoadingLocations,\n fetchLocations,\n }\n}\n\nexport default useLocations\n","import {\n Autocomplete,\n FormControl,\n InputLabel,\n MenuItem,\n Select,\n SelectChangeEvent,\n TextField,\n useTheme,\n} from '@mui/material'\nimport { Button } from 'components'\nimport { DATE_RANGES_OPTIONS } from '../constants'\nimport { useMemo } from 'react'\nimport { Toolbar } from 'components/Toolbar'\nimport ToolbarControls from 'components/Toolbar/components/ToolbarControls'\nimport { DropdownOption, ToolbarControl } from 'types'\nimport useLocations from 'hooks/useLocations'\n\ninterface IDashboardFilters {\n selectedRange: string\n setOpenCustomDateRangeSelector: React.Dispatch>\n handleSelectDateRange: (event: SelectChangeEvent) => void\n subOrgs: any[]\n selectedSubOrg: string | undefined\n setSelectedLocation: React.Dispatch>\n setSelectedSubOrg: React.Dispatch>\n}\n\nconst DashboardFilters = ({\n selectedRange,\n setOpenCustomDateRangeSelector,\n handleSelectDateRange,\n subOrgs,\n selectedSubOrg,\n setSelectedLocation,\n setSelectedSubOrg,\n}: IDashboardFilters) => {\n const theme = useTheme()\n\n const { locations, fetchLocations, loadingLocations } = useLocations()\n\n const filteredLocations = useMemo(\n () =>\n !selectedSubOrg\n ? locations.map((location) => ({\n value: location.id,\n label: location.name,\n }))\n : locations\n .filter((location) => location.id_org === selectedSubOrg)\n .map((location) => ({\n value: location.id,\n label: location.name,\n })),\n [locations, selectedSubOrg],\n )\n\n const organizationOptions = useMemo(\n () => [\n ...subOrgs.map((org) => ({\n id: org.id,\n label: org.name,\n })),\n ],\n [subOrgs],\n )\n\n const handleSelectLocation = (\n event: React.SyntheticEvent,\n value: DropdownOption | null,\n ) => {\n setSelectedLocation(value ? value.value : 'all')\n }\n\n const handleSelectOrganization = (\n event: React.SyntheticEvent,\n value: {\n id: string\n label: string\n } | null,\n ) => {\n const org = subOrgs.find((o) => o.id === value?.id)\n if (!org) {\n // Get information from the main organization if the user\n // clears out the target selector\n setSelectedSubOrg(undefined)\n } else {\n setSelectedSubOrg(org.id)\n }\n }\n\n const controls: ToolbarControl[] = [\n {\n display: selectedRange === 'custom',\n render: (\n setOpenCustomDateRangeSelector(true)}\n >\n Select Dates\n \n ),\n },\n {\n display: true,\n render: (\n \n Date Range\n \n {DATE_RANGES_OPTIONS.map((option) => (\n \n {option.label}\n \n ))}\n \n \n ),\n },\n {\n display: true,\n render: (\n (\n \n )}\n onChange={handleSelectOrganization}\n size=\"small\"\n />\n ),\n },\n {\n display: true,\n render: (\n (\n \n )}\n onChange={handleSelectLocation}\n size=\"small\"\n disabled={loadingLocations}\n />\n ),\n },\n ]\n\n return (\n \n control.display && (control.isMenu === undefined || !control.isMenu),\n )}\n >\n control.display)}\n />\n \n )\n}\n\nexport default DashboardFilters\n","import React, { useRef, useEffect, useState } from 'react'\nimport { Card, CardContent, Box, Typography, Skeleton } from '@mui/material'\nimport { Button, Image, NotificationDialog } from 'components'\nimport { API_URL } from '../../../constants'\nimport { reportApi, settingsApi } from '../../../resources'\nimport { CSVLink } from 'react-csv'\nimport useDialog from 'hooks/useDialog'\n\nconst WelcomeCard = () => {\n const ORG_DATA: string | null = localStorage.getItem('currentOrg')\n const ORG_NAME: string = ORG_DATA ? JSON.parse(ORG_DATA).name : undefined\n const CURRENT_USER: string | null = localStorage.getItem('currentUser')\n\n const { getReports } = reportApi()\n\n type UserType = {\n user: {\n id: string\n created_at: string\n name: string\n email: string\n phone_number: string\n active: boolean\n }\n location: string\n purchases: number\n }\n\n type LocationType = {\n location: {\n id: string\n name: string\n address: string\n }\n count: number\n }\n\n type MonthlyData = {\n month: number\n count: number\n }\n\n type ReportType = {\n earnings: {\n earnings: number\n currency: string\n }\n users: {\n total: number\n data: MonthlyData[]\n }\n transactions: {\n total: number\n data: MonthlyData[]\n }\n top_users: UserType[]\n top_locations: LocationType[]\n }\n\n const [data, setData] = useState([])\n\n const TOKEN: string = CURRENT_USER\n ? JSON.parse(CURRENT_USER).signInUserSession?.idToken?.jwtToken\n : undefined\n\n const fileInput = useRef(null)\n\n const [whitelabelData, setWhitelabelData] = React.useState({\n logo: null,\n })\n\n const [loading, setLoading] = useState(true)\n\n const { getWhiteLabel } = settingsApi()\n const { dialog, displayMessage, closeDialog } = useDialog()\n\n const handleFileInputChange = async (event) => {\n const selectedFile = event.target.files[0]\n\n const isImage = /^image\\//.test(selectedFile.type)\n\n if (!isImage) {\n displayMessage('Only images are allowed')\n return\n }\n\n const formData = new FormData()\n formData.append('image', selectedFile)\n\n const whiteLabelData = await fetch(API_URL + 'white-label/logo', {\n method: 'PATCH',\n body: formData,\n headers: {\n Authorization: `Bearer ${TOKEN}`,\n },\n })\n .then((res) => res.json())\n .catch(console.error)\n\n setWhitelabelData({\n logo: whiteLabelData.app_logo,\n })\n }\n\n const parseJSONToCSVFormat = (json: ReportType) => {\n const parsedData = [\n {\n earnings_earnings: json.earnings.earnings,\n earnings_currency: json.earnings.currency,\n users_total: json.users.total,\n users_month_1: json.users.data[0]?.month || '',\n users_count_1: json.users.data[0]?.count || '',\n users_month_2: json.users.data[1]?.month || '',\n users_count_2: json.users.data[1]?.count || '',\n transactions_total: json.transactions.total,\n transactions_month_1: json.transactions.data[0]?.month || '',\n transactions_count_1: json.transactions.data[0]?.count || '',\n top_users_User_id: json.top_users[0]?.user.id || '',\n top_users_User_created_at: json.top_users[0]?.user.created_at || '',\n top_users_User_name: json.top_users[0]?.user.name || '',\n top_users_User_email: json.top_users[0]?.user.email || '',\n top_users_User_phone_number: json.top_users[0]?.user.phone_number || '',\n top_users_User_active: json.top_users[0]?.user.active || '',\n top_users_location: json.top_users[0]?.location || '',\n top_users_purchases: json.top_users[0]?.purchases || '',\n top_locations_Location_id: json.top_locations[0]?.location.id || '',\n top_locations_Location_name: json.top_locations[0]?.location.name || '',\n top_locations_Location_address:\n json.top_locations[0]?.location.address || '',\n top_locations_count: json.top_locations[0]?.count || '',\n },\n ]\n setData(parsedData)\n }\n\n const HEADERS = [\n { label: 'earnings_earnings', key: 'earnings_earnings' },\n { label: 'earnings_currency', key: 'earnings_currency' },\n { label: 'users_total', key: 'users_total' },\n { label: 'users_month_1', key: 'users_month_1' },\n { label: 'users_count_1', key: 'users_count_1' },\n { label: 'users_month_2', key: 'users_month_2' },\n { label: 'users_count_2', key: 'users_count_2' },\n { label: 'transactions_total', key: 'transactions_total' },\n { label: 'transactions_month_1', key: 'transactions_month_1' },\n { label: 'transactions_count_1', key: 'transactions_count_1' },\n { label: 'top_users_User_id', key: 'top_users_User_id' },\n { label: 'top_users_User_created_at', key: 'top_users_User_created_at' },\n { label: 'top_users_User_name', key: 'top_users_User_name' },\n { label: 'top_users_User_email', key: 'top_users_User_email' },\n {\n label: 'top_users_User_phone_number',\n key: 'top_users_User_phone_number',\n },\n ]\n\n useEffect(() => {\n const fetchData = async () => {\n try {\n const whiteLabelData = await getWhiteLabel()\n setWhitelabelData({\n logo: whiteLabelData?.app_logo,\n })\n const reportsData = await getReports()\n parseJSONToCSVFormat(reportsData)\n setLoading(false)\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n fetchData()\n }, [])\n\n return (\n \n `${theme.palette.mode === 'dark' ? '#32363e' : ''}`,\n borderWidth: '0px',\n height: '200px',\n }}\n >\n \n \n \n \n \n {!loading ? (\n <>\n Hey {ORG_NAME}
\n \n ) : (\n \n )}\n {!loading ? (\n <>Download Latest Report\n ) : (\n \n )}\n \n {!loading ? (\n \n \n \n ) : (\n \n )}\n
\n \n {!whitelabelData.logo && (\n \n )}\n {whitelabelData.logo && (\n \"logo\"\n )}\n
\n \n
\n \n \n )\n}\n\nexport default WelcomeCard\n","import { Add, Remove } from '@mui/icons-material'\nimport {\n Card,\n CardContent,\n Typography,\n Box,\n Skeleton,\n FormControl,\n InputLabel,\n Select,\n MenuItem,\n SelectChangeEvent,\n useTheme,\n} from '@mui/material'\nimport { IconButton } from 'components'\nimport { IMetric } from 'models/Analytics'\nimport { useEffect } from 'react'\nimport { DropdownOption } from 'types'\nimport { getCookie } from 'utils/helpers'\n\nexport interface IMetricCard {\n metric: IMetric | null\n id: number\n buildMetricObject: (id: number, metric: string) => Promise\n metricsOptions: DropdownOption[]\n setCurrentFetchingMetric: React.Dispatch>\n loading: boolean\n}\n\nconst MetricCard = ({\n metric,\n id,\n index,\n cardsLength,\n buildMetricObject,\n metricsOptions,\n setCurrentFetchingMetric,\n loading,\n addNewMetricCard,\n removeNewMetricCard,\n}: IMetricCard & {\n addNewMetricCard(): void\n removeNewMetricCard(id: number): void\n index: number\n cardsLength: number\n}) => {\n const theme = useTheme()\n\n const handleSelectMetric = async (\n event: SelectChangeEvent,\n id: number,\n ) => {\n const { value } = event.target\n // Set cookie to save the selected metric by id\n const expirationDate = new Date(\n 'Fri, 31 Dec 9999 23:59:59 GMT',\n ).toUTCString()\n\n if (value) {\n document.cookie = `metric_${id}=${value}; metrics_length=${cardsLength}; expires=${expirationDate}; path=/`\n document.cookie = `metrics_length=${cardsLength}; expires=${expirationDate}; path=/`\n }\n\n setCurrentFetchingMetric(value)\n await buildMetricObject(id, value)\n }\n\n useEffect(() => {\n const fetchSavedMetrics = async () => {\n const metricCookie = getCookie(`metric_${id}`)\n\n if (metricCookie) {\n await buildMetricObject(id, metricCookie)\n }\n }\n\n // If no metric is loaded, fetch the saved metric\n if (!metric) {\n fetchSavedMetrics()\n }\n }, [metric, id, buildMetricObject])\n\n const shouldShowAdd = cardsLength < 10 && index === cardsLength - 1\n\n return (\n \n \n {shouldShowAdd && (\n \n \n \n )}\n\n {index > 4 && (\n removeNewMetricCard(id)}\n >\n \n \n )}\n \n Select Metric\n ) =>\n handleSelectMetric(event, id)\n }\n inputProps={{\n MenuProps: {\n PaperProps: {\n sx: {\n backgroundImage: 'none',\n boxShadow: 3,\n backgroundColor:\n theme.palette.mode === 'dark' ? '#2A2E34' : '#f7f7f7',\n },\n },\n },\n }}\n >\n {metricsOptions?.map((option) => (\n \n {option.label}\n \n ))}\n \n \n \n \n {loading ? (\n \n ) : (\n metric?.icon\n )}\n \n {loading ? (\n \n ) : (\n metric?.title\n )}\n \n \n \n {loading ? : metric?.value}\n \n \n {loading ? : metric?.legend || ''}\n \n \n \n \n )\n}\n\nexport default MetricCard\n","import {\n Box,\n Card,\n CardContent,\n CardHeader,\n Table,\n TableCell,\n TableHead,\n TableRow,\n Typography,\n} from '@mui/material'\nimport { TableBody } from 'components'\nimport useDialog from 'hooks/useDialog'\nimport { useEffect, useState } from 'react'\nimport { reportApi } from 'resources'\nimport { TOP_USERS_HEADERS } from '../constants'\nimport { ITopUsers } from 'models/Analytics'\nimport { RootStateOrAny, useSelector } from 'react-redux'\nimport { parseCurrency } from 'utils/helpers'\n\ninterface ITopUsersProps {\n targetOrg: string | undefined\n}\n\nconst TopUsers = ({ targetOrg }: ITopUsersProps) => {\n const { getTopUsers } = reportApi()\n\n const { dialog, displayMessage, closeDialog } = useDialog()\n\n const [topUsers, setTopUsers] = useState([])\n\n const currency = useSelector(\n (state: RootStateOrAny) => state.currencyReducer.currency,\n )\n\n const fetchTopUsers = async () => {\n try {\n const topUsers = await getTopUsers(targetOrg)\n if (topUsers.length === 0) {\n setTopUsers([])\n } else {\n setTopUsers(topUsers.map((item) => ({ ...item, user: item.user })))\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`)\n }\n }\n\n useEffect(() => {\n fetchTopUsers()\n }, [targetOrg])\n\n return (\n \n \n Top Users\n \n }\n />\n \n \n \n \n \n {TOP_USERS_HEADERS.map((header) => (\n \n \n {header.label}\n \n \n ))}\n \n \n \n {topUsers.length > 0 &&\n topUsers.map((row) => (\n \n \n \n {row.user.name}\n {row.user.email}\n \n \n \n \n {row.location}\n \n \n \n \n {row.purchases} {parseCurrency(currency)}\n \n \n \n ))}\n {topUsers.length === 0 && (\n \n No data to show\n \n )}\n \n \n \n \n \n )\n}\n\nexport default TopUsers\n","import { Tooltip, Typography } from '@mui/material'\n\ninterface ISummarizedTextProps {\n text: string\n charLimit?: number\n fontSize?: string | number\n}\n\nconst SummarizedText = ({\n text,\n fontSize = 'inherit',\n charLimit = 25,\n}: ISummarizedTextProps) => {\n return (\n \n \n {text.length > charLimit ? `${text.substring(0, charLimit)}...` : text}\n \n \n )\n}\n\nexport default SummarizedText\n","import {\n Box,\n Card,\n CardContent,\n CardHeader,\n Table,\n TableCell,\n TableHead,\n TableRow,\n Typography,\n} from '@mui/material'\nimport { TableBody } from 'components'\nimport useDialog from 'hooks/useDialog'\nimport { ITopLocations } from 'models/Analytics'\nimport { useEffect, useState } from 'react'\nimport { reportApi } from 'resources'\nimport { TOP_LOCATIONS_HEADERS } from '../constants'\nimport { SummarizedText } from 'components/SummarizedText'\n\ninterface ITopLocationsProps {\n targetOrg: string | undefined\n}\n\nconst TopLocations = ({ targetOrg }: ITopLocationsProps) => {\n const { getLocations } = reportApi()\n\n const { dialog, displayMessage, closeDialog } = useDialog()\n\n const [topLocations, setTopLocations] = useState([])\n\n const fetchTopLocations = async () => {\n try {\n const topLocations = await getLocations(targetOrg)\n if (topLocations.length === 0) {\n setTopLocations([])\n } else {\n setTopLocations(\n topLocations.map((item) => ({ ...item, location: item.location })),\n )\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`)\n }\n }\n\n useEffect(() => {\n fetchTopLocations()\n }, [targetOrg])\n\n return (\n \n \n Top Locations\n \n }\n />\n \n \n \n \n \n {TOP_LOCATIONS_HEADERS.map((header) => (\n \n \n {header.label}\n \n \n ))}\n \n \n \n {topLocations.length > 0 &&\n topLocations.map((row) => (\n \n \n \n {row.location.name}\n \n \n \n \n \n \n \n \n \n {row.count}\n \n \n \n ))}\n {topLocations.length === 0 && (\n \n No data to show\n \n )}\n \n \n \n \n \n )\n}\n\nexport default TopLocations\n","import { Grid, Theme, useMediaQuery } from '@mui/material'\nimport WelcomeCard from './WelcomeCard'\nimport MetricCard, { IMetricCard } from './MetricCard'\nimport TopUsers from './TopUsers'\nimport TopLocations from './TopLocations'\nimport { DropdownOption } from 'types'\n\ninterface IDashboardContent {\n visibleMetrics: IMetricCard[]\n buildMetricObject: (id: number, metric: string) => Promise\n addNewMetricCard(): void\n removeNewMetricCard(id: number): void\n metricOptions: DropdownOption[]\n loading: boolean\n currentFetchingMetric: string\n setCurrentFetchingMetric: React.Dispatch>\n targetOrg: string | undefined\n}\n\nconst DashboardContent = ({\n visibleMetrics,\n buildMetricObject,\n metricOptions,\n loading,\n currentFetchingMetric,\n setCurrentFetchingMetric,\n targetOrg,\n addNewMetricCard,\n removeNewMetricCard,\n}: IDashboardContent) => {\n const smDown = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'))\n\n return (\n <>\n \n \n {visibleMetrics.map((metric, index) => (\n \n ))}\n \n \n \n \n \n \n )\n}\n\nexport default DashboardContent\n","import { SelectChangeEvent } from '@mui/material'\nimport { useEffect, useMemo, useState } from 'react'\nimport { organizationApi, reportApi } from 'resources'\nimport { IMetricCard } from './components/MetricCard'\nimport SensorDoorIcon from '@mui/icons-material/SensorDoor'\nimport PersonAddIcon from '@mui/icons-material/PersonAdd'\nimport WarningAmberIcon from '@mui/icons-material/WarningAmber'\nimport PieChartIcon from '@mui/icons-material/PieChart'\nimport SyncAltIcon from '@mui/icons-material/SyncAlt'\nimport PeopleIcon from '@mui/icons-material/People'\nimport PlaceIcon from '@mui/icons-material/Place'\nimport MoneyIcon from '@mui/icons-material/Money'\nimport AccessTimeIcon from '@mui/icons-material/AccessTime'\nimport {\n IAnalyticsFilters,\n IAverageRevenuePerTransaction,\n IDoorHealth,\n IEarnings,\n INewUserGrowth,\n IOccupancyRate,\n IReportedIssueRate,\n ITotalDoors,\n ITotalLocations,\n ITotalTransactions,\n ITransactionRate,\n ITransactionsPerLocker,\n} from 'models/Analytics'\nimport useDialog from 'hooks/useDialog'\nimport CustomDateRange from './components/CustomDateRange'\nimport {\n parseAverageRevenuePerTransactionValue,\n parseDoorHealthValue,\n parseEarningsValue,\n parseNewTransactionsValue,\n parseNewUserGrowthValue,\n parseOccupancyRateValue,\n parseOptionToDateRange,\n parseOptionToInterval,\n parseReportedIssuesRateValue,\n parseTotalDoorsValue,\n parseTotalLocationsValue,\n parseTotalTransactionsValue,\n parseTotalUsersValue,\n parseTransactionPerLockerValue,\n parseTransactionTimeAverageValue,\n} from './helper'\nimport DashboardFilters from './components/DashboardFilters'\nimport DashboardContent from './components/DashboardContent'\nimport { NotificationDialog } from 'components'\nimport { getCookie } from 'utils/helpers'\n\nconst defaultFilters: IAnalyticsFilters = {\n from: null,\n to: null,\n}\n\nconst createMetricObject = (i: number) =>\n ({\n metric: null,\n id: i,\n buildMetricObject: async () => {},\n metricsOptions: [],\n loading: false,\n setCurrentFetchingMetric: () => {},\n } as IMetricCard)\n\nconst Dashboard = () => {\n const [visibleMetrics, setVisibleMetrics] = useState(() => {\n return Array.from(\n { length: Number(getCookie('metrics_length')) || 5 },\n (_, i) => createMetricObject(i),\n )\n })\n const [subOrgs, setSubOrgs] = useState([])\n const [filters, setFilters] = useState(defaultFilters)\n const [loading, setLoading] = useState(false)\n const [openCustomDateRangeSelector, setOpenCustomDateRangeSelector] =\n useState(false)\n const [selectedRange, setSelectedRange] = useState('this_week')\n const [selectedSubOrg, setSelectedSubOrg] = useState()\n const [selectedLocation, setSelectedLocation] = useState('all')\n const [currentFetchingMetric, setCurrentFetchingMetric] = useState('')\n const { dialog, displayMessage, closeDialog } = useDialog()\n const {\n getEarnings,\n getUserGrowth,\n getDoorHealth,\n getIssueRate,\n getOccupancyRate,\n getNewTransactionRate,\n getTransactionsPerLocker,\n getTotalTransactions,\n getTransactionTimeAverage,\n getTotalUsers,\n getTotalLocations,\n getAverageRevenuePerTransaction,\n getTotalDoors,\n } = reportApi()\n const { getOrgs } = organizationApi()\n\n const metricsData = [\n {\n icon: ,\n title: 'Earnings',\n legend: 'Revenue',\n accesor: 'earnings',\n parseFunction: (response: any) =>\n parseEarningsValue(response as IEarnings),\n fetchFunction: () => getEarnings(selectedSubOrg),\n },\n {\n icon: ,\n title: 'New User Growth',\n accesor: 'newUserGrowth',\n parseFunction: (response: any) =>\n parseNewUserGrowthValue(response as INewUserGrowth),\n fetchFunction: () =>\n getUserGrowth(parseOptionToInterval(selectedRange), selectedSubOrg),\n },\n {\n icon: ,\n title: 'Door Health',\n accesor: 'doorHealth',\n parseFunction: (response: any) =>\n parseDoorHealthValue(response as IDoorHealth[], selectedLocation),\n fetchFunction: () => getDoorHealth(selectedSubOrg),\n },\n {\n icon: ,\n title: 'Reported Issues Rate',\n accesor: 'reportedIssuesRate',\n parseFunction: (response: any) =>\n parseReportedIssuesRateValue(response as IReportedIssueRate),\n fetchFunction: () =>\n getIssueRate(\n filters.from || undefined,\n filters.to || undefined,\n selectedLocation !== 'all' ? [selectedLocation] : undefined,\n selectedSubOrg,\n ),\n },\n {\n icon: ,\n title: 'Occupancy Rate',\n accesor: 'occupancyRate',\n parseFunction: (response: any) =>\n parseOccupancyRateValue(response as IOccupancyRate[], selectedLocation),\n fetchFunction: () =>\n getOccupancyRate(\n filters.from || undefined,\n filters.to || undefined,\n selectedSubOrg,\n ),\n },\n {\n icon: ,\n title: 'New Transactions',\n accesor: 'newTransaction',\n parseFunction: (response: any) =>\n parseNewTransactionsValue(response as ITransactionRate),\n fetchFunction: () =>\n getNewTransactionRate(\n filters.from || undefined,\n filters.to || undefined,\n selectedSubOrg,\n ),\n },\n {\n icon: ,\n title: 'Transaction Per Locker',\n accesor: 'transactionsPerLocker',\n parseFunction: (response: any) =>\n parseTransactionPerLockerValue(response as ITransactionsPerLocker),\n fetchFunction: () =>\n getTransactionsPerLocker(\n selectedLocation !== 'all' ? selectedLocation : undefined,\n filters.from || undefined,\n filters.to || undefined,\n selectedSubOrg,\n ),\n },\n {\n icon: ,\n title: 'Total Transactions',\n accesor: 'totalTransactions',\n parseFunction: (response: any) =>\n parseTotalTransactionsValue(response as ITotalTransactions),\n fetchFunction: () =>\n getTotalTransactions(\n selectedLocation !== 'all' ? selectedLocation : undefined,\n undefined,\n selectedSubOrg,\n ),\n },\n {\n icon: ,\n title: 'Average Transaction Time',\n accesor: 'transactionTimeAverage',\n parseFunction: (response: any) =>\n parseTransactionTimeAverageValue(response as number),\n fetchFunction: () =>\n getTransactionTimeAverage(\n filters.from || undefined,\n filters.to || undefined,\n selectedSubOrg,\n ),\n },\n {\n icon: ,\n title: 'Active users in transaction',\n accesor: 'totalUsers',\n parseFunction: (response: any) =>\n parseTotalUsersValue(response as number),\n fetchFunction: () => getTotalUsers(selectedSubOrg),\n },\n {\n icon: ,\n title: 'Total Locations',\n accesor: 'totalLocations',\n parseFunction: (response: any) =>\n parseTotalLocationsValue(response as ITotalLocations),\n fetchFunction: () => getTotalLocations(selectedSubOrg),\n },\n {\n icon: ,\n title: 'Average Revenue Per Transaction',\n accesor: 'averageRevenuePerTransaction',\n parseFunction: (response: any) =>\n parseAverageRevenuePerTransactionValue(\n response as IAverageRevenuePerTransaction,\n ),\n fetchFunction: () => getAverageRevenuePerTransaction(selectedSubOrg),\n },\n {\n icon: ,\n title: 'Total Doors',\n accesor: 'totalDoors',\n parseFunction: (response: any) =>\n parseTotalDoorsValue(response as ITotalDoors, selectedLocation),\n fetchFunction: () =>\n getTotalDoors(\n selectedLocation !== 'all' ? selectedLocation : undefined,\n selectedSubOrg,\n ),\n },\n ]\n\n const metricOptions = useMemo(\n () => metricsData.map((m) => ({ value: m.accesor, label: m.title })),\n [metricsData],\n )\n\n const buildMetricObject = async (id: number, metricKey: string) => {\n try {\n const metricDef = metricsData.find((m) => m.accesor === metricKey)\n if (!metricDef) return null\n\n const responseonse = await metricDef.fetchFunction()\n return {\n metric: metricDef.accesor,\n value: metricDef.parseFunction(responseonse),\n title: metricDef.title,\n icon: metricDef.icon,\n legend: metricDef.legend,\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n return null\n }\n }\n\n const refreshMetrics = async () => {\n const toFetch = visibleMetrics.filter((m) => m.metric?.metric)\n\n if (toFetch.length === 0) return\n\n setLoading(true)\n try {\n const results = await Promise.all(\n toFetch.map(async (slot) => {\n const newMetricData = await buildMetricObject(\n slot.id,\n slot.metric!.metric,\n )\n return { slotId: slot.id, data: newMetricData }\n }),\n )\n\n const newVisible = visibleMetrics.map((old) => {\n const found = results.find((r) => r.slotId === old.id)\n if (found?.data) {\n return {\n ...old,\n metric: found.data,\n }\n }\n return old\n })\n\n setVisibleMetrics(newVisible)\n } finally {\n setLoading(false)\n setCurrentFetchingMetric('')\n }\n }\n\n const fetchSubOrgs = async () => {\n try {\n const subOrgs = await getOrgs(1, 1000)\n setSubOrgs(subOrgs.items)\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n useEffect(() => {\n fetchSubOrgs()\n }, [])\n\n useEffect(() => {\n if (selectedRange === 'custom') {\n return\n }\n\n const newFrom = parseOptionToDateRange(selectedRange)\n const newTo = new Date()\n\n setFilters((prev) => {\n const sameFrom = prev.from?.getTime?.() === newFrom?.getTime?.()\n const sameTo = prev.to?.getTime?.() === newTo.getTime()\n if (sameFrom && sameTo) {\n return prev\n }\n return { from: newFrom, to: newTo }\n })\n }, [selectedRange])\n\n useEffect(() => {\n refreshMetrics()\n }, [selectedLocation, filters, selectedSubOrg])\n\n const handleCloseCustomDateDialog = () => {\n setOpenCustomDateRangeSelector(false)\n }\n\n const handleSelectDateRange = (event: SelectChangeEvent) => {\n setSelectedRange(event.target.value)\n }\n\n const addNewMetricCard = () => {\n setVisibleMetrics((prev) => [...prev, createMetricObject(prev.length)])\n }\n\n const removeNewMetricCard = (id: number) => {\n setVisibleMetrics((prev) => prev.filter((m) => m.id !== id))\n }\n\n return (\n <>\n \n {\n setCurrentFetchingMetric(key)\n setLoading(true)\n try {\n const newMetricData = await buildMetricObject(id, key)\n setVisibleMetrics((prev) =>\n prev.map((m) =>\n m.id === id\n ? {\n ...m,\n metric: newMetricData || m.metric,\n }\n : m,\n ),\n )\n } finally {\n setLoading(false)\n setCurrentFetchingMetric('')\n }\n }}\n addNewMetricCard={addNewMetricCard}\n removeNewMetricCard={removeNewMetricCard}\n metricOptions={metricOptions}\n loading={loading}\n currentFetchingMetric={currentFetchingMetric}\n setCurrentFetchingMetric={setCurrentFetchingMetric}\n targetOrg={selectedSubOrg}\n />\n \n \n \n )\n}\nexport default Dashboard\n","import TableCell from '@mui/material/TableCell'\nimport TableHead from '@mui/material/TableHead'\nimport TableRow from '@mui/material/TableRow'\nimport TableSortLabel from '@mui/material/TableSortLabel'\nimport Typography from '@mui/material/Typography'\nimport { Box, Checkbox, Link, Tooltip } from '@mui/material'\nimport ArrowDropUpRoundedIcon from '@mui/icons-material/ArrowDropUpRounded'\nimport ArrowDropDownRoundedIcon from '@mui/icons-material/ArrowDropDownRounded'\nimport { getUserRole } from 'utils/helpers'\n\nexport type Order = 'asc' | 'desc' | 'default'\n\nexport interface ISortableHeader {\n value: string\n label: string\n sortable: boolean\n active: boolean\n}\n\nexport interface ISortableTableHead {\n onRequestSort: (event: React.MouseEvent, property: string) => void\n order: Order | false\n orderBy: string\n headers: ISortableHeader[]\n handleSelectAll: (event: React.ChangeEvent, checked: boolean) => void\n}\n\nconst SortableTableHead = ({\n order,\n orderBy,\n onRequestSort,\n headers,\n handleSelectAll,\n}: ISortableTableHead) => {\n const role = getUserRole()\n\n const createSortHandler =\n (property: string) => (event: React.MouseEvent) => {\n onRequestSort(event, property)\n }\n\n return (\n \n \n {headers?.map((header) => (\n \n {header.sortable ? (\n (\n \n )}\n >\n \n {header.label}\n \n \n ) : (\n \n {header.label === 'Select' ? (\n \n \n \n ) : (\n <>{header.label}\n )}\n \n )}\n \n ))}\n \n \n )\n}\n\n//TODO: export this into a SFC if it grows too long, by now this should suffice though.\nconst SortIcon: React.FC<{\n order: Order | false\n isActive: boolean\n}> = ({ order, isActive }) => {\n return (\n \n \n \n \n )\n}\n\nexport default SortableTableHead\n","import { ISortableHeader } from 'components/Table/components/TableHead/SortableTableHead'\nimport { ORG_FILTERS_IDENTFIER } from '../constants'\nimport { useState } from 'react'\nimport { settingsApi } from 'resources'\n\ninterface IUseColumnFiltering {\n displayMessage: (message: string | JSX.Element) => void\n}\n\nconst useColumnFiltering = ({ displayMessage }: IUseColumnFiltering) => {\n const [filteredColumns, setFilteredColumns] = useState([])\n const { getFilters } = settingsApi()\n\n const getDefaultFilters = async (): Promise => {\n try {\n const defaultFilters = await getFilters(\n ORG_FILTERS_IDENTFIER[location.pathname],\n )\n setFilteredColumns(defaultFilters)\n } catch (error) {\n displayMessage(`${(error as Error).message}`)\n }\n }\n return {\n filteredColumns,\n setFilteredColumns,\n getDefaultFilters,\n }\n}\n\nexport default useColumnFiltering\n","import { Order } from 'components/Table/components/TableHead/SortableTableHead'\nimport {\n IDevice,\n IGroup,\n IIssue,\n ILocation,\n IMember,\n ISubscription,\n IPrice,\n IPromo,\n ISize,\n ITransaction,\n IUser,\n} from 'models'\nimport { ICondition } from 'models/Condition'\nimport { IProduct } from 'models/Product'\nimport { IProductGroup } from 'models/ProductGroup'\nimport { IReport } from 'models/Report'\nimport { IReservation } from 'models/Reservations'\nimport React, { useState } from 'react'\nimport { INotification } from 'types'\n\nexport type NestedProperty = {\n columnValue: string\n path: string\n defaultValue: string | number // fallback value in case of unexisting prop\n}\n\ntype Entity =\n | IDevice\n | ILocation\n | IPromo\n | IPrice\n | ISubscription\n | ISize\n | ITransaction\n | IReservation\n | IUser\n | IMember\n | IGroup\n | IIssue\n | IProduct\n | IProductGroup\n | ICondition\n | IReport\n | INotification\n\ninterface IUseSortableHeader {\n defaultOrder?: Order\n defaultOrderBy: string\n entity: string\n nestedProps?: NestedProperty[] // Useful to get nested or different named props\n}\n\nconst useSortableHeader = ({\n defaultOrder = 'default',\n defaultOrderBy,\n entity,\n nestedProps = [],\n}: IUseSortableHeader) => {\n const [order, setOrder] = useState(defaultOrder)\n const [orderBy, setOrderBy] = useState(defaultOrderBy)\n\n const getValueFromNestedKey = (\n object: Entity,\n path: string,\n defaultValue: string | number,\n ) => {\n const value = path\n .replace(/\\[(\\d+)\\]/g, '.$1') // Convert array indices to dot notation (e.g., devices[0] -> devices.0)\n .split('.')\n .reduce((accumulator, currentValue) => {\n if (accumulator && accumulator[currentValue] !== undefined) {\n return accumulator[currentValue]\n }\n return defaultValue\n }, object)\n return value\n }\n\n const getDataTyped = (data: Entity[]) => {\n switch (entity) {\n case 'pay-per':\n return data as IPrice[]\n case 'subscriptions':\n return data as ISubscription[]\n case 'promo-codes':\n return data as IPromo[]\n case 'locations':\n return data as ILocation[]\n case 'devices':\n return data as IDevice[]\n case 'sizes':\n return data as ISize[]\n case 'pricing':\n return data as IPrice[]\n case 'inventory':\n return data as IProduct[]\n case 'product-groups':\n return data as IProductGroup[]\n case 'conditions':\n return data as ICondition[]\n case 'users':\n return data as IUser[]\n case 'groups':\n return data as IGroup[]\n case 'members':\n return data as IMember[]\n case 'transactions':\n return data as ITransaction[]\n case 'reservations':\n return data as any[]\n case 'subscribers':\n return data as any[]\n case 'issues':\n return data as IIssue[]\n case 'notifications':\n return data as INotification[]\n default:\n return data as any[]\n }\n }\n\n const parseValue = (value: any) => {\n switch (typeof value) {\n case 'number':\n return value\n case 'string':\n return value.toLowerCase()\n default:\n return value ? value.toString() : ''\n }\n }\n\n const comparator = (a: Entity, b: Entity) => {\n const nestedKey = nestedProps.find(\n (property) => property.columnValue === orderBy,\n )\n const itemA = nestedKey\n ? getValueFromNestedKey(a, nestedKey.path, nestedKey.defaultValue)\n : a[orderBy]\n\n const itemB = nestedKey\n ? getValueFromNestedKey(b, nestedKey.path, nestedKey.defaultValue)\n : b[orderBy]\n\n const valueA = parseValue(itemA)\n const valueB = parseValue(itemB)\n\n if (valueB < valueA) {\n return -1\n }\n if (valueB > valueA) {\n return 1\n }\n return 0\n }\n\n const handleRequestSort = (\n e: React.MouseEvent,\n property: string,\n ) => {\n //fallback to default order to asc just in case we're switching to a \"new\" column being sorted\n let newOrder: Order = 'asc'\n //If we're just cycling, then go through the switch statement\n if (orderBy === property) {\n switch (order) {\n case 'default':\n newOrder = 'asc'\n break\n case 'asc':\n newOrder = 'desc'\n break\n default:\n newOrder = 'default'\n }\n }\n setOrder(newOrder)\n setOrderBy(property)\n }\n\n const getVisibleRowsSorted = (\n data: Array,\n dataBackup: Array,\n ) => {\n if (order !== 'default') {\n const comparatorFn =\n order === 'asc'\n ? (a: Entity, b: Entity) => -comparator(a, b)\n : (a: Entity, b: Entity) => comparator(a, b)\n return getDataTyped(data.sort((a, b) => comparatorFn(a, b)))\n }\n return data\n }\n\n return {\n order,\n setOrder,\n orderBy,\n handleRequestSort,\n getVisibleRowsSorted,\n }\n}\n\nexport default useSortableHeader\n","import { DeleteForever } from '@mui/icons-material'\nimport { Checkbox, Link, Tooltip } from '@mui/material'\nimport DownloadIcon from '@mui/icons-material/Download'\nimport {\n ConfirmDialog,\n IDialogType,\n IconButton,\n TableCell,\n TableRow,\n} from 'components'\nimport { IReport } from 'models/Report'\nimport { useState } from 'react'\nimport { reportApi } from 'resources'\nimport { getUserRole, parseSnakeCaseToTitleCase } from 'utils/helpers'\nimport { SummarizedText } from 'components/SummarizedText'\n\ninterface IReportRowProps {\n report: IReport\n filteredColumns: any[]\n handleSelectRow: (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => void\n selected: boolean\n displayMessage: (message: string, type?: IDialogType) => void\n success: () => void\n handleEditReport: (report: IReport) => void\n}\n\nconst ReportRow = ({\n report,\n filteredColumns,\n handleSelectRow,\n selected,\n displayMessage,\n success,\n handleEditReport,\n}: IReportRowProps) => {\n const [confirmationMessage, setConfirmationMessage] = useState({\n isOpen: false,\n message: '',\n })\n\n const { remove, downloadReport } = reportApi()\n\n const role = getUserRole()\n\n const handleDeleteReport = async () => {\n try {\n await remove([report.id])\n displayMessage('Report deleted successfully', 'success')\n success()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleDownloadReport = async () => {\n try {\n const file = await downloadReport(report.id)\n const element = document.getElementById(`${report.id}-download`)\n\n if (element && element instanceof HTMLAnchorElement) {\n element.setAttribute('download', `${report.id}-report.csv`)\n const href = URL.createObjectURL(file)\n element.href = href\n element.setAttribute('target', '_blank')\n element.click()\n URL.revokeObjectURL(href)\n displayMessage('Report downloaded successfully', 'success')\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const formatContents = () =>\n report.contents\n .map((content) => parseSnakeCaseToTitleCase(content))\n .join(', ')\n\n return (\n <>\n \n {filteredColumns.findIndex((c) => c.value === 'select' && c.active) !==\n -1 && (\n \n {role === 'admin' ? (\n {\n handleSelectRow(event, checked, report.id)\n }}\n inputProps={{ 'aria-label': 'controlled' }}\n />\n ) : (\n \n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'name' && c.active) !==\n -1 && (\n \n handleEditReport(report)}\n >\n {report.name}\n \n \n )}\n {filteredColumns.findIndex(\n (c) => c.value === 'contents' && c.active,\n ) !== -1 && {formatContents()}}\n {filteredColumns.findIndex(\n (c) => c.value === 'assignees' && c.active,\n ) !== -1 && (\n \n member.name).join(', ')}\n />\n \n )}\n {filteredColumns.findIndex(\n (c) => c.value === 'last_sent' && c.active,\n ) !== -1 && (\n \n {report.last_sent ? (\n new Date(report.last_sent).toLocaleString('en-US', {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n })\n ) : (\n <>Report not sent yet\n )}\n \n )}\n {filteredColumns.findIndex(\n (c) => c.value === 'previous' && c.active,\n ) !== -1 && -}\n {filteredColumns.findIndex((c) => c.value === 'action' && c.active) !==\n -1 && (\n \n \n \n \n \n \n \n \n {\n setConfirmationMessage({\n isOpen: true,\n message: 'Are you sure you want to delete this report?',\n })\n }}\n >\n \n \n \n \n \n )}\n \n \n setConfirmationMessage({\n isOpen: false,\n message: '',\n })\n }\n onClickConfirm={handleDeleteReport}\n onClickCancel={() =>\n setConfirmationMessage({\n isOpen: false,\n message: '',\n })\n }\n confirmText=\"Yes\"\n cancelText=\"No\"\n />\n \n )\n}\n\nexport default ReportRow\n","import { LoadingButton } from '@mui/lab'\nimport { Box, useTheme } from '@mui/material'\nimport { Button } from 'components/Buttons'\nimport { MouseEventHandler } from 'react'\n\ninterface IFormActionsProps {\n onClose: () => void\n submitText?: string\n cancelText?: string\n loading?: boolean\n loadingText?: string\n disableSubmit?: boolean\n onSubmit?: MouseEventHandler | null\n}\n\nconst FormActions = ({\n onClose,\n submitText = 'Submit',\n cancelText = 'Cancel',\n loading = false,\n loadingText = 'Loading...',\n disableSubmit = false,\n onSubmit = null,\n}: IFormActionsProps) => {\n const theme = useTheme()\n return (\n \n {!onSubmit && (\n \n {loading ? loadingText : submitText}\n \n )}\n {onSubmit && (\n \n {loading ? loadingText : submitText}\n \n )}\n\n \n {cancelText}\n \n \n )\n}\n\nexport default FormActions\n","import HelpOutlineRoundedIcon from '@mui/icons-material/HelpOutlineRounded'\nimport { Box, Tooltip } from '@mui/material'\nimport { CSSProperties, PropsWithChildren, useState } from 'react'\n\ninterface IHelpProps {\n helpText: string\n styles?: CSSProperties\n}\n\nconst Help = ({\n helpText,\n styles,\n children,\n}: PropsWithChildren) => {\n const [hover, setHover] = useState(false)\n\n return (\n setHover(true)}\n onMouseLeave={() => setHover(false)}\n sx={{ ...styles, display: 'flex', alignItems: 'center', gap: '0.25rem' }}\n >\n {children}\n {hover && (\n \n \n \n )}\n \n )\n}\n\nexport default Help\n","import React from 'react'\nimport { Box, Theme, Typography, useMediaQuery } from '@mui/material'\nimport { Help } from 'components/Help'\nimport { PropsWithChildren } from 'react'\n\ninterface IFormWrapperProps {\n title?: string\n helpText?: string\n isDialog?: boolean\n}\n\nconst FormWrapper = ({\n title = '',\n helpText = '',\n isDialog = false,\n children,\n}: PropsWithChildren) => {\n const smDown = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'))\n return (\n \n {title && helpText && (\n \n \n \n {title}\n \n \n \n )}\n {title && !helpText && (\n \n {title}\n \n )}\n {children}\n \n )\n}\n\nexport default FormWrapper\n","export const METRICS = [\n {\n label: 'Earnings',\n value: 'earnings',\n },\n {\n label: 'User Growth',\n value: 'user_growth',\n },\n {\n label: 'System Health',\n value: 'system_health',\n },\n {\n label: 'Issue Rate',\n value: 'issue_rate',\n },\n {\n label: 'Occupancy Rate',\n value: 'occupancy_rate',\n },\n {\n label: 'Transaction Rate',\n value: 'transaction_rate',\n },\n {\n label: 'Users',\n value: 'users',\n },\n {\n label: 'Top Users',\n value: 'top_users',\n },\n {\n label: 'Top Locations',\n value: 'top_locations',\n },\n {\n label: 'Active Locks',\n value: 'active_locks',\n },\n]\n\nexport const DAYS = [\n {\n label: 'Monday',\n value: '0',\n },\n {\n label: 'Tuesday',\n value: '1',\n },\n {\n label: 'Wednesday',\n value: '2',\n },\n {\n label: 'Thursday',\n value: '3',\n },\n {\n label: 'Friday',\n value: '4',\n },\n {\n label: 'Saturday',\n value: '5',\n },\n {\n label: 'Sunday',\n value: '6',\n },\n]\n\nexport const MONTHS = [\n {\n label: 'January',\n value: '1',\n },\n {\n label: 'February',\n value: '2',\n },\n {\n label: 'March',\n value: '3',\n },\n {\n label: 'April',\n value: '4',\n },\n {\n label: 'May',\n value: '5',\n },\n {\n label: 'June',\n value: '6',\n },\n {\n label: 'July',\n value: '7',\n },\n {\n label: 'August',\n value: '8',\n },\n {\n label: 'September',\n value: '9',\n },\n {\n label: 'October',\n value: '10',\n },\n {\n label: 'November',\n value: '11',\n },\n {\n label: 'December',\n value: '12',\n },\n]\n\nexport const WHEN_OPTIONS = [\n {\n label: 'Beginning of month',\n value: 'start',\n },\n {\n label: 'End of month',\n value: 'end',\n },\n]\n","import {\n Autocomplete,\n Box,\n Checkbox,\n FormControlLabel,\n FormGroup,\n TextField as MUITextField,\n Typography,\n} from '@mui/material'\nimport {\n Form,\n IDialogType,\n SelectField,\n TextField,\n ToggleField,\n} from 'components'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { FormProvider, SubmitHandler, useForm } from 'react-hook-form'\nimport CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'\nimport CheckBoxIcon from '@mui/icons-material/CheckBox'\nimport { useEffect, useState } from 'react'\nimport { IMember } from 'models'\nimport { IReport, Recurrence } from 'models/Report'\nimport { reportApi } from 'resources'\nimport { DAYS, METRICS, MONTHS, WHEN_OPTIONS } from '../constants'\nimport { TimePicker } from '@mui/x-date-pickers/TimePicker'\nimport { DropdownOption } from 'types'\n\ninterface IReportFormProps {\n report: IReport | undefined\n onClose: () => void\n displayMessage: (message: string, type?: IDialogType) => void\n success: (showNewestFirst?: boolean) => void\n members: IMember[]\n}\n\nconst ReportForm = ({\n report,\n onClose,\n displayMessage,\n success,\n members,\n}: IReportFormProps) => {\n const [metrics, setMetrics] = useState(report?.contents || [])\n const [defaultMetrics, setDefaultMetrics] = useState(() =>\n report\n ? METRICS.filter((m) => report.contents.some((c) => c === m.value))\n : [],\n )\n const [membersOptions, setMembersOptions] = useState<\n { label: string; id: string; email: string }[]\n >([])\n const [defaultMembers, setDefaultMembers] = useState<\n { label: string; id: string; email: string }[]\n >(() =>\n report\n ? members\n .filter((member) =>\n report.assign_to.some((id) => member.user_id === id),\n )\n .map((member) => ({\n label: member.name,\n id: member.user_id,\n email: member.email,\n }))\n : [],\n )\n\n const [recurrence, setRecurrence] = useState(\n report?.recurrence || '',\n )\n\n const [selectedMembers, setSelectedMembers] = useState(\n report?.assign_to || [],\n )\n const [sendTime, setSendTime] = useState(() => {\n if (report) {\n const date = new Date()\n date.setUTCHours(Number(report.send_time.split(':')[0]))\n date.setUTCMinutes(Number(report.send_time.split(':')[1]))\n return date\n }\n return null\n })\n\n const { loading, setLoading } = useLoadingState()\n\n const { createReport, updateReport } = reportApi()\n\n const methods = useForm({\n defaultValues: { ...report },\n })\n\n const handleToggleMetrics = (event: React.SyntheticEvent, value: any) => {\n const metrics: string[] = value.map((option) => option.value)\n setMetrics(metrics)\n }\n\n const handleMemberSelection = (event: React.SyntheticEvent, value: any) => {\n const membersSelected: string[] = value.map((option) => option.id)\n setSelectedMembers(membersSelected)\n }\n\n const buildMembersOptions = () => {\n if (members.length > 0) {\n const autoCompleteOptions = members.map((member) => ({\n label: member.name,\n id: member.user_id,\n email: member.email,\n }))\n const sortedOptions = autoCompleteOptions.sort((a, b) => {\n if (a.label < b.label) {\n return -1\n }\n if (a.label > b.label) {\n return 1\n }\n return 0\n })\n setMembersOptions(sortedOptions)\n }\n }\n\n const disableSubmit =\n Object.keys(methods.formState.errors).length > 0 ||\n !sendTime ||\n !recurrence ||\n selectedMembers.length === 0 ||\n metrics.length === 0\n\n const onSubmit: SubmitHandler> = async (\n newReport: Partial,\n ) => {\n try {\n setLoading(true)\n\n if (!sendTime) {\n return\n }\n\n const date = new Date(sendTime)\n const hours = date.getUTCHours()\n const minutes = date.getUTCMinutes()\n\n const payload = {\n ...newReport,\n weekday: ['weekly', 'biweekly'].includes(recurrence)\n ? newReport.weekday\n : undefined,\n month: ['monthly', 'bimonthly'].includes(recurrence)\n ? newReport.month\n : undefined,\n when: ['monthly', 'bimonthly'].includes(recurrence)\n ? newReport.when\n : undefined,\n contents: metrics,\n assign_to: selectedMembers,\n recurrence,\n send_time: `${hours < 10 ? '0' : ''}${hours}:${\n minutes < 10 ? '0' : ''\n }${minutes}`,\n }\n\n if (report) {\n await updateReport(report.id, payload)\n onClose()\n displayMessage('Report updated successfully!', 'success')\n success(true)\n } else {\n await createReport(payload)\n onClose()\n displayMessage('Report created successfully!', 'success')\n success(true)\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n useEffect(() => {\n buildMembersOptions()\n }, [members])\n\n useEffect(() => {\n const month = methods.watch('month')\n const when = methods.watch('when')\n const weekday = methods.watch('weekday')\n if (['weekly', 'biweekly'].includes(recurrence) && when && month) {\n methods.resetField('month')\n methods.resetField('when')\n } else if (['monthly', 'bimonthly'].includes(recurrence) && weekday) {\n methods.resetField('weekday')\n }\n }, [recurrence])\n\n return (\n <>\n \n
\n \n \n option.label}\n renderOption={(props, option, { selected }) => (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n {option.label}\n
  • \n )}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n onChange={handleToggleMetrics}\n loading={METRICS.length === 0}\n />\n\n (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n \n {option.label}\n \n {option.email}\n \n \n
  • \n )}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n onChange={handleMemberSelection}\n loading={members.length === 0}\n disableCloseOnSelect={true}\n getOptionLabel={(option) => option.label}\n />\n\n \n Recurrence\n \n\n \n \n setRecurrence('weekly')}\n />\n }\n label=\"Weekly\"\n />\n setRecurrence('monthly')}\n />\n }\n label=\"Monthly\"\n />\n \n \n setRecurrence('biweekly')}\n />\n }\n label=\"Biweekly\"\n />\n setRecurrence('bimonthly')}\n />\n }\n label=\"Bimonthly\"\n />\n \n \n\n {['weekly', 'biweekly'].includes(recurrence) && (\n \n )}\n\n {['monthly', 'bimonthly'].includes(recurrence) && (\n \n )}\n\n {['monthly', 'bimonthly'].includes(recurrence) && (\n \n )}\n\n setSendTime(newValue)}\n renderInput={(params) => }\n />\n\n \n\n {report && (\n \n {report.last_sent ? (\n `Last report was sent on ${new Date(\n report.last_sent,\n ).toLocaleString('en-US', {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n })}`\n ) : (\n <>Report not sent yet\n )}\n \n )}\n\n \n
    \n
    \n
    \n \n )\n}\n\nexport default ReportForm\n","/* eslint-disable no-unused-vars */\n/* eslint-disable camelcase */\nexport enum PriceTypes {\n pay_per_weight = 'pay_per_weight',\n pay_per_time = 'pay_per_time',\n}\n\nexport enum PriceUnits {\n kg = 'kg',\n lb = 'lb',\n minute = 'minute',\n hour = 'hour',\n day = 'day',\n week = 'week',\n}\n\nexport enum PriceCurrencies {\n usd = 'usd',\n eur = 'eur',\n gbp = 'gbp',\n cad = 'cad',\n aud = 'aud',\n}\n\nexport interface IPrice {\n id: string\n created_at: Date\n name: string\n amount: number\n unit: PriceUnits\n unit_amount: number\n currency: PriceCurrencies\n prorated: boolean\n price_type: PriceTypes\n card_on_file: boolean\n default: boolean\n}\n\nexport interface IPriceList {\n items: IPrice[]\n total: number\n pages: number\n}\n","/* eslint-disable camelcase */\n/* eslint-disable no-unused-vars */\nimport { ISize, IPrice, ILocation, IUser, IGroup, ITransaction } from 'models'\nimport { IProduct } from './Product'\n\nexport enum DeviceType {\n linka = 'linka',\n spintly = 'spintly',\n ojmar = 'ojmar',\n gantner = 'gantner',\n keynius = 'keynius',\n harbor = 'harbor',\n dclock = 'dclock',\n kerong = 'kerong',\n headleader = 'headleader',\n}\n\nexport enum DeviceMode {\n service = 'service',\n storage = 'storage',\n rental = 'rental',\n delivery = 'delivery',\n vending = 'vending',\n}\n\nexport interface IDevice {\n id: string\n created_at: string\n name: string\n item: string\n item_description: string\n image: string\n locker_number: number\n price_required: boolean\n mode: string\n status: string\n hardware_type: DeviceType\n mac_address: string\n integration_id: string\n locker_udn: string\n user_code: string\n master_code: string\n gantner_id: string\n keynius_id: string\n lock_status: string\n harbor_tower_id: string\n harbor_locker_id: string\n dclock_terminal_no: string\n dclock_box_no: string\n id_location: string\n id_size: string\n id_price: string | null\n id_product: string | null\n location: ILocation\n size: ISize\n price: IPrice\n product: IProduct\n shared: boolean\n require_image: boolean\n restriction: IRestriction | null\n ip: string | null\n circuit_unit: string\n board_unit: string\n hook_port: number | null\n additional_metadata: string | null\n custom_identifier: string | null\n port: number | null\n headboard: number | null\n ada_compliance: boolean\n}\n\ninterface IRestriction {\n restriction_type: string\n items: IUser[] | IGroup[]\n}\n\nexport interface IDeviceLog {\n id: string\n log_type: DeviceLogType\n log_owner: string\n event: ITransaction\n created_at: Date | string\n}\n\nexport type DeviceLogType = 'lock' | 'unlock' | 'maintenance' | 'report_issue'\n\nexport interface IDeviceList {\n items: IDevice[]\n total: number\n pages: number\n}\n","/* eslint-disable camelcase */\n/* eslint-disable no-unused-vars */\n\nimport { IDevice, IPromo, ISubscription, IUser } from 'models'\n\nexport enum TransactionType {\n service = 'service',\n storage = 'storage',\n rental = 'rental',\n delivery = 'delivery',\n}\n\nexport enum TransactionStatusDTO {\n in_progress = 'in_progress',\n awaiting_service_pickup = 'awaiting_service_pickup',\n awaiting_service_dropoff = 'awaiting_service_dropoff',\n awaiting_user_pickup = 'awaiting_user_pickup',\n finished = 'finished',\n canceled = 'canceled',\n}\n\nexport enum TransactionStatus {\n in_progress = 'In progress',\n awaiting_service_pickup = 'Service pickup',\n awaiting_service_dropoff = 'Service dropoff',\n awaiting_user_pickup = 'User pickup',\n awaiting_payment_confirmation = 'Payment confirmation',\n finished = 'Finished',\n canceled = 'Canceled',\n refunded = 'Refunded',\n expired = 'Expired',\n removed = 'Removed',\n}\n\nexport type PenaltyReason =\n | 'missing_items'\n | 'damaged_items'\n | 'misconduct'\n | 'other'\n\nexport interface ITransaction {\n id: string\n invoice_id: string\n order_id: string\n started_at: string\n created_at: string\n ended_at: string\n event_status: TransactionStatus\n event_type: TransactionType\n total: number | string\n id_user: string\n id_device: string\n device: IDevice\n user: IUser\n total_time: string\n signature_url: string\n device_name: string\n location_name: string\n image_url: string\n courier_pin_code: string\n refunded_amount: string\n penalize_charge: string\n penalize_reason: PenaltyReason\n canceled_at: string\n canceled_by: string\n promo: IPromo\n membership: ISubscription\n notification_status: string\n notification_status_date: string\n}\n\nexport interface ITransactionList {\n items: ITransaction[]\n total: number\n pages: number\n}\n\nexport interface PublicTransactionDTO {\n app_logo: string\n created_at: string\n device_name: string\n event_status: TransactionStatusDTO\n event_type: TransactionType\n id: string\n invoice_id: string\n location_name: string\n user_email: string\n user_name: string\n user_phone: string\n}\n\nexport interface ITransactionLog {\n id: string\n log_type: LogType\n log_owner: string\n event: ITransaction\n created_at: Date | string\n}\n\nexport type LogType = 'lock' | 'unlock' | 'maintenance' | 'report_issue'\n\nexport interface CodeDeliveryResponse {\n message: string\n email_success: boolean | null\n sms_success: boolean | null\n}\n","/* eslint-disable no-unused-vars */\n/* eslint-disable camelcase */\n\nimport { ILocation } from './Location'\nimport { PriceCurrencies } from './Price'\nimport { IUser } from './User'\n\nexport enum BillingPeriod {\n day = 'day',\n week = 'week',\n month = 'month',\n year = 'year',\n}\n\nexport interface ISubscription {\n id: string\n created_at: Date\n expiration_date: Date\n name: string\n description: string\n active: boolean\n currency: PriceCurrencies\n amount: number\n billing_type: BillingType\n billing_period: BillingPeriod\n number_of_payments: number\n membership_type: SubscriptionType\n value: number\n stripe_product_id: string\n stripe_price_id: string\n card_on_file: boolean\n locations: ILocation[]\n users: IUser[]\n}\n\nexport interface ISubscriptionList {\n items: ISubscription[]\n total: number\n pages: number\n}\n\nexport type BillingType = 'one_time' | 'recurring'\n\nexport type SubscriptionType = 'unlimited' | 'limited' | 'fixed' | 'percentage'\n\nexport const SUBSCRIPTION_TYPES = [\n {\n value: 'unlimited',\n label: 'Unlimited',\n },\n {\n value: 'limited',\n label: 'Limited',\n },\n {\n value: 'fixed',\n label: 'Fixed',\n },\n {\n value: 'percentage',\n label: 'Percentage',\n },\n]\n","import {\n IDevice,\n IProduct,\n ITransaction,\n ISize,\n ILocation,\n IProductGroup,\n ICondition,\n IUser,\n IGroup,\n IMember,\n IReservation,\n ISubscription,\n IIssue,\n TransactionStatus,\n} from 'models'\n\nexport const replaceCommaWithSpace = (str: string): string =>\n str?.replace(/,/g, ' ')\n\nexport const capitalizeFirstLetter = (str: string): string =>\n str.charAt(0).toUpperCase() + str.slice(1)\n\nexport const setHardwareDetails = (obj: IDevice) => {\n const data = {\n linka: {\n mac_address: obj.mac_address,\n },\n spintly: {\n integration_id: obj.integration_id,\n },\n ojmar: {\n locker_udn: obj.locker_udn,\n user_code: obj.user_code,\n master_code: obj.master_code,\n },\n gantner: {\n gantner_id: obj.gantner_id,\n },\n harbor: {\n harbor_tower_id: obj.harbor_tower_id,\n harbor_locker_id: obj.harbor_locker_id,\n },\n dclocker: {\n dclock_terminal_no: obj.dclock_terminal_no,\n dclock_box_no: obj.dclock_box_no,\n },\n kerong: {\n mac_address: obj.mac_address,\n ip: obj.ip,\n circuit_unit: obj.circuit_unit,\n board_unit: obj.board_unit,\n hook_port: obj.hook_port,\n },\n headleader: {\n headboard: obj.headboard,\n port: obj.port,\n },\n }\n\n return data[obj.hardware_type]\n}\nexport const DeviceColumnValues = (obj: IDevice) => {\n const data = {\n id_location: obj.location?.name,\n id_price: obj.price?.name,\n id_size: obj.size?.name,\n name: obj.name,\n custom_identifier: obj.custom_identifier,\n item: obj.item,\n item_description: obj.item_description,\n locker_number: obj.locker_number,\n mode: capitalizeFirstLetter(obj.mode),\n price_required: obj.price_required,\n hardware_type: capitalizeFirstLetter(obj.hardware_type),\n status: obj.status,\n lock_status: obj.lock_status,\n }\n\n return { ...data, ...setHardwareDetails(obj) }\n}\nexport const DeviceHeaders = [\n 'name',\n 'locker_number',\n 'id_location',\n 'id_size',\n 'hardware_type',\n 'lock_status',\n 'status',\n 'mode',\n 'item',\n 'id_price',\n 'custom_identifier',\n 'item_description',\n 'price_required',\n 'mac_address',\n 'integration_id',\n 'locker_udn',\n 'user_code',\n 'master_code',\n 'gantner_id',\n 'harbor_tower_id',\n 'harbor_locker_id',\n 'dclock_terminal_no',\n 'dclock_box_no',\n 'ip',\n 'circuit_unit',\n 'board_unit',\n 'hook_port',\n]\nexport const DeviceLabels = {\n id_location: 'Location',\n id_price: 'Price',\n id_size: 'Size',\n name: 'Name',\n custom_identifier: 'Custom Identifier',\n item: 'Item',\n item_description: 'Item Description',\n locker_number: 'Locker Number',\n mode: 'Mode',\n price_required: 'Price Required',\n hardware_type: 'Hardware Type',\n status: 'Status',\n lock_status: 'Lock State',\n mac_address: 'MAC Address',\n integration_id: 'Integration ID',\n locker_udn: 'Locker UDN',\n user_code: 'User Code',\n master_code: 'Master Code',\n gantner_id: 'Gantner ID',\n harbor_tower_id: 'Harbor Tower ID',\n harbor_locker_id: 'Harbor Locker ID',\n dclock_terminal_no: 'DCLOCK Terminal No',\n dclock_box_no: 'DCLOCK Box No',\n ip: 'Ip',\n circuit_unit: 'Circuit Unit',\n board_unit: 'Board Unit',\n hook_port: 'Hook Port',\n}\nexport const ProductColumnValues = (obj: IProduct) => {\n return {\n id: obj.id,\n image: obj.image,\n product_name: obj.name,\n serial_number: obj.serial_number,\n assigned_locker: obj.devices?.[0]?.locker_number,\n assigned_location: obj.devices?.[0]?.location?.name,\n cost: obj.price,\n sale_price: obj.sales_price,\n sku: obj.sku,\n msrp: obj.msrp,\n groups: obj.id_product_group,\n }\n}\nexport const ProductHeaders = [\n 'id',\n 'image',\n 'product_name',\n 'serial_number',\n 'assigned_locker',\n 'assigned_location',\n 'cost',\n 'sale_price',\n 'sku',\n 'msrp',\n 'groups',\n]\nexport const ProductLabels = {\n id: 'ID',\n image: 'Image',\n product_name: 'Product Name',\n serial_number: 'Serial Number',\n assigned_locker: 'Assigned Locker',\n assigned_location: 'Assigned Location',\n cost: 'Cost',\n sale_price: 'Sale Price',\n sku: 'SKU',\n msrp: 'MSRP',\n groups: 'Groups',\n}\nexport const EventColumnValues = (obj: ITransaction) => {\n return {\n id: obj.id,\n invoice_id: obj.invoice_id,\n order_id: obj.order_id,\n user_name: obj.user.name,\n user_phone: obj.user.phone_number,\n user_email: obj.user.email,\n device_name: obj.device.name,\n locker_number: obj.device.locker_number,\n location: obj.device.location.name,\n mode: obj.device.mode,\n status: TransactionStatus[obj.event_status],\n start_date: obj.started_at,\n end_date: obj.ended_at,\n duration: obj.ended_at,\n amount: obj.total,\n image: obj.image_url,\n }\n}\nexport const EventHeaders = [\n 'id',\n 'invoice_id',\n 'order_id',\n 'user_name',\n 'user_phone',\n 'user_email',\n 'device_name',\n 'locker_number',\n 'location',\n 'mode',\n 'status',\n 'start_date',\n 'end_date',\n 'duration',\n 'amount',\n 'image',\n]\nexport const EventLabels = {\n id: 'ID',\n invoice_id: 'Invoice ID',\n order_id: 'Order ID',\n user_name: 'User Name',\n user_phone: 'User Phone',\n user_email: 'User Email',\n device_name: 'Device Name',\n locker_number: 'Locker Number',\n location: 'Location',\n mode: 'Mode',\n status: 'Status',\n start_date: 'Start Date',\n end_date: 'End Date',\n duration: 'Duration',\n amount: 'Amount',\n image: 'Image',\n}\nexport const SizeColumnValues = (obj: ISize) => {\n return {\n id: obj.id,\n name: obj.name,\n width: obj.width,\n height: obj.height,\n depth: obj.depth,\n }\n}\nexport const SizeHeaders = ['id', 'name', 'width', 'height', 'depth']\nexport const SizeLabels = {\n id: 'ID',\n name: 'Name',\n width: 'Width',\n height: 'Height',\n depth: 'Depth',\n}\nexport const LocationColumnValues = (obj: ILocation) => {\n return {\n id: obj.id,\n name: obj.name,\n no_of_devices: obj.devices?.length,\n address: replaceCommaWithSpace(obj.address),\n image: obj.image,\n hidden: obj.hidden,\n }\n}\nexport const LocationHeaders = [\n 'id',\n 'name',\n 'no_of_devices',\n 'address',\n 'image',\n 'hidden',\n]\nexport const LocationLabels = {\n id: 'ID',\n name: 'Name',\n no_of_devices: 'No of Devices',\n address: 'Address',\n image: 'Image',\n hidden: 'Hidden',\n}\nexport const ProductGroupColumnValues = (obj: IProductGroup) => {\n return {\n id: obj.id,\n group_name: obj.name,\n locker_size: obj?.size?.name,\n no_of_products: obj.products?.length,\n }\n}\nexport const ProductGroupHeaders = [\n 'id',\n 'group_name',\n 'locker_size',\n 'no_of_products',\n]\nexport const ProductGroupLabels = {\n id: 'ID',\n group_name: 'Group Name',\n locker_size: 'Locker Size',\n no_of_products: 'No of Products',\n}\nexport const ConditionColumnValues = (obj: ICondition) => {\n return {\n id: obj.id,\n name: obj.name,\n products_assigned: obj.products?.length,\n auto_report_issue: obj.auto_report,\n auto_maintenance: obj.auto_maintenance,\n }\n}\nexport const ConditionHeaders = [\n 'id',\n 'name',\n 'products_assigned',\n 'auto_report_issue',\n 'auto_maintenance',\n]\nexport const ConditionLabels = {\n id: 'ID',\n name: 'Name',\n products_assigned: 'Products Assigned',\n auto_report_issue: 'Auto Report Issue',\n auto_maintenance: 'Auto Maintenance',\n}\nexport const UserColumnValues = (obj: IUser) => {\n return {\n id: obj.id,\n name: obj.name,\n last_name: obj.last_name,\n email: obj.email,\n address: replaceCommaWithSpace(obj.address),\n phone_number: obj.phone_number,\n user_id: obj.user_id,\n user_pin_code: obj.pin_code,\n active: obj.active,\n created_at: obj.created_at,\n require_auth: obj.require_auth,\n }\n}\nexport const UserHeaders = [\n 'id',\n 'name',\n 'last_name',\n 'email',\n 'address',\n 'phone_number',\n 'user_id',\n 'user_pin_code',\n 'active',\n 'created_at',\n 'require_auth',\n]\nexport const UserLabels = {\n id: 'ID',\n name: 'Name',\n last_name: 'Last Name',\n email: 'Email',\n address: 'Address',\n phone_number: 'Phone Number',\n user_id: 'User ID',\n user_pin_code: 'User Pin Code',\n active: 'Active',\n created_at: 'Created At',\n require_auth: 'Require Auth',\n}\nexport const GroupColumnValues = (obj: IGroup) => {\n return {\n id: obj.id,\n name: obj.name,\n users: obj.users?.length,\n devices: obj.devices,\n locations: obj.locations.length,\n }\n}\nexport const GroupHeaders = ['id', 'name', 'users', 'devices', 'locations']\nexport const GroupLabels = {\n id: 'ID',\n name: 'Name',\n users: 'Users',\n devices: 'Devices',\n locations: 'Locations',\n}\nexport const MemberColumnValues = (obj: IMember) => {\n return {\n user_id: obj.user_id,\n email: obj.email,\n name: obj.name,\n first_name: obj.first_name,\n last_name: obj.last_name,\n role: obj.role,\n pin_code: obj.pin_code,\n }\n}\nexport const MemberHeaders = [\n 'user_id',\n 'email',\n 'name',\n 'first_name',\n 'last_name',\n 'role',\n 'pin_code',\n]\nexport const MemberLabels = {\n user_id: 'User ID',\n email: 'Email',\n name: 'Name',\n first_name: 'First Name',\n last_name: 'Last Name',\n role: 'Role',\n pin_code: 'Pin Code',\n}\n\nexport const ReservationColumnValues = (obj: IReservation) => {\n return {\n id: obj.id,\n tracking_number: obj?.tracking_number,\n location: obj?.location?.name,\n size: obj?.size?.name,\n user: obj?.user?.name,\n device: obj?.device?.name,\n product: obj?.product?.name,\n phone_number: obj?.phone_number,\n email: obj?.email,\n mode: obj?.mode,\n recurring: obj?.recurring,\n monday: obj?.monday,\n tuesday: obj?.tuesday,\n wednesday: obj?.wednesday,\n thursday: obj?.thursday,\n friday: obj?.friday,\n saturday: obj?.saturday,\n sunday: obj?.sunday,\n from_time: obj?.from_time,\n to_time: obj?.to_time,\n start_date: obj?.start_date,\n end_date: obj?.end_date,\n created_at: obj?.created_at,\n }\n}\nexport const ReservationHeaders = [\n 'id',\n 'tracking_number',\n 'location',\n 'size',\n 'user',\n 'device',\n 'product',\n 'phone_number',\n 'email',\n 'mode',\n 'recurring',\n 'monday',\n 'tuesday',\n 'wednesday',\n 'thursday',\n 'friday',\n 'saturday',\n 'sunday',\n 'from_time',\n 'to_time',\n 'start_date',\n 'end_date',\n 'created_at',\n]\nexport const ReservationLabels = {\n id: 'ID',\n tracking_number: 'Tracking Number',\n location: 'Location Name',\n size: 'Size Name',\n user: 'User Name',\n device: 'Device Name',\n product: 'Product Name',\n phone_number: 'Phone Number',\n email: 'Email',\n mode: 'Mode',\n recurring: 'Recurring',\n monday: 'Monday',\n tuesday: 'Tuesday',\n wednesday: 'Wednesday',\n thursday: 'Thursday',\n friday: 'Friday',\n saturday: 'Saturday',\n sunday: 'Sunday',\n from_time: 'From Time',\n to_time: 'To Time',\n start_date: 'Start Date',\n end_date: 'End Date',\n created_at: 'Created At',\n}\n\nexport const MembershipColumnValues = (obj: ISubscription) => {\n return {\n id: obj.id,\n name: obj?.name,\n description: obj?.description,\n active: obj?.active,\n currency: obj?.currency,\n amount: obj?.amount,\n billing_type: obj?.billing_type,\n billing_period: obj?.billing_period,\n number_of_payments: obj?.number_of_payments,\n membership_type: obj?.membership_type,\n value: obj?.value,\n stripe_product_id: obj?.stripe_product_id,\n stripe_price_id: obj?.stripe_price_id,\n card_on_file: obj?.card_on_file,\n locations: obj?.locations.length,\n users: obj?.users.length,\n }\n}\n\nexport const MembershipHeaders = [\n 'id',\n 'name',\n 'description',\n 'active',\n 'currency',\n 'amount',\n 'billing_type',\n 'billing_period',\n 'number_of_payments',\n 'membership_type',\n 'value',\n 'stripe_product_id',\n 'stripe_price_id',\n 'card_on_file',\n 'locations',\n 'users',\n]\n\nexport const MembershipLabels = {\n id: 'ID',\n name: 'Name',\n description: 'Description',\n active: 'Active',\n currency: 'Currency',\n amount: 'Amount',\n billing_type: 'Billing Type',\n billing_period: 'Billing Period',\n number_of_payments: 'Number of Payments',\n membership_type: 'Membership Type',\n value: 'Value',\n stripe_product_id: 'Stripe Product ID',\n stripe_price_id: 'Stripe Price ID',\n card_on_file: 'Card On File',\n locations: 'Locations',\n users: 'Users',\n}\n\nexport const IssueColumnValues = (obj: IIssue) => {\n return {\n id: obj.id,\n created_at: obj?.created_at,\n description: replaceCommaWithSpace(obj?.description),\n pictures: obj?.pictures,\n status: obj?.status,\n issue_id: obj?.issue_id,\n id_user: obj?.id_user,\n id_event: obj?.id_event,\n team_member_id: obj?.team_member_id,\n team_member: obj?.team_member?.user_id,\n invoice_id: obj?.invoice_id,\n }\n}\n\nexport const IssueHeaders = [\n 'id',\n 'created_at',\n 'description',\n 'pictures',\n 'status',\n 'issue_id',\n 'id_user',\n 'id_event',\n 'team_member_id',\n 'team_member',\n 'invoice_id',\n]\n\nexport const IssueLabels = {\n id: 'ID',\n created_at: 'Created At',\n description: 'Description',\n pictures: 'Pictures',\n status: 'Status',\n issue_id: 'Issue ID',\n id_user: 'User ID',\n id_event: 'Event ID',\n team_member_id: 'Team Member ID',\n team_member: 'Team Member',\n invoice_id: 'Invoice ID',\n}\n","import { Button, Card, Stack, Typography, useTheme } from '@mui/material'\nimport { ConfirmDialog, NotificationDialog } from 'components/Dialog'\nimport { saveAs } from 'file-saver'\nimport { useState } from 'react'\nimport { createCsvBlob } from 'utils/helpers'\nimport {\n ConditionColumnValues,\n ConditionHeaders,\n ConditionLabels,\n DeviceColumnValues,\n DeviceHeaders,\n DeviceLabels,\n EventColumnValues,\n EventHeaders,\n EventLabels,\n GroupColumnValues,\n GroupHeaders,\n GroupLabels,\n IssueColumnValues,\n IssueHeaders,\n IssueLabels,\n LocationColumnValues,\n LocationHeaders,\n LocationLabels,\n MemberColumnValues,\n MemberHeaders,\n MemberLabels,\n MembershipColumnValues,\n MembershipHeaders,\n MembershipLabels,\n ProductColumnValues,\n ProductGroupColumnValues,\n ProductGroupHeaders,\n ProductGroupLabels,\n ProductHeaders,\n ProductLabels,\n ReservationColumnValues,\n ReservationHeaders,\n ReservationLabels,\n SizeColumnValues,\n SizeHeaders,\n SizeLabels,\n UserColumnValues,\n UserHeaders,\n UserLabels,\n} from './constants'\n\n// TODO fix any types\ninterface IMultiSelectToolbarProps {\n itemsSelectedData?: any\n itemsSelected: number\n handleAction?: () => void\n setAction?: React.Dispatch>\n actionsAllowed?: string[]\n show?: boolean\n model?: string\n totalQty?: number\n getAllExportData?(): Promise\n}\n\nconst MultiSelectToolbar = ({\n itemsSelectedData,\n itemsSelected,\n handleAction,\n setAction,\n actionsAllowed = ['delete'],\n show = true,\n model,\n totalQty,\n getAllExportData,\n}: IMultiSelectToolbarProps) => {\n const [confirmationMessage, setConfirmationMessage] = useState({\n isOpen: false,\n message: '',\n })\n\n const [notificationMessage, setNotificationMessage] = useState({\n isOpen: false,\n message: '',\n })\n\n const onConfirm = () => {\n handleAction?.()\n closeDialog()\n }\n\n const convertArrayOfObjectsToCSV = (\n arrayData,\n headers,\n labels,\n model,\n setDetailsHelper,\n itemsSelected,\n ) => {\n const csvRows: any = []\n const csvHeaderLabels = headers.map((key) => labels[key])\n csvRows.push(csvHeaderLabels)\n\n for (const obj of arrayData) {\n const data = setDetailsHelper(obj)\n const ParsedData = headers.map((key) => data[key])\n csvRows.push(ParsedData)\n }\n\n const csvContent = csvRows.map((row) => row.join(',')).join('\\n')\n const csvBlob = createCsvBlob(csvContent)\n\n saveAs(csvBlob, `${model}_export.csv`)\n setNotificationMessage({\n isOpen: true,\n message: `Exported ${itemsSelected} item${\n itemsSelected > 1 ? 's' : ''\n } successfully`,\n })\n }\n\n const handleExportDevices = (itemsToExport) => {\n for (const obj of itemsToExport) {\n if (obj.hardware_type !== itemsToExport[0].hardware_type) {\n setNotificationMessage({\n isOpen: true,\n message: `Cannot export items with different hardware types`,\n })\n return\n }\n }\n\n convertArrayOfObjectsToCSV(\n itemsToExport,\n DeviceHeaders,\n DeviceLabels,\n model,\n DeviceColumnValues,\n itemsToExport.length,\n )\n }\n const handleExportProduct = (itemsToExport) => {\n convertArrayOfObjectsToCSV(\n itemsToExport,\n ProductHeaders,\n ProductLabels,\n model,\n ProductColumnValues,\n itemsToExport.length,\n )\n }\n const handleExportEvents = (itemsToExport) => {\n convertArrayOfObjectsToCSV(\n itemsToExport,\n EventHeaders,\n EventLabels,\n model,\n EventColumnValues,\n itemsToExport.length,\n )\n }\n const handleExportSize = (itemsToExport) => {\n convertArrayOfObjectsToCSV(\n itemsToExport,\n SizeHeaders,\n SizeLabels,\n model,\n SizeColumnValues,\n itemsToExport.length,\n )\n }\n const handleExportLocation = (itemsToExport) => {\n convertArrayOfObjectsToCSV(\n itemsToExport,\n LocationHeaders,\n LocationLabels,\n model,\n LocationColumnValues,\n itemsToExport.length,\n )\n }\n const handleExportProductGroup = (itemsToExport) => {\n convertArrayOfObjectsToCSV(\n itemsToExport,\n ProductGroupHeaders,\n ProductGroupLabels,\n model,\n ProductGroupColumnValues,\n itemsToExport.length,\n )\n }\n const handleExportCondition = (itemsToExport) => {\n convertArrayOfObjectsToCSV(\n itemsToExport,\n ConditionHeaders,\n ConditionLabels,\n model,\n ConditionColumnValues,\n itemsToExport.length,\n )\n }\n const handleExportUser = (itemsToExport) => {\n convertArrayOfObjectsToCSV(\n itemsToExport,\n UserHeaders,\n UserLabels,\n model,\n UserColumnValues,\n itemsToExport.length,\n )\n }\n\n const handleExportGroup = (itemsToExport) => {\n convertArrayOfObjectsToCSV(\n itemsToExport,\n GroupHeaders,\n GroupLabels,\n model,\n GroupColumnValues,\n itemsToExport.length,\n )\n }\n\n const handleExportMember = (itemsToExport) => {\n convertArrayOfObjectsToCSV(\n itemsToExport,\n MemberHeaders,\n MemberLabels,\n model,\n MemberColumnValues,\n itemsToExport.length,\n )\n }\n\n const handleExportReservation = (itemsToExport) => {\n convertArrayOfObjectsToCSV(\n itemsToExport,\n ReservationHeaders,\n ReservationLabels,\n model,\n ReservationColumnValues,\n itemsToExport.length,\n )\n }\n\n const handleExportMembership = (itemsToExport) => {\n convertArrayOfObjectsToCSV(\n itemsToExport,\n MembershipHeaders,\n MembershipLabels,\n model,\n MembershipColumnValues,\n itemsToExport.length,\n )\n }\n\n const handleExportIssues = (itemsToExport) => {\n convertArrayOfObjectsToCSV(\n itemsToExport,\n IssueHeaders,\n IssueLabels,\n model,\n IssueColumnValues,\n itemsToExport.length,\n )\n }\n\n const closeDialog = () => {\n setConfirmationMessage({ isOpen: false, message: '' })\n setNotificationMessage({ isOpen: false, message: '' })\n }\n const editAction = () => {\n setAction?.('edit')\n }\n const deleteAction = () => {\n setAction?.('delete')\n setConfirmationMessage({\n isOpen: true,\n message: `Are you sure you want to delete ${itemsSelected} item${\n itemsSelected > 1 ? 's' : ''\n }?`,\n })\n }\n const maintenanceAction = () => {\n setAction?.('putUnderMaintenance')\n setConfirmationMessage({\n isOpen: true,\n message: `Are you sure you want to switch ${itemsSelected} device${\n itemsSelected > 1 ? 's' : ''\n } to maintenance mode?`,\n })\n }\n const endAction = () => {\n setAction?.('end')\n setConfirmationMessage({\n isOpen: true,\n message: `Are you sure you want to end ${itemsSelected} transaction${\n itemsSelected > 1 ? 's' : ''\n }?`,\n })\n }\n\n const handleExportItems = (itemsToExport) => {\n switch (model) {\n case 'device':\n handleExportDevices(itemsToExport)\n break\n case 'product':\n handleExportProduct(itemsToExport)\n break\n case 'event':\n handleExportEvents(itemsToExport)\n break\n case 'size':\n handleExportSize(itemsToExport)\n break\n case 'location':\n handleExportLocation(itemsToExport)\n break\n case 'product-group':\n handleExportProductGroup(itemsToExport)\n break\n case 'condition':\n handleExportCondition(itemsToExport)\n break\n case 'user':\n handleExportUser(itemsToExport)\n break\n case 'group':\n handleExportGroup(itemsToExport)\n break\n case 'member':\n handleExportMember(itemsToExport)\n break\n case 'reservation':\n handleExportReservation(itemsToExport)\n break\n case 'subscription':\n handleExportMembership(itemsToExport)\n break\n case 'issue':\n handleExportIssues(itemsToExport)\n break\n default:\n break\n }\n }\n\n return (\n <>\n {show && (\n <>\n \n \n {itemsSelected}{' '}\n {itemsSelected > 1 ? 'items selected' : 'item selected'}\n \n \n {actionsAllowed.includes('export') && getAllExportData && (\n {\n setNotificationMessage({\n isOpen: true,\n message: 'Exporting all the data is in progress...',\n })\n const data = await getAllExportData()\n setNotificationMessage({\n isOpen: false,\n message: '',\n })\n handleExportItems(data)\n }}\n sx={{\n minWidth: 192,\n }}\n >\n Export All {totalQty && `(${totalQty} items)`}\n \n )}\n\n {actionsAllowed.includes('export') && (\n handleExportItems(itemsSelectedData)}\n sx={{\n minWidth: 192,\n }}\n >\n Export Selected\n \n )}\n\n {actionsAllowed.includes('edit') && (\n \n Edit\n \n )}\n\n {actionsAllowed.includes('delete') && (\n \n Delete\n \n )}\n\n {actionsAllowed.includes('putUnderMaintenance') && (\n \n Put under maintenance\n \n )}\n\n {actionsAllowed.includes('end') && (\n \n End\n \n )}\n \n \n \n \n \n )}\n \n )\n}\n\nexport default MultiSelectToolbar\n","export default __webpack_public_path__ + \"static/media/no-data.2fa5b216.png\";","import { Card, Typography } from '@mui/material'\nimport { Image } from 'components/Image'\nimport noDataImg from '../../assets/images/backgrounds/no-data.png'\n\ninterface INoDataProps {\n condition: boolean\n text?: string\n}\n\nconst NoData = ({ condition, text = 'No Data to Show' }: INoDataProps) => {\n return (\n <>\n {condition && (\n \n \n {text}\n \n )}\n \n )\n}\n\nexport default NoData\n","import { Card } from '@mui/material'\nimport { Spinner } from 'components/Spinner'\n\ninterface ILoadingTableDataProps {\n isLoading: boolean\n loadingText?: string\n}\n\nconst LoadingTableData = ({\n isLoading,\n loadingText = 'Fetching data...',\n}: ILoadingTableDataProps) => {\n return (\n <>\n {isLoading ? (\n \n \n \n ) : null}\n \n )\n}\n\nexport default LoadingTableData\n","import {\n Box,\n IconButton,\n Menu,\n Theme,\n Tooltip,\n useMediaQuery,\n} from '@mui/material'\nimport { PropsWithChildren, useState } from 'react'\nimport FilterListIcon from '@mui/icons-material/FilterList'\n\nconst Filters = ({ children }: PropsWithChildren) => {\n const [anchorEl, setAnchorEl] = useState(null)\n const displayFilters = Boolean(anchorEl)\n\n const handleClick = (event) => {\n setAnchorEl(event.currentTarget)\n }\n\n const handleClose = () => {\n setAnchorEl(null)\n }\n\n return (\n \n \n \n \n \n \n \n {children}\n \n \n )\n}\n\nexport default Filters\n","import { Box, Divider, Switch, Typography } from '@mui/material'\nimport { ChangeEvent, PropsWithChildren, useEffect } from 'react'\nimport Filters from 'components/Toolbar/components/Filters'\nimport { SearchBar } from 'components/SearchBar'\nimport { settingsApi } from 'resources'\nimport { ORG_FILTERS_IDENTFIER } from '../../../constants'\ninterface IToolbarSearchbarProps {\n handleSearch: (event: ChangeEvent) => void\n filteredColumns?: any\n setFilteredColumns?: React.Dispatch> | any\n enableFilters?: boolean\n storageKey?: string\n /**\n * If `true`, only columns where column.sortable === true will be shown.\n * Defaults to false, meaning all columns are shown. this is useful for\n * filtering the table by columns that are dynamically generated.\n */\n onlySortable?: boolean\n local?: boolean\n}\n\nconst ToolbarSearchbar = ({\n handleSearch,\n filteredColumns,\n setFilteredColumns,\n enableFilters = true,\n storageKey,\n onlySortable = false,\n local = false,\n children,\n}: PropsWithChildren) => {\n const { updateFilters } = settingsApi()\n\n const handleToggle = async (\n event: React.ChangeEvent,\n column: any,\n ) => {\n const toggled = event.target.checked\n const index = filteredColumns?.findIndex(\n (c: any) => c.value === column.value,\n )\n\n if (index !== -1) {\n const activeColumnsClone = [...filteredColumns]\n activeColumnsClone[index] = { ...column, active: toggled }\n setFilteredColumns(activeColumnsClone)\n\n if (local && storageKey) {\n const existingFilters = JSON.parse(\n localStorage.getItem('tableFilters') || '{}',\n )\n existingFilters[storageKey] = activeColumnsClone\n localStorage.setItem('tableFilters', JSON.stringify(existingFilters))\n } else {\n const currentPage = ORG_FILTERS_IDENTFIER[location.pathname]\n await updateFilters(currentPage, activeColumnsClone)\n }\n }\n }\n\n useEffect(() => {\n if (local && storageKey) {\n const allFilters = JSON.parse(\n localStorage.getItem('tableFilters') || '{}',\n )\n const storedColumns = allFilters[storageKey]\n if (storedColumns) {\n setFilteredColumns(storedColumns)\n }\n }\n }, [local, storageKey, setFilteredColumns])\n\n const columnsToShow = onlySortable\n ? filteredColumns?.filter((col: any) => col.sortable)\n : filteredColumns\n\n return (\n \n \n {enableFilters && (\n \n {columnsToShow && (\n <>\n \n Toggle to enable or disable columns that you want to filter the\n table by.\n \n\n {columnsToShow.map((column: any, index: number) => (\n \n \n {column.label}\n handleToggle(event, column)}\n />\n \n {index !== columnsToShow.length - 1 && }\n \n ))}\n \n )}\n {!columnsToShow && children}\n \n )}\n \n )\n}\n\nexport default ToolbarSearchbar\n","import { Autocomplete, TextField } from '@mui/material'\nimport {\n Button,\n NotificationDialog,\n SideBar,\n Table,\n TableBody,\n TablePagination,\n} from 'components'\nimport SortableTableHead from 'components/Table/components/TableHead/SortableTableHead'\nimport { DEVICES_PER_PAGE, DEFAULT_PAGE } from '../../constants'\nimport useColumnFiltering from 'hooks/useColumnFiltering'\nimport useDialog from 'hooks/useDialog'\nimport useSortableHeader from 'hooks/useSortableHeader'\nimport { ChangeEvent, useEffect, useMemo, useState } from 'react'\nimport ReportRow from './components/ReportRow'\nimport ReportForm from './components/ReportForm'\nimport { IMember, IOrganization } from 'models'\nimport { memberApi, organizationApi, reportApi } from 'resources'\nimport MultiSelectToolbar from 'components/Table/components/MultiSelectToolbar/MultiSelectToolbar'\nimport NoData from 'components/PageBase/NoData'\nimport LoadingTableData from 'components/Table/components/LoadingTableData/LoadingTableData'\nimport { IReport, IReportList } from 'models/Report'\nimport Toolbar from 'components/Toolbar/Toolbar'\nimport ToolbarControls from 'components/Toolbar/components/ToolbarControls'\nimport ToolbarSearchbar from 'components/Toolbar/components/ToolbarSearchbar'\nimport { DropdownOption, ToolbarControl } from 'types'\nimport useLoadingState from 'hooks/useLoadingState'\n\nconst Reporting = () => {\n const [reports, setReports] = useState({\n items: [],\n total: 0,\n pages: 0,\n })\n const [reportsBackup, setReportsBackup] = useState([])\n const [members, setMembers] = useState([])\n const [openSidebar, setOpenSidebar] = useState(false)\n const [currentPage, setCurrentPage] = useState(DEFAULT_PAGE)\n const [rowsPerPage, setRowsPerPage] = useState(DEVICES_PER_PAGE)\n const [search, setSearch] = useState('')\n const [selectedRows, setSelectedRows] = useState([])\n const [currentReport, setCurrentReport] = useState()\n const [subOrgs, setSubOrgs] = useState([])\n const [selectedSubOrg, setSelectedSubOrg] = useState(null)\n\n const { dialog, displayMessage, closeDialog } = useDialog()\n\n const { filteredColumns, setFilteredColumns, getDefaultFilters } =\n useColumnFiltering({ displayMessage })\n\n const { order, setOrder, orderBy, handleRequestSort, getVisibleRowsSorted } =\n useSortableHeader({\n defaultOrderBy: 'name',\n entity: 'reporting',\n nestedProps: [\n {\n columnValue: 'assignee',\n path: 'assignee.name',\n defaultValue: '',\n },\n ],\n })\n\n const { getMany } = memberApi()\n const { getAllReports, remove } = reportApi()\n const { getOrgs } = organizationApi()\n\n const { loading, setLoading } = useLoadingState(true)\n const { loading: loadingSubOrgs, setLoading: setLoadingSubOrgs } =\n useLoadingState(true)\n\n const organizationOptions: DropdownOption[] = useMemo(\n () => [\n ...subOrgs.map((org) => ({\n value: org.id,\n label: org.name,\n })),\n ],\n [subOrgs],\n )\n\n const handleCloseSidebar = () => {\n setOpenSidebar(false)\n setCurrentReport(undefined)\n }\n\n const handleSearch = (event: ChangeEvent): void => {\n setSearch(event.target.value)\n }\n\n const handleSelectRow = (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => {\n setSelectedRows((previousValue) =>\n checked\n ? [...previousValue, id]\n : previousValue.filter((rowId) => rowId !== id),\n )\n }\n\n const handleSelectAll = (event: React.ChangeEvent, checked: boolean) => {\n setSelectedRows(() =>\n checked ? reports.items.map((report) => report.id) : [],\n )\n }\n\n const handleDeleteMany = async () => {\n try {\n await remove(selectedRows)\n displayMessage(\n `${selectedRows.length} item${\n selectedRows.length > 1 ? 's' : ''\n } deleted successfully`,\n 'success',\n )\n setSelectedRows([])\n fetchReports()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const fetchReports = async (\n showNewestFirst: boolean = false,\n ): Promise => {\n try {\n setLoading(true)\n const reports = await getAllReports(\n currentPage + 1,\n rowsPerPage,\n search,\n selectedSubOrg,\n )\n setReportsBackup([...reports.items])\n setReports(reports)\n if (showNewestFirst) {\n setOrder('default')\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const fetchSubOrgs = async (): Promise => {\n try {\n setLoadingSubOrgs(true)\n const subOrgs = await getOrgs(1, 1000)\n setSubOrgs(subOrgs.items)\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoadingSubOrgs(false)\n }\n }\n\n const fetchMembers = async (): Promise => {\n try {\n const members = await getMany(1, 1000)\n setMembers(members.items)\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleEditReport = (report: IReport) => {\n setCurrentReport(report)\n setOpenSidebar(true)\n }\n\n const handleSelectOrganization = (\n event: React.SyntheticEvent,\n value: {\n value: string\n label: string\n } | null,\n ) => {\n const org = subOrgs.find((o) => o.id === value?.value)\n if (!org) {\n // Get information from the main organization if the user\n // clears out the target selector\n setSelectedSubOrg(null)\n } else {\n setSelectedSubOrg(org.id)\n }\n }\n\n const visibleRows = useMemo(\n () => getVisibleRowsSorted(reports.items, reportsBackup),\n [reports, order, orderBy],\n )\n\n useEffect(() => {\n fetchReports()\n }, [search, currentPage, rowsPerPage])\n\n useEffect(() => {\n fetchReports()\n }, [selectedSubOrg])\n\n useEffect(() => {\n fetchReports()\n fetchMembers()\n fetchSubOrgs()\n getDefaultFilters()\n }, [])\n\n const controls: ToolbarControl[] = [\n {\n display: true,\n render: (\n setOpenSidebar(true)}\n disabled={loading || loadingSubOrgs}\n >\n Create Report\n \n ),\n },\n {\n display: true,\n render: (\n (\n \n )}\n onChange={handleSelectOrganization}\n size=\"small\"\n disabled={loading || loadingSubOrgs}\n />\n ),\n },\n ]\n\n return (\n <>\n control.display)}>\n \n \n \n {selectedRows.length > 0 && (\n \n )}\n {!loading && reports.items.length > 0 && (\n <>\n \n c.active)}\n handleSelectAll={handleSelectAll}\n />\n \n {visibleRows.map((report) => (\n c.active)}\n handleSelectRow={handleSelectRow}\n selected={selectedRows.includes(report.id)}\n displayMessage={displayMessage}\n success={fetchReports}\n handleEditReport={handleEditReport}\n />\n ))}\n \n
    \n \n \n )}\n\n \n\n \n\n {openSidebar && (\n \n \n \n )}\n \n \n )\n}\n\nexport default Reporting\n","export default __webpack_public_path__ + \"static/media/fallback.7755eba9.png\";","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAADfCAMAAAA3FNH5AAACKFBMVEVMaXH////+/v7////////////////////+/v7////////////+/v7////+/v7+/v7////////////+/v7////////+/v7////////////////////////////+/v7////////////+/v7////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+/v7////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+/v7////////////+/v7+/v7+/v7+/v7+/v7////+/v6TeYwEAAAAtnRSTlMAAf78Avv9/uUD5fr8BPs65Kuy/e4XAQ6ZV+Nb4l3k9G31+vD54iUI4U7y5+vtBpF8RKnumus9GOgROI8c90b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ruSwadSbnhfec0XbsOIWvTEVT7n1ujB2pbvTnY0lYDYCPPXEki3P9Bx3NVtpmBpA/+pT75964qosJBA5rkekw22NQRse/VKCUCyIUnhSq+DJ4x/NnHw7EL0+ffefn63XKmjBgYs7XBIRB2avKseCRi9MbvrnlQM5/wsXLH/p3WVPVfBx3kdGPvR/eHykmEwFr64CGh0qR1TJk2alT2ruU50ds75+696nsydNWjvn+x3PbOqVP6ykBQcg2bNnzp0r35+YX5GomO4zh+du23P327WT/m/2py/MfP/3DTKYVRaKqqTX9H0kw3/N45WP64SBxn5wxaPgKbtUW8vMuAAAAHxJREFURjEPw60CFoA5ChYV/hJQdbSk64aeHI0QSZj0m0l2W1fRC5OKbwUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUYV/w/f8yaUcnCYGEAAAAASUVORK5CYII=\"","import { ISignIn, PublicOrg } from 'models'\nimport { Link } from 'react-router-dom'\nimport { SignInStyles } from './styles'\nimport { Koloni } from 'assets'\nimport { useState, useEffect } from 'react'\nimport { organizationApi, useAuth } from 'resources'\nimport CancelIcon from '@mui/icons-material/Cancel'\nimport { Grid, Box, Typography, CircularProgress } from '@mui/material'\nimport { PageContainer, SignInForm, Image } from 'components'\nimport { SIGN_IN_PAGE } from '../../constants'\nimport { getOrganizationFromHost } from 'utils/helpers'\n\nconst SignIn = () => {\n const { STYLES, SX } = SignInStyles()\n\n const [err, setErr] = useState(null)\n\n const [org, setOrg] = useState()\n\n const { signIn, configureAmplify } = useAuth()\n const { getOrgDetailsPublic } = organizationApi()\n\n const fetchPublicOrgData = async () => {\n const orgName = getOrganizationFromHost()\n const orgData = await getOrgDetailsPublic(orgName)\n setOrg(orgData)\n }\n\n const initAmplify = async () => {\n configureAmplify()\n }\n\n initAmplify()\n\n useEffect(() => {\n fetchPublicOrgData()\n }, [])\n\n const onSignIn = async ({ email, password }: ISignIn): Promise => {\n setErr(null)\n try {\n localStorage.clear()\n await signIn(email.trim(), password, org)\n } catch (error: any) {\n setErr(error.message)\n }\n }\n\n return (\n \n \n \n \n \n {!org ? (\n \n ) : (\n \n )}\n \n \n \n \n \n \n \n \n {SIGN_IN_PAGE.WELCOME}\n {org ? `${org.name}` : ''}\n \n \n \n {err && (\n <>\n \n {err}\n \n )}\n \n\n \n \n \n {SIGN_IN_PAGE.FORGOT_PASSWORD}\n \n {SIGN_IN_PAGE.CHANGE_PASSWORD}\n \n \n \n \n \n \n \n \n \n )\n}\nexport default SignIn\n","import { ISx, IStyles } from 'types'\nimport { useTheme } from '@mui/material/styles'\n\nexport const SignInStyles = (): {\n SX: ISx\n STYLES: IStyles\n} => {\n const theme = useTheme()\n\n const SX: ISx = {\n GRID_CONTAINER: {\n height: '100vh',\n justifyContent: 'center',\n },\n GRID_ITEM: {\n background: theme.palette.mode === 'dark' ? '#1c1f25' : '#ffffff',\n },\n RESET_LINK_CONTAINER: {\n display: {\n xs: 'block',\n sm: 'flex',\n lg: 'flex',\n },\n alignItems: 'center',\n },\n BOX_LOGO: {\n position: 'relative',\n top: '2em',\n },\n BOX_WELCOME: {\n p: 4,\n },\n BOX_IMAGE_CONTAINER: {\n position: 'relative',\n },\n BOX_IMAGE: {\n position: 'relative',\n display: {\n xs: 'block',\n sm: 'block',\n md: 'block',\n lg: 'flex',\n },\n paddingTop: {\n xs: '6rem',\n sm: '6rem',\n md: '6rem',\n lg: 0,\n },\n alignItems: 'center',\n justifyContent: 'center',\n height: { xs: 'auto', lg: '100vh' },\n right: { xs: 'auto', lg: '0px' },\n textAlign: 'center',\n },\n }\n\n const STYLES: IStyles = {\n RESET_LINK: {\n color: theme.palette.primary.main,\n },\n IMG: {\n width: 400,\n height: 250,\n },\n }\n return { SX, STYLES }\n}\n","export default __webpack_public_path__ + \"static/media/login-bg.6614b757.png\";","import { Grid, Box, Typography, Button, TextField } from '@mui/material'\nimport { Link } from 'react-router-dom'\nimport PageContainer from '../../components/container/PageContainer'\nimport img1 from '../../assets/images/backgrounds/login-bg.png'\n\nconst SignUp = () => (\n \n \n \n `${theme.palette.mode === 'dark' ? '#1c1f25' : '#ffffff'}`,\n }}\n >\n \n \n \n \n \n \n \n \n \n \n \n Welcome\n \n \n \n Already have an Account?\n \n \n Sign In\n \n \n \n \n Name\n \n \n \n Email Address\n \n \n \n Password\n \n \n \n Sign Up\n \n \n \n \n \n \n \n \n)\n\nexport default SignUp\n","import { Box, Container, Typography, Button } from '@mui/material'\nimport { Link } from 'react-router-dom'\nimport PageContainer from '../../components/container/PageContainer'\n\nconst Error = () => (\n \n \n \n \n `${\n theme.palette.mode === 'dark'\n ? 'rgba(0, 0, 0, 0.87)'\n : 'rgba(0, 0, 0, 0.87)'\n }`,\n }}\n >\n 404\n \n \n `${\n theme.palette.mode === 'dark'\n ? 'rgba(0, 0, 0, 0.87)'\n : 'rgba(0, 0, 0, 0.87)'\n }`,\n }}\n >\n This page could not be found.\n \n \n Back to Home\n \n \n \n \n)\n\nexport default Error\n","import { Grid, Box } from '@mui/material'\nimport img1 from '../../assets/images/backgrounds/login-bg.png'\nimport { useAuth } from 'resources'\nimport { ResetPasswordStyles } from './styles'\nimport { ResetPasswordForm, PageContainer, Image } from 'components'\nimport { RESET_PASSWORD_PAGE } from '../../constants'\n\nconst ResetPassword = () => {\n const { SX, STYLES } = ResetPasswordStyles()\n\n const { configureAmplify } = useAuth()\n\n const initAmplify = () => {\n configureAmplify()\n }\n\n initAmplify()\n\n return (\n \n \n \n \n \n \"bg\"\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nexport default ResetPassword\n","import { SxProps } from '@mui/material'\nimport { useTheme } from '@mui/material/styles'\nimport { ISx, IStyles } from 'types'\n\nexport const ResetPasswordStyles = (): {\n SX: ISx\n STYLES: IStyles\n} => {\n const theme = useTheme()\n\n const SX: { [key: string]: SxProps } = {\n GRID_CONTAINER: {\n height: '100vh',\n justifyContent: 'center',\n },\n GRID_ITEM: {\n background: `${theme.palette.mode === 'dark' ? '#1c1f25' : '#ffffff'}`,\n },\n BOX_IMAGE_CONTAINER: {\n position: 'relative',\n },\n BOX_IMAGE: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: {\n xs: 'relative',\n lg: 'absolute',\n },\n top: {\n xs: '5rem',\n lg: '0',\n },\n height: { xs: 'auto', lg: '100vh' },\n right: { xs: 'auto' },\n margin: '0 auto',\n width: '100%',\n },\n BOX_LOGO: {\n display: 'flex',\n alignItems: 'center',\n p: 4,\n position: 'absolute',\n top: '0',\n },\n }\n\n const STYLES: IStyles = {\n IMG: {\n width: '90%',\n height: '100%',\n },\n }\n\n return { SX, STYLES }\n}\n","import { Grid, Box } from '@mui/material'\nimport img1 from '../../assets/images/backgrounds/login-bg.png'\n\nimport { SetNewPasswordStyles } from './styles'\n\nimport { SetNewPasswordForm, PageContainer, Image } from 'components'\n\nconst SetNewPassword = () => {\n const { SX, STYLES } = SetNewPasswordStyles()\n\n return (\n \n \n \n \n \n \"bg\"\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nexport default SetNewPassword\n","import { SxProps } from '@mui/material'\nimport { useTheme } from '@mui/material/styles'\nimport { ISx, IStyles } from 'types'\n\nexport const SetNewPasswordStyles = (): {\n SX: ISx\n STYLES: IStyles\n} => {\n const theme = useTheme()\n\n const SX: { [key: string]: SxProps } = {\n GRID_CONTAINER: {\n height: '100vh',\n justifyContent: 'center',\n },\n GRID_ITEM: {\n background: `${theme.palette.mode === 'dark' ? '#1c1f25' : '#ffffff'}`,\n },\n BOX_IMAGE_CONTAINER: {\n position: 'relative',\n },\n BOX_IMAGE: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: {\n xs: 'relative',\n lg: 'absolute',\n },\n top: {\n xs: '5rem',\n lg: '0',\n },\n height: { xs: 'auto', lg: '100vh' },\n right: { xs: 'auto' },\n margin: '0 auto',\n width: '100%',\n },\n BOX_LOGO: {\n display: 'flex',\n alignItems: 'center',\n p: 4,\n position: 'absolute',\n top: '0',\n },\n }\n\n const STYLES: IStyles = {\n IMG: {\n width: '100%',\n height: '100%',\n },\n }\n\n return { SX, STYLES }\n}\n","/* eslint-disable react/display-name */\nimport { DeleteForever, CopyAll } from '@mui/icons-material'\nimport { Checkbox, Link, Tooltip, Box } from '@mui/material'\nimport {\n ConfirmDialog,\n IDialogType,\n IconButton,\n TableCell,\n TableRow,\n} from 'components'\nimport { ISubscription, IPrice, IPromo } from 'models'\nimport { useMemo, useState } from 'react'\nimport { RootStateOrAny, useSelector } from 'react-redux'\nimport { promoApi } from 'resources'\nimport { getUserRole, parseCurrency } from 'utils/helpers'\n\ninterface IItemRowProps {\n item: IPrice | ISubscription | IPromo\n setCurrentItem: React.Dispatch<\n React.SetStateAction\n >\n filteredColumns: any[] | undefined\n displayMessage: (message: string, type?: IDialogType) => void\n success: () => void\n handleSelectRow: (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => void\n selectedRows: string[]\n}\n\nconst ItemRow = ({\n item,\n setCurrentItem,\n filteredColumns,\n displayMessage,\n success,\n handleSelectRow,\n selectedRows,\n}: IItemRowProps) => {\n const initialDialog = {\n isOpen: false,\n message: '',\n }\n const [confirmDialog, setConfirmDialog] = useState(initialDialog)\n\n const role = getUserRole()\n const { remove: deletePromo } = promoApi()\n\n const currency = useSelector(\n (state: RootStateOrAny) => state.currencyReducer.currency,\n )\n\n const data = useMemo(\n () => [\n {\n column: 'select',\n render: () =>\n role === 'admin' ? (\n \n handleSelectRow(event, checked, item.id)\n }\n inputProps={{ 'aria-label': 'controlled' }}\n />\n ) : (\n \n ),\n },\n {\n column: 'name',\n render: () =>\n role !== 'member' ? (\n setCurrentItem(item as IPromo)}\n >\n {(item as IPromo).name}\n \n ) : (\n (item as IPromo).name\n ),\n },\n {\n column: 'code',\n render: () => (item as IPromo).code,\n },\n {\n column: 'discount_type',\n render: () =>\n (item as IPromo).discount_type?.charAt(0).toUpperCase() +\n (item as IPromo).discount_type?.slice(1),\n },\n {\n column: 'amount',\n render: () =>\n (item as IPromo).discount_type === 'fixed'\n ? `${parseCurrency(currency)}${(item as IPromo).amount}`\n : `${(item as IPromo).amount}%`,\n },\n {\n column: 'start_time',\n render: () =>\n new Date((item as IPromo).created_at).toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n }),\n },\n {\n column: 'end_time',\n render: () =>\n new Date((item as IPromo).end_time).toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n }),\n },\n {\n column: 'action',\n render: () => (\n \n setConfirmDialog({\n isOpen: true,\n message: 'Are you sure you want to delete this promo?',\n })\n }\n >\n \n \n \n \n ),\n },\n\n {\n column: 'id',\n render: () => (\n \n {\n navigator.clipboard.writeText(item.id)\n }}\n >\n \n \n \n \n \n ),\n },\n ],\n [item, selectedRows],\n )\n\n const dataMap = useMemo(() => {\n const map = new Map React.ReactNode>()\n data.forEach((item) => {\n map.set(item.column, item.render)\n })\n return map\n }, [data])\n\n const deleteAction = async () => {\n try {\n await deletePromo([item.id])\n displayMessage('Promo has been successfully deleted!', 'success')\n success()\n setConfirmDialog({ isOpen: false, message: '' })\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n return (\n <>\n \n {filteredColumns?.map(\n (c) =>\n c.active && (\n \n {dataMap.has(c.value) ? (\n dataMap.get(c.value)!()\n ) : typeof (item as any)[c.value] === 'boolean' ? (\n \n ) : (\n (item as any)[c.value] || ''\n )}\n \n ),\n )}\n \n setConfirmDialog({ isOpen: false, message: '' })}\n onClickConfirm={() => {\n setConfirmDialog({ isOpen: false, message: '' })\n deleteAction()\n }}\n onClickCancel={() => setConfirmDialog({ isOpen: false, message: '' })}\n confirmText=\"Yes\"\n cancelText=\"No\"\n />\n \n )\n}\n\nexport default ItemRow\n","import { DropdownOption } from 'types'\n\nexport const PAY_PER_TABLE_HEADERS = [\n {\n value: 'name',\n label: 'Name',\n active: true,\n },\n {\n value: 'price_type',\n label: 'Price Type',\n active: true,\n },\n {\n value: 'amount',\n label: 'Amount',\n active: true,\n },\n {\n value: 'unit',\n label: 'Unit',\n active: true,\n },\n {\n value: 'prorated',\n label: 'Prorated',\n active: true,\n },\n {\n value: 'card_on_file',\n label: 'Card on file',\n active: true,\n },\n {\n value: 'actions',\n label: 'Actions',\n active: true,\n },\n]\n\nexport const WEIGHT_UNITS: DropdownOption[] = [\n { label: 'Lb', value: 'lb' },\n { label: 'Kg', value: 'kg' },\n]\n\nexport const TIME_UNITS: DropdownOption[] = [\n { label: 'Minute', value: 'minute' },\n { label: 'Hour', value: 'hour' },\n { label: 'Day', value: 'day' },\n { label: 'Week', value: 'week' },\n]\n\nexport const PRICE_TYPES: DropdownOption[] = [\n { label: 'Weight', value: 'pay_per_weight' },\n { label: 'Time', value: 'pay_per_time' },\n]\n\nexport const MEMBERSHIPS_TABLE_HEADERS = [\n {\n value: 'name',\n label: 'Name',\n active: true,\n },\n {\n value: 'membership_type',\n label: 'Membership Type',\n active: true,\n },\n {\n value: 'amount',\n label: 'Amount',\n active: true,\n },\n {\n value: 'billing_type',\n label: 'Billing Type',\n active: true,\n },\n {\n value: 'billing_period',\n label: 'Billing Period',\n active: true,\n },\n {\n value: 'number_of_payments',\n label: 'No. of Payments',\n active: true,\n },\n {\n value: 'value',\n label: 'Value',\n active: true,\n },\n {\n value: 'actions',\n label: 'Actions',\n active: true,\n },\n]\n\nexport const PROMO_CODES_TABLE_HEADERS = [\n {\n value: 'name',\n label: 'Name',\n active: true,\n },\n {\n value: 'code',\n label: 'Code',\n active: true,\n },\n {\n value: 'discount_type',\n label: 'Discount Type',\n active: true,\n },\n {\n value: 'amount',\n label: 'Amount',\n active: true,\n },\n {\n value: 'start_time',\n label: 'Start Time',\n active: true,\n },\n {\n value: 'end_time',\n label: 'End Time',\n active: true,\n },\n {\n value: 'actions',\n label: 'Actions',\n active: true,\n },\n]\n\nexport const PROMO_DISCOUNT: DropdownOption[] = [\n { label: 'Fixed', value: 'fixed' },\n { label: 'Percentage', value: 'percentage' },\n]\n\nexport const COUNTRY_OPTIONS: DropdownOption[] = [\n { label: 'Austria', value: 'AT' },\n { label: 'Belgium', value: 'BE' },\n { label: 'Finland', value: 'FI' },\n { label: 'France', value: 'FR' },\n { label: 'Germany', value: 'DE' },\n { label: 'Ireland', value: 'IE' },\n { label: 'Italy', value: 'IT' },\n { label: 'Netherlands', value: 'NL' },\n { label: 'Portugal', value: 'PT' },\n { label: 'Spain', value: 'ES' },\n { label: 'United Kingdom / Great Britain', value: 'GB' },\n { label: 'Australia', value: 'AU' },\n { label: 'Canada', value: 'CA' },\n { label: 'United States', value: 'US' },\n]\n\nexport const PRICE_CURRENCIES: DropdownOption[] = [\n { label: '$ USD', value: 'usd' },\n { label: '€ EUR', value: 'eur' },\n { label: '£ GBP', value: 'gbp' },\n { label: '$ CAD', value: 'cad' },\n { label: '$ AUD', value: 'aud' },\n]\n\nexport const PROMO_DEFAULTS = [\n 'select',\n 'name',\n 'code',\n 'discount_type',\n 'amount',\n 'start_time',\n 'end_time',\n 'action',\n 'id',\n]\n\nexport const SUBSCRIPTION_DEFAULTS = [\n 'select',\n 'name',\n 'membership_type',\n 'amount',\n 'billing_type',\n 'billing_period',\n 'number_of_payments',\n 'value',\n 'action',\n 'id',\n]\n\nexport const PRICE_DEFAULTS = [\n 'select',\n 'name',\n 'price_type',\n 'amount',\n 'unit_amount',\n 'unit',\n 'prorated',\n 'card_on_file',\n 'action',\n 'id',\n]\n","export const DEVICE_STATUSES = [\n {\n label: 'Available',\n value: 'available',\n },\n {\n label: 'Reserved',\n value: 'reserved',\n },\n {\n label: 'Maintenance',\n value: 'maintenance',\n },\n]\n\nexport const DEVICE_MODE_TYPES = [\n {\n label: 'Asset',\n value: 'rental',\n },\n {\n label: 'Storage',\n value: 'storage',\n },\n {\n label: 'Delivery',\n value: 'delivery',\n },\n {\n label: 'Service',\n value: 'service',\n },\n {\n label: 'Vending',\n value: 'vending',\n },\n]\n\nexport const DEVICE_TYPES = [\n {\n label: 'Linka',\n value: 'linka',\n },\n {\n label: 'Headleader',\n value: 'headleader',\n },\n {\n label: 'Spintly',\n value: 'spintly',\n },\n {\n label: 'Ojmar',\n value: 'ojmar',\n },\n {\n label: 'Gantner',\n value: 'gantner',\n },\n {\n label: 'Harbor',\n value: 'harbor',\n },\n {\n label: 'DC Locker',\n value: 'dclock',\n },\n {\n label: 'Virtual Locker',\n value: 'virtual',\n },\n {\n label: 'Kerong',\n value: 'kerong',\n },\n]\n","import { DEVICE_TYPES } from 'pages/Doors/constants'\nimport { useEffect, useState } from 'react'\nimport { organizationApi } from 'resources'\nimport { DropdownOption } from 'types'\nimport { getErrorMessage } from 'utils/helpers'\n\nconst useHardwareTypes = () => {\n const [orgHardware, setOrgHardware] = useState([])\n const [isLoadingHardware, setIsLoadingHardware] = useState(false)\n const { getSelfOrg } = organizationApi()\n\n const fetchOrgHardwareTypes = async (): Promise => {\n try {\n setIsLoadingHardware(true)\n const selfOrg = await getSelfOrg()\n const deviceTypes: DropdownOption[] = DEVICE_TYPES.filter((type) => {\n return selfOrg[`${type.value}_hardware`] === true\n })\n setOrgHardware([...orgHardware, ...deviceTypes])\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n } finally {\n setIsLoadingHardware(false)\n }\n }\n\n useEffect(() => {\n fetchOrgHardwareTypes()\n }, [])\n\n return {\n orgHardware,\n isLoadingHardware,\n }\n}\n\nexport default useHardwareTypes\n","import { useApiRequest } from 'utils'\nimport { IProduct, IProductList } from 'models/Product'\nimport { getErrorMessage } from 'utils/helpers'\n\nconst productApi = () => {\n const { fetchPartnerEndpoint } = useApiRequest()\n\n const getMany = async (\n page: number,\n size: number,\n search: string = '',\n id?: string,\n ): Promise => {\n const urlParams = new URLSearchParams({\n page: page.toString(),\n size: size.toString(),\n ...(id && { by_location: id ?? '' }),\n search,\n })\n const endpoint = `products?${urlParams.toString()}`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const clone = async (id_product: string): Promise => {\n const endpoint = `products/${id_product}/duplicate`\n const method = 'POST'\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const create = async (product: FormData): Promise => {\n const endpoint = `products`\n const method = 'POST'\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: product,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const uploadCSV = async (file: File) => {\n const endpoint = `products/csv`\n const method = 'POST'\n const body = new FormData()\n\n body.append('file', file)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const update = async (\n productId: string,\n product: FormData,\n ): Promise => {\n const endpoint = `products/${productId}`\n const method = 'PUT'\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: product,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const patch = async (ids: string[], productData: Partial) => {\n const endpoint = `products`\n const method = 'PATCH'\n\n const body = {\n id_products: ids,\n product: productData,\n }\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(body),\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return {\n status: response.status,\n result: await response.json(),\n }\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const remove = async (ids: string[]): Promise => {\n const endpoint = `products`\n const method = 'DELETE'\n const headers = {\n 'Content-Type': 'application/json',\n }\n const body = JSON.stringify(ids)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return { getMany, create, clone, uploadCSV, update, remove, patch }\n}\nexport default productApi\n","import { IReservationList, IReservationSettings } from 'models/Reservations'\nimport { useApiRequest } from 'utils'\nimport { getErrorMessage } from 'utils/helpers'\n\nconst reservationApi = () => {\n const { fetchPartnerEndpoint } = useApiRequest()\n\n const getMany = async (\n page: number,\n size: number,\n search: string = '',\n ): Promise => {\n const urlParams = new URLSearchParams({\n page: page.toString(),\n size: size.toString(),\n search,\n })\n\n const endpoint = `reservations?${urlParams.toString()}`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const checkUniqueTrackingNumber = async (trackingNumber: string) => {\n const endpoint = `reservations/${trackingNumber}/check-uniqueness`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const create = async (reservation) => {\n const endpoint = `reservations`\n const method = 'POST'\n const headers = { 'Content-Type': 'application/json' }\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body: JSON.stringify(reservation),\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const update = async (reservation, reservationId) => {\n const endpoint = `reservations/${reservationId}`\n const method = 'PUT'\n const headers = { 'Content-Type': 'application/json' }\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body: JSON.stringify(reservation),\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const remove = async (ids: string[]): Promise => {\n const endpoint = `reservations`\n const method = 'DELETE'\n const headers = {\n 'Content-Type': 'application/json',\n }\n const body = JSON.stringify(ids)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getReservationSettings = async (): Promise => {\n const endpoint = 'reservation-settings'\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const updateReservationSettings = async (\n reservationSettings: IReservationSettings,\n ) => {\n // No need for a \"POST\" endpoint since reservations settings are\n // created automatically by backend on \"GET\" request if not found.\n const endpoint = 'reservation-settings'\n const method = 'PUT'\n const headers = { 'Content-Type': 'application/json' }\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body: JSON.stringify(reservationSettings),\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const uploadCSV = async (file: File) => {\n const endpoint = `reservations/csv`\n const method = 'POST'\n const body = new FormData()\n\n body.append('file', file)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return {\n getMany,\n create,\n update,\n remove,\n getReservationSettings,\n updateReservationSettings,\n uploadCSV,\n checkUniqueTrackingNumber,\n }\n}\n\nexport default reservationApi\n","import {\n Box,\n FormControl,\n InputLabel,\n Link,\n MenuItem,\n Select,\n Typography,\n useTheme,\n} from '@mui/material'\nimport { useEffect, useState } from 'react'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport Papa from 'papaparse'\nimport { saveAs } from 'file-saver'\nimport {\n deviceApi,\n locationApi,\n memberApi,\n membershipApi,\n priceApi,\n promoApi,\n sizeApi,\n userApi,\n} from 'resources'\nimport { Form, IDialogType } from 'components'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { IPrice } from 'models'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { Help } from 'components/Help'\nimport { getUserRole } from 'utils/helpers'\nimport useHardwareTypes from 'hooks/useHardwareTypes'\nimport { productApi } from 'resources/product'\nimport { reservationApi } from 'resources/reservations'\n\ninterface IBulkUploadEntityProps {\n entity:\n | 'pay-per'\n | 'subscriptions'\n | 'promos'\n | 'locations'\n | 'devices'\n | 'sizes'\n | 'users'\n | 'members'\n | 'products'\n | 'reservations'\n renderSuccessMessage?: (rowsCount: number) => string\n successForm: () => void\n onClose: () => void\n displayMessage?: (message: string | JSX.Element, type?: IDialogType) => void\n}\n\nconst BulkUploadEntity = ({\n entity,\n renderSuccessMessage,\n successForm,\n onClose,\n displayMessage,\n}: IBulkUploadEntityProps) => {\n const role = getUserRole()\n\n const { uploadCSV: uploadPayPerCSV } = priceApi()\n const { uploadCSV: uploadMembershipsCSV } = membershipApi()\n const { uploadCSV: uploadPromosCSV } = promoApi()\n const { uploadCSV: uploadLocationsCSV } = locationApi()\n const { uploadCSV: uploadDevicesCSV } = deviceApi()\n const { uploadCSV: uploadSizesCSV } = sizeApi()\n const { uploadCSV: uploadUsersCSV } = userApi()\n const { uploadCSV: uploadMembersCSV } = memberApi()\n const { uploadCSV: uploadProductsCSV } = productApi()\n const { uploadCSV: uploadReservationsCSV } = reservationApi()\n\n const methods = useForm({})\n\n const [hardwareTypeSelect, setHardwareTypeSelect] = useState('linka')\n const [csvData, setCsvData] = useState([])\n const [csvFile, setCsvFile] = useState(null)\n\n const [isOjmarOrg] = useState(() => {\n const currentOrg = JSON.parse(localStorage.getItem('currentOrg') || '{}')\n return currentOrg && currentOrg.name === 'ojmar'\n })\n\n const { orgHardware } = useHardwareTypes()\n\n const { loading: uploadingRows, setLoading } = useLoadingState()\n\n const theme = useTheme()\n\n const handleDragOver = (event) => {\n event.preventDefault()\n }\n\n const handleDrop = (event) => {\n event.preventDefault()\n const file = event.dataTransfer.files[0]\n file ? handleFileUpload({ target: { files: [file] } }) : null\n }\n\n const handleFileUpload = (event) => {\n const file = event.target.files[0]\n\n if (file) {\n const reader = new FileReader()\n\n reader.onload = (e) => {\n if (e.target && typeof e.target.result === 'string') {\n const text = e.target.result\n parseCSV(text)\n setCsvFile(file)\n }\n }\n reader.readAsText(file)\n }\n }\n\n const handleHardwareTypeChange = (event) => {\n setHardwareTypeSelect(event.target.value)\n }\n\n // Just in case these values are needed in the future\n const parseCSV = (csvText: string) => {\n const rows = csvText.split('\\n')\n const headerRow = rows.shift()?.split(',')\n const file_list: any[] = []\n\n if (!headerRow) return\n\n rows.map((row) => {\n const rowData = row.split(',')\n const obj: { [key: string]: string } = {}\n headerRow.forEach((key, index) => {\n const cleanKey = key.replace(/\"/g, '').trim()\n const cleanValue = rowData[index]?.replace(/\"/g, '').trim()\n if (cleanValue) {\n obj[cleanKey] = cleanValue\n }\n })\n file_list.push(obj)\n })\n\n setCsvData(file_list)\n }\n\n const createCsvBlob = (csvString) => {\n const csvData = Papa.unparse(Papa.parse(csvString).data)\n const blob = new Blob([csvData], { type: 'text/csv' })\n return blob\n }\n\n const handleSubmit = async () => {\n try {\n setLoading(true)\n let response\n\n switch (entity) {\n case 'pay-per':\n response = await uploadPayPerCSV(csvFile)\n break\n\n case 'subscriptions':\n response = await uploadMembershipsCSV(csvFile)\n break\n\n case 'promos':\n response = await uploadPromosCSV(csvFile)\n break\n\n case 'locations':\n response = await uploadLocationsCSV(csvFile)\n break\n\n case 'devices':\n response = await uploadDevicesCSV(csvFile)\n break\n\n case 'sizes':\n response = await uploadSizesCSV(csvFile)\n break\n\n case 'users':\n response = await uploadUsersCSV(csvFile)\n break\n\n case 'members':\n response = await uploadMembersCSV(csvFile)\n break\n\n case 'products':\n response = await uploadProductsCSV(csvFile)\n break\n\n case 'reservations':\n response = await uploadReservationsCSV(csvFile)\n break\n\n default:\n displayMessage?.(\n 'Error uploading CSV: This entity is not supported yet.',\n 'error',\n )\n return\n }\n const successRows = response.filter((r) => r.detail === true).length\n const errorRows = response.filter((r) => r.detail !== true).length\n displayMessage?.(\n <>\n {successRows > 0 && errorRows > 0 && (\n <>\n \n {successRows} row{successRows === 1 ? '' : 's'} was successfully\n added.\n \n \n {errorRows} row{errorRows === 1 ? '' : 's'} has failed.\n {' '}\n
    \n {response.map((r, index) =>\n r.detail === true ? null : (\n \n Error ocurred on row {index + 1}:{' '}\n {r.detail}\n \n ),\n )}\n \n )}\n {successRows > 0 && errorRows === 0 && (\n \n {successRows} row{`${successRows === 1 ? '' : 's'}`}{' '}\n {successRows === 1 ? 'has' : 'have'} been uploaded successfully!\n \n )}\n {errorRows > 0 && successRows === 0 && (\n <>\n Upload was unsuccessful!\n
    \n {response\n .filter((r) => r.detail !== true)\n .map((r, index) => (\n \n Error ocurred on row {index + 1}:{' '}\n {r.detail}\n \n ))}\n \n )}\n ,\n successRows === 0 ? 'error' : 'success',\n )\n if (successRows > 0) successForm()\n onClose()\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const downloadCSVTemplate = () => {\n let csvString: string | unknown = ''\n\n switch (entity) {\n case 'pay-per':\n csvString =\n 'name,amount,currency,prorated,card_on_file,unit,unit_amount,price_type\\n' +\n 'Test Price CSV,1.0,usd,yes,yes,hour,2,pay_per_time'\n break\n case 'subscriptions':\n csvString =\n 'name,description,active,currency,amount,billing_type,billing_period,number_of_payments,membership_type,value\\n' +\n 'Test Membership CSV, Some description,yes,usd,12.0,recurring,month,0,percentage,10.0'\n break\n\n case 'promos':\n csvString =\n 'name,code,amount,discount_type,start_time,end_time\\n' +\n 'Test Promo CSV,CVSCVS,25,percentage,2023-10-02T13:06:00.000Z,2023-11-15T13:06:00.000Z'\n break\n\n case 'locations':\n csvString =\n 'name,address,custom_id,hidden,latitude,longitude,contact_email,contact_phone\\n' +\n 'Test Location CSV,someplace,12345,1,23.13,23.14,,,'\n break\n\n case 'devices':\n const deviceTemplates = [\n {\n name: 'linka',\n tpl:\n 'name,product,location,price,size,' +\n 'locker_number,mode,status,mac_address,hardware_type,' +\n 'price_required,group\\n' +\n `CSV Linka 1,,,,,,rental,available,00:00:00:00:00,linka,false,Sales\\n` +\n `CSV Linka 2,,,,,,rental,available,00:00:00:00:00,linka,false,Sales\\n` +\n `CSV Linka 3,,,,,,rental,available,00:00:00:00:00,linka,false,Sales\\n` +\n `CSV Linka 4,,,,,,rental,available,00:00:00:00:00,linka,false,Sales`,\n },\n {\n name: 'spintly',\n tpl:\n 'name,product,location,price,size,' +\n 'locker_number,mode,status,integration_id,hardware_type,' +\n 'price_required,group\\n' +\n 'CSV Spintly 1,,,,,,rental,available,1111,spintly,false,Sales\\n' +\n 'CSV Spintly 2,,,,,,rental,available,2222,spintly,false,Sales\\n' +\n 'CSV Spintly 3,,,,,,rental,available,3333,spintly,false,Sales\\n' +\n 'CSV Spintly 4,,,,,,rental,available,4444,spintly,false,Sales',\n },\n {\n name: 'ojmar',\n tpl:\n 'name,product,location,price,size,' +\n 'locker_number,mode,status,hardware_type,locker_udn,user_code,master_code,' +\n 'price_required,group\\n' +\n 'CSV Ojmar 1,,,,,,rental,available,ojmar,locker_udn,1111,100001,false,Sales\\n' +\n 'CSV Ojmar 2,,,,,,rental,available,ojmar,locker_udn,2222,100002,false,Sales\\n' +\n 'CSV Ojmar 3,,,,,,rental,available,ojmar,locker_udn,3333,100003,false,Sales\\n' +\n 'CSV Ojmar 4,,,,,,rental,available,ojmar,locker_udn,4444,100004,false,Sales',\n },\n {\n name: 'gantner',\n tpl:\n 'name,product,location,price,size,' +\n 'locker_number,mode,status,gantner_id,hardware_type,' +\n 'price_required,group\\n' +\n 'CSV Gantner 1,,,,,,rental,available,01101689-2248070013-20,gantner,false,Sales\\n' +\n 'CSV Gantner 2,,,,,,rental,available,01101689-2248070013-21,gantner,false,Sales\\n' +\n 'CSV Gantner 3,,,,,,rental,available,01101689-2248070013-22,gantner,false,Sales\\n' +\n 'CSV Gantner 4,,,,,,rental,available,01101689-2248070013-23,gantner,false,Sales',\n },\n {\n name: 'harbor',\n tpl:\n 'name,product,location,price,size,' +\n 'locker_number,mode,status,harbor_tower_id,harbor_locker_id,hardware_type,' +\n 'price_required,group\\n' +\n 'CSV Harbor 1,,,,,,rental,available,0100000000000014,01,harbor,false,Sales\\n' +\n 'CSV Harbor 2,,,,,,rental,available,0100000000000014,02,harbor,false,Sales\\n' +\n 'CSV Harbor 3,,,,,,rental,available,0100000000000014,03,harbor,false,Sales\\n' +\n 'CSV Harbor 4,,,,,,rental,available,0100000000000014,04,harbor,false,Sales',\n },\n {\n name: 'dclock',\n tpl:\n 'name,product,location,price,size,' +\n 'locker_number,mode,status,dclock_terminal_no,dclock_box_no,hardware_type,' +\n 'price_required,group\\n' +\n 'CSV DC Lock 1,,,,,,rental,available,DC00000000000,12,dclock,false,Sales\\n' +\n 'CSV DC Lock 2,,,,,,rental,available,DC00000000000,13,dclock,false,Sales\\n' +\n 'CSV DC Lock 3,,,,,,rental,available,DC00000000000,14,dclock,false,Sales\\n' +\n 'CSV DC Lock 4,,,,,,rental,available,DC00000000000,15,dclock,false,Sales',\n },\n {\n name: 'kerong',\n tpl:\n 'name,product,location,price,size,' +\n 'locker_number,mode,status,mac_address,ip,circuit_unit,board_unit,hook_port,hardware_type,' +\n 'price_required,group\\n' +\n 'CSV Kerong 1,,,,,,rental,available,00:00:00:00:00,192.168.1.1,abc,abc,5005,kerong,false,\\n' +\n 'CSV kerong 2,,,,,,rental,available,00:00:00:00:00,192.168.1.1,abc,abc,5005,kerong,false,\\n',\n },\n ]\n\n csvString = deviceTemplates.find(\n (tpl) => tpl.name === hardwareTypeSelect,\n )?.tpl\n\n break\n\n case 'sizes':\n csvString =\n 'name,external_id,width,depth,height\\n' +\n 'Test Size CSV,SS,1.20,123,1.00'\n break\n\n case 'members':\n csvString =\n 'name,first_name,last_name,email,enabled,role\\n' +\n 'Cool Guy,Cool,Guy,test@koloni.me,yes,admin'\n break\n\n case 'products':\n csvString =\n 'name,description,price,sales_price,sku,msrp,serial_number,condition\\n' +\n 'Test Product CSV,Test desc,1.20,123,1.00,123,123,new'\n break\n\n case 'reservations':\n csvString =\n 'tracking_number,user_name,email,phone_number,location,size,mode,from_time,to_time\\n' +\n 'ABC123,John Doe,test@koloni.me,50683260526,Some Location,M,storage,09:30,10:30'\n break\n\n default:\n displayMessage?.(\n 'Error downloading CSV: This entity is not supported yet.',\n 'error',\n )\n return\n }\n\n const csvBlob = createCsvBlob(csvString)\n\n saveAs(csvBlob, `${entity.replace('-', '_')}_template.csv`)\n }\n\n useEffect(() => {\n if (isOjmarOrg) {\n setHardwareTypeSelect('ojmar')\n }\n }, [])\n\n return (\n <>\n \n
    \n \n \n Note: The bulk upload process may take some time\n depending on the number of rows being processed. We appreciate\n your patience during this time. Please remember that you can\n upload a maximum of 500 rows at once.\n \n {entity === 'devices' && (\n \n Hardware Type\n \n {/* \n Short-hand conditionals such as \"isOjmarOrg ? () : ()\"\n do not seem to trigger the onChange prop in MUI \n \n )}\n\n \n \n Download CSV Template\n \n \n\n \n \n {csvData.length === 0\n ? 'Drag and drop a CSV file here or click to upload.'\n : renderSuccessMessage?.(csvData.length) ||\n `${csvData.length} row(s) successfully imported. Click the \"Submit\" button to upload the imported prices.`}\n \n \n \n \n \n
    \n
    \n \n )\n}\n\nexport default BulkUploadEntity\n","import { useForm, SubmitHandler, FormProvider } from 'react-hook-form'\nimport {\n Form,\n TextField,\n SelectField,\n DateField,\n Tabs,\n IDialogType,\n} from 'components'\nimport { IPromo } from 'models'\nimport { promoApi } from 'resources'\nimport { PROMO_DISCOUNT } from '../../constants'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport { BulkUploadEntity } from 'components/BulkUploadEntity'\nimport { SyntheticEvent, useEffect, useState } from 'react'\nimport { Typography } from '@mui/material'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { getUserRole, parseCurrency } from 'utils/helpers'\nimport { RootStateOrAny, useSelector } from 'react-redux'\n\ninterface IPromoFormProps {\n promo: IPromo | undefined\n onClose: () => void\n displayMessage: (message: string | JSX.Element, type?: IDialogType) => void\n success: (showNewestFirst?: boolean) => void\n}\n\nconst PromoForm = ({\n promo,\n onClose,\n displayMessage,\n success,\n}: IPromoFormProps) => {\n const { loading, setLoading } = useLoadingState()\n const { update, create } = promoApi()\n\n const [currentTab, setCurrentTab] = useState('IndividualUpload')\n\n const methods = useForm({\n defaultValues: { ...promo },\n })\n\n const currency = useSelector(\n (state: RootStateOrAny) => state.currencyReducer.currency,\n )\n\n const handleTabChange = (event: SyntheticEvent, newValue: string): void => {\n setCurrentTab(newValue)\n }\n\n const onSubmit: SubmitHandler = async (newPromo): Promise => {\n try {\n setLoading(true)\n if (promo) {\n await update(promo.id, newPromo)\n onClose()\n displayMessage('Promo updated successfully!', 'success')\n success()\n } else {\n await create(newPromo)\n onClose()\n displayMessage('Promo created successfully!', 'success')\n success(true)\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n useEffect(() => {\n methods.resetField('end_time')\n }, [methods.watch('start_time')])\n\n const disableSubmit = Object.keys(methods.formState.errors).length > 0\n\n const PromoFormElement = (\n \n
    \n \n \n \n\n \n\n \n\n \n \n\n {methods.watch('amount') && (\n \n {methods.watch('discount_type') === 'fixed'\n ? `-${parseCurrency(currency)}${methods.watch(\n 'amount',\n )} per transaction`\n : `-${methods.watch('amount')}% per transaction`}\n \n )}\n\n \n \n
    \n
    \n )\n\n return (\n <>\n {(promo || (getUserRole() !== 'admin' && !promo)) && PromoFormElement}\n {getUserRole() === 'admin' && !promo && (\n \n ),\n },\n ]}\n currentTab={currentTab}\n handleChange={handleTabChange}\n />\n )}\n \n )\n}\nexport default PromoForm\n","import { Box, Typography } from '@mui/material'\nimport {\n Button,\n NotificationDialog,\n SideBar,\n Table,\n TableBody,\n TablePagination,\n} from 'components'\nimport { DEFAULT_PAGE, ITEMS_PER_PAGE } from 'constants/pagination'\nimport { useCallback, useEffect, useMemo, useState } from 'react'\nimport { promoApi } from 'resources'\nimport ItemRow from './ItemRow'\n\nimport useDialog from 'hooks/useDialog'\nimport MultiSelectToolbar from 'components/Table/components/MultiSelectToolbar/MultiSelectToolbar'\nimport SortableTableHead from 'components/Table/components/TableHead/SortableTableHead'\nimport useSortableHeader from 'hooks/useSortableHeader'\nimport useColumnFiltering from 'hooks/useColumnFiltering'\nimport { generateFilters, getStoredTableFilters } from 'utils/helpers'\nimport { Toolbar } from 'components/Toolbar'\nimport ToolbarControls from 'components/Toolbar/components/ToolbarControls'\nimport ToolbarSearchbar from 'components/Toolbar/components/ToolbarSearchbar'\nimport { ToolbarControl } from 'types'\nimport useLoadingState from 'hooks/useLoadingState'\nimport PromoForm from './PromoForm'\n\nimport { PROMO_DEFAULTS } from '../../constants'\nimport {\n PRODUCT_DEFAULTS,\n PRODUCT_SHORT_DEFAULTS,\n} from 'pages/Products/constants'\n\nconst response = {\n items: [],\n total: 0,\n pages: 0,\n}\n\nconst Promo = () => {\n const [data, setData] = useState(response)\n const [dataBackup, setDataBackup] = useState([])\n const [currentPage, setCurrentPage] = useState(DEFAULT_PAGE)\n const [rowsPerPage, setRowsPerPage] = useState(ITEMS_PER_PAGE)\n const [currentItem, setCurrentItem] = useState()\n const [openForm, setOpenForm] = useState(false)\n const [search, setSearch] = useState('')\n const [selectedRows, setSelectedRows] = useState([])\n\n const { loading, setLoading } = useLoadingState(true)\n const { getMany: getPromos, remove: deletePromo } = promoApi()\n\n const { dialog, displayMessage, closeDialog } = useDialog()\n\n const { filteredColumns, setFilteredColumns } = useColumnFiltering({\n displayMessage,\n })\n\n const { order, setOrder, orderBy, handleRequestSort, getVisibleRowsSorted } =\n useSortableHeader({\n defaultOrderBy: 'name',\n entity: 'promo-codes',\n nestedProps: [],\n })\n\n const handleSelectRow = (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => {\n console.log(event, checked, id)\n setSelectedRows((previousValue) =>\n checked\n ? [...previousValue, id]\n : previousValue.filter((rowId) => rowId !== id),\n )\n }\n\n const handleSelectAll = (event: React.ChangeEvent, checked: boolean) => {\n setSelectedRows(() =>\n checked ? data.items.map((device) => device.id) : [],\n )\n }\n\n const deleteMany = useCallback(async () => {\n try {\n await deletePromo(selectedRows)\n displayMessage(\n `${selectedRows.length} item${\n selectedRows.length > 1 ? 's' : ''\n } deleted successfully`,\n 'success',\n )\n fetchPromos()\n closeDialog()\n setSelectedRows([])\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }, [selectedRows])\n\n const handleClose = () => {\n setOpenForm(false)\n setCurrentItem(undefined)\n }\n\n const handleSearch = (event) => {\n setSearch(event.target.value)\n }\n\n const loadTableFilters = (firstItem: any) => {\n try {\n const storageKey = 'filteredColumns_promos'\n const storedColumns = getStoredTableFilters(storageKey)\n debugger\n if (storedColumns) {\n setFilteredColumns(storedColumns)\n } else {\n const generatedColumns = generateFilters(firstItem, PROMO_DEFAULTS)\n setFilteredColumns(generatedColumns)\n const storedFilters = JSON.parse(\n localStorage.getItem('tableFilters') || '{}',\n )\n storedFilters[storageKey] = generatedColumns\n localStorage.setItem('tableFilters', JSON.stringify(storedFilters))\n }\n } catch (error) {\n console.error('Error loading table filters:', error)\n displayMessage(\n 'Error loading table filters: ' + (error as Error).message,\n 'error',\n )\n }\n }\n\n const fetchPromos = async (showNewestFirst: boolean = false) => {\n try {\n setLoading(true)\n const data = await getPromos(currentPage + 1, rowsPerPage, search)\n setDataBackup([...data.items])\n setData(data)\n loadTableFilters(data.items[0])\n if (showNewestFirst) {\n setOrder('default')\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const handleOpenForm = async () => {\n setOpenForm(true)\n }\n\n const visibleRows = useMemo(\n () => getVisibleRowsSorted(data.items, dataBackup),\n [data, order, orderBy],\n )\n\n const controls: ToolbarControl[] = [\n {\n display: true,\n render: (\n \n Add Promo\n \n ),\n },\n ]\n\n useEffect(() => {\n if (currentItem) {\n setOpenForm(true)\n }\n }, [currentItem])\n\n useEffect(() => {\n fetchPromos()\n }, [search, currentPage, rowsPerPage])\n\n return (\n <>\n control.display)}>\n control.display)}\n />\n \n \n\n 0}\n itemsSelected={selectedRows.length}\n handleAction={deleteMany}\n />\n\n <>\n \n c.active)}\n handleSelectAll={handleSelectAll}\n />\n \n {visibleRows.map((item) => (\n \n ))}\n \n
    \n \n \n\n \n \n \n\n \n \n )\n}\n\nexport default Promo\n","/* eslint-disable react/display-name */\nimport { DeleteForever, CopyAll } from '@mui/icons-material'\nimport { Box, Checkbox, Chip, Link, Tooltip } from '@mui/material'\nimport {\n ConfirmDialog,\n IDialogType,\n IconButton,\n TableCell,\n TableRow,\n} from 'components'\nimport { ISubscription, IPrice, IPromo } from 'models'\nimport { useCallback, useMemo, useState } from 'react'\nimport { RootStateOrAny, useSelector } from 'react-redux'\nimport { membershipApi, priceApi, promoApi } from 'resources'\nimport { getUserRole, parseCurrency } from 'utils/helpers'\n\ninterface IItemRowProps {\n item: IPrice | ISubscription | IPromo\n setCurrentItem: React.Dispatch<\n React.SetStateAction\n >\n\n filteredColumns: any[] | undefined\n displayMessage: (message: string, type?: IDialogType) => void\n success: () => void\n handleSelectRow: (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => void\n selectedRows: string[]\n}\n\nconst ItemRow = ({\n item,\n setCurrentItem,\n filteredColumns,\n displayMessage,\n success,\n handleSelectRow,\n selectedRows,\n}: IItemRowProps) => {\n const [confirmDialog, setConfirmDialog] = useState({\n isOpen: false,\n message: '',\n })\n const { remove: deletePrice } = priceApi()\n\n const role = getUserRole()\n\n const currency = useSelector(\n (state: RootStateOrAny) => state.currencyReducer.currency,\n )\n\n const data = useMemo(\n () => [\n {\n column: 'select',\n render: () =>\n role === 'admin' ? (\n \n handleSelectRow(event, checked, item.id)\n }\n inputProps={{ 'aria-label': 'controlled' }}\n />\n ) : (\n \n ),\n },\n {\n column: 'name',\n render: () =>\n role !== 'member' ? (\n \n setCurrentItem(item as IPrice)}\n >\n {(item as IPrice).name}\n {' '}\n {(item as IPrice).default && (\n \n \n \n )}\n \n ) : (\n \n (item as IPrice).name\n {(item as IPrice).default && (\n \n \n \n )}\n \n ),\n },\n {\n column: 'price_type',\n render: () => {\n switch ((item as IPrice).price_type) {\n case 'pay_per_time':\n return 'Time'\n case 'pay_per_weight':\n return 'Weight'\n }\n },\n },\n {\n column: 'amount',\n render: () =>\n `${parseCurrency((item as IPrice).currency || currency)}${\n (item as IPrice).amount\n }`,\n },\n {\n column: 'unit_amount',\n render: () => (item as IPrice).unit_amount,\n },\n {\n column: 'unit',\n render: () =>\n (item as IPrice).unit?.charAt(0).toUpperCase() +\n (item as IPrice).unit?.slice(1),\n },\n {\n column: 'prorated',\n render: () => ((item as IPrice).prorated ? 'Yes' : 'No'),\n },\n {\n column: 'card_on_file',\n render: () => ((item as IPrice).card_on_file ? 'Yes' : 'No'),\n },\n {\n column: 'action',\n render: () => (\n \n setConfirmDialog({\n isOpen: true,\n message: 'Are you sure you want to delete this price?',\n })\n }\n >\n \n \n \n \n ),\n },\n {\n column: 'id',\n render: () => (\n \n {\n navigator.clipboard.writeText(item.id)\n }}\n >\n \n \n \n \n \n ),\n },\n ],\n [item, selectedRows],\n )\n\n const dataMap = useMemo(() => {\n const map = new Map React.ReactNode>()\n data.forEach((item) => {\n map.set(item.column, item.render)\n })\n return map\n }, [data])\n\n const deleteAction = async () => {\n try {\n await deletePrice([item.id])\n displayMessage('Price has been successfully deleted!', 'success')\n success()\n setConfirmDialog({ isOpen: false, message: '' })\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n return (\n <>\n \n {filteredColumns?.map(\n (c) =>\n c.active && (\n \n {dataMap.has(c.value) ? (\n dataMap.get(c.value)!()\n ) : typeof (item as any)[c.value] === 'boolean' ? (\n \n ) : (\n (item as any)[c.value] || ''\n )}\n \n ),\n )}\n \n setConfirmDialog({ isOpen: false, message: '' })}\n onClickConfirm={() => {\n setConfirmDialog({ isOpen: false, message: '' })\n deleteAction()\n }}\n onClickCancel={() => setConfirmDialog({ isOpen: false, message: '' })}\n confirmText=\"Yes\"\n cancelText=\"No\"\n />\n \n )\n}\n\nexport default ItemRow\n","import {\n Checkbox,\n FormControlLabel,\n Typography,\n TextField,\n Grid,\n Box,\n} from '@mui/material'\nimport { useForm, SubmitHandler, FormProvider } from 'react-hook-form'\nimport { Form, SelectField, ToggleField, Tabs, IDialogType } from 'components'\nimport { IPrice, PriceTypes } from 'models'\nimport { SyntheticEvent, useEffect, useState } from 'react'\nimport { getUserRole, parseCurrency, parseUnit } from 'utils/helpers'\nimport { priceApi, settingsApi } from 'resources'\nimport { PRICE_TYPES, TIME_UNITS, WEIGHT_UNITS } from '../../constants'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport { BulkUploadEntity } from 'components/BulkUploadEntity'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { RootStateOrAny, useSelector } from 'react-redux'\n\ninterface IPriceFormProps {\n price: IPrice | undefined\n defaultPriceExists: boolean\n onClose: () => void\n displayMessage: (message: string | JSX.Element, type?: IDialogType) => void\n success: (showNewestFirst?: boolean) => void\n}\n\nconst PriceForm = ({\n price,\n defaultPriceExists,\n onClose,\n displayMessage,\n success,\n}: IPriceFormProps) => {\n const [amount, setAmount] = useState(price?.amount)\n const [cardOnFile, setCardOnFile] = useState(price?.card_on_file)\n const [unit_amount, setUnitAmount] = useState(price?.unit_amount)\n const [priceDisplayStr, setPriceDisplayStr] = useState('')\n const [defaultPrice, setDefaultPrice] = useState(null)\n\n const { create, update } = priceApi()\n const { loading, setLoading } = useLoadingState()\n\n const [currentTab, setCurrentTab] = useState('IndividualUpload')\n\n const currency = useSelector(\n (state: RootStateOrAny) => state.currencyReducer.currency,\n )\n\n const methods = useForm({\n defaultValues: {\n ...price,\n price_type: price ? price.price_type : PriceTypes.pay_per_time,\n },\n })\n\n const handleTabChange = (event: SyntheticEvent, newValue: string): void => {\n setCurrentTab(newValue)\n }\n\n const onSubmit: SubmitHandler = async (newPrice) => {\n try {\n setLoading(true)\n const payload = { ...newPrice, currency }\n if (price) {\n await update(price.id, payload)\n onClose()\n displayMessage('Price updated successfully!', 'success')\n success()\n } else {\n await create(payload)\n onClose()\n displayMessage('Price created successfully!', 'success')\n success(true)\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const handleUnitAmountChange = (\n event: React.ChangeEvent,\n ) => {\n const { value } = event.target\n\n setUnitAmount(value)\n methods.setValue('unit_amount', parseFloat(value))\n }\n\n const handleAmountChange = (event: React.ChangeEvent) => {\n const { value } = event.target\n\n setAmount(isNaN(parseFloat(value)) ? '' : parseFloat(value))\n methods.setValue('amount', parseFloat(value))\n\n if (parseFloat(value) > 0) {\n methods.setValue('card_on_file', true)\n setCardOnFile(true)\n }\n }\n\n const handleCardOnFileChange = (\n event: React.ChangeEvent,\n ) => {\n setCardOnFile(event.target.checked)\n methods.setValue('card_on_file', event.target.checked)\n }\n\n const handleDefaultPriceChange = (\n event: React.ChangeEvent,\n ) => {\n if (event.target.checked && defaultPrice) {\n methods.setValue('name', defaultPrice.name)\n methods.setValue('amount', defaultPrice.amount)\n methods.setValue('unit', defaultPrice.unit)\n methods.setValue('price_type', defaultPrice.price_type)\n methods.setValue('currency', defaultPrice.currency)\n methods.setValue('prorated', defaultPrice.prorated)\n\n // Set local state variables too\n setAmount(defaultPrice.amount)\n setUnitAmount(defaultPrice.unit_amount)\n setCardOnFile(defaultPrice.card_on_file)\n } else {\n // Reset the form values and local state variables to their initial state\n methods.reset()\n setAmount(price?.amount)\n setUnitAmount(price?.unit_amount)\n setCardOnFile(price?.card_on_file)\n }\n }\n\n const priceType = methods.watch('price_type')\n\n useEffect(() => {\n if (methods.watch('unit') && amount >= 0 && !isNaN(amount)) {\n setPriceDisplayStr(\n `${parseCurrency(currency)} ${amount} / ${\n priceType === 'pay_per_time' ? unit_amount : ''\n } ${parseUnit(methods.watch('unit'))}${\n priceType === 'pay_per_time' && unit_amount != 1 ? 's' : ''\n }`,\n )\n }\n }, [methods.watch('unit'), amount, unit_amount])\n\n useEffect(() => {\n methods.resetField('unit')\n }, [priceType])\n\n const disableSubmit = Object.keys(methods.formState.errors).length > 0\n\n const PriceFormElement = (\n \n
    \n \n {defaultPrice && (\n \n }\n label=\"Set to default price\"\n />\n )}\n \n \n \n\n {amount === 0 && (\n \n }\n label=\"Card on file\"\n />\n )}\n\n {methods.watch('price_type') === PriceTypes.pay_per_time && (\n \n \n \n \n \n \n \n \n )}\n\n {methods.watch('price_type') === PriceTypes.pay_per_weight && (\n \n )}\n\n \n \n {/* If no default price yet we show this checkbox */}\n {(!defaultPriceExists || (price && price?.default)) && (\n \n )}\n \n\n {methods.watch('unit') &&\n amount >= 0 &&\n !isNaN(amount) &&\n amount != '' && (\n \n {priceDisplayStr}\n \n )}\n\n \n \n
    \n
    \n )\n\n return (\n <>\n {(price || (getUserRole() !== 'admin' && !price)) && PriceFormElement}\n {getUserRole() === 'admin' && !price && (\n \n ),\n },\n ]}\n currentTab={currentTab}\n handleChange={handleTabChange}\n />\n )}\n \n )\n}\n\nexport default PriceForm\n","import { Box, Typography } from '@mui/material'\nimport {\n Button,\n NotificationDialog,\n SideBar,\n Table,\n TableBody,\n TablePagination,\n} from 'components'\nimport { DEFAULT_PAGE, ITEMS_PER_PAGE } from 'constants/pagination'\nimport { useEffect, useMemo, useState } from 'react'\nimport { organizationApi, priceApi } from 'resources'\nimport ItemRow from './ItemRow'\nimport useDialog from 'hooks/useDialog'\nimport MultiSelectToolbar from 'components/Table/components/MultiSelectToolbar/MultiSelectToolbar'\nimport SortableTableHead from 'components/Table/components/TableHead/SortableTableHead'\nimport useSortableHeader from 'hooks/useSortableHeader'\nimport useColumnFiltering from 'hooks/useColumnFiltering'\nimport {\n getOrganizationFromHost,\n generateFilters,\n getStoredTableFilters,\n} from 'utils/helpers'\nimport { Toolbar } from 'components/Toolbar'\nimport ToolbarControls from 'components/Toolbar/components/ToolbarControls'\nimport ToolbarSearchbar from 'components/Toolbar/components/ToolbarSearchbar'\nimport useLoadingState from 'hooks/useLoadingState'\nimport PriceForm from './PriceForm'\nimport { PRICE_DEFAULTS, PROMO_DEFAULTS } from '../../constants'\n\nconst response = { items: [], total: 0, pages: 0 }\n\nconst Pricing = () => {\n const [data, setData] = useState(response)\n const [dataBackup, setDataBackup] = useState([])\n const [currentPage, setCurrentPage] = useState(DEFAULT_PAGE)\n const [rowsPerPage, setRowsPerPage] = useState(ITEMS_PER_PAGE)\n const [currentItem, setCurrentItem] = useState()\n const [openForm, setOpenForm] = useState(false)\n const [search, setSearch] = useState('')\n const [selectedRows, setSelectedRows] = useState([])\n\n const { loading, setLoading } = useLoadingState(true)\n const { getOrgDetailsPublic } = organizationApi()\n const { dialog, displayMessage, closeDialog } = useDialog()\n const { getMany: getPrices, remove: deletePrice } = priceApi()\n\n const { filteredColumns, setFilteredColumns } = useColumnFiltering({\n displayMessage,\n })\n const { order, setOrder, orderBy, handleRequestSort, getVisibleRowsSorted } =\n useSortableHeader({\n defaultOrderBy: 'name',\n entity: 'pay-per',\n nestedProps: [],\n })\n\n const defaultPriceExists = useMemo(\n () => data.items.some((price) => price.default),\n [data],\n )\n\n const handleSelectRow = (event, checked, id) => {\n setSelectedRows((prev) =>\n checked ? [...prev, id] : prev.filter((rowId) => rowId !== id),\n )\n }\n\n const handleSelectAll = (event, checked) => {\n setSelectedRows(() => (checked ? data.items.map((item) => item.id) : []))\n }\n\n const deleteMany = async () => {\n await deletePrice(selectedRows)\n displayMessage(\n `${selectedRows.length} item${\n selectedRows.length > 1 ? 's' : ''\n } deleted successfully`,\n 'success',\n )\n fetchPrices()\n closeDialog()\n setSelectedRows([])\n }\n\n const handleDeleteMany = async () => {\n try {\n await deleteMany()\n } catch (error) {\n displayMessage((error as Error).message, 'error')\n }\n }\n\n const handleClose = () => {\n setOpenForm(false)\n setCurrentItem(undefined)\n }\n\n const loadTableFilters = (firstItem: any) => {\n try {\n const storageKey = 'filteredColumns_prices'\n const storedColumns = getStoredTableFilters(storageKey)\n if (storedColumns) {\n setFilteredColumns(storedColumns)\n } else {\n const generatedColumns = generateFilters(firstItem, PRICE_DEFAULTS)\n setFilteredColumns(generatedColumns)\n const storedFilters = JSON.parse(\n localStorage.getItem('tableFilters') || '{}',\n )\n storedFilters[storageKey] = generatedColumns\n localStorage.setItem('tableFilters', JSON.stringify(storedFilters))\n }\n } catch (error) {\n console.error('Error loading table filters:', error)\n displayMessage(\n 'Error loading table filters: ' + (error as Error).message,\n 'error',\n )\n }\n }\n\n const fetchPrices = async (showNewestFirst = false) => {\n try {\n setLoading(true)\n const fetchedData = await getPrices(currentPage + 1, rowsPerPage, search)\n setDataBackup(fetchedData.items)\n setData(fetchedData)\n loadTableFilters(fetchedData.items[0])\n if (showNewestFirst) setOrder('default')\n } catch (error) {\n displayMessage((error as Error).message, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const handleOpenForm = async () => {\n setOpenForm(true)\n }\n\n const controls = useMemo(\n () => [\n {\n display: true,\n render: (\n \n Add Price\n \n ),\n },\n ],\n [loading],\n )\n\n useEffect(() => {\n fetchPrices()\n }, [search, currentPage, rowsPerPage])\n\n useEffect(() => {\n if (currentItem) {\n setOpenForm(true)\n }\n }, [currentItem])\n\n return (\n <>\n \n \n setSearch(e.target.value)}\n filteredColumns={filteredColumns}\n setFilteredColumns={setFilteredColumns}\n storageKey=\"filteredColumns_prices\"\n local={true}\n />\n \n\n 0}\n itemsSelected={selectedRows.length}\n handleAction={handleDeleteMany}\n />\n\n 0}>\n c.active)}\n handleSelectAll={handleSelectAll}\n />\n \n {getVisibleRowsSorted(data.items, dataBackup).map((item) => (\n \n ))}\n \n \n \n\n \n \n \n \n \n )\n}\n\nexport default Pricing\n","export const setCurrency = (payload) => ({\n type: 'setCurrency',\n payload,\n})\n","import React, { useState, useEffect } from 'react'\nimport {\n Backdrop,\n Box,\n CircularProgress,\n FormControl,\n InputLabel,\n MenuItem,\n Select,\n SelectChangeEvent,\n Theme,\n Typography,\n useMediaQuery,\n} from '@mui/material'\nimport { useForm } from 'react-hook-form'\nimport { Button, NotificationDialog } from 'components'\nimport { DropdownOption } from 'types'\nimport { financialApi, organizationApi, settingsApi } from 'resources'\nimport { Help } from 'components/Help'\nimport useDialog from 'hooks/useDialog'\nimport { getOrganizationFromHost } from 'utils/helpers'\nimport { IStripeAccount } from 'models'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { RootStateOrAny, useDispatch, useSelector } from 'react-redux'\nimport { setCurrency } from 'redux/currency/Action'\nimport { COUNTRY_OPTIONS, PRICE_CURRENCIES } from '../../constants'\n\nconst Financial = (): React.ReactElement => {\n const [isStripeEnabled, setIsStripeEnabled] = useState(false)\n const [account, setAccount] = useState(null)\n const [defaultCountry, setDefaultCountry] = useState('')\n\n const { createStripeAccount, getStripeAccount, deleteStripeAccount } =\n financialApi()\n const { getSettings, createSettings, updateSettings } = settingsApi()\n const { getOrgDetailsPublic } = organizationApi()\n const { dialog, displayMessage, closeDialog } = useDialog()\n const { loading, setLoading } = useLoadingState(true)\n\n const dispatch = useDispatch()\n\n const currency = useSelector(\n (state: RootStateOrAny) => state.currencyReducer.currency,\n )\n\n const smDown = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'))\n\n const methods = useForm({\n defaultValues: {\n country: 'US',\n ...JSON.parse(localStorage.getItem('settings') || '{}'),\n },\n })\n\n const disconnectAccount = async (): Promise => {\n try {\n setLoading(true)\n await deleteStripeAccount()\n setAccount(null)\n setIsStripeEnabled(false)\n displayMessage(\n 'Your Stripe account has been deleted successfully!',\n 'success',\n )\n setLoading(false)\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const createAccount = async (): Promise => {\n try {\n setLoading(true)\n const { stripeLink } = await createStripeAccount(methods.watch('country'))\n window.open(stripeLink, '_blank')\n getAccount()\n displayMessage(\n 'Your Stripe account has been created successfully!',\n 'success',\n )\n setLoading(false)\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const completeAccount = async (): Promise => {\n try {\n // can we get this link without creating, but with GET method ?\n const { stripeLink } = await createStripeAccount(methods.watch('country'))\n getAccount()\n window.open(stripeLink, '_blank')\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const updateAccount = async (): Promise => {\n try {\n const { stripeLink } = await createStripeAccount(methods.watch('country'))\n window.open(stripeLink, '_blank')\n getAccount()\n displayMessage(\n 'Your Stripe account has been updated successfully!',\n 'success',\n )\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const getAccount = async (): Promise => {\n try {\n const response = await getStripeAccount()\n setIsStripeEnabled(true)\n setAccount(response)\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const getSettingsFn = async () => {\n try {\n const response = await getSettings()\n localStorage.setItem('settings', JSON.stringify(response))\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleCurrencyChange = async (event: SelectChangeEvent) => {\n try {\n const currency = event.target.value\n await updateSettings({ default_currency: currency })\n dispatch(setCurrency(currency))\n displayMessage('Currency has been updated!', 'success')\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleCountryChange = (event: SelectChangeEvent) => {\n setDefaultCountry(event.target.value)\n }\n\n useEffect(() => {\n const fetchStripeData = async () => {\n try {\n const orgName = getOrganizationFromHost()\n const { stripe_enabled } = await getOrgDetailsPublic(orgName)\n setIsStripeEnabled(stripe_enabled)\n if (stripe_enabled) {\n getAccount()\n getSettingsFn()\n }\n setLoading(false)\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n fetchStripeData()\n }, [])\n\n return (\n <>\n {/* \n
    */}\n <>\n \n {!loading && (\n \n \n Stripe\n \n \n )}\n\n {!account && !isStripeEnabled && !loading && (\n \n \n Country\n \n {COUNTRY_OPTIONS.map((country) => (\n \n {country.label}\n \n ))}\n \n \n\n \n Create Stripe Account\n \n \n )}\n\n {account && isStripeEnabled && !loading && (\n \n \n Account Details\n
    \n \n ID: \n {account.id}\n \n \n Email: \n \n {account.email}\n \n \n \n Status: \n \n {account.details_submitted ? 'Enabled' : 'Not Configured'}\n \n \n
    \n \n {!account.details_submitted && (\n \n Complete Stripe Account\n \n )}\n \n Disconnect Stripe Account\n \n \n \n )}\n {account && isStripeEnabled && !loading && (\n \n Set default currency\n \n {PRICE_CURRENCIES.map((currency) => (\n \n {currency.label}\n \n ))}\n \n \n )}\n \n \n {/* \n
    */}\n\n theme.zIndex.drawer + 1 }}\n open={loading}\n onClick={() => {}}\n >\n \n \n\n \n \n )\n}\n\nexport default Financial\n","/* eslint-disable react/display-name */\nimport { DeleteForever, CopyAll } from '@mui/icons-material'\nimport { Box, Checkbox, Chip, Link, Tooltip } from '@mui/material'\nimport {\n ConfirmDialog,\n IDialogType,\n IconButton,\n TableCell,\n TableRow,\n} from 'components'\nimport { ISubscription, IPrice, IPromo } from 'models'\nimport { useCallback, useMemo, useState } from 'react'\nimport { RootStateOrAny, useSelector } from 'react-redux'\nimport { membershipApi, priceApi, promoApi } from 'resources'\nimport { getUserRole, parseCurrency } from 'utils/helpers'\n\ninterface IItemRowProps {\n item: IPrice | ISubscription | IPromo\n setCurrentItem: React.Dispatch<\n React.SetStateAction\n >\n filteredColumns: any[] | undefined\n displayMessage: (message: string, type?: IDialogType) => void\n success: () => void\n handleSelectRow: (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => void\n selectedRows: string[]\n}\n\nconst ItemRow = ({\n item,\n setCurrentItem,\n filteredColumns,\n displayMessage,\n success,\n handleSelectRow,\n selectedRows,\n}: IItemRowProps) => {\n const [confirmDialog, setConfirmDialog] = useState({\n isOpen: false,\n message: '',\n })\n\n const { remove: deleteMembership } = membershipApi()\n\n const role = getUserRole()\n\n const data = useMemo(\n () => [\n {\n column: 'select',\n render: () =>\n role === 'admin' ? (\n \n handleSelectRow(event, checked, item.id)\n }\n inputProps={{ 'aria-label': 'controlled' }}\n />\n ) : (\n \n ),\n },\n {\n column: 'name',\n render: () =>\n role !== 'member' ? (\n setCurrentItem(item as ISubscription)}\n >\n {(item as ISubscription).name}\n \n ) : (\n (item as ISubscription).name\n ),\n },\n {\n column: 'membership_type',\n render: () =>\n (item as ISubscription).membership_type?.charAt(0).toUpperCase() +\n (item as ISubscription).membership_type?.slice(1),\n },\n {\n column: 'amount',\n render: () =>\n `${parseCurrency((item as ISubscription).currency)}${\n (item as ISubscription).amount\n }`,\n },\n {\n column: 'billing_type',\n render: () => {\n switch ((item as ISubscription).billing_type) {\n case 'one_time':\n return 'One time'\n case 'recurring':\n return 'Recurring'\n }\n },\n },\n {\n column: 'billing_period',\n render: () =>\n (item as ISubscription).billing_period?.charAt(0).toUpperCase() +\n (item as ISubscription).billing_period?.slice(1),\n },\n {\n column: 'number_of_payments',\n render: () => (item as ISubscription).number_of_payments,\n },\n {\n column: 'value',\n render: () => (item as ISubscription).value,\n },\n {\n column: 'action',\n render: () => (\n \n setConfirmDialog({\n isOpen: true,\n message: 'Are you sure you want to delete this membership?',\n })\n }\n >\n \n \n \n \n ),\n },\n {\n column: 'id',\n render: () => (\n \n {\n navigator.clipboard.writeText(item.id)\n }}\n >\n \n \n \n \n \n ),\n },\n ],\n [item, selectedRows],\n )\n\n const dataMap = useMemo(() => {\n const map = new Map React.ReactNode>()\n data.forEach((item) => {\n map.set(item.column, item.render)\n })\n return map\n }, [data])\n\n const deleteAction = async () => {\n try {\n await deleteMembership([item.id])\n displayMessage('Subscription has been successfully deleted!', 'success')\n success()\n setConfirmDialog({ isOpen: false, message: '' })\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n return (\n <>\n \n {filteredColumns?.map(\n (c) =>\n c.active && (\n \n {dataMap.has(c.value) ? (\n dataMap.get(c.value)!()\n ) : typeof (item as any)[c.value] === 'boolean' ? (\n \n ) : (\n (item as any)[c.value] || ''\n )}\n \n ),\n )}\n \n setConfirmDialog({ isOpen: false, message: '' })}\n onClickConfirm={() => {\n setConfirmDialog({ isOpen: false, message: '' })\n deleteAction()\n }}\n onClickCancel={() => setConfirmDialog({ isOpen: false, message: '' })}\n confirmText=\"Yes\"\n cancelText=\"No\"\n />\n \n )\n}\n\nexport default ItemRow\n","import { Box, useTheme } from '@mui/material'\n\ninterface IToggleItem {\n label: string\n onClick: Function\n selected: boolean | undefined\n id?: string\n}\n\ninterface IToggleSwitch {\n leftItem: IToggleItem\n rightItem: IToggleItem\n isReadOnly?: boolean\n id?: string\n}\n\nconst ToggleSwitch = ({\n leftItem,\n rightItem,\n isReadOnly = false,\n}: IToggleSwitch) => {\n const theme = useTheme()\n\n const handleClickLeftItem = () => {\n if (rightItem.selected) {\n leftItem.onClick()\n }\n }\n\n const handleClickRightItem = () => {\n if (leftItem.selected) {\n rightItem.onClick()\n }\n }\n\n return (\n \n \n {leftItem.label}\n \n \n {rightItem.label}\n \n \n )\n}\n\nexport default ToggleSwitch\n","import { Box, CircularProgress, Typography } from '@mui/material'\n\ninterface ILoadingFormData {\n loadingText?: string\n}\n\nconst LoadingFormData = ({ loadingText = 'Loading...' }: ILoadingFormData) => {\n return (\n \n \n \n {loadingText}\n \n \n )\n}\n\nexport default LoadingFormData\n","import {\n Box,\n Typography,\n TextField as MUITexField,\n Chip,\n Autocomplete,\n Checkbox,\n Button as MUIButton,\n} from '@mui/material'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { membershipApi } from 'resources'\nimport {\n BillingPeriod,\n BillingType,\n ILocation,\n ISubscription,\n SUBSCRIPTION_TYPES,\n} from 'models'\nimport { SyntheticEvent, useEffect, useState } from 'react'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport { Form, IDialogType, SelectField, Tabs, TextField } from 'components'\nimport { BulkUploadEntity } from 'components/BulkUploadEntity'\nimport CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'\nimport CheckBoxIcon from '@mui/icons-material/CheckBox'\nimport DeleteIcon from '@mui/icons-material/Delete'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { RootStateOrAny, useSelector } from 'react-redux'\nimport { getUserRole, parseCurrency } from 'utils/helpers'\nimport { ToggleSwitch } from 'components/ToggleSwitch'\nimport LoadingFormData from 'components/PageBase/LoadingFormData'\nimport useLocations from 'hooks/useLocations'\n\ninterface IMembershipFormProps {\n membership: ISubscription | undefined\n onClose: () => void\n displayMessage: (message: string | JSX.Element, type?: IDialogType) => void\n success: (showNewestFirst?: boolean) => void\n}\n\nconst MembershipForm = ({\n membership,\n onClose,\n displayMessage,\n success,\n}: IMembershipFormProps) => {\n const currency = useSelector(\n (state: RootStateOrAny) => state.currencyReducer.currency,\n )\n\n const snakeCaseToHumanReadable = (snakeCase: string) => {\n // Replace underscores with spaces\n const withSpaces = snakeCase.replace(/_/g, ' ')\n\n // Capitalize the first letter of each word\n const capitalized = withSpaces.replace(/\\b\\w/g, (match) =>\n match.toUpperCase(),\n )\n\n return capitalized\n }\n\n const { loading, setLoading } = useLoadingState()\n const [currentTab, setCurrentTab] = useState('IndividualUpload')\n\n const handleTabChange = (event: SyntheticEvent, newValue: string): void => {\n setCurrentTab(newValue)\n }\n\n const [assignedLocations, setAssignedLocations] = useState([])\n const [locationsToAdd, setLocationsToAdd] = useState([])\n const [locationsToRemove, setLocationsToRemove] = useState([])\n const [billingType, setBillingType] = useState(\n membership?.billing_type || 'one_time',\n )\n\n const { update, create } = membershipApi()\n const { loadingLocations, locationsOptions, locations, fetchLocations } =\n useLocations()\n\n const methods = useForm({\n defaultValues: { ...membership },\n })\n\n const handleToggle = (event: React.SyntheticEvent, value: any) => {\n const locationsSelected: string[] = value.map((option) => option.value)\n setLocationsToAdd(locationsSelected)\n }\n\n const handleLocationSelect = (locationId: string) => {\n // This does not affect API payload only the view:\n setAssignedLocations((prevState) =>\n prevState.filter((location) => location.id !== locationId),\n )\n\n // This affects the API payload and it's used in the onSubmit function:\n setLocationsToRemove((prevState) => [...prevState, locationId])\n }\n\n const onSubmit = async (data: ISubscription) => {\n try {\n setLoading(true)\n const locationsArr = !membership\n ? [...locationsToAdd]\n : [\n ...locationsToAdd,\n ...membership?.locations\n .filter((location) => !locationsToRemove.includes(location.id))\n .map((location) => location.id),\n ]\n const newMembership = {\n ...data,\n active: true,\n currency,\n locations: locationsArr,\n billing_type: billingType,\n }\n\n if (membership) {\n await update(membership.id, newMembership)\n onClose()\n displayMessage('Subscription updated successfully!', 'success')\n success()\n } else {\n await create(newMembership)\n onClose()\n displayMessage('Subscription created successfully!', 'success')\n success(true)\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n useEffect(() => {\n if (membership) {\n const ids = membership.locations.map((location) => location.id)\n setAssignedLocations(\n locations.filter((location) => ids.includes(location.id)),\n )\n } else {\n setAssignedLocations([])\n }\n }, [locations])\n\n useEffect(() => {\n fetchLocations()\n }, [])\n\n const disableSubmit = Object.keys(methods.formState.errors).length > 0\n\n const MembershipFormElement = (\n \n
    \n \n \n {methods.watch('name') && (\n \n )}\n\n {methods.watch('description') && (\n setBillingType('one_time'),\n selected: billingType === 'one_time',\n id: 'subscription_form_toggle_one_time',\n }}\n rightItem={{\n label: 'Recurring',\n onClick: () => setBillingType('recurring'),\n selected: billingType === 'recurring',\n id: 'subscription_form_toggle_recurring',\n }}\n />\n )}\n\n {methods.watch('description') && (\n ({\n label: snakeCaseToHumanReadable(option),\n value: option,\n }))}\n rules={{ required: 'Billing period is required' }}\n />\n )}\n\n {methods.watch('billing_period') && (\n \n )}\n\n {methods.watch('billing_period') && (\n \n )}\n\n {methods.watch('value') && (\n \n )}\n\n {methods.watch('amount') && (\n \n )}\n\n {methods.watch('number_of_payments') && (\n \n {methods.watch('membership_type') === 'limited' &&\n `${methods.watch('value')} free transactions.`}\n {methods.watch('membership_type') === 'unlimited' &&\n `Unlimited free transactions while the membership still active.`}\n {methods.watch('membership_type') === 'fixed' &&\n `Charge -${methods.watch('value')}${parseCurrency(\n currency,\n )} from ${methods.watch('amount')}$ for ${methods.watch(\n 'number_of_payments',\n )} ${methods.watch('billing_period').toLowerCase()}s`}\n {methods.watch('membership_type') === 'percentage' &&\n `Charge -${methods.watch('value')}% from ${methods.watch(\n 'amount',\n )}$ for ${methods.watch('number_of_payments')} ${methods\n .watch('billing_period')\n .toLowerCase()}s`}\n \n )}\n\n {membership && (\n <>\n \n Assigned locations\n \n {!loadingLocations && (\n \n {assignedLocations.length > 0\n ? 'Select the locations that you want to remove from this membership and hit submit'\n : `No locations assigned to this membership.`}\n \n )}\n\n {assignedLocations.length > 0 && (\n \n {assignedLocations.map((location) => (\n handleLocationSelect(location.id)}\n deleteIcon={}\n variant=\"outlined\"\n color=\"default\"\n />\n ))}\n \n )}\n \n )}\n\n {methods.watch('value') && methods.watch('membership_type') && (\n <>\n Assign Locations\n \n Select locations that you want to assign to this membership to\n and hit submit\n \n option.label}\n renderOption={(props, option, { selected }) => (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n {option.label}\n
  • \n )}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n onChange={handleToggle}\n loading={loadingLocations}\n />\n \n )}\n\n \n \n \n
    \n )\n\n if (loadingLocations) {\n return \n }\n\n return (\n <>\n {(membership || (getUserRole() !== 'admin' && !membership)) &&\n MembershipFormElement}\n {getUserRole() === 'admin' && !membership && (\n \n ),\n id: 'bulk_upload_tab',\n },\n ]}\n currentTab={currentTab}\n handleChange={handleTabChange}\n />\n )}\n \n )\n}\n\nexport default MembershipForm\n","import { Box, Typography } from '@mui/material'\nimport {\n Button,\n NotificationDialog,\n SideBar,\n Table,\n TableBody,\n TablePagination,\n} from 'components'\nimport { DEFAULT_PAGE, ITEMS_PER_PAGE } from 'constants/pagination'\nimport { IPrice, IPriceList, IPromo, ISubscription } from 'models'\nimport { useCallback, useEffect, useMemo, useState } from 'react'\nimport { membershipApi, organizationApi, priceApi, promoApi } from 'resources'\nimport ItemRow from './ItemRow'\n\nimport useDialog from 'hooks/useDialog'\nimport MultiSelectToolbar from 'components/Table/components/MultiSelectToolbar/MultiSelectToolbar'\nimport SortableTableHead from 'components/Table/components/TableHead/SortableTableHead'\nimport useSortableHeader from 'hooks/useSortableHeader'\nimport useColumnFiltering from 'hooks/useColumnFiltering'\nimport {\n getOrganizationFromHost,\n generateFilters,\n getStoredTableFilters,\n} from 'utils/helpers'\nimport { useNavigate } from 'react-router'\n\nimport { Toolbar } from 'components/Toolbar'\nimport ToolbarControls from 'components/Toolbar/components/ToolbarControls'\nimport ToolbarSearchbar from 'components/Toolbar/components/ToolbarSearchbar'\nimport { ToolbarControl } from 'types'\nimport useLoadingState from 'hooks/useLoadingState'\nimport MembershipForm from './MembershipForm'\n\nimport { PROMO_DEFAULTS, SUBSCRIPTION_DEFAULTS } from '../../constants'\n\nconst response = {\n items: [],\n total: 0,\n pages: 0,\n}\n\nconst Membership = () => {\n const [data, setData] = useState(response)\n const [dataBackup, setDataBackup] = useState([])\n const [currentPage, setCurrentPage] = useState(DEFAULT_PAGE)\n const [rowsPerPage, setRowsPerPage] = useState(ITEMS_PER_PAGE)\n const [currentItem, setCurrentItem] = useState()\n const [openForm, setOpenForm] = useState(false)\n const [search, setSearch] = useState('')\n const [isStripeEnabled, setIsStripeEnabled] = useState(false)\n const [selectedRows, setSelectedRows] = useState([])\n const [selectedRowData, setSelectedRowData] = useState([])\n\n const { loading, setLoading } = useLoadingState(true)\n const { getOrgDetailsPublic } = organizationApi()\n const { dialog, displayMessage, closeDialog } = useDialog()\n\n const navigate = useNavigate()\n\n const { filteredColumns, setFilteredColumns } = useColumnFiltering({\n displayMessage,\n })\n\n const { order, setOrder, orderBy, handleRequestSort, getVisibleRowsSorted } =\n useSortableHeader({\n defaultOrderBy: 'name',\n entity: 'subscriptions',\n nestedProps: [],\n })\n\n const { getMany: getSubscriptions, remove: deleteMembership } =\n membershipApi()\n\n const handleSelectRow = (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => {\n console.log(event, checked, id)\n setSelectedRows((previousValue) =>\n checked\n ? [...previousValue, id]\n : previousValue.filter((rowId) => rowId !== id),\n )\n\n setSelectedRowData((previousValue) =>\n checked\n ? [...previousValue, data.items.find((row) => row.id === id)]\n : previousValue.filter((row) => row.id !== id),\n )\n }\n\n const handleSelectAll = (event: React.ChangeEvent, checked: boolean) => {\n setSelectedRows(() =>\n checked ? data.items.map((device) => device.id) : [],\n )\n\n setSelectedRowData(() => (checked ? [...data.items] : []))\n }\n\n const handleDeleteMany = async () => {\n try {\n await deleteMany()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const fetchData = async () => {\n setCurrentPage(DEFAULT_PAGE)\n setRowsPerPage(ITEMS_PER_PAGE)\n fetchSubscriptions()\n }\n\n const deleteMany = useCallback(async () => {\n await deleteMembership(selectedRows)\n displayMessage(\n `${selectedRows.length} item${\n selectedRows.length > 1 ? 's' : ''\n } deleted successfully`,\n 'success',\n )\n fetchSubscriptions()\n closeDialog()\n setSelectedRows([])\n }, [selectedRows])\n\n const handleClose = () => {\n setOpenForm(false)\n setCurrentItem(undefined)\n }\n\n const handleSearch = (event) => {\n setSearch(event.target.value)\n }\n\n const loadTableFilters = (firstItem: any) => {\n try {\n const storageKey = 'filteredColumns_subscriptions'\n const storedColumns = getStoredTableFilters(storageKey)\n debugger\n if (storedColumns) {\n setFilteredColumns(storedColumns)\n } else {\n const generatedColumns = generateFilters(\n firstItem,\n SUBSCRIPTION_DEFAULTS,\n )\n setFilteredColumns(generatedColumns)\n const storedFilters = JSON.parse(\n localStorage.getItem('tableFilters') || '{}',\n )\n storedFilters[storageKey] = generatedColumns\n localStorage.setItem('tableFilters', JSON.stringify(storedFilters))\n }\n } catch (error) {\n console.error('Error loading table filters:', error)\n displayMessage(\n 'Error loading table filters: ' + (error as Error).message,\n 'error',\n )\n }\n }\n\n const fetchSubscriptions = async (showNewestFirst: boolean = false) => {\n try {\n setLoading(true)\n const data = await getSubscriptions(currentPage + 1, rowsPerPage, search)\n setDataBackup([...data.items])\n setData(data)\n loadTableFilters(data.items[0])\n if (showNewestFirst) {\n setOrder('default')\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const handleOpenForm = async () => {\n setOpenForm(true)\n }\n\n const visibleRows = useMemo(\n () => getVisibleRowsSorted(data.items, dataBackup),\n [data, order, orderBy],\n )\n\n const dialogButtonText = useMemo(\n () => (!isStripeEnabled ? 'Setup Stripe' : 'Ok'),\n [isStripeEnabled],\n )\n\n const onCloseDialogHandler = useMemo(\n () =>\n !isStripeEnabled\n ? () => {\n navigate('/pricing-set-up')\n closeDialog()\n }\n : closeDialog,\n [isStripeEnabled],\n )\n\n const controls: ToolbarControl[] = [\n {\n display: true,\n render: (\n \n Add Subscription\n \n ),\n },\n ]\n\n useEffect(() => {\n if (currentItem) {\n setOpenForm(true)\n }\n }, [currentItem])\n\n useEffect(() => {\n fetchData()\n }, [])\n\n useEffect(() => {\n fetchSubscriptions()\n }, [search, currentPage, rowsPerPage])\n\n useEffect(() => {\n const fetchStripeData = async () => {\n const orgName = getOrganizationFromHost()\n const { stripe_enabled } = await getOrgDetailsPublic(orgName)\n setIsStripeEnabled(stripe_enabled)\n }\n fetchStripeData()\n }, [])\n\n return (\n <>\n control.display)}>\n control.display)}\n />\n \n \n\n 0}\n itemsSelected={selectedRows.length}\n handleAction={handleDeleteMany}\n actionsAllowed={['export', 'delete']}\n itemsSelectedData={selectedRowData}\n model=\"subscription\"\n />\n\n \n c.active)}\n handleSelectAll={handleSelectAll}\n />\n \n {visibleRows.map((item) => (\n \n ))}\n \n
    \n \n\n \n \n \n\n \n \n )\n}\n\nexport default Membership\n","import { Build, DeleteForever, QrCode } from '@mui/icons-material'\nimport { Checkbox, Chip, Link, Tooltip, Typography } from '@mui/material'\nimport {\n ConfirmDialog,\n IDialogType,\n IconButton,\n QRGenerator,\n TableCell,\n TableRow,\n} from 'components'\nimport { IDevice, DeviceMode, ILocation } from 'models'\nimport { Dispatch, SetStateAction, useMemo, useState } from 'react'\nimport { deviceApi } from 'resources'\nimport { API_URL } from '../../../../constants'\nimport {\n capitalizeFirstLetter,\n getDeviceStatusColor,\n getUserRole,\n} from 'utils/helpers'\n\ninterface IDeviceRowProps {\n device: IDevice\n success: () => void\n handleEdit: (device: IDevice) => void\n displayMessage: (message: string, type?: IDialogType) => void\n filteredColumns: any[]\n openLocationForm: () => void\n setCurrentLocation: Dispatch>\n handleUnlockButtonState: () => void\n handleSelectRow: (\n event: React.ChangeEvent,\n checked: boolean,\n device: any,\n ) => void\n selected: boolean\n}\n\nconst defaultConfirmation = {\n isOpen: false,\n message: '',\n action: '',\n}\n\nconst DeviceRow = ({\n device,\n success,\n handleEdit,\n displayMessage,\n filteredColumns,\n openLocationForm,\n setCurrentLocation,\n handleUnlockButtonState,\n handleSelectRow,\n selected,\n}: IDeviceRowProps): React.ReactElement => {\n const [confirmationMessage, setConfirmationMessage] =\n useState(defaultConfirmation)\n\n const { generateQRCode } = QRGenerator()\n const { remove, setMaintenanceMode, unlockAll } = deviceApi()\n\n const role = getUserRole()\n\n const maintenanceMessage = useMemo(\n () =>\n device.status !== 'maintenance'\n ? 'This action will put the device in maintenance mode. Do you want to continue?'\n : 'Are you sure you want to make this device available?',\n [device],\n )\n\n const handleUnlock = async () => {\n setConfirmationMessage(defaultConfirmation)\n\n if (\n (device.hardware_type == 'gantner' && device.lock_status == 'unknown') ||\n (device.hardware_type == 'gantner' && device.lock_status == 'offline')\n ) {\n displayMessage(\n 'Unable to reach lock. Please check your lock is connected',\n 'error',\n )\n return\n }\n\n try {\n const response = await unlockAll([device.id])\n displayMessage(\n response?.message?.detail || 'Device unlocked correctly.',\n 'success',\n )\n success()\n } catch (error: any) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleMaintenanceMode = async () => {\n try {\n const disable = device.status === 'maintenance' ? false : true\n const response = await setMaintenanceMode([device.id], disable)\n setConfirmationMessage(defaultConfirmation)\n displayMessage(\n device.status !== 'maintenance'\n ? response?.message?.detail || 'Device has been put into maintenance.'\n : 'Device is now available.',\n 'success',\n )\n success()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n setConfirmationMessage(defaultConfirmation)\n }\n }\n\n const handleDelete = async () => {\n try {\n const response = await remove([device.id])\n setConfirmationMessage(defaultConfirmation)\n displayMessage('Your device was deleted.', 'success')\n success()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n setConfirmationMessage(defaultConfirmation)\n }\n }\n\n const handleQRCode = (): void => {\n generateQRCode(\n device.id,\n `${API_URL?.replace('partner', 'mobile')}device/${device.id}`,\n ) // Requested by the mobile team, they need the mobile url to be in the QR code\n }\n\n const handleConfirmAction = async (action) => {\n switch (action) {\n case 'maintenance':\n await handleMaintenanceMode()\n break\n case 'delete':\n await handleDelete()\n break\n case 'unlock':\n await handleUnlock()\n break\n default:\n return false\n }\n }\n\n const handleSelectedDevice = () => {\n const selectedDevices = JSON.parse(\n localStorage.getItem('selectedDevices') || '[]',\n )\n\n const index = selectedDevices.findIndex((d) => d.id === device.id)\n\n if (index !== -1) {\n selectedDevices.splice(index, 1)\n } else {\n selectedDevices.push(device)\n }\n\n localStorage.setItem('selectedDevices', JSON.stringify(selectedDevices))\n handleUnlockButtonState()\n }\n\n return (\n <>\n \n {filteredColumns.findIndex((c) => c.value === 'select' && c.active) !==\n -1 && (\n \n {role === 'admin' ? (\n {\n handleSelectedDevice()\n handleSelectRow(event, checked, device)\n }}\n inputProps={{ 'aria-label': 'controlled' }}\n />\n ) : (\n \n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'name' && c.active) !==\n -1 && (\n \n {\n handleEdit(device)\n }}\n >\n {device.name}\n \n \n )}\n {filteredColumns.findIndex(\n (c) => c.value === 'locker_number' && c.active,\n ) !== -1 && (\n {device.locker_number}\n )}\n {filteredColumns.findIndex(\n (c) => c.value === 'location' && c.active,\n ) !== -1 && (\n \n {role !== 'member' ? (\n {\n setCurrentLocation(device?.location)\n openLocationForm()\n }}\n >\n {device?.location?.name}\n \n ) : (\n <>{device?.location?.name}\n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'size' && c.active) !==\n -1 && (\n \n {device?.size ? (\n \n {device?.size?.name}\n \n ) : (\n '-'\n )}\n \n )}\n {filteredColumns.findIndex(\n (c) => c.value === 'hardware_type' && c.active,\n ) !== -1 && (\n {capitalizeFirstLetter(device.hardware_type)}\n )}\n {filteredColumns.findIndex((c) => c.value === 'status' && c.active) !==\n -1 && (\n \n \n \n )}\n {filteredColumns.findIndex((c) => c.value === 'state' && c.active) !==\n -1 && (\n \n \n role !== 'member' &&\n device.lock_status !== 'open' &&\n setConfirmationMessage({\n isOpen: true,\n message:\n 'This will force your device to unlock. Do you want to continue?',\n action: 'unlock',\n })\n }\n sx={{\n cursor: 'pointer',\n color: 'white',\n opacity:\n device.lock_status === 'open'\n ? '70%'\n : device.lock_status === 'locked'\n ? '70%'\n : '80%',\n backgroundColor:\n device.lock_status === 'open'\n ? 'red'\n : device.lock_status === 'locked'\n ? 'green'\n : 'gray',\n }}\n label={capitalizeFirstLetter(device.lock_status)}\n />\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'mode' && c.active) !==\n -1 && (\n \n {capitalizeFirstLetter(\n device.mode !== 'rental' ? device.mode : 'asset',\n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'item' && c.active) !==\n -1 && {device?.product?.name}}\n {filteredColumns.findIndex((c) => c.value === 'qr_code' && c.active) !==\n -1 && (\n \n \n \n \n \n \n \n )}\n {filteredColumns.findIndex((c) => c.value === 'action' && c.active) !==\n -1 && (\n \n {role !== 'member' && (\n <>\n \n device.status === 'reserved'\n ? displayMessage(\n 'You cannot put a reserved device in maintenance mode.',\n 'warning',\n )\n : setConfirmationMessage({\n isOpen: true,\n message: maintenanceMessage,\n action: 'maintenance',\n })\n }\n sx={{\n color: (theme) =>\n device.status === 'reserved'\n ? 'gray'\n : theme.palette.mode === 'dark'\n ? '#ffffff'\n : '#0000008a',\n '&:hover': {\n color: 'primary.main',\n },\n }}\n >\n \n \n \n \n\n {\n setConfirmationMessage({\n isOpen: true,\n message: 'Are you sure you want to delete this device?',\n action: 'delete',\n })\n }}\n >\n \n \n \n \n \n )}\n \n )}\n \n setConfirmationMessage(defaultConfirmation)}\n onClickConfirm={() => handleConfirmAction(confirmationMessage.action)}\n onClickCancel={() => setConfirmationMessage(defaultConfirmation)}\n confirmText=\"Yes\"\n cancelText=\"No\"\n />\n \n )\n}\n\nexport default DeviceRow\n","import {\n Autocomplete,\n Box,\n Checkbox,\n TextField as MUITextField,\n Typography,\n} from '@mui/material'\nimport { Image, TextField } from 'components'\nimport { IDevice, DeviceMode } from 'models'\nimport { useEffect, useState } from 'react'\nimport { useFormContext } from 'react-hook-form'\nimport CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'\nimport CheckBoxIcon from '@mui/icons-material/CheckBox'\nimport { IProduct } from 'models/Product'\n\ninterface IRentalModeFieldsProps {\n device: IDevice | undefined\n allowEdit: boolean\n products: IProduct[]\n productsOptions: {\n label: string\n value: string\n serial_number: string\n description: string\n }[]\n selectedProduct: {\n label: string\n value: string\n serial_number: string\n description: string\n } | null\n loading?: boolean\n handleProductSelection: (event: React.SyntheticEvent, value: any) => void\n handleProductsListClick: (event: React.SyntheticEvent) => void\n openAddProductDialog?: () => void\n}\n\nconst RentalModeFields = ({\n device,\n allowEdit,\n products,\n productsOptions,\n selectedProduct,\n loading,\n handleProductSelection,\n handleProductsListClick,\n openAddProductDialog,\n}: IRentalModeFieldsProps) => {\n const [productData, setProductData] = useState(\n device && device.id_product ? device.product : null,\n )\n\n const { watch, setValue } = useFormContext()\n const mode = watch('mode')\n\n const handleLoadProductDescriptions = () => {\n const product = products.find(\n (product) => product.id === selectedProduct?.value,\n )\n\n // Visual change for item_description field:\n setValue('item_description', selectedProduct?.description)\n\n if (product) {\n // Product data update:\n setProductData(product)\n setValue(\n 'item_description',\n selectedProduct?.description || product.description,\n )\n }\n }\n\n useEffect(() => handleLoadProductDescriptions(), [selectedProduct])\n\n return mode === DeviceMode.rental || mode === DeviceMode.vending ? (\n <>\n \n {productData && (\n \n )}\n\n \n option.label}\n renderOption={(props, option, { selected }) => (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n \n {option.label}\n \n {option.serial_number}\n \n \n
  • \n )}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n onChange={handleProductSelection}\n loading={loading}\n loadingText={'Loading products...'}\n onOpen={() => {\n if (!loading && productsOptions.length === 0 && allowEdit) {\n openAddProductDialog?.()\n }\n }}\n />\n \n \n \n \n ) : null\n}\n\nexport default RentalModeFields\n","import { useEffect, useMemo, useState } from 'react'\nimport { SelectField, TextField } from 'components'\nimport { useFormContext } from 'react-hook-form'\nimport { DeviceType } from 'models'\nimport useHardwareTypes from 'hooks/useHardwareTypes'\nimport { DropdownOption } from 'types'\n\ninterface IHardwareTypeFieldsProps {\n allowEdit: boolean\n isOjmarOrg: boolean\n isGantnerOrg: boolean\n loadDefaultHardware?: boolean // Only when creating devices\n}\n\nconst HardwareTypeFields = ({\n allowEdit,\n isOjmarOrg,\n isGantnerOrg,\n loadDefaultHardware = false,\n}: IHardwareTypeFieldsProps) => {\n const { watch, setValue } = useFormContext()\n const { orgHardware } = useHardwareTypes()\n const orgSettings = JSON.parse(localStorage.getItem('settings') || '{}')\n\n const [hardwareOptions, setHardwareOptions] = useState([])\n\n const hardwareType = watch('hardware_type')\n\n useEffect(() => {\n if (orgSettings.default_device_hardware && loadDefaultHardware) {\n setValue('hardware_type', orgSettings.default_device_hardware)\n }\n }, [])\n\n useEffect(() => {\n if (isOjmarOrg) {\n const ojmar = orgHardware.find((type) => type.value === 'ojmar')\n setHardwareOptions(ojmar ? [ojmar] : [])\n } else if (isGantnerOrg) {\n const gantner = orgHardware.find((type) => type.value === 'gantner')\n setHardwareOptions(gantner ? [gantner] : [])\n } else {\n setHardwareOptions([\n ...orgHardware,\n // Show Virtual Locker always\n {\n label: 'Virtual Locker',\n value: 'virtual',\n },\n ])\n }\n }, [orgHardware])\n\n return (\n <>\n \n {hardwareType === DeviceType.linka && (\n \n )}\n {hardwareType === DeviceType.spintly && (\n \n )}\n {hardwareType === DeviceType.ojmar && (\n <>\n \n \n value <= 9999 || 'User Code must be equal or lower than 9999',\n }}\n disabled={!allowEdit}\n />\n \n value <= 999999 ||\n 'Master Code must be equal or lower than 999999',\n }}\n disabled={!allowEdit}\n />\n \n )}\n {hardwareType === DeviceType.gantner && (\n \n )}\n {hardwareType === DeviceType.harbor && (\n <>\n \n \n \n )}\n {hardwareType === DeviceType.dclock && (\n <>\n \n \n \n )}\n {hardwareType === DeviceType.kerong && (\n <>\n \n\n \n \n )}\n {hardwareType === DeviceType.headleader && (\n <>\n \n \n \n )}\n \n )\n}\nexport default HardwareTypeFields\n","import { DeviceType } from 'models'\n\nexport const formatDevicePayload = (data): FormData => {\n const payload = new FormData()\n payload.append('name', data.name)\n payload.append('item', data.item || '')\n payload.append('item_description', data.item_description || '')\n payload.append('locker_number', data.locker_number)\n payload.append('mode', data.mode)\n payload.append('id_price', data.id_price || '')\n payload.append('id_size', data.id_size || '')\n payload.append('id_location', data.id_location)\n payload.append('id_product', data.id_product || '')\n payload.append('status', data.status)\n payload.append('hardware_type', data.hardware_type)\n if (data.image) {\n payload.append('image', data.image)\n }\n payload.append('price_required', data.price_required)\n payload.append('ada_compliance', data.ada_compliance)\n payload.append('require_image', data.require_image)\n switch (data.hardware_type) {\n case DeviceType.linka:\n payload.append('mac_address', data?.mac_address)\n break\n case DeviceType.spintly:\n payload.append('integration_id', data?.integration_id)\n break\n case DeviceType.ojmar:\n payload.append('user_code', data?.user_code)\n payload.append('master_code', data?.master_code)\n payload.append('locker_udn', data?.locker_udn)\n break\n case DeviceType.gantner:\n payload.append('gantner_id', data?.gantner_id)\n break\n case DeviceType.harbor:\n payload.append('harbor_tower_id', data?.harbor_tower_id)\n payload.append('harbor_locker_id', data?.harbor_locker_id)\n break\n case DeviceType.dclock:\n payload.append('dclock_terminal_no', data?.dclock_terminal_no)\n payload.append('dclock_box_no', data?.dclock_box_no)\n break\n case DeviceType.kerong:\n payload.append('circuit_unit', data?.circuit_unit)\n payload.append('hook_port', data?.hook_port)\n break\n case DeviceType.headleader:\n payload.append('headboard', data?.headboard)\n payload.append('port', data?.port)\n break\n }\n\n return payload\n}\n","import { useMemo } from 'react'\nimport { isSuperTenant } from 'utils/helpers'\n\nconst useIsSuperTenantOrg = () => {\n const isSuperTenantOrg = useMemo(() => isSuperTenant(), [])\n\n return isSuperTenantOrg\n}\n\nexport default useIsSuperTenantOrg\n","import * as React from 'react'\nimport { styled } from '@mui/material/styles'\nimport Button from '@mui/material/Button'\nimport CloudUploadIcon from '@mui/icons-material/CloudUpload'\nimport { Box, Typography } from '@mui/material'\n\ninterface IImageUploaderProps {\n inputId?: string\n buttonText: string\n helpText: string\n multiple?: boolean\n onChange: (event: React.ChangeEvent) => void\n}\n\nconst VisuallyHiddenInput = styled('input')({\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(50%)',\n height: 1,\n overflow: 'hidden',\n position: 'absolute',\n bottom: 0,\n left: 0,\n whiteSpace: 'nowrap',\n width: 1,\n})\n\nconst ImageUploader = ({\n inputId = 'uploader',\n buttonText,\n helpText,\n multiple = false,\n onChange,\n}: IImageUploaderProps) => {\n return (\n \n }\n onClick={() => document.getElementById(inputId)?.click()}\n >\n {buttonText}\n \n \n \n {helpText}\n \n \n )\n}\n\nexport default ImageUploader\n","import { useEffect, useRef } from 'react'\n\ninterface Canvas3DPreviewProps {\n width: number\n height: number\n depth: number\n}\n\nconst isValidCoordinate = (x: number, y: number) => {\n return Number.isFinite(x) && Number.isFinite(y)\n}\n\nconst createSafeGradient = (\n ctx: CanvasRenderingContext2D,\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n) => {\n if (!isValidCoordinate(x1, y1) || !isValidCoordinate(x2, y2)) {\n console.warn('Invalid gradient coordinates:', { x1, y1, x2, y2 })\n return null\n }\n\n try {\n return ctx.createLinearGradient(x1, y1, x2, y2)\n } catch (error) {\n console.error('Error creating gradient:', error)\n return null\n }\n}\n\nexport const Canvas3DPreview = ({\n width = 10,\n height = 10,\n depth = 10,\n}: Canvas3DPreviewProps) => {\n const canvasRef = useRef(null)\n\n useEffect(() => {\n const canvas = canvasRef.current\n if (!canvas) return\n\n const ctx = canvas.getContext('2d')\n if (!ctx) return\n\n // Clear canvas\n ctx.clearRect(0, 0, canvas.width, canvas.height)\n\n // Set center point\n const centerX = canvas.width / 2\n const centerY = canvas.height / 2\n\n // Better camera angles for more realistic isometric view\n const angleX = Math.PI / 6 // 30 degrees\n const angleY = Math.PI / 4 // 45 degrees\n\n // Improved scale calculation for better proportions\n const maxDimension = Math.max(width, height, depth)\n const scale = (Math.min(canvas.width, canvas.height) * 0.4) / maxDimension\n\n // Convert 3D point to 2D\n const project = (x: number, y: number, z: number) => {\n const isoX = (x - z) * Math.cos(angleX)\n const isoY = y + (x + z) * Math.sin(angleY)\n return {\n x: centerX + isoX * scale,\n y: centerY - isoY * scale,\n }\n }\n\n // Calculate all points\n const points = {\n // Front face\n ftl: project(-width / 2, height, -depth / 2),\n ftr: project(width / 2, height, -depth / 2),\n fbl: project(-width / 2, 0, -depth / 2),\n fbr: project(width / 2, 0, -depth / 2),\n // Back face\n btl: project(-width / 2, height, depth / 2),\n btr: project(width / 2, height, depth / 2),\n bbl: project(-width / 2, 0, depth / 2),\n bbr: project(width / 2, 0, depth / 2),\n }\n\n // Draw faces with enhanced visual style\n const drawFaces = () => {\n ctx.lineWidth = 2\n ctx.lineJoin = 'round'\n ctx.lineCap = 'round'\n\n // Back face (draw first as it's furthest)\n const backGradient = createSafeGradient(\n ctx,\n points.btl.x,\n points.btl.y,\n points.bbr.x,\n points.bbr.y,\n )\n\n if (backGradient) {\n backGradient.addColorStop(0, '#d8d8d8')\n backGradient.addColorStop(1, '#c0c0c0')\n ctx.fillStyle = backGradient\n } else {\n ctx.fillStyle = '#d0d0d0' // Fallback solid color\n }\n\n ctx.beginPath()\n ctx.moveTo(points.btl.x, points.btl.y)\n ctx.lineTo(points.btr.x, points.btr.y)\n ctx.lineTo(points.bbr.x, points.bbr.y)\n ctx.lineTo(points.bbl.x, points.bbl.y)\n ctx.closePath()\n ctx.fill()\n ctx.strokeStyle = '#999'\n ctx.stroke()\n\n // Left face\n const leftGradient = createSafeGradient(\n ctx,\n points.ftl.x,\n points.ftl.y,\n points.btl.x,\n points.btl.y,\n )\n\n if (leftGradient) {\n leftGradient.addColorStop(0, '#e0e0e0')\n leftGradient.addColorStop(1, '#d0d0d0')\n ctx.fillStyle = leftGradient\n } else {\n ctx.fillStyle = '#d0d0d0' // Fallback solid color\n }\n\n ctx.beginPath()\n ctx.moveTo(points.ftl.x, points.ftl.y)\n ctx.lineTo(points.btl.x, points.btl.y)\n ctx.lineTo(points.bbl.x, points.bbl.y)\n ctx.lineTo(points.fbl.x, points.fbl.y)\n ctx.closePath()\n ctx.fill()\n ctx.strokeStyle = '#999'\n ctx.stroke()\n\n // Bottom face\n const bottomGradient = createSafeGradient(\n ctx,\n points.fbl.x,\n points.fbl.y,\n points.bbr.x,\n points.bbr.y,\n )\n\n if (bottomGradient) {\n bottomGradient.addColorStop(0, '#e8e8e8')\n bottomGradient.addColorStop(1, '#d8d8d8')\n ctx.fillStyle = bottomGradient\n } else {\n ctx.fillStyle = '#d0d0d0' // Fallback solid color\n }\n\n ctx.beginPath()\n ctx.moveTo(points.fbl.x, points.fbl.y)\n ctx.lineTo(points.fbr.x, points.fbr.y)\n ctx.lineTo(points.bbr.x, points.bbr.y)\n ctx.lineTo(points.bbl.x, points.bbl.y)\n ctx.closePath()\n ctx.fill()\n ctx.strokeStyle = '#999'\n ctx.stroke()\n\n // Right face\n const rightGradient = createSafeGradient(\n ctx,\n points.ftr.x,\n points.ftr.y,\n points.bbr.x,\n points.bbr.y,\n )\n\n if (rightGradient) {\n rightGradient.addColorStop(0, '#e8e8e8')\n rightGradient.addColorStop(1, '#d0d0d0')\n ctx.fillStyle = rightGradient\n } else {\n ctx.fillStyle = '#d0d0d0' // Fallback solid color\n }\n\n ctx.beginPath()\n ctx.moveTo(points.ftr.x, points.ftr.y)\n ctx.lineTo(points.btr.x, points.btr.y)\n ctx.lineTo(points.bbr.x, points.bbr.y)\n ctx.lineTo(points.fbr.x, points.fbr.y)\n ctx.closePath()\n ctx.fill()\n ctx.strokeStyle = '#999'\n ctx.stroke()\n\n // Top face\n const topGradient = createSafeGradient(\n ctx,\n points.ftl.x,\n points.ftl.y,\n points.btr.x,\n points.btr.y,\n )\n\n if (topGradient) {\n topGradient.addColorStop(0, '#ffffff')\n topGradient.addColorStop(1, '#f0f0f0')\n ctx.fillStyle = topGradient\n } else {\n ctx.fillStyle = '#f0f0f0' // Fallback solid color\n }\n\n ctx.beginPath()\n ctx.moveTo(points.ftl.x, points.ftl.y)\n ctx.lineTo(points.ftr.x, points.ftr.y)\n ctx.lineTo(points.btr.x, points.btr.y)\n ctx.lineTo(points.btl.x, points.btl.y)\n ctx.closePath()\n ctx.fill()\n ctx.strokeStyle = '#999'\n ctx.stroke()\n\n // Front face (draw last as it's closest)\n const frontGradient = createSafeGradient(\n ctx,\n points.ftl.x,\n points.ftl.y,\n points.fbr.x,\n points.fbr.y,\n )\n\n if (frontGradient) {\n frontGradient.addColorStop(0, '#f8f8f8')\n frontGradient.addColorStop(1, '#e8e8e8')\n ctx.fillStyle = frontGradient\n } else {\n ctx.fillStyle = '#e8e8e8' // Fallback solid color\n }\n\n ctx.beginPath()\n ctx.moveTo(points.ftl.x, points.ftl.y)\n ctx.lineTo(points.ftr.x, points.ftr.y)\n ctx.lineTo(points.fbr.x, points.fbr.y)\n ctx.lineTo(points.fbl.x, points.fbl.y)\n ctx.closePath()\n ctx.fill()\n ctx.strokeStyle = '#999'\n ctx.stroke()\n }\n\n // Add ambient shadow\n ctx.shadowColor = 'rgba(0, 0, 0, 0.15)'\n ctx.shadowBlur = 15\n ctx.shadowOffsetX = 8\n ctx.shadowOffsetY = 8\n\n drawFaces()\n }, [width, height, depth])\n\n return (\n \n )\n}\n","import { useForm, FormProvider, SubmitHandler } from 'react-hook-form'\nimport { Form, TextField, Tabs, IDialogType, Image } from 'components'\nimport { ISize } from 'models'\nimport { sizeApi } from 'resources'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport { BulkUploadEntity } from 'components/BulkUploadEntity'\nimport { SyntheticEvent, useState, ChangeEvent } from 'react'\nimport useLoadingState from 'hooks/useLoadingState'\nimport ImageUploader from 'components/ImageUploader/ImageUploader'\nimport { getUserRole } from 'utils/helpers'\nimport { Canvas3DPreview } from './Canvas3DPreview'\nimport { Switch } from '@mui/material'\nimport { Box, Typography } from '@mui/material'\ninterface ISizeFormProps {\n size: ISize | undefined\n onClose: () => void\n displayMessage?: (message: string | JSX.Element, type?: IDialogType) => void\n success: (showNewestFirst?: boolean) => void\n}\n\nconst SizeForm = ({\n size,\n onClose,\n displayMessage,\n success,\n}: ISizeFormProps) => {\n const { create, update } = sizeApi()\n const { loading, setLoading } = useLoadingState()\n\n const methods = useForm({\n defaultValues: { ...size },\n })\n\n const [currentTab, setCurrentTab] = useState('IndividualUpload')\n const [image, setImage] = useState(null)\n const [imagePreview, setImagePreview] = useState('')\n const [showPreview, setShowPreview] = useState(false)\n\n const handleTabChange = (event: SyntheticEvent, newValue: string): void => {\n setCurrentTab(newValue)\n }\n const handleImageUpload = (event: ChangeEvent): void => {\n const file: File | undefined = event.target.files?.[0]\n if (file && /^image\\//.test(file.type)) {\n const reader = new FileReader()\n reader.readAsDataURL(file)\n reader.onload = (e) => {\n const previewUrl = e.target?.result as string\n setImagePreview(previewUrl)\n\n setImage(file)\n }\n } else {\n displayMessage?.('Only images are allowed!', 'info')\n }\n }\n\n const onSubmit: SubmitHandler = async (newPrice: ISize) => {\n try {\n setLoading(true)\n if (size) {\n await update(newPrice.id, newPrice, image)\n onClose()\n displayMessage?.('Size updated successfully!', 'success')\n success()\n } else {\n await create(newPrice, image)\n onClose()\n displayMessage?.('Size created successfully!', 'success')\n success(true)\n }\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const disableSubmit = Object.keys(methods.formState.errors).length > 0\n\n const validateDimension = (value: number, label: string): string | true => {\n if (value <= 0) {\n return `${label} must be greater than 0`\n }\n if (!/^\\d+(\\.\\d{1,2})?$/.test(value.toString())) {\n return `${label} must have up to 2 decimal places`\n }\n return true\n }\n\n const SizeFormElement = (\n \n
    \n \n {size?.image && imagePreview === '' && (\n \n )}\n {imagePreview && (\n \n )}\n \n\n \n \n\n validateDimension(value, 'Width'),\n }}\n isNumeric={true}\n />\n\n validateDimension(value, 'Depth'),\n }}\n isNumeric={true}\n />\n validateDimension(value, 'Height'),\n }}\n isNumeric={true}\n />\n\n \n \n setShowPreview(e.target.checked)}\n />\n Show 3D Preview\n \n \n\n {showPreview && (\n \n )}\n\n \n \n
    \n
    \n )\n\n return (\n <>\n {size && SizeFormElement}\n {getUserRole() !== 'admin' && !size && SizeFormElement}\n {getUserRole() === 'admin' && !size && (\n success?.()}\n onClose={onClose}\n displayMessage={displayMessage}\n />\n ),\n },\n ]}\n currentTab={currentTab}\n handleChange={handleTabChange}\n />\n )}\n \n )\n}\nexport default SizeForm\n","import { DEVICE_MODE_TYPES } from 'pages/Doors/constants'\nimport { useEffect, useState } from 'react'\nimport { organizationApi } from 'resources'\nimport { DropdownOption } from 'types'\nimport { getErrorMessage } from 'utils/helpers'\n\nconst useDeviceModes = () => {\n const [modes, setModes] = useState([])\n const [isLoadingModes, setIsLoadingModes] = useState(false)\n\n const { getSelfOrg } = organizationApi()\n\n const fetchDeviceModes = async (): Promise => {\n try {\n setIsLoadingModes(true)\n const selfOrg = await getSelfOrg()\n const enabledModes: DropdownOption[] = DEVICE_MODE_TYPES.filter(\n (type) => {\n return selfOrg[`${type.value}_mode`] === true\n },\n )\n\n setModes([...enabledModes])\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n } finally {\n setIsLoadingModes(false)\n }\n }\n\n useEffect(() => {\n fetchDeviceModes()\n }, [])\n\n return {\n modes,\n isLoadingModes,\n }\n}\n\nexport default useDeviceModes\n","import { Box, Divider, Typography } from '@mui/material'\nimport { ITransaction } from 'models'\nimport { parseCurrency } from 'utils/helpers'\nimport { format } from 'date-fns'\n\ninterface IUserHistoryItem {\n transaction: ITransaction\n}\n\ninterface IHistoryLine {\n label: string\n value: string | number | null | undefined\n}\n\nconst HistoryLine = ({ label, value }: IHistoryLine) => (\n \n {label}\n \n {value !== null && value !== undefined ? value : 'N/A'}\n \n \n)\n\nconst UserHistoryItem = ({ transaction }: IUserHistoryItem) => {\n const { started_at, ended_at, device, total_time, total } = transaction\n\n const formattedStartDate = started_at\n ? format(new Date(started_at), 'MM/dd/yyyy hh:mm a')\n : 'Date not available'\n\n const formattedEndDate = ended_at\n ? format(new Date(ended_at), 'MM/dd/yyyy hh:mm a')\n : 'Date not available'\n\n return (\n \n \n \n \n \n \n \n \n \n \n )\n}\n\nexport default UserHistoryItem\n","import {\n Accordion,\n AccordionDetails,\n AccordionSummary,\n Box,\n CircularProgress,\n Typography,\n} from '@mui/material'\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore'\nimport { ITransaction, IUser } from 'models'\nimport { useEffect, useState } from 'react'\nimport { transactionsApi } from 'resources'\nimport useLoadingState from 'hooks/useLoadingState'\nimport {\n Timeline,\n TimelineConnector,\n TimelineContent,\n TimelineDot,\n TimelineItem,\n TimelineSeparator,\n} from '@mui/lab'\nimport UserHistoryItem from './UserHistoryItem'\n\ninterface IUserHistory {\n user: IUser\n goBackCallback?: Function | undefined\n}\n\nconst UserHistory = ({ user, goBackCallback = undefined }: IUserHistory) => {\n const [userTransactions, setUserTransactions] = useState([])\n\n const { getEventsByUserId } = transactionsApi()\n const { loading, setLoading } = useLoadingState()\n\n const fetchUserTransactions = async () => {\n try {\n setLoading(true)\n const transactions = await getEventsByUserId(user.id, false)\n setUserTransactions(transactions.slice(0, 100))\n } catch (error) {\n console.error('Error fetching user transactions:', error)\n } finally {\n setLoading(false)\n }\n }\n\n useEffect(() => {\n fetchUserTransactions()\n }, [])\n\n return (\n <>\n {loading && (\n \n \n \n )}\n {!loading && userTransactions.length === 0 && (\n \n \n No transactions for this user.\n \n \n )}\n\n {!loading && userTransactions.length > 0 && (\n \n {goBackCallback && (\n goBackCallback()}\n >\n â—€ Go Back\n \n )}\n \n User Transaction History\n {user.name}\n \n \n }>\n Transactions...\n \n \n \n Showing last{' '}\n {userTransactions.length < 100\n ? userTransactions.length\n : '100'}{' '}\n user transactions...\n \n \n {userTransactions.map((transaction, index) => (\n \n \n \n {index !== userTransactions.length - 1 && (\n \n )}\n \n \n \n \n \n ))}\n \n \n \n \n )}\n \n )\n}\n\nexport default UserHistory\n","import {\n Accordion,\n AccordionDetails,\n AccordionSummary,\n Box,\n Typography,\n useTheme,\n} from '@mui/material'\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore'\nimport { IProduct, ProductTrackingState } from 'models/Product'\nimport Timeline from '@mui/lab/Timeline'\nimport TimelineItem from '@mui/lab/TimelineItem'\nimport TimelineSeparator from '@mui/lab/TimelineSeparator'\nimport TimelineConnector from '@mui/lab/TimelineConnector'\nimport TimelineContent from '@mui/lab/TimelineContent'\nimport TimelineDot from '@mui/lab/TimelineDot'\nimport { SideBar } from 'components'\nimport { useState } from 'react'\nimport UserHistory from 'pages/People/components/users/UserHistory'\nimport { IUser } from 'models'\n\ninterface IProductTrackingProps {\n product: IProduct\n}\n\nconst ProductTracking = ({ product }: IProductTrackingProps) => {\n const [selectedUser, setSelectedUser] = useState(null)\n const theme = useTheme()\n\n const buildLogText = (state: ProductTrackingState) => {\n switch (state) {\n case 'new':\n return 'Product Created'\n case 'incoming':\n return 'In'\n case 'outgoing':\n return 'Out'\n case 'maintenance':\n return 'Maintenance Ticket'\n }\n }\n\n // Get the creation log in order to display it on bottom of the Tracking Log\n const creationLog = product.product_tracking.find(\n (log) => log.state === 'new',\n )\n\n // Sort the rest of the logs by creation date\n const logs = product.product_tracking\n .filter((log) => log.state !== 'new')\n .sort((a, b) => (new Date(a.created_at) < new Date(b.created_at) ? 1 : -1))\n\n return (\n <>\n \n }\n aria-controls=\"panel1a-content\"\n id=\"panel1a-header\"\n >\n Asset History Log\n \n \n \n {logs.length > 0 &&\n logs.map((log, index) => (\n \n \n \n {index + 1 !== logs.length && (\n \n )}\n {index + 1 === logs.length && creationLog && (\n \n )}\n \n \n \n \n {buildLogText(log.state)}\n {(log.state === 'incoming' ||\n log.state === 'outgoing') && (\n setSelectedUser(log.user)}\n >\n {log.user?.name}\n \n )}\n \n {log.condition && (\n \n \n Product condition:\n \n\n \n {log.condition.name}\n \n \n )}\n \n\n \n \n {new Date(log.created_at).toLocaleString('en-US', {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n })}\n \n \n \n \n ))}\n {/* Placing created log at bottom */}\n {creationLog && (\n \n \n \n \n \n \n {buildLogText(creationLog.state)}\n \n \n \n {new Date(creationLog.created_at).toLocaleString(\n 'en-US',\n {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n },\n )}\n \n \n \n \n )}\n \n \n \n {selectedUser && (\n {\n setSelectedUser(null)\n }}\n >\n {\n setSelectedUser(null)\n }}\n />\n \n )}\n \n )\n}\n\nexport default ProductTracking\n","import {\n Autocomplete,\n Box,\n Checkbox,\n TextField as MUITextField,\n} from '@mui/material'\nimport { useForm, FormProvider, SubmitHandler } from 'react-hook-form'\nimport { Form, TextField, Image, Tabs, IDialogType } from 'components'\nimport { IProduct } from 'models/Product'\nimport { productApi } from 'resources/product/api'\nimport { ChangeEvent, SyntheticEvent, useEffect, useState } from 'react'\nimport ProductTracking from './ProductTracking'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport { IProductGroup } from 'models/ProductGroup'\nimport CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'\nimport CheckBoxIcon from '@mui/icons-material/CheckBox'\nimport useLoadingState from 'hooks/useLoadingState'\nimport ImageUploader from 'components/ImageUploader/ImageUploader'\nimport { DropdownOption } from 'types'\nimport { BulkUploadEntity } from 'components/BulkUploadEntity'\nimport LoadingFormData from 'components/PageBase/LoadingFormData'\nimport { getUserRole } from 'utils/helpers'\n\ninterface IProductFormProps {\n product: IProduct | undefined\n onClose: () => void\n displayMessage?: (message: string | JSX.Element, type?: IDialogType) => void\n success: (showNewestFirst?: boolean) => void\n groups: IProductGroup[]\n}\n\nconst ProductForm = ({\n product,\n onClose,\n displayMessage,\n success,\n groups,\n}: IProductFormProps) => {\n const [currentTab, setCurrentTab] = useState('form')\n const [image, setImage] = useState(null)\n const [previewImage, setImagePreview] = useState('')\n\n const [groupsOptions, setGroupsOptions] = useState([])\n\n const [selectedGroup, setSelectedGroup] = useState(\n () => {\n if (product && product.id_product_group) {\n const group = groups.find(\n (group) => group.id === product.id_product_group,\n )\n if (group) {\n return {\n label: group.name,\n value: group.id,\n }\n }\n return null\n } else {\n return null\n }\n },\n )\n const { create, update } = productApi()\n\n const { loading, setLoading } = useLoadingState()\n const { loading: groupsLoading, setLoading: setGroupsLoading } =\n useLoadingState()\n\n const handleTabChange = (event: SyntheticEvent, newValue: string): void => {\n setCurrentTab(newValue)\n }\n\n const methods = useForm({\n defaultValues: {\n ...product,\n },\n })\n\n const handleImageUpload = (event: ChangeEvent): void => {\n const file: File | undefined = event?.target?.files?.[0]\n const isImage = file && /^image\\//.test(file.type)\n\n if (!isImage) {\n displayMessage?.('Only images are allowed!', 'info')\n return\n }\n\n const reader = new FileReader()\n reader.readAsDataURL(file)\n\n reader.onload = (e) =>\n e.target && e.target.result && setImagePreview(e.target.result as string)\n\n setImage(file ?? null)\n }\n\n const handleGroupSelection = (event: React.SyntheticEvent, value: any) => {\n setSelectedGroup(value)\n }\n\n const buildGroupsOptions = () => {\n if (groups.length > 0) {\n const autoCompleteOptions = groups.map((group) => ({\n label: group.name,\n value: group.id,\n }))\n const sortedOptions = autoCompleteOptions.sort((a, b) => {\n if (a.label < b.label) {\n return -1\n }\n if (a.label > b.label) {\n return 1\n }\n return 0\n })\n setGroupsOptions(sortedOptions)\n }\n\n setGroupsLoading(false)\n }\n\n const onSubmit: SubmitHandler = async (newProduct: IProduct) => {\n try {\n setLoading(true)\n const payload = new FormData()\n Object.keys(newProduct).forEach((key) => {\n if (\n ![\n 'devices',\n 'image',\n 'product_tracking',\n 'id_product_group',\n ].includes(key)\n ) {\n if (newProduct[key]) payload.append(key, newProduct[key])\n }\n })\n if (image) {\n payload.append('image', image)\n }\n if (selectedGroup) {\n payload.append('id_product_group', selectedGroup.value)\n }\n\n if (product) {\n await update(newProduct.id, payload)\n onClose()\n displayMessage?.('Product updated successfully!', 'success')\n success()\n } else {\n await create(payload)\n onClose()\n displayMessage?.('Product created successfully!', 'success')\n success(true)\n }\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n useEffect(() => {\n setGroupsLoading(true)\n buildGroupsOptions()\n }, [groups])\n\n const disableSubmit = Object.keys(methods.formState.errors).length > 0\n\n const ProductForm = (\n <>\n \n
    \n \n {product && product.image && previewImage === '' && (\n \n )}\n {previewImage && (\n \n )}\n\n \n\n \n\n \n\n \n \n \n value > 0 || 'Cost must be greater than 0',\n }\n : {}\n }\n isNumeric={true}\n />\n \n value > 0 || 'Sale price must be greater than 0',\n }\n : {}\n }\n isNumeric={true}\n />\n \n value > 0 || 'MSRP must be greater than 0',\n }\n : {}\n }\n isNumeric={true}\n />\n \n \n\n option.label}\n renderOption={(props, option, { selected }) => (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n {option.label}\n
  • \n )}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n onChange={handleGroupSelection}\n loading={groupsLoading}\n />\n\n \n
    \n
    \n
    \n \n )\n\n if (groupsLoading) {\n return \n }\n\n return (\n <>\n {product && (\n ,\n },\n ]}\n currentTab={currentTab}\n handleChange={handleTabChange}\n />\n )}\n {getUserRole() !== 'admin' && !product && ProductForm}\n {getUserRole() === 'admin' && !product && (\n success?.()}\n onClose={onClose}\n displayMessage={displayMessage}\n />\n ),\n },\n ]}\n currentTab={currentTab}\n handleChange={handleTabChange}\n />\n )}\n \n )\n}\nexport default ProductForm\n","import { useApiRequest } from 'utils'\nimport { IProduct, IProductList } from 'models/Product'\nimport { IProductGroup, IProductGroupList } from 'models/ProductGroup'\nimport { getErrorMessage } from 'utils/helpers'\n\nconst productGroupApi = () => {\n const { fetchPartnerEndpoint } = useApiRequest()\n\n const getMany = async (\n page: number,\n size: number,\n search: string = '',\n ): Promise => {\n const urlParams = new URLSearchParams({\n page: page.toString(),\n size: size.toString(),\n search,\n })\n const endpoint = `product-groups?${urlParams.toString()}`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const create = async (group): Promise => {\n const endpoint = `product-groups`\n const method = 'POST'\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: group,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const update = async (\n groupId: string,\n group: any,\n ): Promise => {\n const endpoint = `product-groups/${groupId}`\n const method = 'PUT'\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: group,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const remove = async (ids: string[]): Promise => {\n const endpoint = `product-groups`\n const method = 'DELETE'\n const headers = {\n 'Content-Type': 'application/json',\n }\n const body = JSON.stringify(ids)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return { getMany, create, update, remove }\n}\nexport default productGroupApi\n","export const formatLocationFormData = (data) => {\n const payload = new FormData()\n payload.append('name', data.name)\n payload.append('address', data.address)\n payload.append('hidden', data.hidden)\n payload.append('latitude', data.latitude.toString())\n payload.append('longitude', data.longitude.toString())\n payload.append('contact_phone', data.contact_phone)\n payload.append('contact_email', data.contact_email)\n payload.append('shared', data.shared)\n payload.append('require_image', data.require_image)\n\n if (data.image !== null) payload.append('image', data.image)\n\n if (data.assign_to && data.assign_to.length > 0) {\n payload.append('assignment_type', data.assignment_type)\n payload.append('assign_to', data.assign_to)\n }\n\n return payload\n}\n","import { createContext, ReactNode, useContext } from 'react'\n\ninterface LocationsContext {\n fetchLocations: (searchTerm?: string) => Promise\n}\n\nconst defaultValue = {\n fetchLocations: async (searchTerm?: string) => {\n return Promise.resolve()\n },\n}\n\nconst LocationsContext = createContext(defaultValue)\n\nconst useLocationsContext = (): LocationsContext => {\n try {\n const context = useContext(LocationsContext)\n if (!context) {\n throw new Error('Child must be used within a LocationsContextProvider')\n }\n return context\n } catch (error) {}\n return defaultValue\n}\n\nexport { LocationsContext, useLocationsContext }\n","import {\n Autocomplete,\n Box,\n Checkbox,\n Typography,\n TextField as MUITextField,\n Chip,\n RadioGroup,\n Radio,\n FormControlLabel,\n} from '@mui/material'\nimport { Form, IDialogType, Image, MapField, TextField } from 'components'\nimport { IGroup, ILocation, IUser } from 'models'\nimport { ChangeEvent, useCallback, useEffect, useRef, useState } from 'react'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'\nimport CheckBoxIcon from '@mui/icons-material/CheckBox'\nimport { groupApi, locationApi, userApi } from 'resources'\nimport DeleteIcon from '@mui/icons-material/Delete'\nimport DoneIcon from '@mui/icons-material/Done'\nimport { formatLocationFormData } from '../helper'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { Help } from 'components/Help'\nimport ImageUploader from 'components/ImageUploader/ImageUploader'\nimport { ToggleSwitch } from 'components/ToggleSwitch'\nimport { DropdownOption } from 'types'\nimport { capitalizeFirstLetter, getCurrentOrgProperty } from 'utils/helpers'\nimport { useLocationsContext } from '../context'\n\ninterface IGeneralProps {\n location: ILocation | undefined\n onClose: () => void\n success?: () => void\n allowEdit: boolean\n displayMessage?: (message: string | JSX.Element, type?: IDialogType) => void\n setCurrentLocation: (location: ILocation) => void\n goToDevicesTab: () => void\n}\n\nconst General = ({\n location,\n onClose,\n success,\n allowEdit = true,\n displayMessage,\n setCurrentLocation,\n goToDevicesTab,\n}: IGeneralProps) => {\n const [currentPosition, setCurrentPosition] = useState({\n lat: 0,\n lng: 0,\n })\n const [address, setAddress] = useState('')\n const [image, setImage] = useState(null)\n const [previewImage, setImagePreview] = useState('')\n const [isRestricted, setIsRestricted] = useState(\n Boolean(location?.restriction),\n )\n const [restrictedTo, setRestrictedTo] = useState(\n location?.restriction\n ? capitalizeFirstLetter(location.restriction.restriction_type)\n : 'Users',\n )\n const [users, setUsers] = useState([])\n const [groups, setGroups] = useState([])\n const [usersToAdd, setUsersToAdd] = useState([])\n const [groupsToAdd, setGroupsToAdd] = useState([])\n const [resourcesToDelete, setResourcesToDelete] = useState([])\n const [options, setOptions] = useState([])\n const [isFirstRender, setIsFirstRender] = useState(true)\n const [loadingResources, setLoadingResources] = useState(false)\n const [isShared, setIsShared] = useState(\n location ? location.shared : false,\n )\n const [isHidden, setIsHidden] = useState(\n location ? location.hidden : false,\n )\n\n const [SharedLocationsAllowed, setSharedLocationsAllowed] =\n useState(false)\n\n const [isSuperTenantOrg, setIsSuperTenantOrg] = useState(false)\n\n const ref = useRef(true)\n\n const [customerSupportSelection, setCustomerSupportSelection] = useState(\n () => {\n if (!location) {\n return 'use_default_cs'\n } else {\n const settings = JSON.parse(localStorage.getItem('settings') || '{}')\n\n if (\n location?.contact_email === settings.default_support_email &&\n location?.contact_phone === settings.default_support_phone\n ) {\n return 'use_default_cs'\n }\n\n return 'add_new'\n }\n },\n )\n\n const { loading, setLoading } = useLoadingState()\n const { fetchLocations } = useLocationsContext()\n\n const {\n assign: assignUserToLocation,\n getMany: getUsers,\n assigned: getUsersFromLocation,\n unassign: removeUserFromLocation,\n } = userApi()\n const {\n assign: assignGroupToLocation,\n getMany: getGroups,\n assigned: getGroupsFromLocation,\n unassign: removeGroupFromLocation,\n } = groupApi()\n const { create, update } = locationApi()\n\n const methods = useForm({\n defaultValues: {\n ...location,\n },\n })\n\n const getFormTitle = useCallback(() => {\n if (location && allowEdit && isSuperTenantOrg) {\n return 'Edit Location'\n } else if (!location && allowEdit) {\n return 'Add Location'\n } else if (location && location.shared && !isSuperTenantOrg)\n return 'Location Details'\n else return 'Location Details'\n }, [isSuperTenantOrg])\n\n const fetchUsers = async (): Promise => {\n try {\n setLoadingResources(true)\n const users = await getUsers(1, 10000, '')\n setUsers(users.items)\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n }\n }\n\n const fetchGroups = async (): Promise => {\n try {\n const groups = await getGroups(1, 10000, '')\n setGroups(groups.items)\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleImageClick = (): void => {\n document.getElementById('image')?.click()\n }\n\n const handleImageUpload = (event: ChangeEvent): void => {\n const file: File | undefined = event?.target?.files?.[0]\n const isImage = file && /^image\\//.test(file.type)\n\n if (!isImage) {\n displayMessage?.('Only images are allowed!', 'info')\n return\n }\n\n const reader = new FileReader()\n reader.readAsDataURL(file)\n\n reader.onload = (e) =>\n e.target && e.target.result && setImagePreview(e.target.result as string)\n\n setImage(file ?? null)\n }\n\n const handleToggle = (event: React.SyntheticEvent, value: any) => {\n const selectedResources: string[] = value.map((option) => option.value)\n if (restrictedTo === 'Users') {\n setUsersToAdd(selectedResources)\n } else {\n setGroupsToAdd(selectedResources)\n }\n }\n\n const buildUserOptions = () => {\n if (users.length > 0) {\n const notAssignedUsers = users.filter(\n (user) => !location?.restriction?.items.some((u) => u.id === user.id),\n )\n const autoCompleteOptions = notAssignedUsers.map((user) => ({\n label: `${user.name || ''} (${user.email || user.phone_number})`,\n value: user.id,\n }))\n const sortedOptions = autoCompleteOptions.sort((a, b) => {\n if (a.label < b.label) {\n return -1\n }\n if (a.label > b.label) {\n return 1\n }\n return 0\n })\n setOptions(sortedOptions)\n }\n setLoadingResources(false)\n }\n\n const buildGroupOptions = () => {\n if (groups.length > 0) {\n const notAssignedGroups = groups.filter(\n (group) => !location?.restriction?.items.some((g) => g.id === group.id),\n )\n const autoCompleteOptions = notAssignedGroups.map((group) => ({\n label: group.name,\n value: group.id,\n }))\n const sortedOptions = autoCompleteOptions.sort((a, b) => {\n if (a.label < b.label) {\n return -1\n }\n if (a.label > b.label) {\n return 1\n }\n return 0\n })\n setOptions(sortedOptions)\n }\n setLoadingResources(false)\n }\n\n const handleRadioCustomerSupport = (event) => {\n const settings = JSON.parse(localStorage.getItem('settings') || '{}')\n const { value } = event.target\n setCustomerSupportSelection(value)\n if (value === 'use_default_cs') {\n methods.setValue('contact_phone', settings.default_support_phone)\n methods.setValue('contact_email', settings.default_support_email)\n } else {\n methods.setValue(\n 'contact_phone',\n customerSupportSelection === 'add_new' &&\n location &&\n location.contact_phone !== settings.default_support_phone\n ? location.contact_phone\n : ' ',\n )\n methods.setValue(\n 'contact_email',\n customerSupportSelection === 'add_new' &&\n location &&\n location.contact_email !== settings.default_support_email\n ? location.contact_email\n : ' ',\n )\n }\n methods.clearErrors()\n }\n\n const handleRestrictionChange = (newRestriction: string) => {\n if (\n restrictedTo === 'Users' &&\n (usersToAdd.length > 0 ||\n (location?.restriction && location?.restriction?.items.length > 0)) &&\n newRestriction === 'Groups'\n ) {\n displayMessage?.(\n 'You have selected/assigned users to this location, please unselect/remove them if you want to change the restriction type.',\n 'warning',\n )\n } else if (\n restrictedTo === 'Groups' &&\n (groupsToAdd.length > 0 ||\n (location?.restriction && location?.restriction?.items.length > 0)) &&\n newRestriction === 'Users'\n ) {\n displayMessage?.(\n 'You have selected/assigned groups to this location, please unselect/remove them if you want to change the restriction type.',\n 'warning',\n )\n } else {\n setRestrictedTo(newRestriction)\n }\n }\n\n const handleSelect = (resourceId: string) => {\n if (resourcesToDelete.includes(resourceId)) {\n setResourcesToDelete(resourcesToDelete.filter((id) => id !== resourceId))\n } else {\n setResourcesToDelete((prevState) => [...prevState, resourceId])\n }\n }\n\n const assignUsers = async (locationId) => {\n const promises = usersToAdd.map(\n async (userId) =>\n await assignUserToLocation(userId, locationId, 'location'),\n )\n await Promise.all(promises)\n }\n\n const assignGroups = async (locationId) => {\n const promises = groupsToAdd.map(\n async (groupId) =>\n await assignGroupToLocation(locationId, groupId, 'location'),\n )\n await Promise.all(promises)\n }\n\n const unassignUsers = async (ids: string[] | null = null) => {\n if (location) {\n const resourcesToUnassign = ids || resourcesToDelete\n const promises = resourcesToUnassign.map(\n async (userId) =>\n await removeUserFromLocation(userId, location?.id, 'location'),\n )\n await Promise.all(promises)\n }\n }\n\n const unassignGroups = async (ids: string[] | null = null) => {\n const resourcesToUnassign = ids || resourcesToDelete\n const promises = resourcesToUnassign.map(\n async (groupId) =>\n await removeGroupFromLocation(location?.id, groupId, 'location'),\n )\n await Promise.all(promises)\n }\n\n const updateOrCreateLocation = async (newLocation: ILocation) => {\n // format payload\n const formattedLocation = formatLocationFormData({\n ...newLocation,\n address,\n latitude: currentPosition.lat,\n longitude: currentPosition.lng,\n assignment_type:\n restrictedTo === 'Users'\n ? 'user'\n : restrictedTo === 'Groups'\n ? 'group'\n : null,\n image: image,\n shared: isShared,\n hidden: isHidden,\n })\n // create or update location\n if (location) {\n if (\n !isRestricted &&\n location.restriction &&\n location.restriction.items.length > 0\n ) {\n if (location.restriction.restriction_type === 'users') {\n await unassignUsers(location.restriction.items.map((user) => user.id))\n } else {\n await unassignGroups(\n location.restriction.items.map((group) => group.id),\n )\n }\n }\n const result = await update(location.id, formattedLocation)\n\n // assign users or groups to location\n if (restrictedTo === 'Users' && usersToAdd.length > 0) {\n await assignUsers(result.id)\n } else if (restrictedTo === 'Groups' && groupsToAdd.length > 0) {\n await assignGroups(result.id)\n }\n\n // unassign users or groups from location\n if (resourcesToDelete.length > 0 && location) {\n if (restrictedTo === 'Users') {\n await unassignUsers()\n } else if (restrictedTo === 'Groups') {\n await unassignGroups()\n }\n }\n onClose()\n success?.()\n fetchLocations()\n displayMessage?.('Location updated successfully!', 'success')\n } else {\n const result = await create(formattedLocation)\n\n // assign users or groups to location\n if (restrictedTo === 'Users' && usersToAdd.length > 0) {\n await assignUsers(result.id)\n } else if (restrictedTo === 'Groups' && groupsToAdd.length > 0) {\n await assignGroups(result.id)\n }\n setCurrentLocation({ ...result })\n onClose()\n fetchLocations()\n success?.()\n displayMessage?.(\n

    \n Location created successfully. You can assign devices to this location\n on Devices tab.\n

    ,\n 'success',\n )\n }\n }\n\n const handleSubmit = async (data: ILocation) => {\n try {\n setLoading(true)\n await updateOrCreateLocation(data)\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n useEffect(() => {\n if (restrictedTo === 'Users') {\n buildUserOptions()\n } else {\n buildGroupOptions()\n }\n }, [restrictedTo, users, groups])\n\n useEffect(() => {\n if (!isRestricted) {\n setUsersToAdd([])\n setGroupsToAdd([])\n }\n }, [isRestricted])\n\n useEffect(() => {\n fetchUsers()\n fetchGroups()\n }, [])\n\n useEffect(() => {\n if (location) {\n setCurrentPosition({\n lat: location?.latitude ?? 41.87,\n lng: location?.longitude ?? -87.62,\n })\n setAddress(location?.address)\n } else {\n setCurrentPosition({\n lat: 41.87,\n lng: -87.62,\n })\n }\n }, [location])\n\n useEffect(() => {\n if (!isFirstRender && customerSupportSelection === 'add_new') {\n const phone = methods.watch('contact_phone')\n const email = methods.watch('contact_email')\n const settings = JSON.parse(localStorage.getItem('settings') || '{}')\n if (\n phone &&\n email &&\n phone !== settings.default_support_phone &&\n email !== settings.default_support_email\n ) {\n methods.clearErrors('contact_phone')\n methods.clearErrors('contact_email')\n methods.setValue(\n 'contact_phone',\n location && location.contact_phone !== settings.default_support_phone\n ? location.contact_phone\n : ' ',\n )\n methods.setValue(\n 'contact_email',\n location && location.contact_email !== settings.default_support_email\n ? location.contact_email\n : ' ',\n )\n } else {\n methods.setValue('contact_phone', ' ')\n methods.setValue('contact_email', ' ')\n }\n }\n }, [customerSupportSelection])\n\n useEffect(() => {\n if (customerSupportSelection === 'use_default_cs') {\n const settings = JSON.parse(localStorage.getItem('settings') || '{}')\n methods.setValue('contact_phone', settings.default_support_phone)\n methods.setValue('contact_email', settings.default_support_email)\n }\n }, [])\n\n useEffect(() => {\n methods.setValue(\n 'contact_phone',\n methods.watch('contact_phone')?.replace(' ', ''),\n )\n methods.setValue(\n 'contact_email',\n methods.watch('contact_email')?.replace(' ', ''),\n )\n }, [methods.watch('contact_email'), methods.watch('contact_phone')])\n\n useEffect(() => {\n const firstRender = ref.current\n\n if (firstRender) {\n setIsFirstRender(false)\n }\n\n const shared = getCurrentOrgProperty('shared_locations')\n const superTenant = getCurrentOrgProperty('isSuperTenant')\n setSharedLocationsAllowed(shared)\n setIsSuperTenantOrg(superTenant)\n console.log('shared', shared)\n console.log('superTenant', superTenant)\n })\n\n const disableSubmit = Object.keys(methods.formState.errors).length > 0\n const isReadOnly =\n Boolean(!allowEdit) || (location?.shared === true && !isSuperTenantOrg)\n const CanShowSharedLocations = isSuperTenantOrg || SharedLocationsAllowed\n const TenantData = isSuperTenantOrg || SharedLocationsAllowed\n return (\n \n
    \n \n {TenantData && CanShowSharedLocations && (\n <>\n \n Share Location\n \n setIsShared(false),\n selected: !isShared,\n }}\n rightItem={{\n label: 'Shared',\n onClick: () => setIsShared(true),\n selected: isShared,\n }}\n />\n \n )}\n\n \n\n \n {previewImage && (\n <>\n \n Preview {image ? image.name : ''}\n \n \n \n )}\n\n {location?.image && previewImage === '' && (\n <>\n Location Image:\n \n \n )}\n\n {!isReadOnly && (\n \n )}\n\n \n Assign access\n \n setIsRestricted(false),\n selected: !isRestricted,\n }}\n rightItem={{\n label: 'Restricted',\n onClick: () => setIsRestricted(true),\n selected: isRestricted,\n }}\n isReadOnly={isReadOnly}\n />\n\n {isRestricted && (\n <>\n \n How would you like to assign access?\n \n handleRestrictionChange('Users'),\n selected: restrictedTo === 'Users',\n }}\n rightItem={{\n label: 'Groups',\n onClick: () => handleRestrictionChange('Groups'),\n selected: restrictedTo === 'Groups',\n }}\n isReadOnly={isReadOnly}\n />\n \n )}\n\n {isRestricted && restrictedTo && !isReadOnly && (\n option.label}\n renderOption={(props, option, { selected }) => (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n {option.label}\n
  • \n )}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n onChange={handleToggle}\n loading={loadingResources}\n loadingText={`Loading ${\n restrictedTo === 'Users' ? 'users' : 'groups'\n }...`}\n noOptionsText={`No ${\n restrictedTo === 'Users' ? 'users' : 'groups'\n } available`}\n />\n )}\n {isRestricted && restrictedTo && (\n <>\n \n {restrictedTo} assigned to this location\n \n\n {!isReadOnly && (\n <>\n {restrictedTo === 'Users' && (\n \n {location?.restriction &&\n location.restriction.items.length > 0\n ? `Select the users that you want to remove from this location and hit submit`\n : `No users assigned to this location.`}\n \n )}\n {restrictedTo === 'Groups' && (\n \n {location?.restriction &&\n location.restriction.items.length > 0\n ? `Select the groups that you want to remove from this location and hit submit`\n : `No groups assigned to this location.`}\n \n )}\n \n )}\n\n \n {location?.restriction &&\n location.restriction.items.length > 0 &&\n restrictedTo === 'Groups' &&\n location.restriction.items.map((group) => (\n handleSelect(group.id)}\n onDelete={() => handleSelect(group.id)}\n deleteIcon={\n resourcesToDelete.includes(group.id) ? (\n \n ) : (\n \n )\n }\n variant={\n resourcesToDelete.includes(group.id)\n ? 'filled'\n : 'outlined'\n }\n color={\n resourcesToDelete.includes(group.id)\n ? 'primary'\n : 'default'\n }\n />\n ))}\n {location?.restriction &&\n location.restriction.items.length > 0 &&\n restrictedTo === 'Users' &&\n location.restriction.items.map((user) => (\n handleSelect(user.id)}\n onDelete={() => handleSelect(user.id)}\n deleteIcon={\n resourcesToDelete.includes(user.id) ? (\n \n ) : (\n \n )\n }\n variant={\n resourcesToDelete.includes(user.id)\n ? 'filled'\n : 'outlined'\n }\n color={\n resourcesToDelete.includes(user.id)\n ? 'primary'\n : 'default'\n }\n />\n ))}\n \n \n )}\n\n Status\n setIsHidden(true),\n selected: isHidden,\n }}\n rightItem={{\n label: 'Live',\n onClick: () => setIsHidden(false),\n selected: !isHidden,\n }}\n isReadOnly={isReadOnly}\n />\n\n Customer Support\n\n {!isReadOnly && (\n \n }\n label=\"Use Default\"\n onChange={handleRadioCustomerSupport}\n checked={customerSupportSelection === 'use_default_cs'}\n disabled={isReadOnly}\n />\n\n }\n label=\"Add New\"\n onChange={handleRadioCustomerSupport}\n checked={customerSupportSelection === 'add_new'}\n disabled={isReadOnly}\n />\n \n )}\n\n {\n // methods.clearErrors('contact_email')\n // }}\n\n disabled={\n customerSupportSelection === 'use_default_cs' || isReadOnly\n }\n placeholder={\n customerSupportSelection === 'add_new' ? 'user@domain.com' : ''\n }\n rules={{\n required: 'Email is required',\n pattern: {\n value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}$/i,\n message: 'Invalid email address',\n },\n }}\n />\n {\n // methods.clearErrors('contact_phone')\n // }}\n disabled={\n customerSupportSelection === 'use_default_cs' || isReadOnly\n }\n placeholder={\n customerSupportSelection === 'add_new' ? '+12345678900' : ''\n }\n rules={{\n required: 'Phone number is required',\n pattern: {\n value: /^[\\+]?[(]?[0-9]*[)]?[-\\s\\.]?[0-9]*[-\\s\\.]?[0-9]{4,6}$/i,\n message: 'Invalid phone number',\n },\n }}\n />\n\n {!isReadOnly && (\n \n )}\n
    \n
    \n
    \n )\n}\n\nexport default General\n","import {\n Autocomplete,\n Box,\n Checkbox,\n Chip,\n Typography,\n TextField as MUITextField,\n CircularProgress,\n} from '@mui/material'\nimport { Form, IDialogType, SideBar } from 'components'\nimport {\n IDevice,\n ILocation,\n ILocationList,\n IPriceList,\n ISizeList,\n} from 'models'\nimport { useCallback, useEffect, useMemo, useState } from 'react'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'\nimport CheckBoxIcon from '@mui/icons-material/CheckBox'\nimport { deviceApi, locationApi, priceApi, sizeApi } from 'resources'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport { getDeviceStatusColor, parseCurrency } from 'utils/helpers'\nimport DeviceForm from 'pages/Doors/components/devices/DeviceForm'\nimport useLoadingState from 'hooks/useLoadingState'\nimport useIsSuperTenantOrg from 'hooks/useIsSuperTenantOrg'\nimport { DropdownOption } from 'types'\nimport { useLocationsContext } from '../context'\n\ninterface ISettingsTabProps {\n location: ILocation | undefined\n onClose: () => void\n displayMessage?: (message: string | JSX.Element, type?: IDialogType) => void\n}\n\nconst SettingsTab = ({\n location,\n onClose,\n displayMessage,\n}: ISettingsTabProps) => {\n const [currentDevice, setCurrentDevice] = useState()\n const [search, setSearch] = useState('')\n const [sizes, setSizes] = useState({\n items: [],\n total: 0,\n pages: 0,\n })\n const [prices, setPrices] = useState({\n items: [],\n total: 0,\n pages: 0,\n })\n const [locations, setLocations] = useState({\n items: [],\n total: 0,\n pages: 0,\n })\n\n const [assignedDevices, setAssignedDevices] = useState([])\n const [devices, setDevices] = useState([])\n const [devicesToDelete, setDevicesToDelete] = useState([])\n const [devicesToAdd, setDevicesToAdd] = useState([])\n const [options, setOptions] = useState([])\n const [isLoadingDevices, setIsLoadingDevices] = useState()\n const [isSubOrg, setIsSubOrg] = useState()\n const [useDefaultSupportInformation, setUseDefaultSupportInformation] =\n useState(location ? false : true)\n\n const { getDevices, update, getMany: getLocations } = locationApi()\n\n const { update: updateDevice, getMany } = deviceApi()\n const { loading, setLoading } = useLoadingState()\n const { getMany: getSizes } = sizeApi()\n const { getMany: getPrices } = priceApi()\n\n const isSuperTenantOrg = useIsSuperTenantOrg()\n\n const { fetchLocations } = useLocationsContext()\n\n const settings = JSON.parse(localStorage.getItem('settings') || '{}')\n\n const sizeOptions = useMemo(\n () =>\n sizes.items.map((size) => ({\n value: size.id,\n label: `${size.name} (${size.width}\" x ${size.depth}\" x ${size.height}\")`,\n })),\n [sizes],\n )\n\n const priceOptions = useMemo(\n () =>\n prices.items.map((price) => ({\n value: price.id,\n label: `${price.name} (${parseCurrency(price.currency)} ${\n price.amount\n } / ${price.unit})`,\n priceType: price.price_type || '',\n })),\n [prices],\n )\n\n const locationOptions = useMemo(\n () =>\n locations.items.map((location) => ({\n value: location.id,\n label: location.name,\n })),\n [locations],\n )\n\n const getFormTitle = useCallback(() => {\n if (location && isSuperTenantOrg) {\n return 'Edit Location'\n } else if (!location) {\n return 'Add Location'\n } else if (location && location.shared && !isSuperTenantOrg)\n return 'Location Details'\n }, [isSuperTenantOrg])\n\n const methods = useForm({\n defaultValues: {\n ...location,\n contact_email:\n useDefaultSupportInformation && settings.default_support_email\n ? settings.default_support_email\n : location?.contact_email,\n contact_phone:\n useDefaultSupportInformation && settings.default_support_phone\n ? settings.default_support_phone\n : location?.contact_phone,\n },\n })\n\n const fetchDevices = async (): Promise => {\n try {\n const devices = await getMany(1, 10000, '')\n setDevices(devices.items)\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n }\n }\n\n const fetchAssignedDevices = async (): Promise => {\n try {\n if (location) {\n setIsLoadingDevices(true)\n const devices = await getDevices(location?.id)\n setAssignedDevices(devices)\n }\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n } finally {\n setIsLoadingDevices(false)\n }\n }\n\n const handleSelect = (deviceId: string) => {\n if (devicesToDelete.includes(deviceId)) {\n setDevicesToDelete(devicesToDelete.filter((id) => id !== deviceId))\n } else {\n setDevicesToDelete((prevState) => [...prevState, deviceId])\n }\n }\n\n const handleToggle = (event: React.SyntheticEvent, value: any) => {\n const devicesSelected: string[] = value.map((option) => option.value)\n setDevicesToAdd(devicesSelected)\n }\n\n const buildOptions = () => {\n if (devices.length > 0) {\n const notAssignedUsers = devices.filter(\n (device) => !assignedDevices?.some((d) => d.id === device.id),\n )\n const autoCompleteOptions = notAssignedUsers.map((device) => ({\n label: device.name,\n value: device.id,\n }))\n const sortedOptions = autoCompleteOptions.sort((a, b) => {\n if (a.label < b.label) {\n return -1\n }\n if (a.label > b.label) {\n return 1\n }\n return 0\n })\n setOptions(sortedOptions)\n }\n }\n\n const handleSubmit = async (data: ILocation) => {\n try {\n setLoading(true)\n if (location) {\n const payload = new FormData()\n payload.append('contact_email', data.contact_email)\n payload.append('contact_phone', data.contact_phone)\n payload.append('name', data.name)\n payload.append('address', data.address)\n payload.append('latitude', data.latitude.toString())\n payload.append('longitude', data.longitude.toString())\n\n const updatedLocation: ILocation = await update(location.id, payload)\n let finalMessage: JSX.Element | string = 'Location updated successfully'\n if (devicesToAdd.length > 0) {\n const promises = devicesToAdd.map(async (deviceId) => {\n const device = devices.find((device) => device.id === deviceId)\n if (device) {\n const payload = new FormData()\n payload.append('id_location', updatedLocation.id)\n payload.append('name', device.name)\n payload.append('price_required', device.price_required.toString())\n payload.append('id_price', device.id_price || '')\n payload.append(\n 'locker_number',\n device.locker_number?.toString() || '',\n )\n return await updateDevice(payload, deviceId)\n }\n })\n const results = await Promise.all(promises)\n const failed = results.filter((promise) => promise?.status !== 200)\n const success = results.filter((promise) => promise?.status === 200)\n const errorMessage = (\n <>\n {failed.length > 0 && (\n \n Error{failed.length > 1 ? 's' : ''}:\n
    \n {failed.map((f, index) => (\n \n
    {`• ${f?.result}`}\n
    \n ))}\n \n )}\n \n )\n const successMessage = (\n <>\n {success.length > 0 && (\n \n {`Successfully assigned ${success.length} device${\n success.length > 1 ? 's' : ''\n } to location.`}\n
    \n
    \n
    \n )}\n {success.length === 0 && null}\n \n )\n finalMessage = (\n \n {updatedLocation.contact_email !== data.contact_email ||\n (updatedLocation.contact_phone !== data.contact_phone && (\n <>\n \n Location updated successfully!

    \n
    \n \n ))}\n {successMessage}\n {errorMessage}\n \n )\n }\n onClose()\n fetchLocations()\n displayMessage?.(finalMessage, 'success')\n }\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const fetchSizes = async (): Promise => {\n const sizes = await getSizes(1, 10000, search)\n setSizes(sizes)\n }\n\n const fetchPrices = async (): Promise => {\n const prices = await getPrices(1, 10000, search)\n setPrices(prices)\n }\n\n useEffect(() => {\n buildOptions()\n }, [devices])\n\n useEffect(() => {\n methods.setValue(\n 'contact_email',\n useDefaultSupportInformation ? settings.default_support_email : '',\n )\n methods.setValue(\n 'contact_phone',\n useDefaultSupportInformation ? settings.default_support_phone : '',\n )\n }, [useDefaultSupportInformation])\n\n useEffect(() => {\n fetchDevices()\n fetchSizes()\n fetchPrices()\n fetchLocations()\n\n if (location) {\n fetchAssignedDevices()\n }\n }, [])\n\n const disableSubmit = Object.keys(methods.formState.errors).length > 0\n\n const isReadOnly = Boolean(location && location.shared && !isSuperTenantOrg)\n\n return (\n <>\n \n
    \n \n \n Devices assigned to this location\n \n\n {/* Tenant view CRUD permissions */}\n {!isReadOnly && (\n <>\n {!isLoadingDevices && (\n \n {assignedDevices?.length > 0\n ? `${assignedDevices?.length} device${\n assignedDevices?.length > 1 ? 's' : ''\n } assigned to this location.`\n : `No devices assigned to this location.`}\n \n )}\n {isLoadingDevices && }\n \n {assignedDevices?.length > 0 &&\n assignedDevices?.map((device) => (\n setCurrentDevice(device)}\n disabled={isSubOrg}\n />\n ))}\n \n\n \n Assign devices to location\n \n \n Select devices that you want to assign to location and hit\n submit\n \n option.label}\n disabled={isSubOrg}\n renderOption={(props, option, { selected }) => (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n {option.label}\n
  • \n )}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n onChange={handleToggle}\n loading={options.length === 0}\n />\n \n )}\n {/* End of Tenant view */}\n\n {/* Read Only view for sub-orgs without tenant capabilities */}\n {isReadOnly && (\n <>\n \n {location?.devices && location.devices.length > 0\n ? `${location.devices.length} device${\n location.devices.length > 1 ? 's' : ''\n } assigned to this location.`\n : `No devices assigned to this location.`}\n \n\n {location?.devices && location.devices.length > 0 && (\n \n {location.devices.map((device) => (\n setCurrentDevice(device)}\n // disabled={isSubOrg}\n />\n ))}\n \n )}\n \n )}\n {/* End of read only view */}\n\n {!isReadOnly && (\n \n )}\n
    \n
    \n
    \n\n {currentDevice && (\n setCurrentDevice(undefined)}\n >\n {\n setCurrentDevice(undefined)\n }}\n sizeOptions={sizeOptions}\n priceOptions={priceOptions}\n locationOptions={locationOptions}\n allowEdit={false}\n />\n \n )}\n \n )\n}\n\nexport default SettingsTab\n","import { useState, SyntheticEvent } from 'react'\nimport { ILocation } from 'models'\nimport { IDialogType, Tabs } from 'components'\nimport General from './GeneralTab'\nimport SettingsTab from './SettingsTab'\nimport { BulkUploadEntity } from 'components/BulkUploadEntity'\nimport { getUserRole } from 'utils/helpers'\nimport { useLocationsContext } from '../context'\n\ninterface ILocationFormProps {\n location: ILocation | undefined\n onClose: () => void\n success?: () => void\n allowEdit?: boolean\n displayMessage?: (message: string | JSX.Element, type?: IDialogType) => void\n creatingLocation?: boolean\n}\n\nconst LocationForm = ({\n location,\n onClose,\n success,\n allowEdit = true,\n displayMessage,\n creatingLocation = false,\n}: ILocationFormProps) => {\n const [currentTab, setCurrentTab] = useState('general')\n const [currentLocation, setCurrentLocation] = useState(\n location ? location : undefined,\n )\n\n const { fetchLocations } = useLocationsContext()\n\n const handleTabChange = (event: SyntheticEvent, newValue: string): void => {\n setCurrentTab(newValue)\n }\n\n return (\n <>\n {location && (\n \n setCurrentLocation(location)\n }\n goToDevicesTab={() => setCurrentTab('settings')}\n />\n ),\n },\n {\n label: 'Settings',\n value: 'settings',\n disabled: creatingLocation,\n children: (\n \n ),\n },\n ]}\n currentTab={currentTab}\n handleChange={handleTabChange}\n />\n )}\n {getUserRole() !== 'admin' && !location && (\n \n setCurrentLocation(location)\n }\n goToDevicesTab={() => setCurrentTab('settings')}\n />\n )}\n {getUserRole() === 'admin' && !location && (\n \n setCurrentLocation(location)\n }\n goToDevicesTab={() => setCurrentTab('settings')}\n />\n ),\n },\n {\n label: 'Bulk Upload',\n value: 'BulkUpload',\n children: (\n {\n fetchLocations()\n success?.()\n }}\n onClose={onClose}\n displayMessage={displayMessage}\n />\n ),\n },\n ]}\n currentTab={currentTab}\n handleChange={handleTabChange}\n />\n )}\n \n )\n}\n\nexport default LocationForm\n","import { Box, Typography } from '@mui/material'\nimport { ITransactionLog } from 'models'\nimport { capitalizeFirstLetter } from 'utils/helpers'\n\ninterface IDeviceLogProps {\n log: ITransactionLog\n}\n\nconst DeviceLog = ({ log }: IDeviceLogProps) => {\n return (\n \n \n {log.log_type === 'report_issue'\n ? 'Report Issue'\n : capitalizeFirstLetter(log.log_type)}\n \n -\n \n {new Date(log.created_at).toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n })}\n \n -\n Order {log.event?.invoice_id}\n \n )\n}\n\nexport default DeviceLog\n","import {\n Accordion,\n AccordionDetails,\n AccordionSummary,\n Box,\n CircularProgress,\n Typography,\n} from '@mui/material'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { IDevice, IDeviceLog } from 'models'\nimport { useEffect, useState } from 'react'\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore'\nimport {\n Timeline,\n TimelineConnector,\n TimelineContent,\n TimelineDot,\n TimelineItem,\n TimelineSeparator,\n} from '@mui/lab'\nimport { deviceApi } from 'resources'\nimport DeviceLog from './DeviceLog'\n\ninterface IDeviceHistory {\n device: IDevice\n}\n\nconst DeviceHistory = ({ device }: IDeviceHistory) => {\n const [deviceHistory, setDeviceHistory] = useState([])\n\n const { loading, setLoading } = useLoadingState()\n\n const { getDeviceHistory } = deviceApi()\n\n const fetchDeviceHistory = async () => {\n try {\n setLoading(true)\n const history = await getDeviceHistory(device.id)\n setDeviceHistory(history)\n } catch (error) {\n } finally {\n setLoading(false)\n }\n }\n\n useEffect(() => {\n fetchDeviceHistory()\n }, [])\n\n const logs = deviceHistory.filter((log) => Boolean(log.event))\n\n return (\n <>\n {loading && (\n \n \n \n )}\n {!loading && logs.length === 0 && (\n \n Device History\n \n Device: {device.name}\n \n Door number: {device.locker_number}\n \n \n Location: {device.location.name}\n \n \n \n No history to show\n \n \n )}\n\n {!loading && logs.length > 0 && (\n \n \n Device History\n \n Device: {device.name}\n \n Door number: {device.locker_number}\n \n \n Location: {device.location.name}\n \n \n \n \n }>\n Logs...\n \n \n \n {logs.map((log, index) => (\n \n \n \n {index + 1 !== logs.length && }\n \n \n \n \n \n ))}\n \n \n \n \n )}\n \n )\n}\n\nexport default DeviceHistory\n","import {\n Box,\n Typography,\n Checkbox,\n FormControlLabel,\n TextField as MUITextField,\n Chip,\n Autocomplete,\n Switch,\n Tooltip,\n} from '@mui/material'\nimport {\n ConfirmDialog,\n Form,\n IDialogType,\n Image,\n SelectField,\n SideBar,\n Tabs,\n TextField,\n} from 'components'\nimport { IDevice, IGroup, IUser } from 'models'\nimport {\n SyntheticEvent,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { DEVICE_STATUSES } from '../../constants'\nimport RentalModeFields from './RentalModeFields'\nimport HardwareTypeFields from './HardwareTypeFields'\nimport { deviceApi, groupApi, userApi, sizeApi, locationApi } from 'resources'\nimport { formatDevicePayload } from '../../helper'\nimport CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'\nimport CheckBoxIcon from '@mui/icons-material/CheckBox'\nimport DeleteIcon from '@mui/icons-material/Delete'\nimport DoneIcon from '@mui/icons-material/Done'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport { BulkUploadEntity } from 'components/BulkUploadEntity'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { Help } from 'components/Help'\nimport { IProduct } from 'models/Product'\nimport { productApi } from 'resources/product'\nimport useIsSuperTenantOrg from 'hooks/useIsSuperTenantOrg'\nimport SizeForm from '../sizes/SizeForm'\nimport { ToggleSwitch } from 'components/ToggleSwitch'\nimport { DropdownOption } from 'types'\nimport useDeviceModes from 'hooks/useDeviceModes'\nimport ProductForm from 'pages/Products/components/inventory/ProductForm'\nimport { productGroupApi } from 'resources/product-group'\nimport { IProductGroup } from 'models/ProductGroup'\nimport LocationForm from 'pages/Locations/components/LocationForm'\nimport LoadingFormData from 'components/PageBase/LoadingFormData'\nimport {\n capitalizeFirstLetter,\n getSettingsProperty,\n getUserRole,\n} from 'utils/helpers'\nimport DeviceHistory from './DeviceHistory'\nimport React from 'react'\n\ninterface IDeviceFormProps {\n allDevices?: IDevice[]\n device: IDevice | undefined\n success?: (showNewestFirst?: boolean) => void\n onClose: () => void\n sizeOptions: DropdownOption[]\n priceOptions: { value: string; label: string; priceType?: string }[]\n locationOptions: DropdownOption[]\n displayMessage?: (message: string | JSX.Element, type?: IDialogType) => void\n allowEdit?: boolean\n}\n\nconst DeviceForm = ({\n allDevices = [],\n device,\n success,\n onClose,\n sizeOptions,\n priceOptions,\n locationOptions,\n displayMessage,\n allowEdit = true,\n}: IDeviceFormProps): React.ReactElement => {\n const [openSizesSidebar, setOpenSizesSidebar] = useState(false)\n const [openProductsSidebar, setOpenProductsSidebar] = useState(false)\n const [openLocationsSidebar, setOpenLocationsSidebar] =\n useState(false)\n const [confirmationMessage, setConfirmationMessage] = useState({\n isOpen: false,\n message: '',\n type: 'sizes',\n })\n const [productGroups, setProductGroups] = useState([])\n const [wrongPriceTypeForService, setWrongPriceTypeForServiceError] =\n useState(false)\n\n const orgSettings = JSON.parse(localStorage.getItem('settings') || '{}')\n\n // Only show Ojmar hardware type if the organization is Ojmar.\n // This is temporary until a better system is in place\n const [isOjmarOrg] = useState(() => {\n const currentOrg = JSON.parse(localStorage.getItem('currentOrg') || '{}')\n return currentOrg && currentOrg.name === 'ojmar'\n })\n const [isGantnerOrg] = useState(() => {\n const currentOrg = JSON.parse(localStorage.getItem('currentOrg') || '{}')\n return currentOrg && currentOrg.name === 'gantnerorg'\n })\n const [currentTab, setCurrentTab] = useState('form')\n const [image, setImage] = useState()\n const [assignType, setAssignType] = useState(\n device?.restriction?.restriction_type\n ? device.restriction.restriction_type.substring(\n 0,\n device.restriction.restriction_type.length - 1,\n )\n : 'user',\n )\n const [users, setUsers] = useState([])\n const [groups, setGroups] = useState([])\n const [loadingResources, setLoadingResources] = useState(true)\n const [usersToAdd, setUsersToAdd] = useState([])\n const [groupsToAdd, setGroupsToAdd] = useState([])\n const [resourcesToDelete, setResourcesToDelete] = useState([])\n const [options, setOptions] = useState([])\n const [isRestricted, setIsRestricted] = useState(\n Boolean(device?.restriction),\n )\n const [priceRequired, setPriceRequired] = useState(\n device?.id_price ? true : false,\n )\n const [adaCompliance, setAdaCompliance] = useState(\n device?.ada_compliance ? true : false,\n )\n const [priceType, setPriceType] = useState('')\n const [products, setProducts] = useState([])\n const [productsOptions, setProductsOptions] = useState<\n {\n label: string\n value: string\n serial_number: string\n description: string\n }[]\n >([])\n const [selectedProduct, setSelectedProduct] = useState<{\n label: string\n value: string\n serial_number: string\n description: string\n } | null>(() => {\n if (device && device.product && device.id_product) {\n return {\n label: device.product.name,\n value: device.product.id,\n serial_number: device.product.serial_number,\n description: device.product.description,\n }\n } else {\n return null\n }\n })\n const [assignedProduct, setAssignedProduct] = useState(\n () => {\n if (device && device.product && device.id_product) {\n return {\n label: device.product.name,\n value: device.product.id,\n }\n } else {\n return null\n }\n },\n )\n const [sizes, setSizes] = useState([...sizeOptions])\n const [locations, setLocations] = useState([\n ...locationOptions,\n ])\n\n const { create, update } = deviceApi()\n const { assign, assigned, unassign, getMany: getUsers } = userApi()\n const {\n getMany: getGroups,\n assign: assignGroup,\n assigned: assignedGroup,\n unassign: unassignGroup,\n } = groupApi()\n const { getMany: getProducts } = productApi()\n const { getMany: getLocations } = locationApi()\n const { getMany: getSizes } = sizeApi()\n const { getMany: getProductGroups } = productGroupApi()\n\n const { loading, setLoading } = useLoadingState()\n const { loading: isLoadingLocations, setLoading: setLoadingLocations } =\n useLoadingState()\n const { loading: isLoadingProducts, setLoading: setIsLoadingProducts } =\n useLoadingState()\n\n const { modes, isLoadingModes } = useDeviceModes()\n\n const isSuperTenantOrg = useIsSuperTenantOrg()\n\n const methods = useForm({\n defaultValues: {\n ...device,\n mode: device ? device.mode : getSettingsProperty('default_device_mode'),\n item: device?.item,\n item_description: device?.item_description,\n id_size: device?.id_size || orgSettings.default_id_size,\n id_product: device?.id_product,\n id_location: device?.id_location,\n shared: device?.shared,\n status: device ? device.status : 'available',\n ada_compliance: device ? device.ada_compliance : false,\n },\n })\n\n const mode = methods.watch('mode')\n\n const selectedLocation = methods.watch('id_location')\n\n const lockerNumbers = useMemo(\n () =>\n selectedLocation\n ? allDevices\n .filter((device) => device?.location?.id === selectedLocation)\n .map((device) => device.locker_number)\n : [],\n [selectedLocation],\n )\n\n const fetchSizes = async () => {\n try {\n const sizes = await getSizes(1, 10000)\n setSizes(\n sizes.items.map((size) => ({\n value: size.id,\n label: size.name,\n })),\n )\n } catch (error) {\n displayMessage?.((error as Error).message)\n }\n }\n\n const fetchLocations = async () => {\n try {\n setLoadingLocations(true)\n const locations = await getLocations(1, 10000)\n setLocations(\n locations.items.map((size) => ({\n value: size.id,\n label: size.name,\n })),\n )\n } catch (error) {\n displayMessage?.((error as Error).message)\n } finally {\n setLoadingLocations(false)\n }\n }\n\n const getFormTitle = useCallback(() => {\n if (device && allowEdit && isSuperTenantOrg) {\n return 'Edit Device'\n } else if (!device && allowEdit) {\n return 'Add Device'\n } else if (device && device.shared && !isSuperTenantOrg)\n return 'Device Details'\n else return 'Device Details'\n }, [isSuperTenantOrg])\n\n const handleTabChange = (event: SyntheticEvent, newValue: string): void => {\n setCurrentTab(newValue)\n }\n\n const fetchUsers = async (): Promise => {\n try {\n const users = await getUsers(1, 10000, '')\n setUsers(users.items)\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n }\n }\n\n const fetchGroups = async (): Promise => {\n try {\n const groups = await getGroups(1, 10000, '')\n setGroups(groups.items)\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n }\n }\n\n const fetchProducts = async (): Promise => {\n try {\n // Set loading state to avoid clicking on empty Autocompletes that\n // get data a second later.\n // This way, we avoid (for example) the \"products\" array being [] and then\n // getting its payload.\n setIsLoadingProducts(true)\n const products = await getProducts(1, 10000)\n setProducts(products.items)\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n } finally {\n setIsLoadingProducts(false)\n }\n }\n\n const fetchProductGroups = async (): Promise => {\n try {\n setLoading(true)\n const productGroups = await getProductGroups(1, 1000)\n setProductGroups(productGroups.items)\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const handlePriceRequiredChange = (e: any) => {\n setPriceRequired(e.target.checked)\n }\n\n const handleAdaComplianceChange = (e: any) => {\n setAdaCompliance(e.target.checked)\n }\n\n const handleImageClick = () => {\n document.getElementById('image')?.click()\n }\n\n const handleProductSelection = (event: React.SyntheticEvent, value: any) => {\n setSelectedProduct(value)\n }\n\n const handleProductsListClick = () => {\n if (products.length === 0 && !isLoadingProducts) {\n setConfirmationMessage({\n isOpen: true,\n message: 'There are no products. Do you want to add a new product now?',\n type: 'products',\n })\n }\n }\n\n const handleToggle = (event: React.SyntheticEvent, value: any) => {\n try {\n const selectedResources: string[] = value.map(\n (option: DropdownOption) => option.value,\n )\n if (assignType === 'user') {\n setUsersToAdd([...selectedResources])\n } else if (assignType === 'group') {\n setGroupsToAdd(selectedResources)\n }\n } catch (error) {\n console.log(error)\n }\n }\n\n const buildUserOptions = () => {\n if (users.length > 0) {\n const notAssignedUsers = users.filter(\n (user) => !device?.restriction?.items.some((u) => u.id === user.id),\n )\n const autoCompleteOptions = notAssignedUsers.map((user) => ({\n label: `${user.name || ''}${user.name && ' '}(${\n user.email || user.phone_number\n })`,\n value: user.id,\n }))\n const sortedOptions = autoCompleteOptions.sort((a, b) => {\n if (a.label < b.label) {\n return -1\n }\n if (a.label > b.label) {\n return 1\n }\n return 0\n })\n setOptions(sortedOptions)\n }\n }\n\n const buildGroupOptions = () => {\n if (groups.length > 0) {\n const notAssignedGroups = groups.filter(\n (group) => !device?.restriction?.items.some((g) => g.id === group.id),\n )\n const autoCompleteOptions = notAssignedGroups.map((group) => ({\n label: group.name,\n value: group.id,\n }))\n const sortedOptions = autoCompleteOptions.sort((a, b) => {\n if (a.label < b.label) {\n return -1\n }\n if (a.label > b.label) {\n return 1\n }\n return 0\n })\n setOptions([...new Set(sortedOptions)])\n }\n }\n\n const handleRestrictionChange = (newRestriction: string) => {\n if (\n assignType === 'user' &&\n (usersToAdd.length > 0 ||\n (device &&\n device.restriction &&\n device.restriction.items?.length > 0)) &&\n newRestriction === 'group'\n ) {\n displayMessage?.(\n 'You have selected/assigned users to this location, please unselect/remove them if you want to change the restriction type.',\n 'warning',\n )\n return\n } else if (\n assignType === 'group' &&\n (groupsToAdd.length > 0 ||\n (device &&\n device.restriction &&\n device?.restriction?.items.length > 0)) &&\n newRestriction === 'user'\n ) {\n displayMessage?.(\n 'You have selected/assigned groups to this location, please unselect/remove them if you want to change the restriction type.',\n 'warning',\n )\n return\n } else if (newRestriction !== assignType) {\n setAssignType(newRestriction)\n }\n }\n\n const assignUsers = async (deviceId: string) => {\n const promises = usersToAdd.map(\n async (userId) => await assign(userId, deviceId, 'device'),\n )\n await Promise.all(promises)\n }\n\n const assignGroups = async (deviceId: string) => {\n const promises = groupsToAdd.map(\n async (groupId) => await assignGroup(deviceId, groupId, 'device'),\n )\n await Promise.all(promises)\n }\n\n const unassignUsers = async (ids: string[] | null = null) => {\n if (device) {\n const resourcesToUnassign = ids || resourcesToDelete\n const promises = resourcesToUnassign.map(\n async (userId) => await unassign(userId, device?.id, 'device'),\n )\n await Promise.all(promises)\n }\n }\n\n const unassignGroups = async (ids: string[] | null = null) => {\n if (device) {\n const resourcesToUnassign = ids || resourcesToDelete\n const promises = resourcesToUnassign.map(\n async (groupId) => await unassignGroup(device?.id, groupId, 'device'),\n )\n await Promise.all(promises)\n }\n }\n\n const handleSelect = (resourceId: string) => {\n if (resourcesToDelete.includes(resourceId)) {\n setResourcesToDelete(resourcesToDelete.filter((id) => id !== resourceId))\n } else {\n setResourcesToDelete((prevState) => [...prevState, resourceId])\n }\n }\n\n const buildProductsOptions = () => {\n if (products.length > 0) {\n const autoCompleteOptions = products\n .filter(\n (product) =>\n !allDevices.some((device) => device?.product?.id === product.id),\n )\n .map((product) => ({\n label: product.name,\n value: product.id,\n serial_number: product.serial_number,\n description: product.description,\n }))\n const sortedOptions = autoCompleteOptions.sort((a, b) => {\n if (a.label < b.label) {\n return -1\n }\n if (a.label > b.label) {\n return 1\n }\n return 0\n })\n setProductsOptions(sortedOptions)\n }\n }\n\n const handleConfirmAction = () => {\n switch (confirmationMessage.type) {\n case 'sizes':\n setOpenSizesSidebar(true)\n return\n case 'locations':\n setOpenLocationsSidebar(true)\n return\n default:\n return\n }\n }\n\n const onSubmit = async (newDevice: IDevice): Promise => {\n try {\n if (isRestricted && assignType && noAssignmentsAdded) {\n displayMessage?.('Please select a restriction type.', 'error')\n return\n }\n if (\n lockerNumberExists &&\n newDevice.locker_number !== device?.locker_number\n ) {\n displayMessage?.(\n 'This Locker Number is already in use. Please try another one.',\n 'error',\n )\n return\n }\n setLoading(true)\n let deviceResult: IDevice\n if (device) {\n // unassign users or groups to device\n if (\n !isRestricted &&\n device.restriction &&\n device.restriction?.items.length > 0\n ) {\n if (device.restriction?.restriction_type === 'users') {\n await unassignUsers(device.restriction.items.map((user) => user.id))\n } else {\n await unassignGroups(\n device.restriction.items.map((group) => group.id),\n )\n }\n }\n if (resourcesToDelete.length > 0) {\n if (assignType === 'user') {\n await unassignUsers()\n } else if (assignType === 'group') {\n await unassignGroups()\n }\n }\n const result = await update(\n formatDevicePayload({\n ...newDevice,\n image,\n price_required: priceRequired,\n ada_compliance: adaCompliance,\n id_price: priceRequired ? newDevice.id_price : null,\n id_product:\n mode === 'rental' || mode === 'vending'\n ? selectedProduct?.value\n : assignedProduct?.value,\n }),\n device?.id,\n )\n deviceResult = result.result\n\n // assign users or groups to device\n if (assignType === 'user' && usersToAdd.length > 0) {\n await assignUsers(deviceResult.id)\n } else if (assignType === 'group' && groupsToAdd.length > 0) {\n await assignGroups(deviceResult.id)\n }\n onClose()\n setSelectedProduct(null)\n displayMessage?.('Device updated successfully', 'success')\n success?.()\n } else {\n const result = await create(\n formatDevicePayload({\n ...newDevice,\n image,\n price_required: priceRequired,\n ada_compliance: adaCompliance,\n id_price: priceRequired ? newDevice.id_price : null,\n id_product:\n mode === 'rental' || mode === 'vending'\n ? selectedProduct?.value\n : assignedProduct?.value,\n }),\n )\n\n deviceResult = result.result\n // assign users or groups to device\n if (assignType === 'user' && usersToAdd.length > 0) {\n await assignUsers(deviceResult.id)\n } else if (assignType === 'group' && groupsToAdd.length > 0) {\n await assignGroups(deviceResult.id)\n }\n onClose()\n setSelectedProduct(null)\n displayMessage?.('Device created successfully', 'success')\n success?.(true)\n }\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n useEffect(() => {\n if (assignType === 'user') {\n buildUserOptions()\n } else {\n buildGroupOptions()\n }\n }, [users, groups])\n\n useEffect(() => {\n if (isRestricted) {\n if (assignType === 'user') {\n fetchUsers()\n } else {\n fetchGroups()\n }\n }\n }, [isRestricted, assignType])\n\n useEffect(() => {\n if (!isRestricted) {\n setUsersToAdd([])\n setGroupsToAdd([])\n }\n }, [isRestricted])\n\n useEffect(() => {\n buildProductsOptions()\n }, [products])\n\n useEffect(() => {\n const filter = priceOptions.filter(\n (f) => f.value == methods.watch('id_price'),\n )\n\n filter.length === 0\n ? setPriceType('')\n : setPriceType(filter[0].priceType || '')\n }, [methods.watch('id_price')])\n\n useEffect(() => {\n if (!priceRequired && methods.watch('id_price')) {\n // @ts-ignore\n methods.setValue('id_price', '')\n }\n if (!priceRequired && methods.formState.errors.id_price) {\n methods.clearErrors('id_price')\n }\n }, [priceRequired])\n\n useEffect(() => {\n if (adaCompliance) {\n methods.setValue('ada_compliance', true)\n }\n }, [adaCompliance])\n\n useEffect(() => {\n if (mode === 'rental' || mode === 'vending') {\n fetchProducts()\n fetchProductGroups()\n }\n if (mode !== 'rental') {\n methods.setValue('require_image', false)\n return\n }\n }, [mode])\n\n useEffect(() => {\n setWrongPriceTypeForServiceError(false)\n\n const [filteredPrice] = priceOptions.filter(\n (p) => p.value === methods.watch('id_price'),\n )\n\n if (!filteredPrice) return\n\n if (mode === 'service' && filteredPrice.priceType !== 'pay_per_weight') {\n setWrongPriceTypeForServiceError(true)\n }\n }, [methods.watch('id_price')])\n\n const lockerNumberExists =\n String(methods.watch('locker_number')) !== '' &&\n lockerNumbers &&\n lockerNumbers.includes(+methods.watch('locker_number'))\n\n const hasFormErrors = Object.keys(methods.formState.errors).length > 0\n const noUsersAdded = usersToAdd.length === 0\n const noGroupsAdded = groupsToAdd.length === 0\n const noAssignmentsAdded = noUsersAdded && noGroupsAdded\n const hasAssignType = assignType !== ''\n const isAssignmentMissing =\n isRestricted && hasAssignType && noAssignmentsAdded\n\n const disableSubmit =\n hasFormErrors || wrongPriceTypeForService || Boolean(isAssignmentMissing)\n\n const isReadOnly =\n Boolean(!allowEdit) ||\n (device?.location?.shared === true && !isSuperTenantOrg)\n\n const validateLockerNumber = (value: number): string | true => {\n if (value.toString().length > 7) {\n return 'Unsupported locker number'\n }\n return true\n }\n\n const HandleAddProduct = () => {\n setConfirmationMessage({\n isOpen: true,\n message:\n 'There are no products to be assigned to this device. Do you want to add a product?',\n type: 'products',\n })\n setOpenProductsSidebar(true)\n }\n\n const DeviceFormElement = (\n \n
    \n \n {isReadOnly && (\n {\n onClose()\n setSelectedProduct(null)\n }}\n >\n â—€\n \n )}\n\n \n\n validateLockerNumber(value),\n }}\n onlyInteger={true}\n disabled={isReadOnly}\n />\n\n {lockerNumberExists &&\n device?.locker_number !==\n Number(methods.watch('locker_number')) && (\n \n This Locker Number is already in use at this location in{' '}\n {mode === 'rental' ? 'Asset' : capitalizeFirstLetter(mode)}{' '}\n mode. Please try another one.\n \n )}\n\n \n\n \n }\n label={\n \n ADA Compliance\n \n }\n />\n\n {mode !== 'vending' && (\n <>\n \n }\n label=\"Price required\"\n />\n {priceRequired && (\n <>\n ({\n label: p.label,\n value: p.value,\n })) || []\n }\n rules={{\n required: 'Price required',\n }}\n disabled={isReadOnly}\n />\n\n {wrongPriceTypeForService && (\n \n Service mode can only use pay-per-weight price types.\n \n )}\n \n )}\n \n )}\n\n {!priceRequired &&\n methods.watch('id_price') &&\n mode !== 'service' &&\n priceType === 'pay_per_weight' && (\n \n This device must be set to mode "Service" to charge by\n weight\n \n )}\n\n {device && device.image && (\n <>\n \n Device Image:\n \n \"\"\n \n )}\n\n {/* Asset Mode & Vending Mode*/}\n \n\n {mode !== 'rental' && mode !== 'vending' && (\n {\n setConfirmationMessage({\n isOpen: true,\n message:\n 'There are no sizes to assign to this device. Do you want to create sizes now? ',\n type: 'sizes',\n })\n return {}\n }\n : undefined\n }\n />\n )}\n\n {\n if (\n a.label.toLocaleLowerCase().replace(\"'\", '') <\n b.label.toLocaleLowerCase().replace(\"'\", '')\n ) {\n return -1\n }\n if (\n a.label.toLocaleLowerCase().replace(\"'\", '') >\n b.label.toLocaleLowerCase().replace(\"'\", '')\n ) {\n return 1\n }\n return 0\n })}\n rules={{ required: 'Location required' }}\n disabled={isReadOnly}\n onOpen={\n locations.length === 0\n ? () => {\n setConfirmationMessage({\n isOpen: true,\n message:\n 'There are no locations to assign to this device. Do you want to create locations now? ',\n type: 'locations',\n })\n return {}\n }\n : undefined\n }\n />\n \n \n\n {/* Remove for all modes except rental: */}\n {mode === 'rental' && (\n \n }\n label=\"Require image to end transaction\"\n />\n )}\n\n {allowEdit && (\n <>\n \n Assign access\n \n setIsRestricted(false),\n selected: !isRestricted,\n }}\n rightItem={{\n label: 'Restricted',\n onClick: () => setIsRestricted(true),\n selected: isRestricted,\n }}\n />\n \n )}\n\n {isRestricted && !isReadOnly && (\n <>\n \n How would you like to assign access?\n \n handleRestrictionChange('user'),\n selected: assignType === 'user',\n }}\n rightItem={{\n label: 'Groups',\n onClick: () => handleRestrictionChange('group'),\n selected: assignType === 'group',\n }}\n />\n \n )}\n\n {isRestricted && assignType && !isReadOnly && (\n <>\n option.label}\n renderOption={(props, option, { selected }) => (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n {option.label}\n
  • \n )}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n loading={loadingResources}\n loadingText={`Loading ${\n assignType === 'user' ? 'users' : 'groups'\n }...`}\n noOptionsText={`No ${\n assignType === 'user' ? 'users' : 'groups'\n } available`}\n />\n\n {isAssignmentMissing && (\n \n Please select a restriction type.\n \n )}\n \n )}\n\n {isRestricted && assignType && device && (\n <>\n \n {assignType === 'user' ? 'Users' : 'Groups'} assigned to this\n device\n \n {assignType === 'user' && (\n \n {device.restriction && device.restriction.items.length > 0\n ? `Select the users that you want to remove from this device and hit submit`\n : `No users assigned to this device.`}\n \n )}\n {assignType === 'group' && (\n \n {device.restriction && device.restriction.items.length > 0\n ? `Select the groups that you want to remove from this device and hit submit`\n : `No groups assigned to this device.`}\n \n )}\n \n {device.restriction &&\n device.restriction.items.length > 0 &&\n assignType === 'group' &&\n device?.restriction?.items.map((group) => (\n handleSelect(group.id)}\n onDelete={() => handleSelect(group.id)}\n deleteIcon={\n resourcesToDelete.includes(group.id) ? (\n \n ) : (\n \n )\n }\n variant={\n resourcesToDelete.includes(group.id)\n ? 'filled'\n : 'outlined'\n }\n color={\n resourcesToDelete.includes(group.id)\n ? 'primary'\n : 'default'\n }\n />\n ))}\n {device.restriction &&\n device.restriction.items.length > 0 &&\n assignType === 'user' &&\n device?.restriction?.items.map((user) => (\n handleSelect(user.id)}\n onDelete={() => handleSelect(user.id)}\n deleteIcon={\n resourcesToDelete.includes(user.id) ? (\n \n ) : (\n \n )\n }\n variant={\n resourcesToDelete.includes(user.id)\n ? 'filled'\n : 'outlined'\n }\n color={\n resourcesToDelete.includes(user.id)\n ? 'primary'\n : 'default'\n }\n />\n ))}\n \n \n )}\n\n {!isReadOnly && (\n {\n onClose()\n setSelectedProduct(null)\n }}\n loading={loading}\n disableSubmit={disableSubmit}\n />\n )}\n
    \n
    \n
    \n )\n\n if (isLoadingModes || isLoadingLocations) {\n return \n }\n\n return (\n <>\n {device && (\n ,\n },\n ]}\n currentTab={currentTab}\n handleChange={handleTabChange}\n />\n )}\n {getUserRole() !== 'admin' && !device && DeviceFormElement}\n {getUserRole() === 'admin' && !device && (\n success?.()}\n onClose={() => {\n onClose()\n setSelectedProduct(null)\n }}\n displayMessage={displayMessage}\n renderSuccessMessage={(rowCount) =>\n `${rowCount} row(s) successfully imported. Click the \"Submit\" button to upload.`\n }\n />\n ),\n },\n ]}\n currentTab={currentTab}\n handleChange={handleTabChange}\n />\n )}\n\n setOpenSizesSidebar(false)}\n >\n setOpenSizesSidebar(false)}\n displayMessage={displayMessage}\n />\n \n\n setOpenProductsSidebar(false)}\n >\n setOpenProductsSidebar(false)}\n displayMessage={displayMessage}\n />\n \n\n setOpenLocationsSidebar(false)}\n >\n setOpenLocationsSidebar(false)}\n displayMessage={displayMessage}\n />\n \n\n setOpenProductsSidebar(false)}\n >\n setOpenProductsSidebar(false)}\n displayMessage={displayMessage}\n />\n \n\n {\n setConfirmationMessage({ isOpen: false, message: '', type: '' })\n setOpenProductsSidebar(false)\n }}\n onClickConfirm={() => {\n setConfirmationMessage({ isOpen: false, message: '', type: '' })\n setOpenProductsSidebar(true)\n }}\n onClickCancel={() => {\n setConfirmationMessage({ isOpen: false, message: '', type: '' })\n setOpenProductsSidebar(false)\n }}\n confirmText=\"Add Product\"\n cancelText=\"Cancel\"\n />\n\n \n setConfirmationMessage({\n isOpen: false,\n message: '',\n type: '',\n })\n }\n onClickConfirm={() => {\n handleConfirmAction()\n setConfirmationMessage({\n isOpen: false,\n message: '',\n type: '',\n })\n }}\n onClickCancel={() =>\n setConfirmationMessage({\n isOpen: false,\n message: '',\n type: '',\n })\n }\n confirmText={\n confirmationMessage.type === 'sizes' ? 'Add Sizes' : 'Add Locations'\n }\n cancelText=\"Cancel\"\n />\n\n \n setConfirmationMessage({\n isOpen: false,\n message: '',\n type: '',\n })\n }\n onClickConfirm={() => {\n setOpenProductsSidebar(true)\n setConfirmationMessage({\n isOpen: false,\n message: '',\n type: '',\n })\n }}\n onClickCancel={() =>\n setConfirmationMessage({\n isOpen: false,\n message: '',\n type: '',\n })\n }\n confirmText=\"Add Product\"\n cancelText=\"Cancel\"\n />\n\n \n setConfirmationMessage({\n isOpen: false,\n message: '',\n type: '',\n })\n }\n onClickConfirm={() => {\n handleConfirmAction()\n setConfirmationMessage({\n isOpen: false,\n message: '',\n type: '',\n })\n }}\n onClickCancel={() =>\n setConfirmationMessage({\n isOpen: false,\n message: '',\n type: '',\n })\n }\n confirmText=\"Add Location\"\n cancelText=\"Cancel\"\n />\n \n )\n}\n\nexport default DeviceForm\n","import {\n Checkbox,\n Dialog,\n FormControlLabel,\n FormGroup,\n Grid,\n Paper,\n Typography,\n} from '@mui/material'\nimport { NotificationDialog } from 'components'\nimport { ILocation } from 'models'\nimport { useState } from 'react'\nimport { locationApi } from 'resources'\n\ninterface IUnlockByLocationDialogProps {\n locations: ILocation[]\n open: boolean\n setOpenUnlockByLocation: (open: boolean) => void\n}\n\nconst UnlockByLocationDialog = ({\n locations,\n open,\n setOpenUnlockByLocation,\n}: IUnlockByLocationDialogProps) => {\n const { unlockByLocation } = locationApi()\n\n const [openMessageDialog, setOpenMessageDialog] = useState(false)\n const [messageDialog, setMessageDialog] = useState('')\n\n const handleCheckboxClick = async (locationId: string) => {\n const unlockResponse = await unlockByLocation(locationId)\n setOpenMessageDialog(true)\n setMessageDialog(unlockResponse.detail)\n }\n\n return (\n <>\n setOpenUnlockByLocation(false)}>\n \n \n \n Select location to Unlock\n\n \n {locations.map((location, index) => (\n handleCheckboxClick(location.id)}\n />\n }\n label={location.name}\n />\n ))}\n \n \n \n \n \n {\n setOpenUnlockByLocation(false)\n setOpenMessageDialog(false)\n }}\n message={messageDialog}\n />\n \n )\n}\n\nexport default UnlockByLocationDialog\n","import { Checkbox, FormControlLabel, Typography } from '@mui/material'\nimport { Form, IDialogType, SelectField } from 'components'\nimport { IDevice } from 'models'\nimport { useEffect, useState } from 'react'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { DEVICE_STATUSES } from '../../constants'\nimport { deviceApi } from 'resources'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { DropdownOption } from 'types'\nimport useDeviceModes from 'hooks/useDeviceModes'\n\ninterface IMultiEditFormProps {\n devices: string[]\n success: () => void\n onClose: () => void\n sizeOptions: DropdownOption[]\n priceOptions: { value: string; label: string; priceType?: string }[]\n locationOptions: DropdownOption[]\n displayMessage: (message: string, type?: IDialogType) => void\n setSelectedRows: React.Dispatch>\n}\n\nconst MultiEditForm = ({\n devices,\n success,\n onClose,\n sizeOptions,\n priceOptions,\n locationOptions,\n displayMessage,\n setSelectedRows,\n}: IMultiEditFormProps): React.ReactElement => {\n const [priceRequired, setPriceRequired] = useState(true)\n\n const { patch } = deviceApi()\n const { modes, isLoadingModes } = useDeviceModes()\n const { loading, setLoading } = useLoadingState()\n\n const methods = useForm({})\n\n const handlePriceRequiredChange = (e: any) => {\n setPriceRequired(e.target.checked)\n }\n\n const onSubmit = async (newDevice: IDevice): Promise => {\n try {\n setLoading(true)\n await patch(devices, {\n ...newDevice,\n price_required: priceRequired,\n id_price: priceRequired ? newDevice.id_price : null,\n })\n setSelectedRows([])\n onClose()\n displayMessage(\n `Successfully updated ${devices.length} device${\n devices.length > 1 ? 's' : ''\n }`,\n 'success',\n )\n success()\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n useEffect(() => {\n methods.clearErrors('id_price')\n }, [priceRequired])\n\n const disableSubmit = Object.keys(methods.formState.errors).length > 0\n\n return (\n \n
    \n \n {`${devices.length} device${\n devices.length > 1 ? 's' : ''\n } selected`}\n \n \n }\n label=\"Price required\"\n />\n {priceRequired && (\n ({\n label: p.label,\n value: p.value,\n })) || []\n }\n rules={\n priceRequired ? { required: 'Price is required' } : undefined\n }\n />\n )}\n\n \n \n \n\n \n \n
    \n
    \n )\n}\n\nexport default MultiEditForm\n","import { ChangeEvent, useState, useEffect, useMemo } from 'react'\nimport {\n Autocomplete,\n FormControl,\n InputLabel,\n MenuItem,\n Select,\n SelectChangeEvent,\n TextField,\n useTheme,\n} from '@mui/material'\nimport {\n Table,\n TableBody,\n TablePagination,\n Button,\n SideBar,\n NotificationDialog,\n ConfirmDialog,\n IDialogType,\n} from 'components'\nimport { IDevice, IDeviceList, ILocation, IPriceList, ISizeList } from 'models'\nimport { deviceApi, priceApi, sizeApi } from 'resources'\nimport DeviceRow from './DeviceRow'\nimport DeviceForm from './DeviceForm'\nimport LocationForm from 'pages/Locations/components/LocationForm'\nimport { DEFAULT_PAGE, DEVICES_PER_PAGE } from 'constants/pagination'\nimport { parseCurrency } from 'utils/helpers'\nimport SortableTableHead from 'components/Table/components/TableHead/SortableTableHead'\nimport UnlockByLocationDialog from './UnlockByLocationDialog'\nimport MultiSelectToolbar from 'components/Table/components/MultiSelectToolbar/MultiSelectToolbar'\nimport MultiEditForm from './MultiEditForm'\nimport useSortableHeader from 'hooks/useSortableHeader'\nimport useColumnFiltering from 'hooks/useColumnFiltering'\nimport NoData from 'components/PageBase/NoData'\nimport useLoadingState from 'hooks/useLoadingState'\nimport Toolbar from 'components/Toolbar/Toolbar'\nimport ToolbarControls from 'components/Toolbar/components/ToolbarControls'\nimport ToolbarSearchbar from 'components/Toolbar/components/ToolbarSearchbar'\nimport { DEVICE_STATUSES } from 'pages/Doors/constants'\nimport { DropdownOption, ToolbarControl } from 'types'\nimport LoadingTableData from 'components/Table/components/LoadingTableData/LoadingTableData'\nimport useLocations from 'hooks/useLocations'\n\nconst defaultConfirmation = {\n isOpen: false,\n message: '',\n action: '',\n}\n\nconst Devices = (): React.ReactElement => {\n const [confirmationMessage, setConfirmationMessage] =\n useState(defaultConfirmation)\n const [devices, setDevices] = useState({\n items: [],\n total: 0,\n pages: 0,\n })\n const [devicesBackup, setDevicesBackup] = useState([])\n const [sizes, setSizes] = useState({\n items: [],\n total: 0,\n pages: 0,\n })\n const [prices, setPrices] = useState({\n items: [],\n total: 0,\n pages: 0,\n })\n const [currentDevice, setCurrentDevice] = useState()\n const [currentLocation, setCurrentLocation] = useState<\n ILocation | undefined\n >()\n const [openDeviceSidebar, setOpenDeviceSidebar] = useState(false)\n const [openLocationForm, setOpenLocationForm] = useState(false)\n const [openUnlockByLocation, setOpenUnlockByLocation] =\n useState(false)\n const [currentPage, setCurrentPage] = useState(DEFAULT_PAGE)\n const [rowsPerPage, setRowsPerPage] = useState(DEVICES_PER_PAGE)\n const [search, setSearch] = useState('')\n const [selectedRows, setSelectedRows] = useState([])\n const [selectedRowData, setSelectedRowsData] = useState([])\n const [action, setAction] = useState('')\n const [openMultiEditForm, setOpenMultiEditForm] = useState(false)\n const [selectedLocation, setSelectedLocation] = useState(() => {\n const saved = localStorage.getItem('selectedLocationFilter')\n return saved || 'all'\n })\n const [selectedStatus, setSelectedStatus] = useState(() => {\n const saved = localStorage.getItem('selectedStatusFilter')\n return saved || 'all'\n })\n const [dialog, setDialog] = useState<{\n isOpen: boolean\n message: string\n action: string\n type?: IDialogType\n }>({\n isOpen: false,\n message: '',\n action: '',\n type: '',\n })\n const [disableUnlockAllButton, setUnlockAllButton] = useState(false)\n\n const { order, setOrder, orderBy, handleRequestSort, getVisibleRowsSorted } =\n useSortableHeader({\n defaultOrderBy: 'locker_number',\n entity: 'devices',\n nestedProps: [\n {\n columnValue: 'location',\n path: 'location.name',\n defaultValue: 0,\n },\n {\n columnValue: 'size',\n path: 'size.name',\n defaultValue: '',\n },\n {\n // State column is lock_status prop\n // this is actually not a nested prop\n // but this works fine with properties\n // that have different names to its\n // corresponding column\n columnValue: 'state',\n path: 'lock_status',\n defaultValue: '',\n },\n ],\n })\n\n const displayMessage = (\n message: string | JSX.Element,\n type?: IDialogType,\n ) => {\n setDialog({\n isOpen: true,\n message: message as string,\n action: 'displayMessage',\n type,\n })\n }\n\n const { filteredColumns, setFilteredColumns, getDefaultFilters } =\n useColumnFiltering({ displayMessage })\n\n const { getMany: getDevices, unlockAll: unlockDevices, remove } = deviceApi()\n const { getMany: getSizes } = sizeApi()\n const { getMany: getPrices } = priceApi()\n\n const { locations, fetchLocations, loadingLocations, locationsOptions } =\n useLocations()\n\n const { loading, setLoading } = useLoadingState(true)\n\n const theme = useTheme()\n\n const sizeOptions = useMemo(\n () =>\n sizes.items.map((size) => ({\n value: size.id,\n label: `${size.name} (${size.width}\" x ${size.depth}\" x ${size.height}\")`,\n })),\n [sizes],\n )\n\n const priceOptions = useMemo(\n () =>\n prices.items.map((price) => ({\n value: price.id,\n label: `${price.name} (${parseCurrency(price.currency)} ${\n price.amount\n } / ${price.unit_amount} ${price.unit}${\n price.unit_amount !== 1 ? 's' : ''\n })`,\n priceType: price.price_type || '',\n })),\n [prices],\n )\n\n const handleSelectRow = (\n event: React.ChangeEvent,\n checked: boolean,\n device: IDevice,\n ) => {\n setSelectedRows((previousValue) =>\n checked\n ? [...previousValue, device.id]\n : previousValue.filter((rowId) => rowId !== device.id),\n )\n\n // Function setSelectedRowsData is used to handle export of CSV files.\n // The code above is used only to handle selection of device IDs.\n //\n // I tried incorporating the setSelectedRows code but resulted in\n // multiple areas of this component failing to work properly.\n setSelectedRowsData((previousValue) => {\n return checked\n ? [...previousValue, device]\n : previousValue.filter(\n (selectedDevice) => selectedDevice.id !== device.id,\n )\n })\n }\n\n const handleSelectAll = (event: React.ChangeEvent, checked: boolean) => {\n setSelectedRows(() =>\n checked ? devices.items.map((device) => device.id) : [],\n )\n\n setSelectedRowsData(checked ? devices.items : [])\n }\n\n const handleDeleteMany = async () => {\n try {\n await remove(selectedRows)\n displayMessage(\n `${selectedRows.length} item${\n selectedRows.length > 1 ? 's' : ''\n } deleted successfully`,\n 'success',\n )\n setSelectedRows([])\n fetchDevices()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleSearch = (event: ChangeEvent): void => {\n setSearch(event.target.value)\n }\n\n const handleEdit = (device: IDevice): void => {\n setCurrentDevice(device)\n setOpenDeviceSidebar(true)\n }\n\n const fetchDevices = async (\n showNewestFirst: boolean = false,\n ): Promise => {\n try {\n setLoading(true)\n const devices = await getDevices(\n currentPage + 1,\n rowsPerPage,\n search,\n selectedStatus !== 'all' ? selectedStatus : undefined,\n selectedLocation !== 'all' ? selectedLocation : undefined,\n ) //TODO: implement proper pagination here\n // currently, it was causing a bug where upon refreshing page 2, it would try to fetch the devices from 10 000 to 20 000, assuming that page 1 was 1 to 10 000.\n setDevicesBackup([...devices.items])\n setDevices(devices)\n if (showNewestFirst) {\n setOrder('default')\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n handleItemColumnVisibility()\n }\n }\n\n const backgroundReloadDevices = async (\n showNewestFirst: boolean = false,\n ): Promise => {\n setTimeout(async () => {\n // Backgrund task to refresh devices table after \"unlock\" is successful.\n //\n // DCLocks get updated every second. At the moment we don't have a WebSockets\n // server or a way to receieve real time alerts of a successful DCLock unlock,\n // only a database UPDATE to the status column in the device table.\n //\n // This grace period is executed 3 seconds after the device table is updated\n // to allow the status column to display the new status of the lock:\n //\n // It would be a good idea in the future to implement a WS server that\n // sends data back after successful unlocks.\n try {\n const devices = await getDevices(\n currentPage + 1,\n rowsPerPage,\n search,\n selectedStatus !== 'all' ? selectedStatus : undefined,\n selectedLocation !== 'all' ? selectedLocation : undefined,\n ) //TODO: implement proper pagination here\n // currently, it was causing a bug where upon refreshing page 2, it would try to fetch the devices from 10 000 to 20 000, assuming that page 1 was 1 to 10 000.\n setDevicesBackup([...devices.items])\n setDevices(devices)\n if (showNewestFirst) {\n setOrder('default')\n }\n } catch (error) {\n console.error('Error refreshing devices list:', error)\n }\n }, 5000)\n }\n\n const fetchSizes = async (): Promise => {\n try {\n const sizes = await getSizes(1, 10000)\n setSizes(sizes)\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const fetchPrices = async (): Promise => {\n try {\n const prices = await getPrices(1, 10000, search)\n setPrices(prices)\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const unlockSelectedDevices = () => {\n const selectedDevices = JSON.parse(\n localStorage.getItem('selectedDevices') || '[]',\n ) as IDevice[]\n\n if (selectedDevices.length === 0) {\n displayMessage('Please select at least one device', 'warning')\n return\n }\n\n const deviceUUIDs: string[] = selectedDevices.map((device) => device.id)\n\n unlockDevices(deviceUUIDs).then(() => {\n localStorage.setItem('selectedDevices', '[]')\n fetchDevices()\n setDialog({\n isOpen: true,\n message: 'Unlock request sent to selected devices',\n action: 'unlockAll',\n type: 'success',\n })\n })\n }\n\n const handleUnlockAllClick = () => {\n const selectedDevices = JSON.parse(\n localStorage.getItem('selectedDevices') || '[]',\n ) as IDevice[]\n\n if (selectedDevices.length === 0) {\n // displayMessage('Please select at least one device')\n\n setOpenUnlockByLocation(true)\n return\n }\n\n setConfirmationMessage({\n isOpen: true,\n message: 'Are you sure you want to unlock all selected devices?',\n action: 'unlockAll',\n })\n }\n\n const handleUnlockButtonState = () => {\n const selectedDevices = JSON.parse(\n localStorage.getItem('selectedDevices') || '[]',\n ) as IDevice[]\n\n if (selectedDevices.length === 0) {\n return setUnlockAllButton(false)\n }\n\n const reservedDevices = selectedDevices.filter(\n (device) => device.status !== 'available',\n )\n\n if (reservedDevices.length > 0) {\n return setUnlockAllButton(true)\n }\n\n return setUnlockAllButton(false)\n }\n\n const handleSelectLocation = (\n event: React.SyntheticEvent,\n value: DropdownOption | null,\n ) => {\n const newValue = value ? value.value : 'all'\n setSelectedLocation(newValue)\n localStorage.setItem('selectedLocationFilter', newValue)\n }\n\n const handleSelectStatus = (event: SelectChangeEvent) => {\n const newValue = event.target.value\n setSelectedStatus(newValue)\n localStorage.setItem('selectedStatusFilter', newValue)\n }\n\n const handleItemColumnVisibility = () => {\n if (devicesBackup.length === 0) return\n\n // If there are no devices on \"rental\" mode, do not show the \"Item\"\n // column.\n const hasRentalDevices = devicesBackup.find((d) => d.mode === 'rental')\n\n if (hasRentalDevices) {\n getDefaultFilters()\n return\n }\n\n const noItemRowColumns = filteredColumns.filter((fc) => fc.value !== 'item')\n setFilteredColumns(noItemRowColumns)\n }\n\n const fetchData = async () => {\n getDefaultFilters()\n fetchDevices()\n fetchSizes()\n fetchPrices()\n fetchLocations()\n localStorage.setItem('selectedDevices', '[]')\n }\n\n useEffect(() => {\n handleItemColumnVisibility()\n }, [devicesBackup])\n\n useEffect(() => {\n fetchData()\n }, [])\n\n useEffect(() => {\n fetchDevices()\n }, [search, currentPage, rowsPerPage, selectedLocation, selectedStatus])\n\n useEffect(() => {\n if (!openDeviceSidebar && currentDevice) setCurrentDevice(undefined)\n }, [openDeviceSidebar])\n\n const visibleRows = useMemo(() => {\n const rows = getVisibleRowsSorted(devices.items, devicesBackup)\n return rows\n }, [devices, order, orderBy])\n\n useEffect(() => {\n if (action === 'edit') {\n setOpenMultiEditForm(true)\n }\n }, [action])\n\n const controls: ToolbarControl[] = [\n {\n display: true,\n render: (\n setOpenDeviceSidebar(true)}\n disabled={loading || loadingLocations}\n >\n Add Device\n \n ),\n },\n {\n display: true,\n render: (\n \n Unlock All\n \n ),\n },\n {\n display: true,\n render: (\n (\n \n )}\n value={\n locationsOptions.find(\n (option) => option.value === selectedLocation,\n ) || null\n }\n onChange={handleSelectLocation}\n size=\"small\"\n disabled={loadingLocations || loading}\n loadingText=\"Loading...\"\n />\n ),\n },\n {\n display: true,\n render: (\n \n Device Status\n \n \n All statuses\n \n {DEVICE_STATUSES.map((status) => (\n \n {status.label}\n \n ))}\n \n \n ),\n },\n ]\n\n return (\n <>\n control.display)}>\n control.display)}\n />\n \n \n {selectedRows.length > 0 && (\n \n )}\n {!loading && visibleRows.length > 0 && (\n <>\n \n c.active)}\n handleSelectAll={handleSelectAll}\n />\n \n {visibleRows.map((device) => (\n {\n backgroundReloadDevices()\n fetchDevices()\n }}\n handleEdit={handleEdit}\n displayMessage={displayMessage}\n filteredColumns={filteredColumns}\n openLocationForm={() => setOpenLocationForm(true)}\n setCurrentLocation={setCurrentLocation}\n handleUnlockButtonState={handleUnlockButtonState}\n handleSelectRow={handleSelectRow}\n selected={selectedRows.includes(device.id)}\n />\n ))}\n \n
    \n \n \n )}\n\n \n\n \n\n {openDeviceSidebar && (\n setOpenDeviceSidebar(false)}\n >\n {\n setOpenDeviceSidebar(false)\n }}\n sizeOptions={sizeOptions} // TO DO MOVE THIS PROPERTY TO A CONTEXT\n priceOptions={priceOptions} // TO DO MOVE THIS PROPERTY TO A CONTEXT\n locationOptions={locationsOptions} // TO DO MOVE THIS PROPERTY TO A CONTEXT\n displayMessage={displayMessage}\n allowEdit={currentDevice?.status !== 'reserved'}\n />\n \n )}\n\n {\n setAction('')\n setOpenMultiEditForm(false)\n }}\n >\n fetchDevices()}\n onClose={() => {\n setAction('')\n setOpenMultiEditForm(false)\n }}\n sizeOptions={sizeOptions}\n priceOptions={priceOptions}\n locationOptions={locationsOptions}\n displayMessage={displayMessage}\n setSelectedRows={setSelectedRows}\n />\n \n\n {openLocationForm && (\n setOpenLocationForm(false)}\n >\n {\n setOpenLocationForm(false)\n setCurrentLocation(undefined)\n }}\n allowEdit={false}\n />\n \n )}\n {\n dialog.action === 'unlockAll'\n ? window.location.reload()\n : setDialog({ isOpen: false, message: '', action: '' })\n\n backgroundReloadDevices()\n }}\n message={dialog.message}\n type={dialog.type}\n />\n setConfirmationMessage(defaultConfirmation)}\n onClickConfirm={() => unlockSelectedDevices()}\n onClickCancel={() => setConfirmationMessage(defaultConfirmation)}\n confirmText=\"Yes\"\n cancelText=\"No\"\n />\n \n \n )\n}\n\nexport default Devices\n","import { DeleteForever } from '@mui/icons-material'\nimport { Checkbox, Link, Tooltip } from '@mui/material'\nimport {\n ConfirmDialog,\n IconButton,\n TableCell,\n TableRow,\n Image,\n IDialogType,\n} from 'components'\nimport { ISize } from 'models'\nimport { useState } from 'react'\nimport { sizeApi } from 'resources'\nimport { getUserRole } from 'utils/helpers'\n\ninterface ISizeRowProps {\n size: ISize\n success: () => void\n displayMessage: (message: string, type?: IDialogType) => void\n filteredColumns: any[]\n handleEditSize: (size: ISize) => void\n handleSelectRow: (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => void\n selected: boolean\n}\n\nconst SizeRow = ({\n size,\n success,\n displayMessage,\n filteredColumns,\n handleEditSize,\n handleSelectRow,\n selected,\n}: ISizeRowProps) => {\n const [confirmationMessage, setConfirmationMessage] = useState({\n isOpen: false,\n message: '',\n })\n const { remove } = sizeApi()\n const role = getUserRole()\n\n const handleRemoveSize = async () => {\n try {\n await remove([size?.id])\n displayMessage('Size deleted successfully', 'success')\n success()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n return (\n <>\n \n {filteredColumns.findIndex((c) => c.value === 'select' && c.active) !==\n -1 && (\n \n {role === 'admin' ? (\n {\n handleSelectRow(event, checked, size.id)\n }}\n inputProps={{ 'aria-label': 'controlled' }}\n />\n ) : (\n \n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'image' && c.active) !==\n -1 && (\n \n {size.image && (\n \n )}\n \n )}\n\n {filteredColumns.findIndex((c) => c.value === 'name' && c.active) !==\n -1 && (\n \n {role !== 'member' ? (\n handleEditSize(size)}\n >\n {size?.name}\n \n ) : (\n <>{size?.name}\n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'width' && c.active) !==\n -1 && {size?.width}}\n {filteredColumns.findIndex((c) => c.value === 'depth' && c.active) !==\n -1 && {size?.depth}}\n {filteredColumns.findIndex((c) => c.value === 'height' && c.active) !==\n -1 && {size?.height}}\n {filteredColumns.findIndex((c) => c.value === 'action' && c.active) !==\n -1 && (\n \n {\n setConfirmationMessage({\n isOpen: true,\n message: 'Are you sure you want to delete this size?',\n })\n }}\n >\n \n \n \n \n \n )}\n \n \n setConfirmationMessage({\n isOpen: false,\n message: '',\n })\n }\n onClickConfirm={handleRemoveSize}\n onClickCancel={() =>\n setConfirmationMessage({\n isOpen: false,\n message: '',\n })\n }\n confirmText=\"Yes\"\n cancelText=\"No\"\n />\n \n )\n}\n\nexport default SizeRow\n","import {\n Button,\n NotificationDialog,\n SideBar,\n Table,\n TableBody,\n TablePagination,\n} from 'components'\nimport { DEFAULT_PAGE, DEVICES_PER_PAGE } from 'constants/pagination'\nimport useDialog from 'hooks/useDialog'\nimport { ISize, ISizeList } from 'models'\nimport { ChangeEvent, useEffect, useMemo, useState } from 'react'\nimport { sizeApi } from 'resources'\nimport SizeRow from './SizeRow'\nimport SizeForm from './SizeForm'\nimport MultiSelectToolbar from 'components/Table/components/MultiSelectToolbar/MultiSelectToolbar'\nimport SortableTableHead from 'components/Table/components/TableHead/SortableTableHead'\nimport useSortableHeader from 'hooks/useSortableHeader'\nimport useColumnFiltering from 'hooks/useColumnFiltering'\nimport NoData from 'components/PageBase/NoData'\nimport LoadingTableData from 'components/Table/components/LoadingTableData/LoadingTableData'\nimport ToolbarControls from 'components/Toolbar/components/ToolbarControls'\nimport ToolbarSearchbar from 'components/Toolbar/components/ToolbarSearchbar'\nimport Toolbar from 'components/Toolbar/Toolbar'\nimport { ToolbarControl } from 'types'\nimport useLoadingState from 'hooks/useLoadingState'\n\nconst Sizes = () => {\n const [sizes, setSizes] = useState({\n items: [],\n total: 0,\n pages: 0,\n })\n const [sizesBackup, setSizesBackup] = useState([])\n const [currentSize, setCurrentSize] = useState()\n const [currentPage, setCurrentPage] = useState(DEFAULT_PAGE)\n const [rowsPerPage, setRowsPerPage] = useState(DEVICES_PER_PAGE)\n const [search, setSearch] = useState('')\n const [openSidebar, setOpenSidebar] = useState(false)\n const [selectedRows, setSelectedRows] = useState([])\n const [selectedRowsData, setSelectedRowsData] = useState([])\n\n const { getMany: getSizes, remove } = sizeApi()\n const { dialog, displayMessage, closeDialog } = useDialog()\n const { filteredColumns, setFilteredColumns, getDefaultFilters } =\n useColumnFiltering({ displayMessage })\n\n const { loading, setLoading } = useLoadingState(true)\n\n const { order, setOrder, orderBy, handleRequestSort, getVisibleRowsSorted } =\n useSortableHeader({\n defaultOrderBy: 'name',\n entity: 'sizes',\n nestedProps: [],\n })\n\n const handleSearch = (event: ChangeEvent): void => {\n setSearch(event.target.value)\n }\n\n const handleSelectRow = (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => {\n setSelectedRows((previousValue) =>\n checked\n ? [...previousValue, id]\n : previousValue.filter((rowId) => rowId !== id),\n )\n setSelectedRowsData((previousValue) =>\n checked\n ? [\n ...previousValue,\n sizes.items.find((size) => size.id === id) as ISize,\n ]\n : previousValue.filter((row) => row.id !== id),\n )\n }\n\n const handleSelectAll = (event: React.ChangeEvent, checked: boolean) => {\n setSelectedRows(() =>\n checked ? sizes.items.map((device) => device.id) : [],\n )\n setSelectedRowsData(checked ? sizes.items : [])\n }\n\n const handleDeleteMany = async () => {\n try {\n await remove(selectedRows)\n displayMessage(\n `${selectedRows.length} item${\n selectedRows.length > 1 ? 's' : ''\n } deleted successfully`,\n 'success',\n )\n setSelectedRows([])\n fetchSizes()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleEditSize = (size: ISize) => {\n setCurrentSize(size)\n setOpenSidebar(true)\n }\n\n const handleCloseSidebar = () => {\n setOpenSidebar(false)\n setCurrentSize(undefined)\n }\n\n const fetchSizes = async (\n showNewestFirst: boolean = false,\n ): Promise => {\n try {\n setLoading(true)\n const sizes = await getSizes(currentPage + 1, rowsPerPage, search)\n setSizesBackup([...sizes.items])\n setSizes(sizes)\n if (showNewestFirst) {\n setOrder('default')\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n useEffect(() => {\n fetchSizes()\n }, [search, currentPage, rowsPerPage])\n\n useEffect(() => {\n fetchSizes()\n getDefaultFilters()\n }, [])\n\n const visibleRows = useMemo(\n () => getVisibleRowsSorted(sizes.items, sizesBackup),\n [sizes, order, orderBy],\n )\n\n const controls: ToolbarControl[] = [\n {\n display: true,\n render: (\n setOpenSidebar(true)}\n >\n Add Size\n \n ),\n },\n ]\n\n return (\n <>\n control.display)}>\n control.display)}\n />\n \n \n {selectedRows.length > 0 && (\n \n )}\n {!loading && sizes.items.length > 0 && (\n <>\n \n c.active)}\n handleSelectAll={handleSelectAll}\n />\n \n {visibleRows.map((size) => (\n \n ))}\n \n
    \n \n \n )}\n\n \n\n \n\n \n \n \n\n \n \n )\n}\n\nexport default Sizes\n","import { Box, Link, Typography, useTheme } from '@mui/material'\nimport { useState } from 'react'\nimport Papa from 'papaparse'\nimport { saveAs } from 'file-saver'\nimport { userApi } from 'resources'\nimport { Form, IDialogType } from 'components'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { Help } from 'components/Help'\nimport { FormProvider, useForm } from 'react-hook-form'\n\ninterface IBulkUploadEntityProps {\n successForm: () => void\n onClose: () => void\n displayMessage?: (message: string | JSX.Element, type?: IDialogType) => void\n}\n\nconst BulkUploadEntity = ({\n successForm,\n onClose,\n displayMessage,\n}: IBulkUploadEntityProps) => {\n const [csvData, setCsvData] = useState([])\n const [csvFile, setCsvFile] = useState(null)\n const csvString =\n 'name,email,phone_number,user_id,pin_code\\n' +\n 'James,james@gmail.com,1234567890,1010\\n'\n\n const theme = useTheme()\n const methods = useForm({})\n\n const { loading: uploadingRows, setLoading } = useLoadingState()\n const { uploadCSV: uploadUsersCSV } = userApi()\n\n const handleDragOver = (event) => {\n event.preventDefault()\n }\n\n const handleDrop = (event) => {\n event.preventDefault()\n const file = event.dataTransfer.files[0]\n file ? handleFileUpload({ target: { files: [file] } }) : null\n }\n\n const handleFileUpload = (event) => {\n const file = event.target.files[0]\n const reader = new FileReader()\n\n try {\n if (file) {\n reader.onload = (e) => {\n if (e.target && typeof e.target.result === 'string') {\n const text = e.target.result\n parseCSV(text)\n setCsvFile(file)\n }\n }\n reader.readAsText(file)\n }\n } catch (error) {\n displayMessage?.(\"Couldn't read the file. Please try again.\", 'error')\n }\n }\n\n const parseCSV = (csvText: string) => {\n const rows = csvText.split('\\n')\n const headerRow = rows.shift()?.split(',')\n const file_list: any[] = []\n\n if (!headerRow) return\n try {\n rows.map((row) => {\n const rowData = row.split(',')\n const obj: { [key: string]: string } = {}\n headerRow.forEach((key, index) => {\n const cleanKey = key.replace(/\"/g, '').trim()\n const cleanValue = rowData[index]?.replace(/\"/g, '').trim()\n if (cleanValue) {\n obj[cleanKey] = cleanValue\n }\n })\n file_list.push(obj)\n })\n\n setCsvData(file_list)\n } catch (error) {\n displayMessage?.(\"Couldn't read the file. Please try again.\", 'error')\n }\n }\n\n const createCsvBlob = (csvString) => {\n const csvData = Papa.unparse(Papa.parse(csvString).data)\n const blob = new Blob([csvData], { type: 'text/csv' })\n return blob\n }\n\n const handleSubmit = async () => {\n try {\n setLoading(true)\n let response: any[] = []\n response = await uploadUsersCSV(csvFile)\n const successRows = response.filter((r) => r.detail === true).length\n const errorRows = response.filter((r) => r.detail !== true).length\n\n displayMessage?.(\n <>\n {successRows > 0 && errorRows > 0 && (\n <>\n \n {successRows} row{successRows === 1 ? '' : 's'} was successfully\n added.\n \n \n {errorRows} row{errorRows === 1 ? '' : 's'} has failed.\n {' '}\n
    \n {response.map((r, index) =>\n r.detail === true ? null : (\n \n Error ocurred on row {index + 1}:{' '}\n {r.detail}\n \n ),\n )}\n \n )}\n {successRows > 0 && errorRows === 0 && (\n \n {successRows} row{`${successRows === 1 ? '' : 's'}`}{' '}\n {successRows === 1 ? 'has' : 'have'} been uploaded successfully!\n \n )}\n {errorRows > 0 && successRows === 0 && (\n <>\n Upload was unsuccessful!\n
    \n {response\n .filter((r) => r.detail !== true)\n .map((r, index) => (\n \n Error ocurred on row {index + 1}:{' '}\n {r.detail}\n \n ))}\n \n )}\n ,\n successRows === 0 ? 'error' : 'success',\n )\n if (successRows > 0) successForm()\n onClose()\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const downloadCSVTemplate = () => {\n try {\n const csvBlob = createCsvBlob(csvString)\n\n saveAs(csvBlob, 'user_template.csv')\n } catch (error) {\n displayMessage?.(\"Couldn't download the file. Please try again.\", 'error')\n }\n }\n\n return (\n <>\n \n
    \n \n \n \n Note: The CSV file must include the following\n headers to ensure proper processing:\n \n \n
  • name
  • \n
  • email
  • \n
  • phone_number
  • \n
  • user_id
  • \n
  • pin_code
  • \n \n \n Please make sure your CSV file contains these headers in the\n correct format. You can download the template below to get a\n sample CSV file.\n \n\n \n \n Download CSV Template\n \n \n
    \n\n \n \n {csvData.length === 0\n ? 'Drag and drop a CSV file here or click to upload.'\n : `${csvData.length} row(s) successfully imported. Click the \"Submit\" button to upload the imported prices.`}\n \n \n \n \n
    \n
    \n
    \n \n )\n}\n\nexport default BulkUploadEntity\n","import { ISettings } from 'models/Settings'\nimport { useEffect, useState } from 'react'\nimport { settingsApi } from 'resources'\nimport useDialog from './useDialog'\n\nconst useOrgSettings = () => {\n const [orgSettings, setOrgSettings] = useState>({})\n const { getSettings, getWhiteLabel } = settingsApi()\n const { displayMessage } = useDialog()\n\n const fetchOrgSettings = async () => {\n try {\n const settings: ISettings = await getSettings()\n const whitelabel = await getWhiteLabel()\n settings.terms_condition = whitelabel?.terms_condition\n settings.terms_condition_2nd = whitelabel?.terms_condition_2nd\n settings.terms_name_2nd = whitelabel?.terms_name_2nd\n localStorage.setItem('settings', JSON.stringify(settings))\n setOrgSettings(settings)\n } catch (error) {\n displayMessage(`${(error as Error).message}`)\n }\n }\n\n useEffect(() => {\n fetchOrgSettings()\n }, [])\n\n return [orgSettings, fetchOrgSettings] as const\n}\n\nexport default useOrgSettings\n","import React, { SyntheticEvent, useEffect, useState } from 'react'\nimport {\n Box,\n Typography,\n TextField as MUITextField,\n Chip,\n Autocomplete,\n Checkbox,\n} from '@mui/material'\nimport { Form, TextField, IDialogType, Tabs } from 'components'\nimport { FormProvider, useForm, SubmitHandler } from 'react-hook-form'\nimport { IGroup, IUser } from 'models'\nimport { userApi } from '../../../../resources/user'\nimport { groupApi } from 'resources'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'\nimport CheckBoxIcon from '@mui/icons-material/CheckBox'\nimport DeleteIcon from '@mui/icons-material/Delete'\nimport DoneIcon from '@mui/icons-material/Done'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { DropdownOption } from 'types'\nimport UserHistory from './UserHistory'\n\nimport { getUserRole, validatePhoneNumberFIeld } from 'utils/helpers'\nimport { Spinner } from 'components/Spinner'\nimport BulkUploadEntity from './BulkUploadEntity'\nimport useOrgSettings from 'hooks/useOrgSettings'\n\ninterface IUserFormProps {\n success?: (showNewestFirst?: boolean) => void\n onClose: () => void\n user: IUser | undefined\n displayMessage?: (message: string | JSX.Element, type?: IDialogType) => void\n allowEdit?: boolean\n}\n\nconst UserForm = ({\n success,\n onClose,\n user,\n displayMessage,\n allowEdit = true,\n}: IUserFormProps): React.ReactElement => {\n const [assignedGroups, setAssignedGroups] = useState([])\n const [groups, setGroups] = useState([])\n const [groupsToAdd, setGroupsToAdd] = useState([])\n const [groupsToRemove, setGroupsToRemove] = useState([])\n const [options, setOptions] = useState([])\n const [isLoadingGroups, setIsLoadingGroups] = useState(false)\n const [currentTab, setCurrentTab] = useState('form')\n\n const { updateUser, create } = userApi()\n const { getMany, removeUser } = groupApi()\n const { loading, setLoading } = useLoadingState()\n\n const methods = useForm({\n defaultValues: {\n ...user,\n last_name: user?.last_name || '',\n email: user?.email || '',\n address: user?.address || '',\n user_id: user?.user_id || '',\n pin_code: user?.pin_code || '',\n },\n })\n\n const fetchGroups = async (): Promise => {\n try {\n const groups = await getMany(1, 10000, '')\n setGroups(groups.items)\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n }\n }\n\n const getGoupsAssignedToUser = async () => {\n try {\n setIsLoadingGroups(true)\n const groups = await getMany(1, 1000)\n const userGroups = groups.items.filter((group) =>\n group.users.some((u) => u.id === user?.id),\n )\n setAssignedGroups(userGroups)\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n } finally {\n setIsLoadingGroups(false)\n }\n }\n\n const handleSubmit: SubmitHandler = async (data) => {\n try {\n setLoading(true)\n if (user) {\n if (groupsToRemove.length > 0) {\n const promises = groupsToRemove.map(async (id) => {\n return removeUser(id, user.id)\n })\n await Promise.all(promises)\n }\n await updateUser(data.id, {\n ...data,\n user_id: data.user_id || null,\n pin_code: data.pin_code || null,\n phone_number: data.phone_number?.replace(' ', ''),\n email: data.email?.toLowerCase().trim(),\n groups: [...groupsToAdd],\n })\n\n success?.()\n onClose()\n displayMessage?.('User updated correctly', 'success')\n } else {\n await create([\n {\n ...data,\n user_id: data.user_id || null,\n pin_code: data.pin_code || null,\n phone_number: data.phone_number?.replace(' ', ''),\n email: data.email?.toLowerCase().trim(),\n groups: [...groupsToAdd],\n },\n ])\n success?.(true)\n onClose()\n displayMessage?.('User created correctly', 'success')\n }\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const handleToggle = (event: React.SyntheticEvent, value: any) => {\n const groupsSelected: string[] = value.map((option) => option.value)\n setGroupsToAdd(groupsSelected)\n }\n\n const buildOptions = () => {\n if (groups.length > 0) {\n const notAssignedGroups = groups.filter(\n (group) => !assignedGroups.some((g) => g.id === group.id),\n )\n const autoCompleteOptions = notAssignedGroups.map((group) => ({\n label: `${group.name}`,\n value: group.id,\n }))\n const sortedOptions = autoCompleteOptions.sort((a, b) => {\n if (a.label < b.label) {\n return -1\n }\n if (a.label > b.label) {\n return 1\n }\n return 0\n })\n setOptions(sortedOptions)\n }\n }\n\n const handleSelect = (userId: string) => {\n if (groupsToRemove.includes(userId)) {\n setGroupsToRemove(groupsToRemove.filter((id) => id !== userId))\n } else {\n setGroupsToRemove((prevState) => [...prevState, userId])\n }\n }\n\n const handleTabChange = (event: SyntheticEvent, newValue: string): void => {\n setCurrentTab(newValue)\n }\n\n useEffect(() => {\n buildOptions()\n }, [assignedGroups])\n\n useEffect(() => {\n fetchGroups()\n getGoupsAssignedToUser()\n }, [])\n\n const [orgSettings] = useOrgSettings()\n\n const isEmailDefault = orgSettings.default_notification === 'email'\n const isPhoneDefault = orgSettings.default_notification === 'sms'\n\n const emailRules = {\n ...(isEmailDefault && { required: 'Email is required' }),\n pattern: {\n value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}$/i,\n message: 'Invalid email address',\n },\n }\n\n const phoneNumberRules = isPhoneDefault\n ? {\n required: 'Phone number is required',\n }\n : {}\n\n const phoneLabel = `Phone number${isPhoneDefault ? '*' : ''}`\n const emailLabel = `Email${isEmailDefault ? '*' : ''}`\n\n const disableSubmit =\n Object.keys(methods.formState.errors).length > 0 ||\n (!methods.watch('email') && !methods.watch('phone_number')) ||\n // org settings not yet loaded\n orgSettings.default_notification === undefined\n\n const UserFormContent = (\n \n
    \n \n \n\n \n\n <>\n \n methods.setValue(\n 'phone_number',\n validatePhoneNumberFIeld(e.target.value),\n )\n }\n />\n\n \n \n \n\n \n\n \n\n {user && (\n <>\n \n Groups assigned to this user\n \n {!isLoadingGroups && (\n \n {assignedGroups?.length > 0\n ? 'Select groups that you want to assign to this user'\n : `No groups assigned to this user.`}\n \n )}\n {isLoadingGroups && (\n \n )}\n {assignedGroups?.length > 0 && (\n \n {assignedGroups.map((group) => (\n handleSelect(group.id)}\n onDelete={() => handleSelect(group.id)}\n deleteIcon={\n groupsToRemove.includes(group.id) ? (\n \n ) : (\n \n )\n }\n variant={\n groupsToRemove.includes(group.id)\n ? 'filled'\n : 'outlined'\n }\n color={\n groupsToRemove.includes(group.id)\n ? 'primary'\n : 'default'\n }\n />\n ))}\n \n )}\n \n )}\n\n \n Assign user to groups\n \n \n Select groups that you want to assign to this user to and hit submit\n \n option.label}\n renderOption={(props, option, { selected }) => (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n {option.label}\n
  • \n )}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n onChange={handleToggle}\n loading={isLoadingGroups}\n loadingText={\n groups.length === assignedGroups.length\n ? 'No groups to add...'\n : 'Loading...'\n }\n />\n\n {allowEdit && (\n \n )}\n \n \n
    \n )\n\n return (\n <>\n {user && (\n ,\n },\n ]}\n currentTab={currentTab}\n handleChange={handleTabChange}\n />\n )}\n {getUserRole() !== 'admin' && !user && UserFormContent}\n {getUserRole() === 'admin' && !user && (\n success?.()}\n onClose={onClose}\n displayMessage={displayMessage}\n />\n ),\n },\n ]}\n currentTab={currentTab}\n handleChange={handleTabChange}\n />\n )}\n \n )\n}\n\nexport default UserForm\n","import { useState } from 'react'\nimport {\n Link,\n IconButton,\n Box,\n Tooltip,\n Checkbox,\n Typography,\n} from '@mui/material'\nimport { DeleteForever, QrCode } from '@mui/icons-material'\nimport PersonOffIcon from '@mui/icons-material/PersonOff'\nimport PersonIcon from '@mui/icons-material/Person'\nimport {\n TableCell,\n TableRow,\n ConfirmDialog,\n QRGenerator,\n IDialogType,\n} from 'components'\nimport { IUser } from 'models'\nimport { userApi } from '../../../../resources/user'\nimport { getUserRole } from 'utils/helpers'\nimport { HOST } from '../../../../constants'\nimport moment from 'moment'\n\nconst role = getUserRole()\n\nconst defaultConfirmation = {\n isOpen: false,\n message: '',\n action: '',\n}\ninterface IUserRowProps {\n user: IUser\n onEdit: (user: IUser) => void\n displayMessage: (message: string, type?: IDialogType) => void\n success: () => void\n filteredColumns: any[]\n handleSelectRow: (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => void\n selected: boolean\n}\n\nconst UserRow = ({\n onEdit,\n user,\n displayMessage,\n success,\n filteredColumns,\n handleSelectRow,\n selected,\n}: IUserRowProps): React.ReactElement => {\n const [confirmationMessage, setConfirmationMessage] =\n useState(defaultConfirmation)\n\n const { deleteUser, updateUser } = userApi()\n const { generateQRCode } = QRGenerator()\n\n const handleDelete = async (): Promise => {\n try {\n await deleteUser([user.id])\n displayMessage('User deleted successfully.', 'success')\n success()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const activateUser = async (): Promise => {\n try {\n await updateUser(user.id, { ...user, active: true })\n displayMessage('User has been activated.', 'success')\n success()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const deactivateUser = async (): Promise => {\n try {\n await updateUser(user.id, { ...user, active: false })\n displayMessage('User has been deactivated.', 'success')\n success()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleEdit = (): void => {\n onEdit(user)\n }\n\n const handleConfirm = (): void => {\n try {\n if (confirmationMessage.action === 'activate') {\n activateUser()\n } else if (confirmationMessage.action === 'deactivate') {\n deactivateUser()\n } else {\n handleDelete()\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleQRCode = (): void => {\n generateQRCode(user.id, `${HOST}/users/${user.id}/details`)\n }\n\n return (\n <>\n \n {filteredColumns.findIndex((c) => c.value === 'select' && c.active) !==\n -1 && (\n \n {role === 'admin' ? (\n {\n handleSelectRow(event, checked, user.id)\n }}\n inputProps={{ 'aria-label': 'controlled' }}\n />\n ) : (\n \n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'name' && c.active) !==\n -1 && (\n \n {role !== 'member' ? (\n \n {user.name || ''}\n \n ) : (\n <>{user.name || ''}\n )}\n \n )}\n\n {filteredColumns.findIndex(\n (c) => c.value === 'last_name' && c.active,\n ) !== -1 && (\n \n {role !== 'member' ? (\n \n {user.last_name || ''}\n \n ) : (\n <>{user.last_name || ''}\n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'email' && c.active) !==\n -1 && (\n \n {role !== 'member' ? (\n \n {user.email || ''}\n \n ) : (\n <>{user.email || ''}\n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'address' && c.active) !==\n -1 && {user.address || ''}}\n {filteredColumns.findIndex(\n (c) => c.value === 'phone_number' && c.active,\n ) !== -1 && (\n \n {role !== 'member' ? (\n \n {user.phone_number || ''}\n \n ) : (\n <>{user.phone_number || ''}\n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'user_id' && c.active) !==\n -1 && {user.user_id}}\n {filteredColumns.findIndex(\n (c) => c.value === 'pin_code' && c.active,\n ) !== -1 && {user.pin_code}}\n {filteredColumns.findIndex((c) => c.value === 'qr_code' && c.active) !==\n -1 && (\n \n \n \n \n \n \n \n )}\n {filteredColumns.findIndex((c) => c.value === 'action' && c.active) !==\n -1 && (\n \n \n {role === 'admin' && (\n \n \n setConfirmationMessage({\n isOpen: true,\n message: `Are you sure that you want to ${\n user.active ? 'deactivate' : 'activate'\n } ${\n user.name\n ? `${user.name} (${\n user.email || user.phone_number\n })`\n : `${user.email || user.phone_number}`\n }?`,\n action: user.active ? 'deactivate' : 'activate',\n })\n }\n >\n {user.active ? : }\n \n \n )}\n {role === 'admin' && (\n \n setConfirmationMessage({\n isOpen: true,\n message:\n 'Are you sure that you want to delete this user?',\n action: 'delete',\n })\n }\n >\n \n \n )}\n \n \n )}\n {filteredColumns.findIndex((c) => c.value === 'id' && c.active) !==\n -1 && {user.id}}\n {filteredColumns.findIndex(\n (c) => c.value === 'created_at' && c.active,\n ) !== -1 && (\n \n {moment(user.created_at).format('MM/DD/YYYY hh:mm A')}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'active' && c.active) !==\n -1 && (\n {user.active ? 'Yes' : 'No'}\n )}\n {filteredColumns.findIndex(\n (c) => c.value === 'access_code' && c.active,\n ) !== -1 && {user.access_code}}\n {filteredColumns.findIndex(\n (c) => c.value === 'require_auth' && c.active,\n ) !== -1 && (\n \n {user.require_auth ? 'Yes' : 'No'}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'groups' && c.active) !==\n -1 && (\n \n {(user.groups || []).map((g) => g.name).join(',')}\n \n )}\n {filteredColumns.findIndex(\n (c) => c.value === 'is_deleted' && c.active,\n ) !== -1 && (\n {user.is_deleted ? 'Yes' : 'No'}\n )}\n \n\n setConfirmationMessage(defaultConfirmation)}\n onClickConfirm={handleConfirm}\n onClickCancel={() => setConfirmationMessage(defaultConfirmation)}\n confirmText=\"Yes\"\n cancelText=\"No\"\n />\n \n )\n}\n\nexport default UserRow\n","import {\n ChangeEvent,\n useState,\n useEffect,\n SyntheticEvent,\n useMemo,\n} from 'react'\nimport { Box } from '@mui/material'\nimport {\n Table,\n TableBody,\n TablePagination,\n Button,\n SideBar,\n NotificationDialog,\n} from 'components'\nimport UserForm from './UserForm'\nimport UserRow from './UserRow'\nimport { userApi } from '../../../../resources/user'\nimport { IUserList, IUser } from 'models'\nimport { DEFAULT_PAGE, ITEMS_PER_PAGE } from 'constants/pagination'\nimport useDialog from 'hooks/useDialog'\nimport MultiSelectToolbar from 'components/Table/components/MultiSelectToolbar/MultiSelectToolbar'\nimport useSortableHeader from 'hooks/useSortableHeader'\nimport SortableTableHead from 'components/Table/components/TableHead/SortableTableHead'\nimport useColumnFiltering from 'hooks/useColumnFiltering'\nimport NoData from 'components/PageBase/NoData'\nimport LoadingTableData from 'components/Table/components/LoadingTableData/LoadingTableData'\nimport Toolbar from 'components/Toolbar/Toolbar'\nimport ToolbarControls from 'components/Toolbar/components/ToolbarControls'\nimport ToolbarSearchbar from 'components/Toolbar/components/ToolbarSearchbar'\nimport { ToolbarControl } from 'types'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { generateFilters } from 'utils/helpers'\nimport { USER_DEFAULTS, USER_SHORT_DEFAULTS } from 'pages/People/constants'\nconst Users = (): React.ReactElement => {\n const [users, setUsers] = useState({\n items: [],\n total: 0,\n pages: 0,\n })\n const [usersBackup, setUsersBackup] = useState([])\n const [search, setSearch] = useState('')\n const [rowsPerPage, setRowsPerPage] = useState(ITEMS_PER_PAGE)\n const [open, setOpen] = useState(false)\n const [currentUser, setCurrentUser] = useState()\n const [currentTab, setCurrentTab] = useState('IndividualUpload')\n const [currentPage, setCurrentPage] = useState(DEFAULT_PAGE)\n const [selectedRows, setSelectedRows] = useState([])\n const [selectedRowsData, setSelectedRowsData] = useState([])\n\n const { getMany, deleteUser } = userApi()\n\n const { order, setOrder, orderBy, handleRequestSort, getVisibleRowsSorted } =\n useSortableHeader({\n defaultOrderBy: 'name',\n entity: 'users',\n nestedProps: [],\n })\n\n const { dialog, displayMessage, closeDialog } = useDialog()\n const { loading, setLoading } = useLoadingState(true)\n\n const { filteredColumns, setFilteredColumns, getDefaultFilters } =\n useColumnFiltering({\n displayMessage,\n })\n\n const handleSearch = (event: ChangeEvent): void => {\n setSearch(event.target.value)\n }\n const handleSelectRow = (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => {\n setSelectedRows((previousValue) =>\n checked\n ? [...previousValue, id]\n : previousValue.filter((rowId) => rowId !== id),\n )\n\n setSelectedRowsData((previousValue) =>\n checked\n ? [...previousValue, users.items.find((user) => user.id === id)]\n : previousValue.filter((row) => row.id !== id),\n )\n }\n\n const handleSelectAll = (event: React.ChangeEvent, checked: boolean) => {\n setSelectedRows(() =>\n checked ? users.items.map((device) => device.id) : [],\n )\n\n setSelectedRowsData(() => (checked ? users.items : []))\n }\n\n const handleDeleteMany = async () => {\n try {\n await deleteUser(selectedRows)\n displayMessage(\n `${selectedRows.length} item${\n selectedRows.length > 1 ? 's' : ''\n } deleted successfully`,\n 'success',\n )\n setSelectedRows([])\n fetchUsers()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n const fetchUsers = async (\n showNewestFirst: boolean = false,\n ): Promise => {\n try {\n setLoading(true)\n const users = await getMany(currentPage + 1, rowsPerPage, search)\n setUsersBackup([...users.items])\n setUsers(users)\n if (showNewestFirst) {\n setOrder('default')\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const handleOpen = (): void => {\n setOpen(true)\n }\n const handleClose = (): void => {\n setOpen(false)\n setCurrentUser(undefined)\n }\n\n const handleEdit = (user: IUser): void => {\n setCurrentUser(user)\n setOpen(true)\n }\n\n useEffect(() => {\n fetchUsers()\n }, [])\n\n useEffect(() => {\n getDefaultFilters()\n fetchUsers()\n }, [search, currentPage, rowsPerPage])\n\n const visibleRows = useMemo(\n () => getVisibleRowsSorted(users.items, usersBackup),\n [users, order, orderBy],\n )\n\n const controls: ToolbarControl[] = [\n {\n display: true,\n render: (\n \n ),\n },\n ]\n\n return (\n <>\n \n control.display)}>\n control.display)}\n />\n \n \n {selectedRows.length > 0 && (\n {\n const users = await getMany(1, 10000, search)\n return users.items\n }\n : undefined\n }\n />\n )}\n {!loading && users.items.length > 0 && (\n <>\n \n c.active)}\n handleSelectAll={handleSelectAll}\n />\n \n {visibleRows.map((user) => (\n fetchUsers()}\n filteredColumns={filteredColumns}\n handleSelectRow={handleSelectRow}\n selected={selectedRows.includes(user.id)}\n />\n ))}\n \n
    \n \n \n )}\n\n \n\n \n\n \n \n \n\n \n
    \n \n )\n}\n\nexport default Users\n","import {\n Autocomplete,\n Checkbox,\n Typography,\n TextField as MUITextField,\n Box,\n Chip,\n} from '@mui/material'\nimport { Form, TextField, IDialogType } from 'components'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { groupApi, userApi } from 'resources'\nimport { IGroup, IUser } from 'models'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { useEffect, useState } from 'react'\nimport { DropdownOption } from 'types'\nimport CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'\nimport CheckBoxIcon from '@mui/icons-material/CheckBox'\nimport DeleteIcon from '@mui/icons-material/Delete'\nimport DoneIcon from '@mui/icons-material/Done'\n\ninterface IGroupFormProps {\n group: IGroup | undefined\n success: (showNewestFirst?: boolean) => void\n onClose: () => void\n displayMessage: (message: string, type?: IDialogType) => void\n}\n\nconst GroupForm = ({\n group,\n success,\n onClose,\n displayMessage,\n}: IGroupFormProps) => {\n const [usersToAdd, setUsersToAdd] = useState([])\n const [usersToRemove, setUsersToRemove] = useState([])\n const [users, setUsers] = useState([])\n const [options, setOptions] = useState([])\n\n const methods = useForm({ defaultValues: { ...group } })\n\n const { loading, setLoading } = useLoadingState()\n const { loading: loadingUsers, setLoading: setLoadingUsers } =\n useLoadingState()\n const { getMany } = userApi()\n const { postGroup, assignUser, removeUser, updateGroup } = groupApi()\n\n const fetchUsers = async (): Promise => {\n try {\n setLoadingUsers(true)\n const users = await getMany(1, 10000, '')\n setUsers(users.items)\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoadingUsers(false)\n }\n }\n\n const handleToggle = (event: React.SyntheticEvent, value: any) => {\n const usersSelected: string[] = value.map((option) => option.value)\n setUsersToAdd(usersSelected)\n }\n\n const handleSubmit = async (data: IGroup) => {\n try {\n setLoading(true)\n if (group) {\n if (group.name !== data.name) {\n await updateGroup(group.id, data.name)\n }\n if (usersToAdd.length > 0) {\n const promises = usersToAdd.map(async (id) => {\n return await assignUser(group.id, id)\n })\n await Promise.all(promises)\n }\n if (usersToRemove.length > 0) {\n const promises = usersToRemove.map(async (id) => {\n return await removeUser(group.id, id)\n })\n await Promise.all(promises)\n }\n displayMessage('Group updated successfully', 'success')\n success(true)\n onClose()\n setUsersToAdd([])\n setUsersToRemove([])\n } else {\n const result = await postGroup(data)\n if (usersToAdd.length > 0) {\n const promises = usersToAdd.map(async (id) => {\n return await assignUser(result.id, id)\n })\n await Promise.all(promises)\n }\n displayMessage('Group created successfully', 'success')\n success(true)\n onClose()\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n const buildOptions = () => {\n if (users.length > 0) {\n const notAssignedUsers = users.filter(\n (user) => !group?.users.some((u) => u.id === user.id),\n )\n const autoCompleteOptions = notAssignedUsers.map((user) => ({\n label: `${user.name || ''} (${user.email || user.phone_number})`,\n value: user.id,\n }))\n const sortedOptions = autoCompleteOptions.sort((a, b) => {\n if (a.label < b.label) {\n return -1\n }\n if (a.label > b.label) {\n return 1\n }\n return 0\n })\n setOptions(sortedOptions)\n }\n }\n\n const handleSelect = (userId: string) => {\n if (usersToRemove.includes(userId)) {\n setUsersToRemove(usersToRemove.filter((id) => id !== userId))\n } else {\n setUsersToRemove((prevState) => [...prevState, userId])\n }\n }\n\n useEffect(() => {\n buildOptions()\n }, [users])\n\n useEffect(() => {\n fetchUsers()\n }, [])\n\n const disableSubmit = Object.keys(methods.formState.errors).length > 0\n\n return (\n \n
    \n \n \n\n Add users to group\n option.label}\n renderOption={(props, option, { selected }) => (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n {option.label}\n
  • \n )}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n onChange={handleToggle}\n loading={options.length === 0}\n />\n\n {group && (\n <>\n \n {group?.users.length > 0\n ? 'Select the users that you want to remove from this group and hit submit'\n : 'No users assigned to this group'}\n \n Users assigned to group\n {group.users.length > 0 && (\n \n {group.users.map((user) => (\n handleSelect(user.id)}\n onDelete={() => handleSelect(user.id)}\n deleteIcon={\n usersToRemove.includes(user.id) ? (\n \n ) : (\n \n )\n }\n variant={\n usersToRemove.includes(user.id) ? 'filled' : 'outlined'\n }\n color={\n usersToRemove.includes(user.id) ? 'primary' : 'default'\n }\n />\n ))}\n \n )}\n \n )}\n\n \n
    \n
    \n
    \n )\n}\n\nexport default GroupForm\n","import { useState } from 'react'\nimport {\n TableRow,\n IconButton,\n TableCell,\n IDialogType,\n ConfirmDialog,\n} from 'components'\nimport { IGroup } from 'models'\nimport { DeleteForever } from '@mui/icons-material'\nimport { Checkbox, Link } from '@mui/material'\nimport { getUserRole } from 'utils/helpers'\nimport { groupApi } from 'resources'\n\ninterface IGroupRowProps {\n group: IGroup\n success: () => void\n filteredColumns: any[]\n displayMessage: (message: string, type?: IDialogType) => void\n handleSelectRow: (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => void\n selected: boolean\n handleEditGroup: (group: IGroup) => void\n}\n\nconst GroupRow = ({\n group,\n success,\n filteredColumns,\n displayMessage,\n handleSelectRow,\n selected,\n handleEditGroup,\n}: IGroupRowProps) => {\n const [confirmationMessage, setConfirmationMessage] = useState({\n isOpen: false,\n message: '',\n })\n\n const { deleteGroup } = groupApi()\n\n const handleDelete = async () => {\n try {\n await deleteGroup([group.id])\n displayMessage('Group has been deleted successfully.', 'success')\n success()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const role = getUserRole()\n\n return (\n <>\n \n {filteredColumns.findIndex((c) => c.value === 'select' && c.active) !==\n -1 && (\n \n {role === 'admin' ? (\n {\n handleSelectRow(event, checked, group.id)\n }}\n inputProps={{ 'aria-label': 'controlled' }}\n />\n ) : (\n \n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'name' && c.active) !==\n -1 && (\n \n {role !== 'member' ? (\n handleEditGroup(group)}\n >\n {group.name}\n \n ) : (\n <>{group.name}\n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'users' && c.active) !==\n -1 && {group.users.length}}\n {filteredColumns.findIndex((c) => c.value === 'devices' && c.active) !==\n -1 && {group.devices}}\n {filteredColumns.findIndex(\n (c) => c.value === 'locations' && c.active,\n ) !== -1 && (\n \n {group.locations.map((location) => location.name).join(', ')}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'action' && c.active) !==\n -1 && (\n \n {role !== 'member' ? (\n \n setConfirmationMessage({\n isOpen: true,\n message: 'Are you sure you want to delete this group?',\n })\n }\n >\n \n \n ) : (\n <>\n )}\n \n )}\n \n \n setConfirmationMessage({\n isOpen: false,\n message: '',\n })\n }\n onClickConfirm={handleDelete}\n onClickCancel={() =>\n setConfirmationMessage({\n isOpen: false,\n message: '',\n })\n }\n confirmText=\"Yes\"\n cancelText=\"No\"\n />\n \n )\n}\n\nexport default GroupRow\n","import { useEffect, useState, ChangeEvent, useMemo } from 'react'\nimport { IGroup, IGroupList } from 'models'\nimport { groupApi } from 'resources'\nimport {\n Table,\n TableBody,\n SideBar,\n TablePagination,\n NotificationDialog,\n} from 'components'\nimport { Button } from '@mui/material'\nimport GroupForm from './GroupForm'\nimport GroupRow from './GroupRow'\nimport useDialog from 'hooks/useDialog'\nimport { DEFAULT_PAGE, ITEMS_PER_PAGE } from 'constants/pagination'\nimport MultiSelectToolbar from 'components/Table/components/MultiSelectToolbar/MultiSelectToolbar'\nimport useSortableHeader from 'hooks/useSortableHeader'\nimport SortableTableHead from 'components/Table/components/TableHead/SortableTableHead'\nimport useColumnFiltering from 'hooks/useColumnFiltering'\nimport NoData from 'components/PageBase/NoData'\nimport LoadingTableData from 'components/Table/components/LoadingTableData/LoadingTableData'\nimport Toolbar from 'components/Toolbar/Toolbar'\nimport ToolbarControls from 'components/Toolbar/components/ToolbarControls'\nimport ToolbarSearchbar from 'components/Toolbar/components/ToolbarSearchbar'\nimport { ToolbarControl } from 'types'\nimport useLoadingState from 'hooks/useLoadingState'\n\nconst Groups = () => {\n const [groups, setGroups] = useState({\n items: [],\n total: 0,\n pages: 0,\n })\n const [groupsBackup, setGroupsBackup] = useState([])\n const [currentPage, setCurrentPage] = useState(DEFAULT_PAGE)\n const [rowsPerPage, setRowsPerPage] = useState(ITEMS_PER_PAGE)\n const [search, setSearch] = useState('')\n const [openSidebar, setOpenSidebar] = useState(false)\n const [selectedRows, setSelectedRows] = useState([])\n const [selectedRowData, setSelectedRowData] = useState([])\n const [currentGroup, setCurrentGroup] = useState()\n\n const { order, setOrder, orderBy, handleRequestSort, getVisibleRowsSorted } =\n useSortableHeader({\n defaultOrderBy: 'name',\n entity: 'groups',\n nestedProps: [],\n })\n\n const { getMany, deleteGroup } = groupApi()\n\n const { dialog, displayMessage, closeDialog } = useDialog()\n const { loading, setLoading } = useLoadingState(true)\n\n const { filteredColumns, setFilteredColumns, getDefaultFilters } =\n useColumnFiltering({ displayMessage })\n\n const handleSelectRow = (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => {\n setSelectedRows((previousValue) =>\n checked\n ? [...previousValue, id]\n : previousValue.filter((rowId) => rowId !== id),\n )\n\n setSelectedRowData((previousValue) =>\n checked\n ? [...previousValue, groups.items.find((group) => group.id === id)]\n : previousValue.filter((row) => row.id !== id),\n )\n }\n\n const handleSelectAll = (event: React.ChangeEvent, checked: boolean) => {\n setSelectedRows(() =>\n checked ? groups.items.map((device) => device.id) : [],\n )\n\n setSelectedRowData(() => (checked ? groups.items : []))\n }\n\n const handleDeleteMany = async () => {\n try {\n await deleteGroup(selectedRows)\n displayMessage(\n `${selectedRows.length} item${\n selectedRows.length > 1 ? 's' : ''\n } deleted successfully`,\n 'success',\n )\n setSelectedRows([])\n fetchGroups()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const fetchGroups = async (showNewestFirst: boolean = false) => {\n try {\n setLoading(true)\n const groups = await getMany(currentPage + 1, rowsPerPage, search)\n setGroupsBackup([...groups.items])\n setGroups(groups)\n if (showNewestFirst) {\n setOrder('default')\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const handleSearch = (event: ChangeEvent): void => {\n setSearch(event.target.value)\n }\n\n const handleEditGroup = (group: IGroup) => {\n setCurrentGroup(group)\n setOpenSidebar(true)\n }\n\n useEffect(() => {\n getDefaultFilters()\n fetchGroups()\n }, [])\n\n useEffect(() => {\n if (!openSidebar && currentGroup) setCurrentGroup(undefined)\n }, [openSidebar])\n\n useEffect(() => {\n fetchGroups()\n }, [search, currentPage, rowsPerPage])\n\n const visibleRows = useMemo(\n () => getVisibleRowsSorted(groups.items, groupsBackup),\n [groups, order, orderBy],\n )\n\n const controls: ToolbarControl[] = [\n {\n display: true,\n render: (\n setOpenSidebar(true)}\n >\n Add Group\n \n ),\n },\n ]\n\n return (\n <>\n control.display)}>\n control.display)}\n />\n \n \n {selectedRows.length > 0 && (\n \n )}\n {!loading && groups.items.length > 0 && (\n <>\n \n c.active)}\n handleSelectAll={handleSelectAll}\n />\n \n {visibleRows.map((group) => (\n fetchGroups()}\n filteredColumns={filteredColumns}\n displayMessage={displayMessage}\n handleSelectRow={handleSelectRow}\n selected={selectedRows.includes(group.id)}\n handleEditGroup={handleEditGroup}\n />\n ))}\n \n
    \n \n \n )}\n\n \n\n \n\n setOpenSidebar(false)}>\n setOpenSidebar(false)}\n displayMessage={displayMessage}\n />\n \n \n \n )\n}\n\nexport default Groups\n","import { ForwardToInbox } from '@mui/icons-material'\nimport { Box, SxProps, Tooltip } from '@mui/material'\nimport { ConfirmDialog, IconButton, IDialogType } from 'components'\nimport { IMember } from 'models'\nimport { useState } from 'react'\nimport { memberApi } from 'resources'\nimport CheckCircleOutlinedIcon from '@mui/icons-material/CheckCircleOutlined'\nimport CancelOutlinedIcon from '@mui/icons-material/CancelOutlined'\n\ninterface IResendPasswordProps {\n member: IMember\n displayMessage: (message: string, type?: IDialogType) => void\n}\n\nconst badgeStyles: SxProps = {\n position: 'absolute',\n bottom: 5,\n right: -3,\n fontSize: '1rem',\n}\n\nconst ResendPassword = ({ member, displayMessage }: IResendPasswordProps) => {\n const [openConfirmDialog, setOpenConfirmDialog] = useState(false)\n const [status, setStatus] = useState<'success' | 'error' | 'pending'>(\n 'pending',\n )\n const { resendPasswordLink } = memberApi()\n\n const onClickConfirm = async () => {\n setOpenConfirmDialog(false)\n try {\n const response = await resendPasswordLink(member)\n setStatus(response.success ? 'success' : 'error')\n } catch (error) {\n displayMessage(`${(error as Error).message}`)\n setStatus('error')\n }\n }\n\n const tooltip = {\n success: 'Email has been successfully sent. Click to send again.',\n error: 'We were unable to send the email. Please try again.',\n pending: 'Click to resend password reset link via email',\n }[status]\n\n const badge = {\n success: (\n \n ),\n error: (\n \n ),\n pending: null,\n }[status]\n\n return (\n <>\n setOpenConfirmDialog(true)}>\n \n \n \n {badge}\n \n \n \n setOpenConfirmDialog(false)}\n onClickConfirm={onClickConfirm}\n onClickCancel={() => setOpenConfirmDialog(false)}\n confirmText=\"Yes\"\n cancelText=\"No\"\n />\n \n )\n}\n\nexport default ResendPassword\n","import { DeleteForever, ForwardToInbox } from '@mui/icons-material'\nimport { Checkbox, IconButton, Link, Tooltip } from '@mui/material'\nimport { ConfirmDialog, IDialogType, TableCell, TableRow } from 'components'\nimport { IMember } from 'models'\nimport { useState } from 'react'\nimport { memberApi } from 'resources'\nimport {\n capitalizeFirstLetter,\n getCurrentUserProperty,\n getUserRole,\n} from 'utils/helpers'\nimport ResendPassword from './ResendPassword'\n\ninterface IMemberRowProps {\n member: IMember\n handleEdit: () => void\n filteredColumns: {\n value: string\n label: string\n active: boolean\n }[]\n success: () => Promise\n displayMessage: (message: string, type?: IDialogType) => void\n handleSelectRow: (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => void\n selected: boolean\n}\n\nconst MemberRow = ({\n member,\n handleEdit,\n filteredColumns,\n success,\n displayMessage,\n handleSelectRow,\n selected,\n}: IMemberRowProps) => {\n const [confirmationMessage, setConfirmationMessage] = useState({\n isOpen: false,\n message: '',\n })\n const role = getUserRole()\n const user_id = getCurrentUserProperty('user_id')\n const { remove } = memberApi()\n\n const handleRemove = async () => {\n try {\n await remove([member.user_id])\n success()\n displayMessage('Member deleted successfully!', 'success')\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n return (\n <>\n \n {filteredColumns.findIndex((c) => c.value === 'select' && c.active) !==\n -1 && (\n \n {role === 'admin' ? (\n {\n handleSelectRow(event, checked, member.user_id)\n }}\n inputProps={{ 'aria-label': 'controlled' }}\n />\n ) : (\n \n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'email' && c.active) !==\n -1 && (\n \n {role === 'admin' ? (\n \n {member?.email || 'N/A'}\n \n ) : (\n <>{member?.email || 'N/A'}\n )}\n \n )}\n {filteredColumns.findIndex(\n (c) => c.value === 'first_name' && c.active,\n ) !== -1 && {member?.first_name || 'N/A'}}\n {filteredColumns.findIndex(\n (c) => c.value === 'last_name' && c.active,\n ) !== -1 && (\n \n {member?.last_name === 'undefined'\n ? 'N/A'\n : member?.last_name || member?.last_name || 'N/A'}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'role' && c.active) !==\n -1 && (\n {capitalizeFirstLetter(member?.role) || 'N/A'}\n )}\n {filteredColumns.findIndex(\n (c) => c.value === 'pin_code' && c.active,\n ) !== -1 && {member?.pin_code || ''}}\n {filteredColumns.findIndex((c) => c.value === 'action' && c.active) !==\n -1 && (\n \n {role === 'admin' && member?.user_id !== user_id && (\n <>\n \n\n {\n setConfirmationMessage({\n isOpen: true,\n message: `Are you sure you want to delete ${member.email} from the organization?`,\n })\n }}\n >\n \n \n \n )}\n \n )}\n \n setConfirmationMessage({ isOpen: false, message: '' })}\n onClickConfirm={handleRemove}\n onClickCancel={() =>\n setConfirmationMessage({ isOpen: false, message: '' })\n }\n confirmText=\"Yes\"\n cancelText=\"No\"\n />\n \n )\n}\n\nexport default MemberRow\n","export const ROLES = [\n { value: 'admin', label: 'Admin' },\n { value: 'member', label: 'Member' },\n { value: 'viewer', label: 'Viewer' },\n]\n\nexport const USER_DEFAULTS: string[] = [\n 'select',\n 'name',\n 'last_name',\n 'email',\n 'address',\n 'phone_number',\n 'user_id',\n 'pin_code',\n 'qr_code',\n 'action',\n]\n\nexport const USER_SHORT_DEFAULTS: string[] = [\n 'name',\n 'last_name',\n 'email',\n 'address',\n 'phone_number',\n 'user_id',\n 'pin_code',\n]\n","import { IMember } from 'models'\nimport { FormProvider, SubmitHandler, useForm } from 'react-hook-form'\nimport { Form, TextField, SelectField, Tabs, IDialogType } from 'components'\nimport { memberApi } from 'resources'\nimport { ROLES } from 'pages/People/constants'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport { BulkUploadEntity } from 'components/BulkUploadEntity'\nimport { SyntheticEvent, useState } from 'react'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { getUserRole } from 'utils/helpers'\nimport { Checkbox, FormControl, FormControlLabel } from '@mui/material'\n\ninterface IMemberFormProps {\n displayMessage: (message: string | JSX.Element, type?: IDialogType) => void\n success: (showNewestFirst?: boolean) => Promise\n member: IMember | undefined\n onClose: () => void\n}\n\nconst MemberForm = ({\n displayMessage,\n success,\n member,\n onClose,\n}: IMemberFormProps) => {\n const { loading, setLoading } = useLoadingState()\n const { create, update } = memberApi()\n\n const methods = useForm({\n defaultValues: {\n ...member,\n send_reported_issues: member?.send_reported_issues || false,\n },\n })\n\n const [currentTab, setCurrentTab] = useState('IndividualUpload')\n\n const handleTabChange = (event: SyntheticEvent, newValue: string): void => {\n setCurrentTab(newValue)\n }\n\n const onSubmit: SubmitHandler = async (data: IMember) => {\n try {\n setLoading(true)\n if (member) {\n await update(\n {\n ...data,\n name: data.last_name\n ? `${data.first_name} ${data.last_name}`\n : data.first_name,\n },\n member.user_id,\n )\n success(true)\n displayMessage('Member updated successfully!', 'success')\n onClose()\n } else {\n await create({\n ...data,\n name: data.last_name\n ? `${data.first_name} ${data.last_name}`\n : data.first_name,\n email: data.email.toLowerCase().trim(),\n })\n success(true)\n displayMessage('New member created successfully!', 'success')\n onClose()\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const disableSubmit = Object.keys(methods.formState.errors).length > 0\n\n const MemberFormElement = (\n \n
    \n \n \n\n \n\n \n\n \n\n \n\n \n \n }\n label=\"Send reported issues\"\n />\n \n\n \n \n
    \n
    \n )\n\n return (\n <>\n {member && MemberFormElement}\n {getUserRole() !== 'admin' && !member && MemberFormElement}\n {getUserRole() === 'admin' && !member && (\n success?.()}\n onClose={onClose}\n displayMessage={displayMessage}\n />\n ),\n },\n ]}\n currentTab={currentTab}\n handleChange={handleTabChange}\n />\n )}\n \n )\n}\nexport default MemberForm\n","import { Checkbox, FormControlLabel, Typography } from '@mui/material'\nimport { Form, IDialogType, SelectField } from 'components'\nimport { IDevice, IMember } from 'models'\nimport { useEffect, useState } from 'react'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { deviceApi, memberApi } from 'resources'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { ROLES } from 'pages/People/constants'\n\ninterface IMultiEditFormProps {\n members: string[]\n success: () => void\n onClose: () => void\n displayMessage: (message: string, type?: IDialogType) => void\n}\n\nconst MultiEditForm = ({\n members,\n success,\n onClose,\n displayMessage,\n}: IMultiEditFormProps): React.ReactElement => {\n const { patch } = memberApi()\n\n const { loading, setLoading } = useLoadingState()\n\n const methods = useForm({})\n\n const onSubmit = async (newDevice: IMember): Promise => {\n try {\n setLoading(true)\n await patch(members, newDevice)\n onClose()\n displayMessage(\n `Successfully updated ${members.length} member${\n members.length > 1 ? 's' : ''\n }`,\n 'success',\n )\n success()\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const disableSubmit = Object.keys(methods.formState.errors).length > 0\n\n return (\n \n
    \n \n {`${members.length} member${\n members.length > 1 ? 's' : ''\n } selected`}\n \n\n \n \n
    \n
    \n )\n}\n\nexport default MultiEditForm\n","import { ChangeEvent, useState, useEffect, useMemo } from 'react'\nimport { Box } from '@mui/material'\nimport {\n Table,\n TableBody,\n TablePagination,\n Button,\n SideBar,\n NotificationDialog,\n} from 'components'\nimport { IMemberList, IMember } from 'models'\nimport { DEFAULT_PAGE, ITEMS_PER_PAGE } from 'constants/pagination'\nimport { memberApi } from 'resources'\nimport MemberRow from './TeamMemberRow'\nimport MemberForm from './TeamMemberForm'\nimport useDialog from 'hooks/useDialog'\nimport MultiSelectToolbar from 'components/Table/components/MultiSelectToolbar/MultiSelectToolbar'\nimport useColumnFiltering from 'hooks/useColumnFiltering'\nimport useSortableHeader from 'hooks/useSortableHeader'\nimport SortableTableHead from 'components/Table/components/TableHead/SortableTableHead'\nimport NoData from 'components/PageBase/NoData'\nimport LoadingTableData from 'components/Table/components/LoadingTableData/LoadingTableData'\nimport MultiEditForm from './MultiEditForm'\nimport Toolbar from 'components/Toolbar/Toolbar'\nimport ToolbarControls from 'components/Toolbar/components/ToolbarControls'\nimport ToolbarSearchbar from 'components/Toolbar/components/ToolbarSearchbar'\nimport { ToolbarControl } from 'types'\nimport useLoadingState from 'hooks/useLoadingState'\n\nconst TeamMembers = (): React.ReactElement => {\n const [members, setMembers] = useState({\n items: [],\n total: 0,\n pages: 0,\n })\n const [membersBackup, setMembersBackup] = useState([])\n const [search, setSearch] = useState('')\n const [rowsPerPage, setRowsPerPage] = useState(ITEMS_PER_PAGE)\n const [open, setOpen] = useState(false)\n const [currentMember, setCurrentMember] = useState()\n const [currentPage, setCurrentPage] = useState(DEFAULT_PAGE)\n const [selectedRows, setSelectedRows] = useState([])\n const [selectedRowData, setSelectedRowData] = useState([])\n const [action, setAction] = useState('')\n const [openMultiEditForm, setOpenMultiEditForm] = useState(false)\n\n const { dialog, displayMessage, closeDialog } = useDialog()\n const { filteredColumns, setFilteredColumns, getDefaultFilters } =\n useColumnFiltering({ displayMessage })\n const { loading, setLoading } = useLoadingState(true)\n\n const { order, setOrder, orderBy, handleRequestSort, getVisibleRowsSorted } =\n useSortableHeader({\n defaultOrderBy: 'name',\n entity: 'members',\n nestedProps: [],\n })\n\n const { getMany, remove } = memberApi()\n\n const handleSelectRow = (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => {\n setSelectedRows((previousValue) =>\n checked\n ? [...previousValue, id]\n : previousValue.filter((rowId) => rowId !== id),\n )\n\n setSelectedRowData((previousValue) =>\n checked\n ? [\n ...previousValue,\n members.items.find((member) => member.user_id === id),\n ]\n : previousValue.filter((row) => row.user_id !== id),\n )\n }\n\n const handleSelectAll = (event: React.ChangeEvent, checked: boolean) => {\n setSelectedRows(() =>\n checked ? members.items.map((member) => member.user_id) : [],\n )\n\n setSelectedRowData(() => (checked ? members.items : []))\n }\n\n const handleDeleteMany = async () => {\n try {\n await remove(selectedRows)\n displayMessage(\n `${selectedRows.length} item${\n selectedRows.length > 1 ? 's' : ''\n } deleted successfully`,\n 'success',\n )\n setSelectedRows([])\n fetchMembers()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleSearch = (event: ChangeEvent): void => {\n setSearch(event.target.value)\n }\n\n const fetchMembers = async (\n showNewestFirst: boolean = false,\n ): Promise => {\n try {\n setLoading(true)\n const members = await getMany(currentPage + 1, rowsPerPage, search)\n members.items.sort((a, b) => {\n return (\n new Date(b.created_at).valueOf() - new Date(a.created_at).valueOf()\n )\n })\n setMembersBackup([...members.items])\n setMembers(members)\n if (showNewestFirst) {\n setOrder('default')\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const handleOpen = (): void => {\n setOpen(true)\n }\n const handleClose = (): void => {\n setOpen(false)\n setCurrentMember(undefined)\n }\n\n const handleEdit = (member: IMember): void => {\n setCurrentMember(member)\n setOpen(true)\n }\n\n useEffect(() => {\n getDefaultFilters()\n fetchMembers()\n }, [])\n\n useEffect(() => {\n fetchMembers()\n }, [search, currentPage, rowsPerPage])\n\n useEffect(() => {\n if (action === 'edit') {\n setOpenMultiEditForm(true)\n }\n }, [action])\n\n const visibleRows = useMemo(\n () => getVisibleRowsSorted(members.items, membersBackup),\n [members, order, orderBy],\n )\n\n const controls: ToolbarControl[] = [\n {\n display: true,\n render: (\n \n ),\n },\n ]\n\n return (\n <>\n \n control.display)}>\n control.display)}\n />\n \n \n {selectedRows.length > 0 && (\n \n )}\n\n {!loading && members.items.length > 0 && (\n <>\n \n c.active)}\n handleSelectAll={handleSelectAll}\n />\n \n {visibleRows.map((member) => (\n handleEdit(member)}\n filteredColumns={filteredColumns}\n success={() => fetchMembers()}\n displayMessage={displayMessage}\n handleSelectRow={handleSelectRow}\n selected={selectedRows.includes(member.user_id)}\n />\n ))}\n \n
    \n\n \n \n )}\n\n \n\n \n\n {open && (\n \n \n \n )}\n\n {\n setAction('')\n setOpenMultiEditForm(false)\n }}\n >\n fetchMembers()}\n onClose={() => {\n setAction('')\n setOpenMultiEditForm(false)\n setSelectedRows([])\n }}\n displayMessage={displayMessage}\n />\n \n\n \n
    \n \n )\n}\n\nexport default TeamMembers\n","export const SETTINGS_TABS = {\n THEME: {\n label: 'Theme',\n value: 'theme',\n },\n GENERAL: {\n label: 'General',\n value: 'general',\n },\n ORGANIZATION: {\n label: 'Organization',\n value: 'organization',\n },\n API_KEYS: {\n label: 'API Keys',\n value: 'api_keys',\n },\n PROFILE: {\n label: 'Profile',\n value: 'profile',\n },\n}\n\nexport const MANAGE_TEAM_TABLE_HEADERS = [\n { label: 'Email', value: 'Email' },\n { label: 'First name', value: 'First name' },\n { label: 'Last name', value: 'Last name' },\n { label: 'Role', value: 'Role' },\n { label: 'Action', value: 'action' },\n]\n\nexport const COUNTRIES_OPTIONS = [\n { label: 'Austria', value: 'AT' },\n { label: 'Belgium', value: 'BE' },\n { label: 'Finland', value: 'FI' },\n { label: 'France', value: 'FR' },\n { label: 'Germany', value: 'DE' },\n { label: 'Ireland', value: 'IE' },\n { label: 'Italy', value: 'IT' },\n { label: 'Netherlands', value: 'NL' },\n { label: 'Portugal', value: 'PT' },\n { label: 'Spain', value: 'ES' },\n { label: 'United Kingdom / Great Britain', value: 'GB' },\n { label: 'Australia', value: 'AU' },\n { label: 'Canada', value: 'CA' },\n { label: 'United States', value: 'US' },\n { label: 'Mexico', value: 'MX' },\n]\n\nexport const ORGANIZATION_TABLE_HEADERS = [\n { value: 'name', label: 'Name' },\n { value: 'domain', label: 'Domain' },\n { value: 'owner', label: 'Owner' },\n { value: 'created_at', label: 'Created At' },\n { value: 'action', label: 'Action' },\n { value: 'expand', label: 'Expand' },\n]\n\nexport const PARCEL_EXPIRATION_UNITS = [\n { value: 'days', label: 'Days' },\n { value: 'hours', label: 'Hours' },\n]\n","import { THEME_COLOR, NAVBAR_BG, SIDEBAR_BG, DARK_THEME } from '../constants'\n\nexport const setTheme = (payload) => ({\n type: THEME_COLOR,\n payload,\n})\nexport const setDarkMode = (payload) => ({\n type: DARK_THEME,\n payload,\n})\nexport const setNavbarBg = (payload) => ({\n type: NAVBAR_BG,\n payload,\n})\n\nexport const setSidebarBg = (payload) => ({\n type: SIDEBAR_BG,\n payload,\n})\n","import {\n Fab,\n RadioGroup,\n FormControlLabel,\n FormControl,\n Box,\n Typography,\n Tooltip,\n Radio,\n} from '@mui/material'\nimport { useSelector, useDispatch, RootStateOrAny } from 'react-redux'\nimport { Check as CheckIcon } from '@mui/icons-material'\nimport { setTheme, setDarkMode } from '../../../../redux/customizer/Action'\nimport { parseSnakeCaseToTitleCase } from 'utils/helpers'\n\nconst ThemeCustomizer = () => {\n const customizer = useSelector(\n (state: RootStateOrAny) => state.CustomizerReducer,\n )\n const dispatch = useDispatch()\n const thColors = [\n {\n id: 0,\n bgColor: '#1a9bfc',\n disp: 'BLUE_THEME',\n },\n {\n id: 1,\n bgColor: '#00cec3',\n disp: 'GREEN_THEME',\n },\n {\n id: 2,\n bgColor: '#7352ff',\n disp: 'PURPLE_THEME',\n },\n {\n id: 3,\n bgColor: '#ff5c8e',\n disp: 'RED_THEME',\n },\n {\n id: 4,\n bgColor: '#1e4db7',\n disp: 'INDIGO_THEME',\n },\n {\n id: 5,\n bgColor: '#fb9678',\n disp: 'ORANGE_THEME',\n },\n ]\n\n const handleThemeModeChange = (color) => {\n dispatch(setDarkMode(color.target.value))\n localStorage.setItem('themeMode', color.target.value)\n }\n const handleThemeColorChange = (color) => {\n dispatch(setTheme(color))\n localStorage.setItem('themeColor', color)\n }\n\n return (\n \n \n {/* ------------ Dark light theme setting ------------- */}\n \n Theme Option\n \n \n \n \n }\n label=\"Light\"\n />\n \n }\n label=\"Dark\"\n />\n \n \n \n {/* ------------ Navbar Color setting ------------- */}\n \n Theme Colors\n \n \n {thColors.map((thcolor) => (\n \n handleThemeColorChange(thcolor.disp)}\n aria-label={thcolor.bgColor}\n >\n {customizer.activeTheme === thcolor.disp ? (\n \n ) : (\n ''\n )}\n \n \n ))}\n \n\n \n \n \n )\n}\n\nexport default ThemeCustomizer\n","import { Box, Typography, Checkbox, useMediaQuery, Theme } from '@mui/material'\n\nimport { Form, TextField, SelectField, IDialogType } from 'components'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { settingsApi, sizeApi } from 'resources'\nimport { PARCEL_EXPIRATION_UNITS } from 'pages/Settings/constants'\nimport { ISettings } from 'models/Settings'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { useEffect, useState } from 'react'\nimport useHardwareTypes from 'hooks/useHardwareTypes'\nimport { DropdownOption } from 'types'\nimport useDeviceModes from 'hooks/useDeviceModes'\nimport { Help } from 'components/Help'\n\ninterface ISettingsFormProps {\n orgSettings: Partial\n fetchOrgSettings: () => void\n displayMessage: (message: string, type?: IDialogType) => void\n}\n\nconst SettingsForm = ({\n orgSettings,\n fetchOrgSettings,\n displayMessage,\n}: ISettingsFormProps) => {\n const [unlimited, setUnlimited] = useState(() => {\n if (orgSettings.default_max_reservations) {\n return false\n }\n return true\n })\n\n const [secondTermsAndConditions, setSecondTermsAndConditions] =\n useState(Boolean(orgSettings.terms_condition_2nd) || false)\n const [expiredParcels, setExpiredParcels] = useState(\n Boolean(\n orgSettings.parcel_expiration || orgSettings.parcel_expiration_unit,\n ),\n )\n\n const [secondContact, setSecondContact] = useState(\n orgSettings.new_contact_notification_enabled || false,\n )\n const [verificationEmailSent, setVerificationEmailSent] =\n useState(false)\n const [emailVerified, setEmailVerified] = useState(\n Boolean(orgSettings.new_contact_notification_email_verified) || false,\n )\n\n const settings = JSON.parse(localStorage.getItem('settings') || '{}')\n\n const smDown = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'))\n\n const { createSettings, updateSettings, patchWhiteLabel } = settingsApi()\n const { orgHardware } = useHardwareTypes()\n\n const methods = useForm({\n defaultValues: {\n ...orgSettings,\n },\n })\n\n const { loading, setLoading } = useLoadingState()\n const { getMany: getSizes } = sizeApi()\n const { modes } = useDeviceModes()\n\n const [sizes, setSizes] = useState([])\n\n const fetchSizes = async () => {\n try {\n const sizes = await getSizes(1, 10000)\n setSizes(\n sizes.items.map((size) => ({\n value: size.id,\n label: size.name,\n })),\n )\n } catch (error) {\n displayMessage?.((error as Error).message)\n }\n }\n\n const onSubmit = async (newLocker: ISettings) => {\n try {\n setLoading(true)\n const reservations = unlimited ? null : newLocker.default_max_reservations\n if (settings) {\n const updatedSettings = {\n ...settings,\n ...newLocker,\n default_max_reservations: reservations,\n new_contact_notification_enabled: secondContact,\n }\n await updateSettings(updatedSettings)\n\n if (\n !secondTermsAndConditions &&\n newLocker.terms_condition_2nd &&\n newLocker.terms_name_2nd\n ) {\n await patchWhiteLabel({\n terms_condition_2nd: null,\n terms_name_2nd: null,\n })\n }\n if (\n newLocker.terms_condition &&\n settings.terms_condition !== newLocker.terms_condition\n ) {\n await patchWhiteLabel({\n terms_condition: newLocker.terms_condition,\n })\n }\n if (\n newLocker.terms_condition_2nd &&\n (settings.terms_condition_2nd !== newLocker.terms_condition_2nd ||\n settings.terms_name_2nd !== newLocker.terms_name_2nd)\n ) {\n await patchWhiteLabel({\n terms_condition_2nd: newLocker.terms_condition_2nd,\n terms_name_2nd: newLocker.terms_name_2nd,\n })\n }\n\n displayMessage('Settings updated successfully', 'success')\n fetchOrgSettings()\n } else {\n await createSettings({\n ...newLocker,\n default_max_reservations: reservations,\n invoice_prefix: 'ZTT',\n })\n displayMessage('Settings created successfully', 'success')\n\n if (newLocker.terms_condition) {\n await patchWhiteLabel({\n terms_condition: newLocker.terms_condition,\n })\n }\n if (newLocker.terms_condition_2nd || newLocker.terms_name_2nd) {\n await patchWhiteLabel({\n terms_condition_2nd: newLocker.terms_condition_2nd || null,\n terms_name_2nd: newLocker.terms_name_2nd || null,\n })\n }\n fetchOrgSettings()\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`)\n methods.reset()\n } finally {\n setLoading(false)\n }\n }\n\n const disableSubmit = Object.keys(methods.formState.errors).length > 0\n\n useEffect(() => {\n fetchSizes()\n }, [])\n\n useEffect(() => {\n if (orgHardware.length === 1) {\n methods.setValue('default_device_hardware', orgHardware[0].value)\n }\n\n if (modes.length === 1) {\n methods.setValue('default_device_mode', modes[0].value)\n }\n }, [orgHardware, modes])\n\n useEffect(() => {\n const duration = methods.watch('parcel_expiration')\n const unit = methods.watch('parcel_expiration_unit')\n if (!expiredParcels && (unit || duration)) {\n methods.setValue('parcel_expiration', null)\n methods.setValue('parcel_expiration_unit', null)\n }\n }, [expiredParcels])\n\n const notification_types = [\n { label: 'Email', value: 'email' },\n { label: 'SMS', value: 'sms' },\n ]\n\n return (\n <>\n \n
    \n \n \n \n Edit Support\n \n\n \n !isNaN(Number(value.replace('+', ''))) ||\n 'Invalid phone number',\n }}\n />\n \n\n \n Edit Terms and Conditions\n \n \n\n \n \n setSecondTermsAndConditions(\n (previousValue) => !previousValue,\n )\n }\n />\n \n \n Add another terms and conditions\n \n \n \n\n {secondTermsAndConditions && (\n <>\n \n \n \n )}\n Expired Parcels\n \n \n setExpiredParcels((previousValue) => !previousValue)\n }\n />\n \n Set duration for expiry of parcels\n \n \n\n {expiredParcels && (\n \n \n \n \n )}\n\n {\n methods.reset()\n }}\n loading={loading}\n disableSubmit={disableSubmit}\n />\n \n \n \n
    \n \n )\n}\nexport default SettingsForm\n","import { HTTP_CODES } from 'constants/HTTP'\nimport { useApiRequest } from 'utils'\nimport { getErrorMessage } from 'utils/helpers'\n\nconst GET_ERRORS = {\n [HTTP_CODES.NOT_FOUND]: 'No API Keys found',\n [HTTP_CODES.INTERNAL_SERVER_ERROR]: 'An internal error occurred',\n}\n\nconst apikeysApi = () => {\n const { fetchPartnerEndpoint } = useApiRequest()\n\n const get = async () => {\n try {\n const response = await fetchPartnerEndpoint({\n endpoint: 'api-keys',\n method: 'GET',\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const createApiKey = async () => {\n try {\n const response = await fetchPartnerEndpoint({\n endpoint: 'api-keys',\n method: 'POST',\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return {\n get,\n createApiKey,\n }\n}\n\nexport default apikeysApi\n","import { useEffect, useState } from 'react'\nimport { Box, Button, Grid, TextField, Typography, Link } from '@mui/material'\nimport { apikeysApi } from 'resources/apikeys'\n\nconst APIKeysForm = () => {\n const { get: getApiKeys, createApiKey } = apikeysApi()\n const [apiKey, setApiKey] = useState(null)\n const [copied, setCopied] = useState(false)\n\n getApiKeys().then((response: any) => {\n if (!response) return setApiKey('')\n\n setApiKey(response[0]?.key)\n })\n\n const handleCopyToClipboard = () => {\n navigator.clipboard.writeText(apiKey || '')\n setCopied(true)\n }\n\n const handleGenerateAPIKey = () => {\n createApiKey().then((response: any) => {\n setApiKey(response.key)\n })\n }\n\n return (\n \n \n \n Koloni API Key\n \n\n \n \n Generate API Key\n \n \n \n {copied ? 'Copied!' : 'Copy'}\n \n
    \n \n {/* \n \n See instructions here\n \n */}\n \n )\n}\n\nexport default APIKeysForm\n","import { Box, Typography, Checkbox, useMediaQuery, Theme } from '@mui/material'\n\nimport {\n Form,\n TextField,\n SelectField,\n IDialogType,\n ToggleField,\n IconButton,\n} from 'components'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { settingsApi, sizeApi } from 'resources'\nimport { COUNTRIES_OPTIONS } from 'pages/Settings/constants'\nimport { ISettings } from 'models/Settings'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { useEffect, useState } from 'react'\nimport useHardwareTypes from 'hooks/useHardwareTypes'\nimport { DropdownOption } from 'types'\nimport useDeviceModes from 'hooks/useDeviceModes'\nimport CheckCircleIcon from '@mui/icons-material/CheckCircle'\nimport ArrowForwardIcon from '@mui/icons-material/ArrowForward'\n\ninterface IDefaultsFormProps {\n orgSettings: Partial\n fetchOrgSettings: () => void\n displayMessage: (message: string, type?: IDialogType) => void\n}\n\nconst DefaultsForm = ({\n orgSettings,\n fetchOrgSettings,\n displayMessage,\n}: IDefaultsFormProps) => {\n const [unlimited, setUnlimited] = useState(() => {\n if (orgSettings.default_max_reservations) {\n return false\n }\n return true\n })\n\n const [secondTermsAndConditions, setSecondTermsAndConditions] =\n useState(Boolean(orgSettings.terms_condition_2nd) || false)\n const [expiredParcels, setExpiredParcels] = useState(\n Boolean(\n orgSettings.parcel_expiration || orgSettings.parcel_expiration_unit,\n ),\n )\n\n const [secondContact, setSecondContact] = useState(\n orgSettings.new_contact_notification_enabled || false,\n )\n const [verificationEmailSent, setVerificationEmailSent] =\n useState(false)\n const [emailVerified, setEmailVerified] = useState(\n Boolean(orgSettings.new_contact_notification_email_verified) || false,\n )\n\n const settings = JSON.parse(localStorage.getItem('settings') || '{}')\n\n const smDown = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'))\n\n const { createSettings, updateSettings, patchWhiteLabel, confirmEmail } =\n settingsApi()\n const { orgHardware } = useHardwareTypes()\n\n const methods = useForm({\n defaultValues: {\n ...orgSettings,\n },\n })\n\n const { loading, setLoading } = useLoadingState()\n const { getMany: getSizes } = sizeApi()\n const { modes } = useDeviceModes()\n\n const [sizes, setSizes] = useState([])\n\n const fetchSizes = async () => {\n try {\n const sizes = await getSizes(1, 10000)\n setSizes(\n sizes.items.map((size) => ({\n value: size.id,\n label: size.name,\n })),\n )\n } catch (error) {\n displayMessage?.((error as Error).message)\n }\n }\n\n const onSubmit = async (newLocker: ISettings) => {\n try {\n setLoading(true)\n const reservations = unlimited ? null : newLocker.default_max_reservations\n if (settings) {\n const updatedSettings = {\n ...settings,\n ...newLocker,\n default_max_reservations: reservations,\n new_contact_notification_enabled: secondContact,\n default_notification_email: methods.getValues(\n 'default_notification_email',\n ),\n default_notification_phone: methods.getValues(\n 'default_notification_phone',\n ),\n default_notification: methods.getValues('default_notification'),\n }\n await updateSettings(updatedSettings)\n\n if (\n !secondTermsAndConditions &&\n newLocker.terms_condition_2nd &&\n newLocker.terms_name_2nd\n ) {\n await patchWhiteLabel({\n terms_condition_2nd: null,\n terms_name_2nd: null,\n })\n }\n if (\n newLocker.terms_condition &&\n settings.terms_condition !== newLocker.terms_condition\n ) {\n await patchWhiteLabel({\n terms_condition: newLocker.terms_condition,\n })\n }\n if (\n newLocker.terms_condition_2nd &&\n (settings.terms_condition_2nd !== newLocker.terms_condition_2nd ||\n settings.terms_name_2nd !== newLocker.terms_name_2nd)\n ) {\n await patchWhiteLabel({\n terms_condition_2nd: newLocker.terms_condition_2nd,\n terms_name_2nd: newLocker.terms_name_2nd,\n })\n }\n\n displayMessage('Settings updated successfully', 'success')\n fetchOrgSettings()\n } else {\n await createSettings({\n ...newLocker,\n default_max_reservations: reservations,\n invoice_prefix: 'ZTT',\n })\n displayMessage('Settings created successfully', 'success')\n\n if (newLocker.terms_condition) {\n await patchWhiteLabel({\n terms_condition: newLocker.terms_condition,\n })\n }\n if (newLocker.terms_condition_2nd || newLocker.terms_name_2nd) {\n await patchWhiteLabel({\n terms_condition_2nd: newLocker.terms_condition_2nd || null,\n terms_name_2nd: newLocker.terms_name_2nd || null,\n })\n }\n fetchOrgSettings()\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`)\n methods.reset()\n } finally {\n setLoading(false)\n }\n }\n\n const handleSendVerificationEmail = async () => {\n try {\n setVerificationEmailSent(true)\n await updateSettings({\n new_contact_notification_email: methods.getValues(\n 'new_contact_notification_email',\n ),\n new_contact_notification_enabled: true,\n default_notification: 'email',\n })\n await confirmEmail(methods.getValues('new_contact_notification_email'))\n displayMessage(\n 'Verification email sent. Please check your inbox.',\n 'success',\n )\n } catch (error) {\n displayMessage(`${(error as Error).message}`)\n }\n }\n\n const disableSubmit = Object.keys(methods.formState.errors).length > 0\n\n useEffect(() => {\n fetchSizes()\n }, [])\n\n useEffect(() => {\n if (orgHardware.length === 1) {\n methods.setValue('default_device_hardware', orgHardware[0].value)\n }\n\n if (modes.length === 1) {\n methods.setValue('default_device_mode', modes[0].value)\n }\n }, [orgHardware, modes])\n\n useEffect(() => {\n const duration = methods.watch('parcel_expiration')\n const unit = methods.watch('parcel_expiration_unit')\n if (!expiredParcels && (unit || duration)) {\n methods.setValue('parcel_expiration', null)\n methods.setValue('parcel_expiration_unit', null)\n }\n }, [expiredParcels])\n\n useEffect(() => {\n const email = methods.watch('new_contact_notification_email')\n if (email !== orgSettings.new_contact_notification_email) {\n setEmailVerified(false)\n setVerificationEmailSent(false)\n }\n }, [methods.watch('new_contact_notification_email')])\n\n const notification_types = [\n { label: 'Email', value: 'email' },\n { label: 'SMS', value: 'sms' },\n ]\n\n return (\n <>\n \n
    \n \n \n \n Country\n \n \n\n Mode\n\n \n\n Hardware\n\n \n\n Size\n\n \n\n Notifications\n\n \n \n This will be the primary setting for notifications.\n \n\n {methods.watch('default_notification') === 'email' && (\n <>\n \n \n\n \n {!emailVerified && !verificationEmailSent && (\n theme.palette.grey[800],\n '&:hover': {\n backgroundColor: (theme) =>\n theme.palette.grey[700],\n },\n width: 30,\n height: 30,\n p: 0,\n }}\n >\n \n \n )}\n\n {!emailVerified && verificationEmailSent && (\n \n theme.palette.success.main,\n borderRadius: '50%',\n width: 30,\n height: 30,\n justifyContent: 'center',\n }}\n >\n \n \n \n \n )}\n\n {emailVerified && (\n \n \n verified\n \n \n \n )}\n \n \n\n {!orgSettings.new_contact_notification_email_verified && (\n \n Note: This email will be used as sender\n for new contact\n
    notification but needs to be{' '}\n verified. please check your\n
    \n inbox for verification email.\n
    \n )}\n \n )}\n\n {methods.watch('default_notification') === 'sms' && (\n <>\n \n \n This will be used to send the notifications.\n \n \n )}\n\n \n\n User Transactions Limit\n \n \n setUnlimited((previousValue) => !previousValue)\n }\n />\n Unlimited\n \n {!unlimited && (\n \n )}\n\n {\n methods.reset()\n }}\n loading={loading}\n disableSubmit={disableSubmit}\n />\n
    \n \n \n
    \n \n )\n}\nexport default DefaultsForm\n","import { ISession } from 'models/Session'\n\nexport const setUserSession = (payload: ISession) => ({\n type: 'setUserSession',\n payload,\n})\n","import { ISession } from 'models/Session'\nimport { useEffect, useState } from 'react'\nimport { RootStateOrAny, useDispatch, useSelector } from 'react-redux'\nimport { setUserSession } from 'redux/user-session/Action'\n\nexport const useUserSession = () => {\n const session = useSelector(\n (state: RootStateOrAny) => state.userSessionReducer,\n )\n const dispatch = useDispatch()\n\n useEffect(() => {\n const getSession = async () => {\n const userSession: ISession = JSON.parse(\n localStorage.getItem('userSession') || '{}',\n )\n dispatch(setUserSession(userSession))\n }\n getSession()\n }, [])\n\n return {\n session,\n isHelpDesk: session.email.includes('helpdesk') && !session.name,\n }\n}\n","import { Link, useTheme } from '@mui/material'\nimport { TextField } from 'components'\nimport { IProfileSettings } from 'models/ProfileSettings'\nimport { useFormContext } from 'react-hook-form'\n\ninterface IChangePasswordProps {\n passwordStrengthElement: JSX.Element | null\n}\n\nconst ChangePassword = ({ passwordStrengthElement }: IChangePasswordProps) => {\n const theme = useTheme()\n const { setValue, watch } = useFormContext()\n\n const showChangePassword = watch('show_change_password')\n\n const toggleShowChangePassword = () =>\n setValue('show_change_password', !showChangePassword)\n\n const newPassword: string = watch('new_password')\n\n return (\n <>\n \n Change Password\n \n\n {showChangePassword && (\n <>\n \n\n \n\n {passwordStrengthElement}\n\n \n value === newPassword || 'The passwords do not match',\n }}\n />\n \n )}\n \n )\n}\n\nexport default ChangePassword\n","import { Box, Theme, Typography, useMediaQuery } from '@mui/material'\nimport { Form, IDialogType, TextField } from 'components'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { useUserSession } from 'hooks/useUserSession'\nimport { IProfileSettings } from 'models/ProfileSettings'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport ChangePassword from './ChangePassword'\nimport { settingsApi } from 'resources'\nimport { useEffect, useState } from 'react'\nimport { useNavigate } from 'react-router'\nimport { usePasswordStrength } from 'hooks/usePasswordStrength'\nimport { setUserSession } from 'redux/user-session/Action'\nimport { useDispatch } from 'react-redux'\n\ninterface IProfileProps {\n displayMessage: (message: string, type?: IDialogType) => void\n}\n\nconst Profile = ({ displayMessage }: IProfileProps) => {\n const smDown = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'))\n const { session: userSession, isHelpDesk } = useUserSession()\n const { updateProfileSettings, changePassword } = settingsApi()\n const [loading, setLoading] = useState(false)\n const navigate = useNavigate()\n const dispatch = useDispatch()\n\n const methods = useForm({\n defaultValues: {\n user_id: '',\n email: '',\n first_name: '',\n last_name: '',\n show_change_password: false,\n confirm_password: '',\n new_password: '',\n password: '',\n },\n })\n\n const setInitialFields = () => {\n methods.setValue('user_id', userSession.user_id)\n methods.setValue('email', userSession.email)\n methods.setValue('first_name', userSession.first_name || '')\n methods.setValue('last_name', userSession.last_name || '')\n }\n\n useEffect(() => {\n setInitialFields()\n }, [userSession])\n\n if (isHelpDesk) return null\n\n const onSubmit = async (formData: IProfileSettings) => {\n try {\n const currentUser = JSON.parse(localStorage.getItem('currentUser')!)\n\n setLoading(true)\n if (formData.show_change_password) {\n await changePassword(\n currentUser.pool.clientId,\n currentUser.signInUserSession.refreshToken.token,\n formData,\n )\n }\n\n await updateProfileSettings(formData)\n const newSession = {\n ...userSession,\n name: `${formData.first_name} ${formData.last_name}`,\n first_name: formData.first_name,\n last_name: formData.last_name,\n }\n localStorage.setItem('userSession', JSON.stringify(newSession))\n dispatch(setUserSession(newSession))\n displayMessage('Settings updated successfully', 'success')\n } catch (error) {\n displayMessage(\n `${\n (error as Error)?.message ||\n 'Something went wrong! Please try again later.'\n }`,\n )\n } finally {\n setLoading(false)\n }\n }\n\n const disableSubmit = Object.keys(methods.formState.errors).length > 0\n const showChangePassword = methods.watch('show_change_password')\n const newPassword: string = methods.watch('new_password')\n const passwordStrength = usePasswordStrength(newPassword)\n\n return (\n \n
    \n \n \n \n Profile\n \n\n \n\n \n\n \n\n \n\n navigate('/home')}\n loading={loading}\n disableSubmit={\n disableSubmit ||\n (showChangePassword &&\n passwordStrength.strengthLabel === 'Weak')\n }\n />\n \n \n \n
    \n )\n}\n\nexport default Profile\n","import { useState, SyntheticEvent, useEffect } from 'react'\nimport { Tabs, NotificationDialog } from 'components'\nimport { memberApi } from 'resources'\nimport { IMember } from 'models/Member'\nimport { SETTINGS_TABS } from './constants'\nimport ThemeCustomizer from './tabs/Theme/ThemeCustomizer'\nimport SettingsForm from './tabs/General/SettingsForm'\nimport APIKeysForm from './tabs/APIKeys/APIKeys'\nimport { Box, Card, Typography, useTheme } from '@mui/material'\nimport useDialog from 'hooks/useDialog'\nimport DefaultsForm from './tabs/Defaults/DefaultsForm'\nimport ProfileForm from './tabs/Profile/Profile'\nimport { useUserSession } from 'hooks/useUserSession'\nimport useOrgSettings from 'hooks/useOrgSettings'\n\nconst Settings = () => {\n const [currentMember, setCurrentMember] = useState()\n const [currentTab, setCurrentTab] = useState(\n SETTINGS_TABS.GENERAL.value,\n )\n const { isHelpDesk } = useUserSession()\n const [orgSettings, fetchOrgSettings] = useOrgSettings()\n\n const { getSelf } = memberApi()\n\n const { dialog, displayMessage, closeDialog } = useDialog()\n\n const theme = useTheme()\n\n const fetch = async () => {\n try {\n const response = await getSelf()\n setCurrentMember(response)\n } catch (error) {\n displayMessage(`${(error as Error).message}`)\n }\n }\n\n useEffect(() => {\n const isFirstTimeLogin = localStorage.getItem('firstTimeLogin') === 'true'\n if (isFirstTimeLogin) {\n localStorage.removeItem('firstTimeLogin')\n const welcomeMessage = (\n \n \n You can fill out the fields on the Settings page to get started\n \n or\n \n We will load the default settings for your organization\n \n \n )\n displayMessage(welcomeMessage, 'welcome', {\n titleColor: theme.palette.primary.main,\n titleText: 'Welcome!',\n })\n }\n try {\n fetch()\n } catch (error) {\n displayMessage(`${(error as Error).message}`)\n }\n }, [])\n\n const handleTabChange = (event: SyntheticEvent, newValue: string): void => {\n setCurrentTab(newValue)\n }\n\n const TABS = [\n {\n label: 'Defaults',\n value: 'defaults',\n children: (\n \n ),\n },\n {\n label: SETTINGS_TABS.GENERAL.label,\n value: SETTINGS_TABS.GENERAL.value,\n children: (\n \n ),\n },\n {\n label: SETTINGS_TABS.THEME.label,\n value: SETTINGS_TABS.THEME.value,\n children: ,\n },\n {\n label: SETTINGS_TABS.API_KEYS.label,\n value: SETTINGS_TABS.API_KEYS.value,\n children: ,\n },\n {\n label: SETTINGS_TABS.PROFILE.label,\n value: SETTINGS_TABS.PROFILE.value,\n children: ,\n disabled: isHelpDesk,\n showDisabled: true,\n },\n ]\n\n return (\n \n {currentMember && Object.keys(orgSettings).length > 0 && (\n \n )}\n \n \n )\n}\nexport default Settings\n","export const ISSUES_TABLE_HEADERS = [\n {\n value: 'issueId',\n label: 'Issue ID',\n active: true,\n },\n {\n value: 'userName',\n label: 'User Name',\n active: true,\n },\n {\n value: 'orderNumber',\n label: 'Order No.',\n active: true,\n },\n\n {\n value: 'status',\n label: 'Status',\n active: true,\n },\n {\n value: 'reportTime',\n label: 'Report Time',\n active: true,\n },\n {\n value: 'action',\n label: 'Action',\n active: true,\n },\n]\n\nexport const ISSUE_STATUSES = [\n {\n value: 'pending',\n label: 'Pending',\n },\n {\n value: 'in_progress',\n label: 'In Progress',\n },\n {\n value: 'resolved',\n label: 'Resolved',\n },\n]\n","import { useState } from 'react'\nimport { SelectChangeEvent } from '@mui/material/Select'\nimport { Checkbox, FormControl, Link, MenuItem, Select } from '@mui/material'\nimport { DeleteForever } from '@mui/icons-material'\nimport {\n TableCell,\n TableRow,\n DeleteDialog,\n IconButton,\n IDialogType,\n} from 'components'\nimport { IssueApi } from 'resources'\nimport { IIssue } from 'models'\nimport { getUserRole } from 'utils/helpers'\nimport { ISSUE_STATUSES } from '../constants'\nimport { formatDate } from '../helpers'\n\nconst role = getUserRole()\ninterface IIssueRowProps {\n issue: IIssue\n success: () => void\n filteredColumns: any[]\n displayMessage: (message: string, type?: IDialogType) => void\n handleSelectRow: (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => void\n selected: boolean\n handleEditIssue: (issue: IIssue) => void\n}\n\nconst IssueRow = ({\n issue,\n success,\n filteredColumns,\n displayMessage,\n handleSelectRow,\n selected,\n handleEditIssue,\n}: IIssueRowProps): React.ReactElement => {\n const [dialog, setDialog] = useState({\n isOpen: false,\n message: '',\n })\n const [status, setStatus] = useState(issue.status)\n\n const { deleteMany, patch } = IssueApi()\n\n const handleDelete = async (): Promise => {\n try {\n await deleteMany([issue.id])\n setDialog({ isOpen: false, message: '' })\n success()\n displayMessage('Issue deleted successfully!', 'success')\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleStatusChange = async (\n event: SelectChangeEvent,\n ): Promise => {\n try {\n const { value } = event.target\n setStatus(value)\n await patch(issue.id, value)\n success()\n displayMessage('Issue updated successfully!', 'success')\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n return (\n <>\n \n {filteredColumns.findIndex((c) => c.value === 'select' && c.active) !==\n -1 && (\n \n {role === 'admin' ? (\n {\n handleSelectRow(event, checked, issue.id)\n }}\n inputProps={{ 'aria-label': 'controlled' }}\n />\n ) : (\n \n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'issueId' && c.active) !==\n -1 && (\n \n {\n handleEditIssue(issue)\n }}\n >\n {issue.issue_id}\n \n \n )}\n\n {filteredColumns.findIndex(\n (c) => c.value === 'userName' && c.active,\n ) !== -1 && (\n \n {issue.user?.name ||\n issue.user?.email ||\n issue.user?.phone_number ||\n issue?.reporter_user_name ||\n issue?.reporter_user_email ||\n issue?.reporter_user_phone ||\n 'N/A'}\n \n )}\n {filteredColumns.findIndex(\n (c) => c.value === 'orderNumber' && c.active,\n ) !== -1 && (\n \n {issue.event?.invoice_id ? issue.event?.invoice_id : 'N/A'}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'status' && c.active) !==\n -1 && (\n \n \n \n {ISSUE_STATUSES.map((option) => (\n \n {option.label}\n \n ))}\n \n \n \n )}\n\n {filteredColumns.findIndex(\n (c) => c.value === 'reportTime' && c.active,\n ) !== -1 && (\n \n {new Date(issue.created_at).toLocaleString('en-US', {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n })}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'action' && c.active) !==\n -1 && (\n \n {\n setDialog({\n isOpen: true,\n message: `Are you sure you want to delete this issue This cannot be undone.`,\n })\n }}\n >\n \n \n \n )}\n \n\n {dialog.isOpen && (\n setDialog({ isOpen: false, message: '' })}\n onClickConfirm={handleDelete}\n open={dialog.isOpen}\n onClose={() => setDialog({ isOpen: false, message: '' })}\n />\n )}\n \n )\n}\n\nexport default IssueRow\n","import { Form, IDialogType, Image, SelectField, TextField } from 'components'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { IIssue, IMember, ITransaction, IUser } from 'models'\nimport { FormProvider, SubmitHandler, useForm } from 'react-hook-form'\nimport { ISSUE_STATUSES } from '../constants'\nimport {\n Autocomplete,\n Box,\n Checkbox,\n TextField as MUITextField,\n Typography,\n} from '@mui/material'\nimport CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'\nimport CheckBoxIcon from '@mui/icons-material/CheckBox'\nimport { ChangeEvent, useEffect, useMemo, useState } from 'react'\nimport { formatDate } from '../helpers'\nimport { IssueApi, transactionsApi } from 'resources'\nimport ImageUploader from 'components/ImageUploader/ImageUploader'\nimport { DropdownOption } from 'types'\nimport LoadingFormData from 'components/PageBase/LoadingFormData'\n\ninterface IIssueFormProps {\n issue: IIssue | undefined\n onClose: () => void\n displayMessage: (message: string, type?: IDialogType) => void\n success: (showNewestFirst?: boolean) => void\n users: IUser[]\n teamMembers: IMember[]\n}\n\nconst IssueForm = ({\n issue,\n onClose,\n displayMessage,\n success,\n users,\n teamMembers,\n}: IIssueFormProps) => {\n const [usersOptions, setUserOptions] = useState([])\n const [loadingUserTransactions, setLoadingUserTransactions] =\n useState(false)\n\n const [invoiceIdOptions, setInvoiceIdOptions] = useState<\n { label: string; id: string; id_event: string }[]\n >([])\n\n const [selectedUser, setSelectedUser] = useState(\n () => {\n if (issue && issue.id_user) {\n const user = users.find((user) => user.id === issue.id_user)\n if (user) {\n return {\n label: `${user.name || ''} (${user.email || user.phone_number})`,\n value: user.id,\n }\n }\n return null\n } else {\n return null\n }\n },\n )\n\n const [selectedInvoiceId, setSelectedInvoiceId] = useState<{\n label: string\n id: string\n id_event: string\n } | null>(() => {\n if (issue && issue?.event?.invoice_id) {\n return {\n id: issue.event.invoice_id,\n label: issue.event.invoice_id,\n id_event: issue.event.id,\n }\n } else {\n return null\n }\n })\n\n const [selectedTeamMember, setSelectedTeamMember] =\n useState(() => {\n const foundTeamMember = teamMembers.find(\n (member) => member.user_id === issue?.team_member_id,\n )\n\n if (foundTeamMember) {\n return {\n label: `${foundTeamMember.name || ''} (${foundTeamMember.email})`,\n value: foundTeamMember.user_id,\n }\n } else {\n return null\n }\n })\n\n const [images, setImages] = useState([])\n const [imagesPreviews, setImagesPreviews] = useState([])\n const [isValidInvoiceID, setIsValidInvoiceID] = useState(true)\n\n const { loading, setLoading } = useLoadingState()\n const { getEventsByUserId } = transactionsApi()\n const { create, update } = IssueApi()\n\n const methods = useForm({\n defaultValues: {\n ...issue,\n invoice_id: issue?.event?.invoice_id || '',\n },\n })\n\n const handleUserSelection = (event: React.SyntheticEvent, value: any) => {\n setSelectedUser(value)\n }\n\n const handleInvoiceIdSelection = (\n event: React.SyntheticEvent,\n value: any,\n ) => {\n setSelectedInvoiceId(value)\n }\n\n const handleTeamMemberSelection = (event, value) => {\n setSelectedTeamMember(value)\n }\n\n const onSubmit: SubmitHandler = async (newIssue) => {\n try {\n setLoading(true)\n\n const payload = new FormData()\n\n Object.keys(newIssue).forEach((key) => {\n if (!['issue_id', 'user', 'event'].includes(key)) {\n payload.append(key, newIssue[key])\n }\n })\n\n if (selectedTeamMember) {\n payload.set('team_member_id', selectedTeamMember?.value as any)\n }\n\n if (selectedUser) {\n payload.append('id_user', selectedUser.value)\n }\n\n if (selectedInvoiceId) {\n payload.append('invoice_id', selectedInvoiceId.id)\n }\n\n if (images.length > 0) {\n images.forEach((image) => {\n payload.append('images', image)\n })\n }\n\n if (issue) {\n // FormData automatically fetches value from Autocomplete field present in the\n // update form. This is a workaround that unassigns the selected team member\n if (payload.get('team_member_id') && !selectedTeamMember) {\n payload.delete('team_member_id')\n payload.delete('team_member')\n }\n\n if (payload.get('team_member_id') && selectedTeamMember) {\n payload.set('team_member_id', selectedTeamMember?.value)\n }\n\n await update(issue.id, payload)\n onClose()\n displayMessage('Issue updated successfully!', 'success')\n success()\n } else {\n if (!selectedInvoiceId) {\n setIsValidInvoiceID(false)\n return\n }\n\n await create(payload, selectedInvoiceId.id_event)\n onClose()\n\n displayMessage('Issue created successfully!', 'success')\n success(true)\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const buildUsersOptions = () => {\n if (users.length > 0) {\n const autoCompleteOptions = users.map((user) => ({\n label: `${user.name || ''} (${user.email || user.phone_number})`,\n value: user.id,\n }))\n const sortedOptions = autoCompleteOptions.sort((a, b) => {\n if (a.label < b.label) {\n return -1\n }\n if (a.label > b.label) {\n return 1\n }\n return 0\n })\n setUserOptions(sortedOptions)\n }\n }\n\n const buildInvoiceIdOptions = async (idUser: string) => {\n try {\n setLoadingUserTransactions(true)\n const events = await getEventsByUserId(idUser, false)\n\n setInvoiceIdOptions(\n events.length === 0\n ? []\n : events.map((e: ITransaction) => ({\n id: e.invoice_id,\n label: e.invoice_id,\n id_event: e.id,\n })),\n )\n } catch {\n displayMessage('Failed to fetch transactions from selected user', 'error')\n } finally {\n setLoadingUserTransactions(false)\n }\n }\n\n const handleImageUpload = (event: ChangeEvent): void => {\n const files: FileList | null = event?.target?.files\n\n if (files) {\n const fileArray = Array.from(files)\n fileArray.forEach((file) => {\n const isImage = file && /^image\\//.test(file.type)\n if (!isImage) {\n displayMessage?.(\n 'One or more of the selected files are not images. Please try again.',\n 'success',\n )\n return\n }\n const reader = new FileReader()\n reader.readAsDataURL(file)\n\n reader.onload = (e) => {\n if (e.target && e.target.result) {\n const preview = e.target.result as string\n setImagesPreviews((previousValue) => [...previousValue, preview])\n }\n }\n })\n setImages(fileArray)\n }\n }\n\n const handleImageClick = (): void => {\n document.getElementById('image')?.click()\n }\n\n useEffect(() => {\n buildUsersOptions()\n }, [users])\n\n useEffect(() => {\n if (!issue) return\n\n setSelectedInvoiceId({\n id: issue.event?.invoice_id,\n label: issue.event?.invoice_id,\n id_event: issue.event?.id,\n })\n }, [selectedUser])\n\n useEffect(() => {\n const fetchUserTransactions = async () => {\n if (selectedUser) {\n if (selectedInvoiceId) setSelectedInvoiceId(null)\n const idUser = selectedUser.value\n await buildInvoiceIdOptions(idUser)\n } else {\n setSelectedInvoiceId(null)\n setInvoiceIdOptions([])\n }\n }\n fetchUserTransactions()\n }, [selectedUser])\n\n const disableSubmit = Object.keys(methods.formState.errors).length > 0\n\n const helpText = `Click the button below to ${\n issue ? 'update' : 'upload'\n } the images\n related to the issue. You can ${issue ? 'update' : 'upload'} one or\n multiple images.${' '}\n ${issue ? 'Old pictures will be replaced by the new images you select.' : ''}`\n\n if (loadingUserTransactions) {\n return \n }\n\n return (\n \n
    \n \n <>\n {!issue && imagesPreviews.length > 0 && (\n <>\n Issue images\n \n {imagesPreviews.map((picture, index) => (\n \n ))}\n \n \n )}\n \n\n \n {`${images.length} image${\n images.length === 1 ? '' : 's'\n } selected`}\n \n \n\n {issue && (\n \n )}\n option.label}\n renderOption={(props, option, { selected }) => (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n {option.label}\n
  • \n )}\n style={{ width: '100%' }}\n renderInput={(params) => }\n onChange={handleUserSelection}\n loading={usersOptions.length === 0}\n />\n\n {!issue && (\n option.label}\n renderOption={(props, option, { selected }) => (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n {option.label}\n
  • \n )}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n onChange={handleInvoiceIdSelection}\n loading={loadingUserTransactions}\n loadingText=\"Loading user transactions...\"\n disabled={!selectedUser}\n noOptionsText=\"No transactions for this user...\"\n />\n )}\n\n {issue && issue.event?.invoice_id && (\n \n )}\n\n {!isValidInvoiceID && (\n \n Order No. does not exist.\n \n )}\n\n \n\n ({\n label: `${member.name} (${member.email})`,\n value: member.user_id,\n }))}\n getOptionLabel={(option) => option.label}\n renderOption={(props, option, { selected }) => (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n {option.label}\n
  • \n )}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n onChange={handleTeamMemberSelection}\n loading={teamMembers.length === 0}\n />\n\n \n {issue && (\n <>\n Issue Report Time\n \n {formatDate(issue.created_at)}\n \n \n )}\n\n {issue && issue.pictures && (\n <>\n Issue images\n \n {issue?.pictures?.map((picture, index) => (\n \n ))}\n \n \n )}\n\n \n
    \n
    \n
    \n )\n}\n\nexport default IssueForm\n","export const formatDate = (date: Date | string): string => {\n const newDate = new Date(date)\n return newDate.toLocaleString('en-US', {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n })\n}\n","import { ChangeEvent, useState, useEffect, useMemo } from 'react'\nimport {\n Table,\n TableBody,\n TablePagination,\n NotificationDialog,\n Button,\n SideBar,\n} from 'components'\nimport IssueRow from './components/IssueRow'\nimport { IIssue, IIssueList, IMember, IUser } from 'models'\nimport { IssueApi, memberApi, settingsApi, userApi } from 'resources'\nimport { DEFAULT_PAGE, ITEMS_PER_PAGE } from 'constants/pagination'\nimport useDialog from 'hooks/useDialog'\nimport MultiSelectToolbar from 'components/Table/components/MultiSelectToolbar/MultiSelectToolbar'\nimport IssueForm from './components/IssueForm'\nimport useSortableHeader from 'hooks/useSortableHeader'\nimport SortableTableHead from 'components/Table/components/TableHead/SortableTableHead'\nimport useColumnFiltering from 'hooks/useColumnFiltering'\nimport NoData from 'components/PageBase/NoData'\nimport LoadingTableData from 'components/Table/components/LoadingTableData/LoadingTableData'\nimport Toolbar from 'components/Toolbar/Toolbar'\nimport ToolbarControls from 'components/Toolbar/components/ToolbarControls'\nimport ToolbarSearchbar from 'components/Toolbar/components/ToolbarSearchbar'\nimport { ToolbarControl } from 'types'\nimport useLoadingState from 'hooks/useLoadingState'\n\nconst Issues = (): React.ReactElement => {\n const [issues, setIssues] = useState({\n items: [],\n total: 0,\n pages: 0,\n })\n const [issuesBackup, setIssuesBackup] = useState([])\n const [search, setSearch] = useState('')\n const [currentPage, setCurrentPage] = useState(DEFAULT_PAGE)\n const [rowsPerPage, setRowsPerPage] = useState(ITEMS_PER_PAGE)\n const [selectedRows, setSelectedRows] = useState([])\n const [selectedRowData, setSelectedRowData] = useState([])\n const [openSidebar, setOpenSidebar] = useState(false)\n const [currentIssue, setCurrentIssue] = useState()\n const [users, setUsers] = useState([])\n const [teamMembers, setTeamMembers] = useState([])\n\n const { getMany, deleteMany } = IssueApi()\n const { getMany: getUsers } = userApi()\n const { getMany: getTeamMembers } = memberApi()\n\n const { dialog, displayMessage, closeDialog } = useDialog()\n const { filteredColumns, setFilteredColumns, getDefaultFilters } =\n useColumnFiltering({ displayMessage })\n const { loading, setLoading } = useLoadingState(true)\n\n const { order, setOrder, orderBy, handleRequestSort, getVisibleRowsSorted } =\n useSortableHeader({\n defaultOrderBy: 'name',\n entity: 'issues',\n nestedProps: [\n {\n columnValue: 'issueId',\n path: 'issue_id',\n defaultValue: '',\n },\n {\n columnValue: 'userName',\n path: 'user.name',\n defaultValue: '',\n },\n {\n columnValue: 'orderNumber',\n path: 'event.invoice_id',\n defaultValue: '',\n },\n {\n columnValue: 'reportTime',\n path: 'created_at',\n defaultValue: '',\n },\n ],\n })\n\n const handleSelectRow = (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => {\n setSelectedRows((previousValue) =>\n checked\n ? [...previousValue, id]\n : previousValue.filter((rowId) => rowId !== id),\n )\n\n setSelectedRowData((previousValue) =>\n checked\n ? [...previousValue, issues.items.find((issue) => issue.id === id)]\n : previousValue.filter((row) => row.id !== id),\n )\n }\n\n const handleSelectAll = (event: React.ChangeEvent, checked: boolean) => {\n setSelectedRows(() =>\n checked ? issues.items.map((device) => device.id) : [],\n )\n\n setSelectedRowData(() => (checked ? issues.items : []))\n }\n\n const handleDeleteMany = async () => {\n try {\n await deleteMany(selectedRows)\n displayMessage(\n `${selectedRows.length} item${\n selectedRows.length > 1 ? 's' : ''\n } deleted successfully`,\n 'success',\n )\n setSelectedRows([])\n fetchIssues()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleSearch = (event: ChangeEvent): void => {\n setSearch(event.target.value)\n }\n\n const fetchUsers = async (): Promise => {\n try {\n const users = await getUsers(1, 10000, '')\n setUsers(users.items)\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const fetchTeamMembers = async (): Promise => {\n try {\n const teamMembers = await getTeamMembers(1, 150, '')\n setTeamMembers(teamMembers.items)\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const fetchIssues = async (\n showNewestFirst: boolean = false,\n ): Promise => {\n try {\n setLoading(true)\n const issues = await getMany(currentPage + 1, rowsPerPage, search)\n setIssuesBackup([...issues.items])\n setIssues(issues)\n if (showNewestFirst) {\n setOrder('default')\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const handleEditIssue = (issue: IIssue) => {\n setCurrentIssue(issue)\n setOpenSidebar(true)\n }\n\n useEffect(() => {\n getDefaultFilters()\n fetchIssues()\n fetchUsers()\n fetchTeamMembers()\n }, [])\n\n useEffect(() => {\n fetchIssues()\n }, [search, currentPage, rowsPerPage])\n\n const visibleRows = useMemo(\n () => getVisibleRowsSorted(issues.items, issuesBackup),\n [issues, order, orderBy],\n )\n\n const controls: ToolbarControl[] = [\n {\n display: true,\n render: (\n setOpenSidebar(true)}\n >\n Add Issue\n \n ),\n },\n ]\n\n return (\n <>\n control.display)}>\n control.display)}\n />\n \n \n {selectedRows.length > 0 && (\n \n )}\n {!loading && issues.items.length > 0 && (\n <>\n \n c.active)}\n handleSelectAll={handleSelectAll}\n />\n \n {visibleRows.map((issue) => (\n {\n fetchIssues()\n }}\n filteredColumns={filteredColumns}\n displayMessage={displayMessage}\n handleSelectRow={handleSelectRow}\n selected={selectedRows.includes(issue.id)}\n handleEditIssue={handleEditIssue}\n />\n ))}\n \n
    \n\n \n \n )}\n\n \n\n \n\n {\n setCurrentIssue(undefined)\n setOpenSidebar(false)\n }}\n >\n {\n setCurrentIssue(undefined)\n setOpenSidebar(false)\n }}\n displayMessage={displayMessage}\n users={users}\n teamMembers={teamMembers}\n />{' '}\n \n\n \n \n )\n}\n\nexport default Issues\n","//import { NOTIFICATION_API_URL } from '../constants' // Notification service endpoint\nimport { PUBLIC_API_URL } from '../constants' // Bridge endpoint for notification service\nimport { useAuth } from 'resources'\n\nconst useNotificationApi = () => {\n const { getJwtToken } = useAuth()\n\n const uploadImagesToNotification = async ({\n notificationId,\n header_image,\n body_image,\n footer_image,\n }: {\n notificationId: string\n header_image?: File | null\n body_image?: File | null\n footer_image?: File | null\n }) => {\n try {\n const jwtToken = await getJwtToken()\n const formData = new FormData()\n if (header_image) formData.append('header_image', header_image)\n if (body_image) formData.append('body_image', body_image)\n if (footer_image) formData.append('footer_image', footer_image)\n\n const response = await fetch(\n //`${NOTIFICATION_API_URL}/notification/notifications/${notificationId}/upload-images`, // Commenting out for now\n `${PUBLIC_API_URL}notifications-service/notifications/${notificationId}/upload-images`, // Using public API URL for now\n {\n method: 'PATCH',\n body: formData,\n headers: {\n Authorization: `Bearer ${jwtToken}`,\n accept: 'application/json',\n },\n },\n )\n\n if (!response.ok) {\n throw new Error(`Upload failed with status ${response.status}`)\n }\n\n return response.json()\n } catch (error) {\n throw new Error(\n `An error occurred while uploading images. ${(error as Error).message}`,\n )\n }\n }\n\n return {\n uploadImagesToNotification,\n }\n}\n\nexport default useNotificationApi\n","import { HTTP_CODES } from 'constants/HTTP'\nimport { INotificationList } from 'models/Notification'\nimport { DropdownOption } from 'types'\nimport { useApiRequest } from 'utils'\nimport { getErrorMessage } from 'utils/helpers'\nimport useNotificationApi from 'services/notificationServiceApi'\n\nconst GET_ERRORS = {\n [HTTP_CODES.NOT_FOUND]: 'No notifcations found',\n [HTTP_CODES.INTERNAL_SERVER_ERROR]: 'An internal server error has occurred',\n}\n\nconst notificationApi = () => {\n const { fetchPartnerEndpoint, fetchEndpoint } = useApiRequest()\n const { uploadImagesToNotification } = useNotificationApi()\n\n const getMany = async (\n page: number,\n size: number,\n search: string = '',\n ): Promise => {\n const urlParams = new URLSearchParams({\n page: page.toString(),\n size: size.toString(),\n search,\n })\n const endpoint = `notifications?${urlParams.toString()}`\n const method = 'GET'\n try {\n const response = await fetchPartnerEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const create = async (\n notification,\n images: { header?: File; footer?: File; body?: File },\n ) => {\n const endpoint = `notifications`\n const method = 'POST'\n const headers = { 'Content-Type': 'application/json' }\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: JSON.stringify(notification),\n headers,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n const result = await response.json()\n if (images.header || images.body || images.footer) {\n console.log('images', images)\n try {\n await uploadImagesToNotification({\n notificationId: result.id,\n header_image: images.header || null,\n body_image: images.body || null,\n footer_image: images.footer || null,\n })\n } catch (uploadError) {\n throw new Error('Notification created, but image upload failed.')\n }\n }\n return result\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const update = async (\n notificationId,\n notification,\n images: { header?: File; footer?: File; body?: File },\n ) => {\n const endpoint = `notifications/${notificationId}`\n const method = 'PUT'\n const headers = { 'Content-Type': 'application/json' }\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: JSON.stringify(notification),\n headers,\n })\n const result = await response.json()\n if (!response.ok) {\n throw result.detail\n }\n if (images.header || images.body || images.footer) {\n console.log('images', images)\n try {\n await uploadImagesToNotification({\n notificationId: result.id,\n header_image: images.header || null,\n body_image: images.body || null,\n footer_image: images.footer || null,\n })\n } catch (uploadError) {\n throw new Error('Notification updated, but image upload failed.')\n }\n }\n return result\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const remove = async (ids: string[]) => {\n const endpoint = `notifications`\n const method = 'DELETE'\n const headers = {\n 'Content-Type': 'application/json',\n }\n const body = JSON.stringify(ids)\n\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n headers,\n body,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n const getNotificationTypes = async (): Promise => {\n const endpoint = `types/notification/type`\n const method = 'GET'\n try {\n const response = await fetchEndpoint({ endpoint, method })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return { getMany, create, update, remove, getNotificationTypes }\n}\nexport default notificationApi\n","export const EVENTS_DEFAULT_NOTIFICATIONS: Record<\n string,\n Record\n> = {\n service: {\n on_start:\n 'Your order is ready for pickup in ((locker_number)) at ((location_name)). Please collect it at your earliest convenience.',\n on_service_dropoff:\n 'Order ((order_id)) has been received and is awaiting operator pickup in Locker ((locker_number)) at ((location_name)).\\n\\nWe will update you when the status of your order has changed.',\n on_service_pickup:\n \"Good news! Your items has been picked up and is being processed for ((order_id)).\\n\\nWe'll soon weigh it and let you know how much will be charged to your card.\",\n on_service_charge:\n 'Your items weigh ((weight)) lbs and you were successfully charged $((charged_amount)) for order ((order_id)).\\n\\nYour order is in process and we will notify you when it’s available to be for pick up.',\n on_reservation:\n 'Thank you for using our service. Your reservation is confirmed.',\n on_complete:\n 'Order ((order_id)) has been completed.\\nThank you for trusting us. Please return soon!',\n },\n rental: {\n on_start:\n 'Order ((order_id)) has started in locker ((locker_number)) at ((location_address))',\n on_reservation: 'You have a reservation for Asset at ((location_name)).',\n on_complete:\n 'Order ((order_id)) has successfully been completed.\\nThank you for using our service. Please return soon!',\n },\n storage: {\n on_start:\n 'Order ((order_id)) has started in locker ((locker_number)) at ((location_address))',\n on_reservation: 'You have a reservation for Storage at ((location_name)).',\n on_complete:\n 'Order ((order_id)) has successfully been completed.\\nThank you for trusting us. Please return soon!',\n },\n delivery: {\n on_start:\n 'Your transaction has started in locker ((locker_number)) at ((location_address)). Use this ((event code)) for pickup.',\n on_reservation: 'You have a reservation for Delivery at ((location_name)).',\n on_complete:\n 'Order ((order_id)) has successfully been picked up.\\nThank you. Please return soon!',\n non_locker_delivery:\n 'Your package did not fit in a locker. It was delivered at the front desk at ((location_name)). Please collect it at the earliest.',\n on_expired:\n 'Your parcel is going to expire in ((selected_duration)) from ((locker_number)) at ((location_name)). If you do not collect your parcel before it expires you can collect it from the front desk.',\n },\n}\n\nexport const NOTIFICATIONS_TABLE_HEADERS = [\n {\n value: 'name',\n label: 'Name',\n active: true,\n },\n {\n value: 'type',\n label: 'Type',\n active: true,\n },\n {\n value: 'email',\n label: 'Email',\n active: true,\n },\n {\n value: 'sms',\n label: 'SMS',\n active: true,\n },\n {\n value: 'push',\n label: 'Push',\n active: true,\n },\n {\n value: 'action',\n label: 'Action',\n active: true,\n },\n]\n\nexport const TIME_UNITS = [\n { value: 'immediately', label: 'Immediately' },\n { value: 'minute', label: 'Minute' },\n { value: 'hour', label: 'Hour' },\n { value: 'day', label: 'Day' },\n { value: 'week', label: 'Week' },\n]\n\nexport const NOTIFICATION_TYPES_BY_MODE = {\n 'all-modes': ['welcome', 'on_start', 'reminder', 'complete'],\n delivery: ['welcome', 'on_start', 'reminder', 'complete', 'on_expired'],\n service: [\n 'welcome',\n 'start',\n 'pickup',\n 'charge',\n 'user_pickup',\n 'reminder',\n 'complete',\n ],\n}\n\nexport const NOTIFICATION_EVENTS_BY_MODE = {\n service: [\n {\n value: 'on_start',\n label: 'User pick up',\n },\n {\n value: 'on_service_dropoff',\n label: 'Ready for pickup',\n },\n {\n value: 'on_service_pickup',\n label: 'Operator Pickup',\n },\n {\n value: 'on_service_charge',\n label: 'Charged',\n },\n {\n value: 'on_reservation',\n label: 'Reservation',\n },\n {\n value: 'on_complete',\n label: 'Order Completion',\n },\n ],\n rental: [\n {\n value: 'on_start',\n label: 'Asset Start',\n },\n {\n value: 'on_reservation',\n label: 'Reservation',\n },\n {\n value: 'on_complete',\n label: 'Asset End',\n },\n ],\n storage: [\n {\n value: 'on_start',\n label: 'Order Start',\n },\n {\n value: 'on_reservation',\n label: 'Reservation',\n },\n {\n value: 'on_complete',\n label: 'Order Completion',\n },\n ],\n delivery: [\n {\n value: 'on_start',\n label: 'User pick up',\n },\n {\n value: 'on_reservation',\n label: 'Reservation',\n note: 'For Kiosk only',\n },\n {\n value: 'on_complete',\n label: 'Order Completion',\n },\n {\n value: 'non_locker_delivery',\n label: 'Message for delivered but not in the locker',\n note: 'For Kiosk only',\n },\n {\n value: 'on_expired',\n label: 'Expired Parcels',\n note: 'For Kiosk only',\n },\n ],\n}\n\nexport const MESSAGE_AT_LOCATION_RESTRICTIONS = {\n rental: ['on_service_pickup', 'on_start', 'on_reservation', 'on_complete'],\n delivery: [\n 'on_service_pickup',\n 'on_start',\n 'on_reservation',\n 'on_complete',\n 'on_expired',\n ],\n service: [\n 'on_service_pickup',\n 'on_start',\n 'on_service_dropoff',\n 'on_service_charge',\n 'on_reservation',\n 'on_complete',\n ],\n storage: ['on_service_pickup', 'on_start'],\n}\n","import { useState } from 'react'\nimport { Link, Checkbox, Tooltip, Chip, Box } from '@mui/material'\nimport { DeleteForever, ContentCopy } from '@mui/icons-material'\nimport {\n TableCell,\n TableRow,\n IconButton,\n ConfirmDialog,\n IDialogType,\n} from 'components'\nimport { INotification } from 'models/Notification'\nimport { notificationApi } from 'resources/notification'\nimport {\n capitalizeFirstLetter,\n getUserRole,\n snakeCaseToHumanReadable,\n} from 'utils/helpers'\nimport { NOTIFICATION_EVENTS_BY_MODE } from '../constants'\n\nconst role = getUserRole()\ninterface INotificationRowProps {\n notification: INotification\n success: () => void\n filteredColumns: any[]\n handleOpen: () => void\n setCurrentNotification: React.Dispatch<\n React.SetStateAction\n >\n displayMessage: (message: string, type?: IDialogType) => void\n handleSelectRow: (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => void\n selected: boolean\n}\n\nconst defaultConfirmation = {\n isOpen: false,\n message: '',\n action: '',\n}\n\nconst NotificationRow = ({\n notification,\n success,\n filteredColumns,\n handleOpen,\n setCurrentNotification,\n displayMessage,\n handleSelectRow,\n selected,\n}: INotificationRowProps): React.ReactElement => {\n const [confirmationMessage, setConfirmationMessage] =\n useState(defaultConfirmation)\n\n const { create, update, remove } = notificationApi()\n\n const handleDelete = async (): Promise => {\n try {\n await remove([notification.id])\n displayMessage('Notification deleted successfully!', 'success')\n success()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleClone = async (): Promise => {\n try {\n await create(\n {\n ...notification,\n name: `${notification.name} (copy)`,\n is_template: false,\n },\n {\n header: undefined,\n body: undefined,\n footer: undefined,\n },\n )\n displayMessage(`Notification cloned successfully!`, 'success')\n success()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleCheck = async (type: string) => {\n try {\n await update(\n notification.id,\n {\n ...notification,\n [type]: !notification[type],\n locations: notification.locations.map((location) => location.id),\n },\n {\n header: undefined,\n body: undefined,\n footer: undefined,\n },\n )\n displayMessage('Notification updated successfully!', 'success')\n success()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleConfirmAction = async (action: string) => {\n switch (action) {\n case 'delete':\n await handleDelete()\n break\n case 'clone':\n await handleClone()\n break\n default:\n return\n }\n }\n\n const getNotificationTypeLabel = (mode: string, type: string): string => {\n const events =\n NOTIFICATION_EVENTS_BY_MODE[\n mode as keyof typeof NOTIFICATION_EVENTS_BY_MODE\n ] || []\n const event = events.find((event) => event.value === type)\n return event ? event.label : snakeCaseToHumanReadable(type)\n }\n\n const isDefaultNotification = notification.is_default\n\n return (\n <>\n \n {filteredColumns.findIndex((c) => c.value === 'select' && c.active) !==\n -1 && (\n \n {!isDefaultNotification && role === 'admin' ? (\n {\n handleSelectRow(event, checked, notification.id)\n }}\n inputProps={{ 'aria-label': 'controlled' }}\n />\n ) : (\n \n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'name' && c.active) !==\n -1 && (\n \n \n {\n setCurrentNotification(notification)\n handleOpen()\n }}\n >\n {notification.name}\n \n {isDefaultNotification && (\n \n \n \n )}\n \n \n )}\n {filteredColumns.findIndex((c) => c.value === 'mode' && c.active) !==\n -1 && (\n \n {notification.mode === 'rental'\n ? 'Asset'\n : capitalizeFirstLetter(notification.mode)}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'type' && c.active) !==\n -1 && (\n \n {notification.notification_type &&\n getNotificationTypeLabel(\n notification.mode,\n notification.notification_type,\n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'action' && c.active) !==\n -1 && (\n \n {notification.is_template && (\n {\n setConfirmationMessage({\n isOpen: true,\n message: `Are you sure you want to create a copy of this notification?`,\n action: 'clone',\n })\n }}\n >\n \n \n \n \n )}\n {\n setConfirmationMessage({\n isOpen: true,\n message: `Are you sure you want to delete this notification? This cannot be undone.`,\n action: 'delete',\n })\n }}\n >\n \n \n \n )}\n \n setConfirmationMessage(defaultConfirmation)}\n onClickConfirm={() => handleConfirmAction(confirmationMessage.action)}\n onClickCancel={() => setConfirmationMessage(defaultConfirmation)}\n confirmText=\"Yes\"\n cancelText=\"No\"\n />\n \n )\n}\n\nexport default NotificationRow\n","import {\n Box,\n Typography,\n Checkbox,\n Tab,\n TextField as MUITextField,\n Autocomplete,\n Chip,\n FormControlLabel,\n} from '@mui/material'\nimport { useEffect, useState, useMemo, ChangeEvent } from 'react'\nimport {\n Form,\n IDialogType,\n SelectField,\n TextField,\n Tabs,\n Image,\n} from 'components'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { notificationApi } from 'resources/notification'\nimport { INotification } from 'models/Notification'\nimport {\n EVENTS_DEFAULT_NOTIFICATIONS,\n MESSAGE_AT_LOCATION_RESTRICTIONS,\n NOTIFICATION_EVENTS_BY_MODE,\n NOTIFICATION_TYPES_BY_MODE,\n TIME_UNITS,\n} from '../constants'\nimport { IMember } from 'models'\nimport { memberApi } from 'resources'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'\nimport CheckBoxIcon from '@mui/icons-material/CheckBox'\nimport DeleteIcon from '@mui/icons-material/Delete'\nimport DoneIcon from '@mui/icons-material/Done'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { DropdownOption } from 'types'\nimport useLocations from 'hooks/useLocations'\nimport ImageUploader from 'components/ImageUploader/ImageUploader'\n\ninterface INotificationFormProps {\n notification: INotification | undefined\n success: () => void\n onClose: () => void\n modes: DropdownOption[]\n notificationTypes: DropdownOption[]\n displayMessage: (message: string, type?: IDialogType) => void\n}\n\ninterface TeamMemberDropdownOption extends DropdownOption {\n email: string\n}\n\nconst NotificationForm = ({\n notification,\n success,\n onClose,\n modes,\n notificationTypes,\n displayMessage,\n}: INotificationFormProps): React.ReactElement => {\n const [filteredNotificationTypes, setFilteredNotificationTypes] = useState<\n DropdownOption[]\n >([])\n const [filteredEvents, setFilteredEvents] = useState([])\n const [locationsToAdd, setLocationsToAdd] = useState([])\n const [locationsToRemove, setLocationsToRemove] = useState([])\n const [image, setImage] = useState(null)\n const [previewImage, setImagePreview] = useState('')\n const [teamMembers, setTeamMembers] = useState([])\n const [currentTab, setCurrentTab] = useState('email_template')\n const [teamMembersOptions, setTeamMembersOptions] = useState<\n TeamMemberDropdownOption[]\n >([])\n const [selectedTeamMember, setSelectedTeamMember] =\n useState(() => {\n if (notification && notification.id_member && notification.member) {\n return {\n label: notification.member.name,\n value: notification.member.user_id,\n email: notification.member.email,\n }\n }\n return null\n })\n const [before, setBefore] = useState(\n notification ? notification?.before : false,\n )\n const [after, setAfter] = useState(\n notification ? notification?.after : true,\n )\n\n const [isDefault, setIsDefault] = useState(\n notification ? notification.is_default ?? false : false,\n )\n\n const { create, update } = notificationApi()\n const { getMany: getTeamMembers } = memberApi()\n\n const { loading, setLoading } = useLoadingState()\n const { loading: loadingTeamMembers, setLoading: setLoadingTeamMembers } =\n useLoadingState()\n\n const { loadingLocations, locationsOptions, locations } = useLocations()\n\n const methods = useForm({\n defaultValues: {\n ...(notification || {}),\n header: notification?.header || '',\n message_email: notification?.message_email || '',\n footer: notification?.footer || '',\n message: notification?.message || '',\n location_message: notification?.location_message || '',\n member_message: notification?.member_message || '',\n },\n })\n\n const mode = methods.watch('mode')\n const timeUnit = methods.watch('time_unit')\n const notificationType = methods.watch('notification_type')\n const nameVal = methods.watch('name')\n const timeAmountVal = methods.watch('time_amount')\n\n const filteredLocations = useMemo(() => {\n if (notification) {\n return locationsOptions.filter(\n (option) => !notification.locations.some((l) => l.id == option.value),\n )\n }\n return locationsOptions\n }, [locationsOptions])\n\n const alreadyHasDefault = false // TODO: Implement this\n\n const [headerImage, setHeaderImage] = useState(null)\n const [footerImage, setFooterImage] = useState(null)\n const [bodyImage, setBodyImage] = useState(null)\n\n const [email, setEmail] = useState(\n notification ? notification?.email ?? false : false,\n )\n const [sms, setSms] = useState(\n notification ? notification?.sms ?? true : true,\n )\n\n const [headerImageSuccess, setHeaderImageSuccess] = useState(\n notification?.header_s3_url ? true : false,\n )\n const [bodyImageSuccess, setBodyImageSuccess] = useState(\n notification?.body_s3_url ? true : false,\n )\n const [footerImageSuccess, setFooterImageSuccess] = useState(\n notification?.footer_s3_url ? true : false,\n )\n\n const hideMessageAtLocation =\n locationsToAdd.length > 0 ||\n (notification && notification?.locations.length > 0) ||\n MESSAGE_AT_LOCATION_RESTRICTIONS[mode]?.includes(notificationType)\n\n const handleSubmit = async (data): Promise => {\n if (sms && !data.message) {\n displayMessage('Please fill out the SMS template message', 'error')\n setCurrentTab('sms_template')\n return\n }\n\n if (email && !data.message_email) {\n displayMessage('Please fill out the Email template message', 'error')\n setCurrentTab('email_template')\n return\n }\n\n if (isDefault && alreadyHasDefault && !notification?.is_template) {\n displayMessage(\n 'A default notification for this event combination already exists. Only one default is allowed.',\n 'error',\n )\n return\n }\n\n const locationsArr = !notification\n ? [...locationsToAdd]\n : [\n ...locationsToAdd,\n ...notification?.locations\n .filter((location) => !locationsToRemove.includes(location.id))\n .map((location) => location.id),\n ]\n\n const cleanTimeAmount = data.time_amount\n ? Number(String(data.time_amount).replace(/\\D/g, ''))\n : 0\n\n const newNotification = {\n ...data,\n locations: isDefault ? [] : locationsArr,\n is_default: isDefault,\n time_amount: cleanTimeAmount,\n before,\n after,\n email,\n sms,\n ...(selectedTeamMember && { id_member: selectedTeamMember.value }),\n location_message:\n isDefault || hideMessageAtLocation ? '' : data.location_message || '',\n }\n\n try {\n setLoading(true)\n if (notification) {\n await update(notification.id, newNotification, {\n header: headerImage || undefined,\n body: bodyImage || undefined,\n footer: footerImage || undefined,\n })\n onClose()\n displayMessage('Notification updated successfully', 'success')\n success()\n } else {\n await create(newNotification, {\n header: headerImage || undefined,\n body: bodyImage || undefined,\n footer: footerImage || undefined,\n })\n onClose()\n displayMessage('Notification created successfully', 'success')\n success()\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const fetchTeamMembers = async (): Promise => {\n try {\n setLoadingTeamMembers(true)\n const teamMembers = await getTeamMembers(1, 150, '')\n setTeamMembers(teamMembers.items)\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleToggleWhen = (event) => {\n if (event.target.checked) {\n setBefore((previousValue) => !previousValue)\n setAfter((previousValue) => !previousValue)\n }\n }\n\n const handleToggle = (event: React.SyntheticEvent, value: any) => {\n const locationsSelected: string[] = value.map((option) => option.value)\n setLocationsToAdd(locationsSelected)\n }\n\n const handleMemberSelection = (\n event: React.SyntheticEvent,\n value: TeamMemberDropdownOption | null,\n ) => {\n setSelectedTeamMember(value)\n }\n\n const buildMembersOptions = () => {\n if (teamMembers.length > 0) {\n const autoCompleteOptions = teamMembers.map((member) => ({\n label: member.name,\n value: member.user_id,\n email: member.email,\n }))\n const sortedOptions = autoCompleteOptions.sort((a, b) => {\n if (a.label < b.label) {\n return -1\n }\n if (a.label > b.label) {\n return 1\n }\n return 0\n })\n setTeamMembersOptions(sortedOptions)\n }\n }\n\n const handleSelect = (locationId: string) => {\n if (locationsToRemove.includes(locationId)) {\n setLocationsToRemove(locationsToRemove.filter((id) => id !== locationId))\n } else {\n setLocationsToRemove((prevState) => [...prevState, locationId])\n }\n }\n\n const handleTabChange = (event: React.SyntheticEvent, newValue: string) => {\n setCurrentTab(newValue)\n }\n\n const handleHeaderImageUpload = (e: React.ChangeEvent) => {\n if (e.target.files && e.target.files[0]) {\n setHeaderImage(e.target.files[0])\n setHeaderImageSuccess(true)\n }\n }\n\n const handleBodyImageUpload = (e: React.ChangeEvent) => {\n if (e.target.files && e.target.files[0]) {\n setBodyImage(e.target.files[0])\n setBodyImageSuccess(true)\n }\n }\n\n const handleFooterImageUpload = (e: React.ChangeEvent) => {\n if (e.target.files && e.target.files[0]) {\n setFooterImage(e.target.files[0])\n setFooterImageSuccess(true)\n }\n }\n\n useEffect(() => {\n if (mode) {\n const filterMode = mode === 'service' ? mode : 'all-modes'\n const filteredTypes = notificationTypes.filter((type) =>\n NOTIFICATION_TYPES_BY_MODE[filterMode].includes(type.value),\n )\n setFilteredNotificationTypes(filteredTypes)\n setFilteredEvents(NOTIFICATION_EVENTS_BY_MODE[mode])\n }\n }, [mode])\n\n useEffect(() => {\n if (timeUnit === 'immediately') {\n methods.setValue('time_amount', 0)\n }\n }, [timeUnit])\n\n useEffect(() => {\n setLoadingTeamMembers(false)\n }, [teamMembersOptions])\n\n useEffect(() => {\n buildMembersOptions()\n }, [locations, teamMembers])\n\n useEffect(() => {\n fetchTeamMembers()\n }, [])\n\n useEffect(() => {\n const initializeSelectedMember = () => {\n if (notification?.id_member && teamMembers.length > 0) {\n const member = teamMembers.find(\n (m) => m.user_id === notification.id_member,\n )\n if (member) {\n setSelectedTeamMember({\n label: member.name,\n value: member.user_id,\n email: member.email,\n })\n }\n }\n }\n\n initializeSelectedMember()\n }, [notification, teamMembers])\n\n const disableSubmit = Object.keys(methods.formState.errors).length > 0\n\n const ShowAssignTeamMember =\n notificationType === 'non_locker_delivery' ||\n notificationType === 'on_service_dropoff' ||\n notificationType === 'on_expired' ||\n notificationType === 'on_service_pickup'\n\n const ShowEmailTemplate = currentTab === 'email_template'\n\n const timingPhrase = useMemo(() => {\n if (timeUnit === 'immediately') {\n return 'immediately after'\n }\n\n // Extract only numbers from timeAmountVal and convert to number\n const numericValue = String(timeAmountVal).replace(/\\D/g, '')\n const amount = numericValue ? parseInt(numericValue) : 0\n\n return `${amount} ${timeUnit} after`\n }, [timeUnit, timeAmountVal])\n\n const eventNameFormatted = notificationType\n ? notificationType.replace(/_/g, ' ')\n : ''\n\n const notificationDescription = nameVal\n ? `${nameVal} notification will be sent ${timingPhrase} the ${eventNameFormatted} event occurs.`\n : ''\n\n const showLocationsMessage =\n methods.watch('message') || methods.watch('message_email')\n const messageTooltip =\n mode === 'delivery' && notificationType === 'on_start'\n ? 'If you are using Kiosk use ((event code)) for the user pickup event. Without this you cannot complete a transaction. If you are using web app- you don’t need an event code to do a transaction'\n : ''\n\n useEffect(() => {\n if (!notification) {\n const defaultMessage =\n EVENTS_DEFAULT_NOTIFICATIONS[mode]?.[notificationType] || ''\n methods.setValue('message', defaultMessage)\n methods.setValue('message_email', defaultMessage)\n }\n }, [notificationType, mode])\n\n const TabForm = (\n <>\n \n
    \n \n \n\n {mode && (\n \n )}\n\n {nameVal && (\n <>\n When?\n\n \n {nameVal && (\n \n )}\n\n {notificationType && (\n \n {timeUnit !== 'immediately' && (\n \n )}\n \n \n )}\n\n {nameVal && notificationType && timeUnit && (\n \n {notificationDescription}\n \n )}\n \n \n )}\n\n {notificationType && nameVal && (\n \n setIsDefault(e.target.checked)}\n />\n }\n label=\"Set as Default Notification\"\n />\n \n Only one default notification is allowed per mode & event\n combination.\n \n \n )}\n\n {timeUnit &&\n (timeAmountVal || timeAmountVal === 0) &&\n nameVal &&\n notificationType && (\n <>\n {ShowEmailTemplate && (\n <>\n \n\n \n\n \n \n \n )}\n\n {ShowEmailTemplate && (\n <>\n \n \n \n )}\n {!ShowEmailTemplate && (\n <>\n \n \n )}\n \n )}\n\n {!isDefault && notificationType && showLocationsMessage && (\n <>\n Assign Locations\n option.label}\n renderOption={(props, option, { selected }) => (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n {option.label}\n
  • \n )}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n onChange={handleToggle}\n loading={loadingLocations}\n loadingText={'Loading locations...'}\n />\n\n {!hideMessageAtLocation && (\n \n )}\n\n {notification && (\n Locations assigned\n )}\n {notification && (\n \n {notification.locations.length > 0\n ? 'Select the locations that you want to remove and hit submit'\n : 'No locations assigned'}\n \n )}\n {notification && notification?.locations.length > 0 && (\n \n {notification.locations.map((location) => (\n handleSelect(location.id)}\n onDelete={() => handleSelect(location.id)}\n deleteIcon={\n locationsToRemove.includes(location.id) ? (\n \n ) : (\n \n )\n }\n variant={\n locationsToRemove.includes(location.id)\n ? 'filled'\n : 'outlined'\n }\n color={\n locationsToRemove.includes(location.id)\n ? 'primary'\n : 'default'\n }\n />\n ))}\n \n )}\n \n )}\n\n {timeUnit &&\n (timeAmountVal || timeAmountVal === 0) &&\n nameVal &&\n notificationType &&\n methods.watch('message') &&\n ShowAssignTeamMember && (\n <>\n Assign Team Member\n (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n \n {option.label}\n \n {option.email}\n \n \n
  • \n )}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n onChange={handleMemberSelection}\n loading={loadingTeamMembers}\n loadingText={'Loading team members...'}\n disableCloseOnSelect={true}\n getOptionLabel={(option) => option.label}\n />\n \n )}\n {selectedTeamMember && (\n \n )}\n\n \n \n \n
    \n \n )\n\n return (\n <>\n \n \n )\n}\n\nexport default NotificationForm\n","import { useMemo, useState } from 'react'\nimport {\n Box,\n Typography,\n Dialog,\n Grid,\n FormControlLabel,\n FormControl,\n FormLabel,\n RadioGroup,\n Radio,\n} from '@mui/material'\n\nconst NotificationDefaultSettings = ({ open, onClose }): React.ReactElement => {\n const [defaultNotificationSettings, setDefaultNotificationSettings] =\n useState({\n primary: 'email',\n secondary: 'push',\n })\n\n const handleDefaultSettingsChange = (channel, e) => {\n // channel: primary or secondary\n const stateObj = {\n ...defaultNotificationSettings,\n [channel]: e.target.value,\n }\n\n setDefaultNotificationSettings(stateObj)\n\n localStorage.setItem('notificationSettings', JSON.stringify(stateObj))\n }\n\n useMemo(() => {\n const defaultSettings = localStorage.getItem('notificationSettings')\n\n if (defaultSettings) {\n setDefaultNotificationSettings(JSON.parse(defaultSettings))\n }\n }, [])\n\n return (\n \n \n \n Default Settings\n \n\n \n \n \n Primary\n handleDefaultSettingsChange('primary', e)}\n name=\"radio-buttons-group\"\n >\n }\n label=\"Email\"\n />\n } label=\"SMS\" />\n }\n label=\"Push\"\n />\n \n \n \n \n \n \n Secondary\n handleDefaultSettingsChange('secondary', e)}\n name=\"radio-buttons-group\"\n >\n }\n label=\"Email\"\n />\n }\n label=\"SMS\"\n />\n }\n label=\"Push\"\n />\n \n \n \n \n \n \n \n )\n}\n\nexport default NotificationDefaultSettings\n","import { INotification } from 'models/Notification'\n\nexport const addStepsToAssetNotifications = (\n notifications: INotification[],\n): INotification[] => {\n const notificationsWithStep = notifications.map((notification) => {\n if (notification.name === 'Welcome') {\n return { ...notification, step: 1 }\n } else if (notification.name === 'Transaction Starts') {\n return { ...notification, step: 2 }\n } else if (notification.name === 'Complete') {\n return { ...notification, step: 3 }\n }\n return { ...notification, step: 4 }\n })\n return notificationsWithStep.sort((a, b) => a.step - b.step)\n}\n\nexport const addStepsToServiceNotifications = (\n notifications: INotification[],\n): INotification[] => {\n const notificationsWithStep = notifications.map((notification) => {\n if (notification.name === 'Welcome') {\n return { ...notification, step: 1 }\n } else if (notification.name === 'Ready for pick-up') {\n return { ...notification, step: 2 }\n } else if (notification.name === 'Picked up') {\n return { ...notification, step: 3 }\n } else if (notification.name === 'Charge') {\n return { ...notification, step: 4 }\n } else if (notification.name === 'User Pickup') {\n return { ...notification, step: 5 }\n } else if (notification.name === 'Complete') {\n return { ...notification, step: 6 }\n }\n return { ...notification, step: 7 }\n })\n return notificationsWithStep.sort((a, b) => a.step - b.step)\n}\n\nexport const addStepsToStorageNotifications = (\n notifications: INotification[],\n): INotification[] => {\n const notificationsWithStep = notifications.map((notification) => {\n if (notification.name === 'Welcome') {\n return { ...notification, step: 1 }\n } else if (notification.name === 'Transaction Starts') {\n return { ...notification, step: 2 }\n } else if (notification.name === 'Complete') {\n return { ...notification, step: 3 }\n }\n return { ...notification, step: 4 }\n })\n return notificationsWithStep.sort((a, b) => a.step - b.step)\n}\n\nexport const addStepsToDeliveryNotifications = (\n notifications: INotification[],\n): INotification[] => {\n const notificationsWithStep = notifications.map((notification) => {\n if (notification.name === 'User Sign Up') {\n return { ...notification, step: 1 }\n } else if (notification.name === 'Transaction Starts') {\n return { ...notification, step: 2 }\n } else if (notification.name === 'Complete') {\n return { ...notification, step: 3 }\n }\n return { ...notification, step: 4 }\n })\n return notificationsWithStep.sort((a, b) => a.step - b.step)\n}\n","export const setLastModeFilter = (payload) => ({\n type: 'setLastModeFilter',\n payload,\n})\n","import { ChangeEvent, useState, useEffect, useMemo } from 'react'\nimport {\n FormControl,\n InputLabel,\n MenuItem,\n Select,\n SelectChangeEvent,\n useTheme,\n} from '@mui/material'\nimport {\n Table,\n TableHead,\n TableBody,\n TablePagination,\n Button,\n SideBar,\n NotificationDialog,\n} from 'components'\nimport NotificationRow from './components/NotificationRow'\nimport { settingsApi } from 'resources'\nimport { notificationApi } from 'resources/notification'\nimport NotificationForm from './components/NotificationsForm'\nimport { INotification, INotificationList } from 'models/Notification'\nimport { DEFAULT_PAGE, ITEMS_PER_PAGE } from 'constants/pagination'\nimport { capitalizeWords } from 'utils/helpers'\nimport useDialog from 'hooks/useDialog'\nimport MultiSelectToolbar from 'components/Table/components/MultiSelectToolbar/MultiSelectToolbar'\nimport NotificationDefaultSettings from './components/NotificationDefaultSettings'\nimport useColumnFiltering from 'hooks/useColumnFiltering'\nimport NoData from 'components/PageBase/NoData'\nimport LoadingTableData from 'components/Table/components/LoadingTableData/LoadingTableData'\nimport { DropdownOption, ToolbarControl } from 'types'\nimport Toolbar from 'components/Toolbar/Toolbar'\nimport ToolbarControls from 'components/Toolbar/components/ToolbarControls'\nimport ToolbarSearchbar from 'components/Toolbar/components/ToolbarSearchbar'\nimport useLoadingState from 'hooks/useLoadingState'\nimport useDeviceModes from 'hooks/useDeviceModes'\nimport {\n addStepsToAssetNotifications,\n addStepsToDeliveryNotifications,\n addStepsToServiceNotifications,\n addStepsToStorageNotifications,\n} from './helper'\nimport { RootStateOrAny, useDispatch, useSelector } from 'react-redux'\nimport { setLastModeFilter } from 'redux/notification/Action'\n\nconst Notifications = (): React.ReactElement => {\n const [notifications, setNotifications] = useState({\n items: [],\n totals: {\n page: 0,\n page_size: 0,\n total: 0,\n total_pages: 0,\n },\n })\n const [currentNotification, setCurrentNotification] =\n useState()\n const [currentPage, setCurrentPage] = useState(DEFAULT_PAGE)\n const [rowsPerPage, setRowsPerPage] = useState(ITEMS_PER_PAGE)\n const [search, setSearch] = useState('')\n const [openSidebar, setOpenSidebar] = useState(false)\n const [notificationTypes, setNotificationTypes] = useState(\n [],\n )\n const [selectedRows, setSelectedRows] = useState([])\n const [defaultNotificationsDialog, setDefaultNotificationsDialog] =\n useState(false)\n\n const { getSettings } = settingsApi()\n const { getMany, getNotificationTypes, remove } = notificationApi()\n const { modes, isLoadingModes } = useDeviceModes()\n\n const { dialog, displayMessage, closeDialog } = useDialog()\n const { filteredColumns, setFilteredColumns, getDefaultFilters } =\n useColumnFiltering({ displayMessage })\n const { loading, setLoading } = useLoadingState(true)\n\n const theme = useTheme()\n\n const dispatch = useDispatch()\n\n const lastModeFilter = useSelector(\n (state: RootStateOrAny) => state.lastModeFilterReducer,\n )\n\n const handleSelectRow = (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => {\n setSelectedRows((previousValue) =>\n checked\n ? [...previousValue, id]\n : previousValue.filter((rowId) => rowId !== id),\n )\n }\n\n const handleSelectAll = (event: React.ChangeEvent, checked: boolean) => {\n setSelectedRows(() =>\n checked ? notifications.items.map((device) => device.id) : [],\n )\n }\n\n const handleDeleteMany = async () => {\n try {\n await remove(selectedRows)\n displayMessage(\n `${selectedRows.length} item${\n selectedRows.length > 1 ? 's' : ''\n } deleted successfully`,\n 'success',\n )\n setSelectedRows([])\n fetchNotifications()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const getAllNotificationTypes = async () => {\n try {\n const notificationTypes = await getNotificationTypes()\n const capitalizedTypes = notificationTypes.map((type) => ({\n ...type,\n label: capitalizeWords(type.label, '_', ' '),\n }))\n setNotificationTypes(capitalizedTypes)\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleSearch = (event: ChangeEvent): void => {\n setSearch(event.target.value)\n }\n\n const handleModeChange = (event: SelectChangeEvent): void => {\n const mode = event.target.value\n // setCurrentMode(mode)\n dispatch(setLastModeFilter(mode))\n localStorage.setItem('lastModeFilter', mode)\n }\n\n const fetchNotifications = async (): Promise => {\n try {\n setLoading(true)\n const notifications = await getMany(currentPage + 1, rowsPerPage, search)\n const filterByMode = notifications.items.filter(\n (notification) => notification.mode === lastModeFilter,\n )\n let withSteps\n if (lastModeFilter === 'rental') {\n withSteps = addStepsToAssetNotifications(filterByMode)\n } else if (lastModeFilter === 'service') {\n withSteps = addStepsToServiceNotifications(filterByMode)\n } else if (lastModeFilter === 'delivery') {\n withSteps = addStepsToDeliveryNotifications(filterByMode)\n } else if (lastModeFilter === 'storage') {\n withSteps = addStepsToStorageNotifications(filterByMode)\n } else if (lastModeFilter === 'vending') {\n setNotifications({\n ...notifications,\n items: [],\n })\n } else {\n }\n setNotifications({\n ...notifications,\n items:\n lastModeFilter === 'all'\n ? notifications.items\n : lastModeFilter === 'vending'\n ? []\n : withSteps,\n })\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const getOrgSettings = async (): Promise => {\n try {\n const settingsRes = await getSettings()\n localStorage.setItem('settings', JSON.stringify(settingsRes))\n } catch {\n // No need to display a in case of failure, as this API fetch is only to\n // populate org_settings in case the /settings page hasn't been accessed\n // yet. Little edge-case.\n console.warn('Failed to retrieve default settings.')\n }\n }\n\n const handleClose = () => {\n setCurrentNotification(undefined)\n setOpenSidebar(false)\n setDefaultNotificationsDialog(false)\n }\n\n useEffect(() => {\n getDefaultFilters()\n fetchNotifications()\n getAllNotificationTypes()\n const storedMode = localStorage.getItem('lastModeFilter')\n if (storedMode) {\n dispatch(setLastModeFilter(storedMode))\n }\n }, [])\n\n useEffect(() => {\n fetchNotifications()\n }, [search, currentPage, rowsPerPage])\n\n useEffect(() => {\n fetchNotifications()\n }, [lastModeFilter])\n\n useMemo(() => {\n getOrgSettings()\n }, [])\n\n useEffect(() => {\n // (KD-2759): Do not show 'All modes' under notifications if the org has only\n // one mode enabled. Default to relevant mode\n if (modes.length === 1) {\n dispatch(setLastModeFilter(modes[0].value))\n }\n }, [modes])\n\n const controls: ToolbarControl[] = [\n {\n display: true,\n render: (\n setOpenSidebar(true)}\n >\n Add Notification\n \n ),\n },\n\n {\n display: true,\n render: (\n \n Filter by mode\n \n {isLoadingModes && (\n \n Loading...\n \n )}\n {!isLoadingModes && modes.length !== 1 && (\n All modes\n )}\n {!isLoadingModes &&\n modes.map((mode) => (\n \n {mode.label}\n \n ))}\n \n \n ),\n },\n ]\n\n return (\n <>\n control.display)}>\n control.display)}\n />\n \n \n {selectedRows.length > 0 && (\n \n )}\n {!loading && notifications.items.length > 0 && (\n <>\n \n c.active)}\n handleSelectAll={handleSelectAll}\n />\n \n {notifications.items.map((notification) => (\n {\n fetchNotifications()\n }}\n filteredColumns={filteredColumns}\n handleOpen={() => {\n setOpenSidebar(true)\n }}\n setCurrentNotification={setCurrentNotification}\n displayMessage={displayMessage}\n handleSelectRow={handleSelectRow}\n selected={selectedRows.includes(notification.id)}\n />\n ))}\n \n
    \n\n \n \n )}\n\n \n\n \n\n {openSidebar && (\n \n fetchNotifications()}\n onClose={handleClose}\n displayMessage={displayMessage}\n modes={modes}\n notificationTypes={notificationTypes}\n />\n \n )}\n \n\n \n \n )\n}\n\nexport default Notifications\n","import { useState } from 'react'\nimport {\n TableCell,\n TableRow,\n IconButton,\n QRGenerator,\n Image,\n ConfirmDialog,\n IDialogType,\n} from 'components'\nimport { Box, Checkbox, Chip, Link, Tooltip } from '@mui/material'\nimport { DeleteForever, QrCode } from '@mui/icons-material'\nimport { ILocation } from 'models'\nimport { RENTAL_URL } from '../../../constants'\nimport { locationApi } from 'resources'\nimport { getUserRole } from 'utils/helpers'\nimport useIsSuperTenantOrg from 'hooks/useIsSuperTenantOrg'\nimport { SummarizedText } from 'components/SummarizedText'\nimport { LocationsContext, useLocationsContext } from '../context'\n\ninterface ILocationRowProps {\n location: ILocation\n handleOpen: () => void\n setCurrentLocation: (location: ILocation) => void\n filteredColumns: any[]\n displayMessage: (message: string, type?: IDialogType) => void\n setCreatingLocation: (value: boolean) => void\n handleSelectRow: (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => void\n selected: boolean\n}\n\nconst defaultConfirmation = {\n isOpen: false,\n message: '',\n action: '',\n}\n\nconst LocationRow = ({\n location,\n handleOpen,\n setCurrentLocation,\n filteredColumns,\n displayMessage,\n setCreatingLocation,\n handleSelectRow,\n selected,\n}: ILocationRowProps): React.ReactElement => {\n const ORG_DATA: string | null = localStorage.getItem('currentOrg')\n const ORG_NAME: string = ORG_DATA ? JSON.parse(ORG_DATA).name : undefined\n const [confirmationMessage, setConfirmationMessage] =\n useState(defaultConfirmation)\n\n const { fetchLocations } = useLocationsContext()\n const isSuperTenantOrg = useIsSuperTenantOrg()\n const { generateQRCode } = QRGenerator()\n const { patch, remove } = locationApi()\n\n const handleDeleteLocation = async (): Promise => {\n try {\n await remove([location.id])\n fetchLocations()\n displayMessage('Location deleted successfully!', 'success')\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleHideLocation = async (): Promise => {\n try {\n await patch(location.id, { hidden: !location.hidden })\n fetchLocations()\n displayMessage('Saved successfully!', 'success')\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n // const handleShareLocation = async (): Promise => {\n // try {\n // await patch(location.id, { shared: !location.shared })\n // success()\n // displayMessage('Saved successfully!', 'success')\n // } catch (error) {\n // displayMessage(`${(error as Error).message}`, 'error')\n // }\n // }\n\n const handleQRCode = ({\n locationId,\n orgName,\n }: {\n locationId: string\n orgName: string\n }): void => {\n generateQRCode(\n locationId,\n `${RENTAL_URL}?location=${locationId}&org=${orgName}`,\n )\n }\n\n const handleConfirmAction = async (action: string) => {\n setConfirmationMessage(defaultConfirmation)\n switch (action) {\n case 'delete':\n await handleDeleteLocation()\n break\n case 'hide':\n await handleHideLocation()\n break\n // case 'share':\n // await handleShareLocation()\n // break\n default:\n return\n }\n }\n\n const label = { inputProps: { 'aria-label': 'Hide Location' } }\n const role = getUserRole()\n\n return (\n <>\n \n {filteredColumns.findIndex((c) => c.value === 'select' && c.active) !==\n -1 && (\n \n {role === 'admin' ? (\n {\n handleSelectRow(event, checked, location.id)\n }}\n inputProps={{ 'aria-label': 'controlled' }}\n />\n ) : (\n \n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'name' && c.active) !==\n -1 && (\n \n \n {role !== 'member' ? (\n {\n handleOpen()\n setCurrentLocation(location)\n setCreatingLocation(false)\n }}\n >\n {location.name}\n \n ) : (\n <>{location.name}\n )}\n {/* {location.shared && (\n \n \n \n )} */}\n \n \n )}\n {filteredColumns.findIndex(\n (c) => c.value === 'no_of_devices' && c.active,\n ) !== -1 && (\n {location.devices?.length}\n )}\n {filteredColumns.findIndex((c) => c.value === 'address' && c.active) !==\n -1 && (\n \n \n \n )}\n {filteredColumns.findIndex((c) => c.value === 'image' && c.active) !==\n -1 && (\n \n {location.image && (\n \n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'hidden' && c.active) !==\n -1 && (\n \n {isSuperTenantOrg ? (\n {\n setConfirmationMessage({\n isOpen: true,\n message: `Are you sure you want to ${\n location.hidden ? 'unhide' : 'hide'\n } this location?`,\n action: 'hide',\n })\n }}\n />\n ) : (\n <>{location.hidden ? 'Yes' : 'No'}\n )}\n \n )}\n {/* {filteredColumns.findIndex((c) => c.value === 'shared' && c.active) !==\n -1 && (\n \n {isSuperTenantOrg ? (\n {\n setConfirmationMessage({\n isOpen: true,\n message: `Are you sure you want to ${\n location.hidden ? 'unshare' : 'share'\n } this location?`,\n action: 'share',\n })\n }}\n />\n ) : (\n <>{location.shared ? 'Yes' : 'No'}\n )}\n \n )} */}\n {filteredColumns.findIndex((c) => c.value === 'qrCode' && c.active) !==\n -1 && (\n \n {\n handleQRCode({ locationId: location.id, orgName: ORG_NAME })\n }}\n sx={{\n '&:hover': {\n color: 'primary.main',\n },\n }}\n >\n \n \n \n )}\n {filteredColumns.findIndex((c) => c.value === 'action' && c.active) !==\n -1 && (\n \n {role !== 'member' ? (\n {\n setConfirmationMessage({\n isOpen: true,\n message: `Are you sure you want to delete this location? This cannot be undone.`,\n action: 'delete',\n })\n }}\n >\n \n \n ) : (\n <>\n )}\n \n )}\n \n\n setConfirmationMessage(defaultConfirmation)}\n onClickConfirm={() => handleConfirmAction(confirmationMessage.action)}\n onClickCancel={() => setConfirmationMessage(defaultConfirmation)}\n confirmText=\"Yes\"\n cancelText=\"No\"\n />\n \n )\n}\n\nexport default LocationRow\n","import { useEffect, useState } from 'react'\nimport { ILocation } from 'models'\nimport {\n DeleteForever,\n QrCode,\n ArrowDropDown,\n ArrowDropUp,\n} from '@mui/icons-material'\nimport {\n ConfirmDialog,\n IconButton,\n NotificationDialog,\n QRGenerator,\n Image,\n} from 'components'\nimport { Source, Layer } from '@urbica/react-map-gl'\nimport MapGL, { Marker, Popup } from '@urbica/react-map-gl'\nimport 'mapbox-gl/dist/mapbox-gl.css'\nimport { RENTAL_URL } from '../../../../constants'\nimport { locationApi } from 'resources'\nimport { Box, useTheme, Typography, Switch } from '@mui/material'\nimport useDialog from 'hooks/useDialog'\nimport CloseIcon from '@mui/icons-material/Close'\nimport { capitalizeFirstLetter } from 'utils/helpers'\nimport './map.css'\nimport { SummarizedText } from 'components/SummarizedText'\n\ninterface IMapViewProps {\n locations: ILocation[]\n controls: boolean\n closeControls?: () => void\n}\ninterface TooltipInfo {\n activeId: string | null\n data: ILocation | null\n}\n\nconst MapView = ({ locations, controls, closeControls }: IMapViewProps) => {\n const [confirmationMessage, setConfirmationMessage] = useState({\n isOpen: false,\n message: '',\n })\n const [locationToDelete, setLocationToDelete] = useState('')\n const [selectedMarker, setSelectedMarker] = useState('')\n const [showHeatmap, setShowHeatmap] = useState(false)\n const [showFakeHeatmap, setShowFakeHeatmap] = useState(false)\n const [viewport, setViewport] = useState({\n latitude: 37.78,\n longitude: -122.41,\n zoom: 11,\n })\n const [tooltipInfo, setTooltipInfo] = useState({\n activeId: null,\n data: null,\n })\n const [showSubTooltip, setShowSubTooltip] = useState(false)\n\n const ORG_DATA: string | null = localStorage.getItem('currentOrg')\n const ORG_NAME: string = ORG_DATA ? JSON.parse(ORG_DATA).name : undefined\n\n const theme = useTheme()\n\n const { generateQRCode } = QRGenerator()\n const { remove } = locationApi()\n\n const { dialog, displayMessage, closeDialog } = useDialog()\n\n const handleQRCode = ({\n locationId,\n orgName,\n }: {\n locationId: string\n orgName: string\n }): void => {\n generateQRCode(\n locationId,\n `${RENTAL_URL}?location=${locationId}&org=${orgName}`,\n )\n }\n\n const handleDeleteLocation = async (id: string): Promise => {\n try {\n await remove([id])\n displayMessage('Location deleted successfully!', 'success')\n setConfirmationMessage({\n isOpen: false,\n message: '',\n })\n setLocationToDelete('')\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const closeToolTip = () => {\n setTooltipInfo({ activeId: null, data: null })\n setShowSubTooltip(false)\n setSelectedMarker('')\n }\n\n const openToolTip = (location: ILocation) => {\n setTooltipInfo({ activeId: location.id, data: location })\n setSelectedMarker(location.id)\n }\n\n const fakeLocations = Array.from({ length: 1000 }, (_, index) => ({\n id: `location-${index}`,\n latitude: 37.78 + Math.random() * 0.1 - 0.05, // Randomize around a central point\n longitude: -122.41 + Math.random() * 0.1 - 0.05,\n devices: Array.from({ length: Math.floor(Math.random() * 100) }), // Random number of devices up to 100\n }))\n\n const geoJsonData = {\n type: 'FeatureCollection',\n features: fakeLocations.map((location) => ({\n type: 'Feature',\n properties: {\n intensity: location.devices.length, // Use device count as intensity\n },\n geometry: {\n type: 'Point',\n coordinates: [location.longitude, location.latitude],\n },\n })),\n }\n\n useEffect(() => {\n setShowSubTooltip(false)\n }, [tooltipInfo])\n\n useEffect(() => {\n if (tooltipInfo) {\n const arrow = document.getElementsByClassName('mapboxgl-popup-tip')[0]\n console.log('arrow: ', arrow)\n if (arrow) {\n arrow.classList.add(\n `popup-arrow-${theme.palette.mode === 'dark' ? 'dark' : 'light'}`,\n )\n arrow.classList.remove(\n `popup-arrow-${theme.palette.mode === 'dark' ? 'light' : 'dark'}`,\n )\n }\n }\n }, [tooltipInfo, theme.palette.mode])\n\n return (\n <>\n \n {showHeatmap && (\n \n \n \n )}\n {showFakeHeatmap && (\n \n )}\n\n {controls && (\n \n \n \n \n \n \n
    \n \n Controls\n \n
    \n
    \n \n What Three Words\n \n
    \n \n Google Address\n \n \n \n Movement Data\n \n \n \n Usage Heat Map\n \n \n \n User Address Heat Map\n setShowFakeHeatmap(!showFakeHeatmap)} />\n \n \n \n )}\n {locations.map((location) => {\n const isSelected = location.id === selectedMarker\n return (\n \n \n
    \n {location.id === selectedMarker ? (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ) : (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )}\n
    \n {tooltipInfo.activeId === location.id && tooltipInfo.data && (\n \n \n \n \n \n \n
    \n \n Name: <>{tooltipInfo?.data?.name}\n \n \n Address:{' '}\n \n \n \n No. of Devices:{' '}\n {tooltipInfo?.data?.devices?.length ?? 0}\n \n
    \n {showSubTooltip && (\n <>\n {tooltipInfo?.data?.devices &&\n tooltipInfo?.data?.devices?.length > 0 && (\n \n Modes:\n\n {tooltipInfo?.data?.devices && (\n
      \n {tooltipInfo?.data?.devices\n .reduce((acc: any, device: any) => {\n const mode = device?.mode\n const found = acc.find(\n (item: any) => item?.mode === mode,\n )\n if (found) {\n found.count++\n } else {\n acc.push({ mode, count: 1 })\n }\n return acc\n }, [])\n .map((modeItem) => (\n
    • \n {modeItem?.mode === 'rental'\n ? 'Asset'\n : capitalizeFirstLetter(\n modeItem?.mode,\n )}\n : {modeItem?.count}\n
    • \n ))}\n
    \n )}\n
    \n )}\n\n {tooltipInfo?.data?.devices &&\n tooltipInfo?.data?.devices?.length > 1 && (\n \n Hardware types:\n {tooltipInfo?.data?.devices && (\n
      \n {tooltipInfo?.data?.devices\n .reduce((acc: any, device: any) => {\n const hardwareType =\n device?.hardware_type\n const found = acc.find(\n (item: any) =>\n item?.hardwareType === hardwareType,\n )\n if (found) {\n found.count++\n } else {\n acc.push({ hardwareType, count: 1 })\n }\n return acc\n }, [])\n .map((hardwareItem: any) => (\n
    • \n {capitalizeFirstLetter(\n hardwareItem?.hardwareType,\n )}\n : {hardwareItem?.count}\n
    • \n ))}\n
    \n )}\n
    \n )}\n\n {tooltipInfo?.data?.devices &&\n tooltipInfo?.data?.devices?.length > 1 && (\n \n Sizes:\n {tooltipInfo?.data?.devices && (\n
      \n {tooltipInfo?.data?.devices\n .reduce((acc: any, device: any) => {\n const sizeName = device?.size?.name\n const found = acc.find(\n (item) => item?.sizeName === sizeName,\n )\n if (found) {\n found.count++\n } else {\n acc.push({ sizeName, count: 1 })\n }\n return acc\n }, [])\n .map((sizeItem) => (\n
    • \n {sizeItem?.sizeName}:{' '}\n {sizeItem?.count}\n
    • \n ))}\n
    \n )}\n
    \n )}\n\n {tooltipInfo.data.image && (\n \n )}\n \n )}\n\n \n {\n setShowSubTooltip((previousValue) => !previousValue)\n }}\n >\n {showSubTooltip ? : }\n \n {\n handleQRCode({\n locationId: location.id,\n orgName: ORG_NAME,\n })\n }}\n >\n \n \n {\n setConfirmationMessage({\n isOpen: true,\n message:\n 'Are you sure you want to delete this location?',\n })\n setLocationToDelete(location.id)\n }}\n >\n \n \n \n \n \n )}\n \n \n )\n })}\n \n \n {\n setConfirmationMessage({\n isOpen: false,\n message: '',\n })\n setLocationToDelete('')\n }}\n onClickConfirm={() => handleDeleteLocation(locationToDelete)}\n onClickCancel={() => {\n setConfirmationMessage({\n isOpen: false,\n message: '',\n })\n setLocationToDelete('')\n }}\n confirmText=\"Yes\"\n cancelText=\"No\"\n />\n \n )\n}\n\nexport default MapView\n","import { ChangeEvent, useState, useEffect, useMemo } from 'react'\nimport { Box, Autocomplete, TextField } from '@mui/material'\nimport {\n Table,\n TableBody,\n TablePagination,\n Button,\n SideBar,\n NotificationDialog,\n} from 'components'\nimport LocationRow from './components/LocationRow'\nimport { ILocation } from 'models'\nimport { locationApi } from 'resources'\nimport LocationForm from './components/LocationForm'\nimport { DEFAULT_PAGE, ITEMS_PER_PAGE } from 'constants/pagination'\nimport useDialog from 'hooks/useDialog'\nimport MultiSelectToolbar from 'components/Table/components/MultiSelectToolbar/MultiSelectToolbar'\nimport SortableTableHead from 'components/Table/components/TableHead/SortableTableHead'\nimport useSortableHeader from 'hooks/useSortableHeader'\nimport useColumnFiltering from 'hooks/useColumnFiltering'\nimport NoData from 'components/PageBase/NoData'\nimport LoadingTableData from 'components/Table/components/LoadingTableData/LoadingTableData'\nimport MapView from './components/Map/MapView'\nimport Toolbar from 'components/Toolbar/Toolbar'\nimport ToolbarControls from 'components/Toolbar/components/ToolbarControls'\nimport ToolbarSearchbar from 'components/Toolbar/components/ToolbarSearchbar'\nimport { ToolbarControl, DropdownOption } from 'types'\nimport useLocations from 'hooks/useLocations'\nimport { getPaginatedSlice } from 'utils/helpers'\nimport { LocationsContext } from './context'\nimport { settingsApi } from 'resources'\nimport { ISettings } from 'models/Settings'\n\nconst Locations = (): React.ReactElement => {\n const [currentLocation, setCurrentLocation] = useState()\n const [search, setSearch] = useState('')\n const [currentPage, setCurrentPage] = useState(DEFAULT_PAGE)\n const [rowsPerPage, setRowsPerPage] = useState(ITEMS_PER_PAGE)\n const [openSidebar, setOpenSidebar] = useState(false)\n const [creatingLocation, setCreatingLocation] = useState(false)\n const [selectedRows, setSelectedRows] = useState([])\n const [selectedRowsData, setSelectedRowsData] = useState([])\n const [mapView, setMapView] = useState(false)\n const [showControls, setShowControls] = useState(false)\n const [selectedLocation, setSelectedLocation] = useState(() => {\n const saved = localStorage.getItem('selectedLocationFilter')\n return saved || ''\n })\n const [loading, setLoading] = useState(false)\n const { order, setOrder, orderBy, handleRequestSort, getVisibleRowsSorted } =\n useSortableHeader({\n defaultOrderBy: 'name',\n entity: 'locations',\n nestedProps: [\n {\n columnValue: 'no_of_devices',\n path: 'devices.length',\n defaultValue: 0,\n },\n ],\n })\n const { getSettings } = settingsApi()\n const { dialog, displayMessage, closeDialog } = useDialog()\n const { filteredColumns, setFilteredColumns, getDefaultFilters } =\n useColumnFiltering({ displayMessage })\n const { locations, fetchLocations, loadingLocations, locationsOptions } =\n useLocations()\n\n const { remove } = locationApi()\n\n const handleSelectRow = (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => {\n setSelectedRows((previousValue) =>\n checked\n ? [...previousValue, id]\n : previousValue.filter((rowId) => rowId !== id),\n )\n\n setSelectedRowsData((previousValue) =>\n checked\n ? [...previousValue, locations.find((location) => location.id === id)]\n : previousValue.filter((row) => row.id !== id),\n )\n }\n\n const handleSelectAll = (event: React.ChangeEvent, checked: boolean) => {\n setSelectedRows(() =>\n checked ? locations.map((location) => location.id) : [],\n )\n setSelectedRowsData(() => (checked ? locations : []))\n }\n\n const handleDeleteMany = async () => {\n try {\n await remove(selectedRows)\n displayMessage(\n `${selectedRows.length} item${\n selectedRows.length > 1 ? 's' : ''\n } deleted successfully`,\n 'success',\n )\n setSelectedRows([])\n fetchLocations()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleOpen = (): void => {\n setOpenSidebar(true)\n }\n\n const handleSearch = (event: ChangeEvent): void => {\n setSearch(event.target.value)\n }\n\n const getSettingsFn = async () => {\n try {\n const response = await getSettings()\n localStorage.setItem('settings', JSON.stringify(response))\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleSelectLocation = (\n event: React.SyntheticEvent,\n value: DropdownOption | null,\n ) => {\n const newValue = value ? value.value : ''\n setSelectedLocation(newValue)\n localStorage.setItem('selectedLocationFilter', newValue)\n }\n\n useEffect(() => {\n getDefaultFilters()\n fetchLocations()\n getSettingsFn()\n }, [])\n\n useEffect(() => {\n fetchLocations(search, selectedLocation)\n }, [search, selectedLocation])\n\n useEffect(() => {\n if (!openSidebar && currentLocation) setCurrentLocation(undefined)\n }, [openSidebar])\n\n const visibleRows = useMemo(() => {\n return getVisibleRowsSorted(\n getPaginatedSlice(currentPage, rowsPerPage, locations),\n locations,\n )\n }, [locations, search, order, orderBy, rowsPerPage, currentPage])\n\n const controls: ToolbarControl[] = [\n {\n display: true,\n render: (\n {\n setCreatingLocation(true)\n handleOpen()\n }}\n disabled={loadingLocations}\n >\n Add Location\n \n ),\n },\n {\n display: true,\n render: (\n setMapView((prev) => !prev)}\n disabled={loadingLocations}\n >\n {mapView ? 'Table View' : 'Map View'}\n \n ),\n },\n {\n display: false,\n render: (\n setShowControls((prev) => !prev)}\n variant=\"contained\"\n name=\"toggleMapControls\"\n >\n Map Controls\n \n ),\n },\n {\n display: true,\n render: (\n option.value === selectedLocation,\n ) || null\n }\n renderInput={(params) => (\n \n )}\n onChange={handleSelectLocation}\n size=\"small\"\n disabled={loadingLocations || loading}\n loadingText=\"Loading...\"\n />\n ),\n },\n ]\n\n return (\n \n \n control.display)}>\n control.display)}\n />\n \n \n {selectedRows.length > 0 && (\n \n )}\n {!loadingLocations && locations.length > 0 && (\n <>\n {mapView ? (\n <>\n setShowControls(false)}\n controls={showControls}\n locations={locations}\n />\n \n ) : (\n <>\n \n c.active && c.value !== 'shared',\n )}\n handleSelectAll={handleSelectAll}\n />\n \n {visibleRows.map((location) => (\n {\n setCurrentLocation(location)\n }}\n filteredColumns={filteredColumns}\n displayMessage={displayMessage}\n setCreatingLocation={(value: boolean) =>\n setCreatingLocation(value)\n }\n handleSelectRow={handleSelectRow}\n selected={selectedRows.includes(location.id)}\n />\n ))}\n \n
    \n \n \n )}\n \n )}\n\n \n\n \n\n {openSidebar && (\n setOpenSidebar(false)}>\n {\n setOpenSidebar(false)\n setCurrentLocation(undefined)\n }}\n // success={fetchLocations}\n displayMessage={displayMessage}\n creatingLocation={creatingLocation}\n />\n \n )}\n \n
    \n
    \n )\n}\n\nexport default Locations\n","export const RETURN_TO_OPTIONS = [\n {\n value: 'one_to_one',\n label: 'Same Locker',\n },\n {\n value: 'any_locker_of_same_size_and_location',\n label: 'Any locker of same size and location',\n },\n // {\n // value: 'any_locker_of_same_size_at_any_location',\n // label: 'Any locker of same size at any location',\n // },\n]\n\nexport const PRODUCT_DEFAULTS = [\n 'select',\n 'image',\n 'product_name',\n 'serial_number',\n 'assigned_locker',\n 'assigned_location',\n 'cost',\n 'sale_price',\n 'sku',\n 'msrp',\n 'groups',\n 'qr_code',\n 'barcode',\n 'action',\n]\n\nexport const PRODUCT_SHORT_DEFAULTS = [\n 'product_name',\n 'assigned_locker',\n 'assigned_location',\n 'cost',\n 'sale_price',\n 'sku',\n 'msrp',\n]\n","import {\n Autocomplete,\n Box,\n Checkbox,\n TextField as MUITextField,\n} from '@mui/material'\nimport { useForm, FormProvider, SubmitHandler } from 'react-hook-form'\nimport { Form, TextField, Image, IDialogType } from 'components'\nimport { IProduct } from 'models/Product'\nimport { productApi } from 'resources/product/api'\nimport { ChangeEvent, useEffect, useState } from 'react'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport { IProductGroup } from 'models/ProductGroup'\nimport CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'\nimport CheckBoxIcon from '@mui/icons-material/CheckBox'\nimport useLoadingState from 'hooks/useLoadingState'\nimport ImageUploader from 'components/ImageUploader/ImageUploader'\nimport { DropdownOption } from 'types'\nimport LoadingFormData from 'components/PageBase/LoadingFormData'\n\ninterface IMultiEditProductFormProps {\n products: string[]\n onClose: () => void\n displayMessage?: (message: string | JSX.Element, type?: IDialogType) => void\n success: (showNewestFirst?: boolean) => void\n groups: IProductGroup[]\n}\n\nconst MultiEditProductForm = ({\n products,\n onClose,\n displayMessage,\n success,\n groups,\n}: IMultiEditProductFormProps) => {\n const [image, setImage] = useState(null)\n const [previewImage, setImagePreview] = useState('')\n const [groupsOptions, setGroupsOptions] = useState([])\n const [selectedGroup, setSelectedGroup] = useState(\n null,\n )\n const { patch } = productApi()\n\n const { loading, setLoading } = useLoadingState()\n const { loading: groupsLoading, setLoading: setGroupsLoading } =\n useLoadingState()\n\n const methods = useForm({})\n\n const handleImageUpload = (event: ChangeEvent): void => {\n const file: File | undefined = event?.target?.files?.[0]\n const isImage = file && /^image\\//.test(file.type)\n\n if (!isImage) {\n displayMessage?.('Only images are allowed!', 'info')\n return\n }\n\n const reader = new FileReader()\n reader.readAsDataURL(file)\n\n reader.onload = (e) =>\n e.target && e.target.result && setImagePreview(e.target.result as string)\n\n setImage(file ?? null)\n }\n\n const handleGroupSelection = (event: React.SyntheticEvent, value: any) => {\n setSelectedGroup(value)\n }\n\n const buildGroupsOptions = () => {\n if (groups.length > 0) {\n const autoCompleteOptions = groups.map((group) => ({\n label: group.name,\n value: group.id,\n }))\n const sortedOptions = autoCompleteOptions.sort((a, b) => {\n if (a.label < b.label) {\n return -1\n }\n if (a.label > b.label) {\n return 1\n }\n return 0\n })\n setGroupsOptions(sortedOptions)\n }\n\n setGroupsLoading(false)\n }\n const onSubmit: SubmitHandler = async (formData: IProduct) => {\n try {\n setLoading(true)\n\n const productData = {\n ...(formData.name && { name: formData.name }),\n ...(formData.price && { price: formData.price }),\n ...(formData.description && { description: formData.description }),\n ...(formData.sales_price && { sales_price: formData.sales_price }),\n ...(formData.msrp && { msrp: formData.msrp }),\n ...(formData.serial_number && {\n serial_number: formData.serial_number,\n }),\n ...(selectedGroup && { id_product_group: selectedGroup.value }),\n }\n\n await patch(products, productData)\n onClose()\n displayMessage?.('Products updated successfully!', 'success')\n success()\n } catch (error) {\n displayMessage?.(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n useEffect(() => {\n setGroupsLoading(true)\n buildGroupsOptions()\n }, [groups])\n\n const disableSubmit = Object.keys(methods.formState.errors).length > 0\n\n const MultiEditProductForm = (\n <>\n \n
    \n \n {previewImage && (\n \n )}\n\n \n\n \n\n \n\n option.label}\n renderOption={(props, option, { selected }) => (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n {option.label}\n
  • \n )}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n onChange={handleGroupSelection}\n loading={groupsLoading}\n />\n\n \n \n value > 0 || 'Cost must be greater than 0',\n }\n : {}\n }\n isNumeric={true}\n />\n \n value > 0 || 'Sale price must be greater than 0',\n }\n : {}\n }\n isNumeric={true}\n />\n \n value > 0 || 'MSRP must be greater than 0',\n }\n : {}\n }\n isNumeric={true}\n />\n \n\n \n
    \n
    \n
    \n \n )\n\n if (groupsLoading) {\n return \n }\n\n return MultiEditProductForm\n}\nexport default MultiEditProductForm\n","/* eslint-disable react/display-name */\nimport { ContentCopy, DeleteForever, QrCode } from '@mui/icons-material'\nimport { Checkbox, Link, Tooltip, useTheme, Box } from '@mui/material'\nimport {\n ConfirmDialog,\n IDialogType,\n IconButton,\n Image,\n QRGenerator,\n TableCell,\n TableRow,\n BarCodeGenerator,\n} from 'components'\nimport { IProduct } from 'models/Product'\nimport { IProductGroup } from 'models/ProductGroup'\nimport { useState, useMemo } from 'react'\nimport { RootStateOrAny, useSelector } from 'react-redux'\nimport { productApi } from 'resources/product/api'\nimport { getUserRole, parseCurrency, parseHexToRGB } from 'utils/helpers'\n\ninterface IProductRowProps {\n product: IProduct\n success: () => void\n displayMessage: (message: string, type?: IDialogType) => void\n filteredColumns: any[]\n handleEditProduct: (product: IProduct) => void\n handleSelectRow: (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => void\n selected: boolean\n groups: IProductGroup[]\n}\n\nconst defaultConfirmation = {\n isOpen: false,\n message: '',\n action: '',\n}\n\nconst ProductRow = ({\n product,\n success,\n displayMessage,\n filteredColumns,\n handleEditProduct,\n handleSelectRow,\n selected,\n groups,\n}: IProductRowProps) => {\n const [confirmationMessage, setConfirmationMessage] =\n useState(defaultConfirmation)\n const [productToClone, setProductToClone] = useState(null)\n\n const { remove, clone } = productApi()\n const { generateQRCode } = QRGenerator()\n const { generateBarcode } = BarCodeGenerator()\n const theme = useTheme()\n\n const currency = useSelector(\n (state: RootStateOrAny) => state.currencyReducer.currency,\n )\n\n const role = getUserRole()\n\n const handleDeleteProduct = async () => {\n try {\n await remove([product?.id])\n displayMessage('Product deleted successfully', 'success')\n success()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleCloneProduct = async () => {\n try {\n if (!productToClone) return\n\n await clone(productToClone.id)\n\n displayMessage?.('Product created successfully!', 'success')\n success()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleQRCode = (): void => {\n generateQRCode(product.id, product.id)\n }\n\n const handleBarcode = (): void => {\n generateBarcode(product.id, product.id)\n }\n\n const getRowBackground = () => {\n if (\n !product.devices?.[0]?.location?.name &&\n !product.devices?.[0]?.locker_number\n ) {\n return parseHexToRGB('#7c7e82', '0.1')\n }\n return undefined\n }\n\n const data = useMemo(\n () => [\n {\n column: 'select',\n render: () =>\n role === 'admin' ? (\n {\n handleSelectRow(event, checked, product.id)\n }}\n inputProps={{ 'aria-label': 'controlled' }}\n />\n ) : (\n \n ),\n },\n {\n column: 'image',\n render: () => {\n return product.image ? (\n \n ) : null\n },\n },\n {\n column: 'product_name',\n render: () => {\n return role !== 'member' ? (\n handleEditProduct(product)}\n >\n {product?.name}\n \n ) : (\n <>{product?.name}\n )\n },\n },\n {\n column: 'serial_number',\n render: () => {\n return product.serial_number || null\n },\n },\n {\n column: 'assigned_locker',\n render: () => {\n return product.devices?.[0]?.locker_number || '-'\n },\n },\n {\n column: 'assigned_location',\n render: () => {\n return product.devices?.[0]?.location?.name || '-'\n },\n },\n {\n column: 'cost',\n render: () => {\n return product.price ? (\n <>\n {parseCurrency(currency)}\n {product?.price}\n \n ) : null\n },\n },\n {\n column: 'sale_price',\n render: () => {\n return product.sales_price ? (\n <>\n {parseCurrency(currency)}\n {product?.sales_price}\n \n ) : null\n },\n },\n {\n column: 'sku',\n render: () => {\n return product?.sku || null\n },\n },\n {\n column: 'msrp',\n render: () => {\n return product.msrp ? (\n <>\n {parseCurrency(currency)}\n {product.msrp}\n \n ) : null\n },\n },\n {\n column: 'groups',\n render: () => {\n return (\n groups.find((group) => group.id === product.id_product_group)\n ?.name || null\n )\n },\n },\n {\n column: 'qr_code',\n render: () => (\n <>\n \n \n \n \n ),\n },\n {\n column: 'barcode',\n render: () => (\n \n \n \n \n \n \n \n ),\n },\n {\n column: 'action',\n render: () => (\n <>\n {\n setProductToClone(product)\n setConfirmationMessage({\n isOpen: true,\n message: 'Are you sure you want to clone this product?',\n action: 'clone',\n })\n }}\n >\n \n \n \n \n\n {\n setConfirmationMessage({\n isOpen: true,\n message: 'Are you sure you want to delete this product?',\n action: 'delete',\n })\n }}\n >\n \n \n \n \n \n ),\n },\n ],\n [groups, selected],\n )\n\n const dataMap = useMemo(() => {\n const map = new Map React.ReactNode>()\n data.forEach((item) => {\n map.set(item.column, item.render)\n })\n return map\n }, [data])\n\n return (\n <>\n \n {filteredColumns?.map(\n (c) =>\n c.active && (\n \n {dataMap.has(c.value) ? (\n dataMap.get(c.value)!()\n ) : typeof (c as any)[c.value] === 'boolean' ? (\n \n ) : (\n (product as any)[c.value] || ''\n )}\n \n ),\n )}\n \n setConfirmationMessage(defaultConfirmation)}\n onClickConfirm={handleDeleteProduct}\n onClickCancel={() => setConfirmationMessage(defaultConfirmation)}\n confirmText=\"Yes\"\n cancelText=\"No\"\n />\n setConfirmationMessage(defaultConfirmation)}\n onClickConfirm={handleCloneProduct}\n onClickCancel={() => setConfirmationMessage(defaultConfirmation)}\n confirmText=\"Yes\"\n cancelText=\"No\"\n />\n \n )\n}\n\nexport default ProductRow\n","import {\n Button,\n NotificationDialog,\n SideBar,\n Table,\n TableBody,\n TablePagination,\n} from 'components'\nimport { Box, Autocomplete, TextField } from '@mui/material'\nimport { DEFAULT_PAGE, DEVICES_PER_PAGE } from 'constants/pagination'\nimport { PRODUCT_DEFAULTS, PRODUCT_SHORT_DEFAULTS } from './../../constants'\nimport MultiEditProductForm from './MultiEditProductForm'\nimport useDialog from 'hooks/useDialog'\nimport { ChangeEvent, useEffect, useMemo, useState } from 'react'\nimport ProductForm from './ProductForm'\nimport { IProduct, IProductList } from 'models/Product'\nimport productApi from 'resources/product/api/productApi'\nimport ProductRow from './ProductRow'\nimport MultiSelectToolbar from 'components/Table/components/MultiSelectToolbar/MultiSelectToolbar'\nimport { IProductGroup } from 'models/ProductGroup'\nimport { productGroupApi } from 'resources/product-group'\nimport useSortableHeader from 'hooks/useSortableHeader'\nimport SortableTableHead from 'components/Table/components/TableHead/SortableTableHead'\nimport useColumnFiltering from 'hooks/useColumnFiltering'\nimport NoData from 'components/PageBase/NoData'\nimport LoadingTableData from 'components/Table/components/LoadingTableData/LoadingTableData'\nimport Toolbar from 'components/Toolbar/Toolbar'\nimport ToolbarControls from 'components/Toolbar/components/ToolbarControls'\nimport ToolbarSearchbar from 'components/Toolbar/components/ToolbarSearchbar'\nimport { ToolbarControl, DropdownOption } from 'types'\nimport useLoadingState from 'hooks/useLoadingState'\nimport useLocations from 'hooks/useLocations'\nimport { generateFilters, getStoredTableFilters } from 'utils/helpers'\n\nconst Inventory = () => {\n const [products, setProducts] = useState({\n items: [],\n total: 0,\n pages: 0,\n })\n const [productsBackup, setProductsBackup] = useState([])\n const [productGroups, setProductGroups] = useState([])\n const [currentProduct, setCurrentProduct] = useState()\n const [currentPage, setCurrentPage] = useState(DEFAULT_PAGE)\n const [rowsPerPage, setRowsPerPage] = useState(DEVICES_PER_PAGE)\n const [search, setSearch] = useState('')\n const [openSidebar, setOpenSidebar] = useState(false)\n const [selectedProducts, setSelectedProducts] = useState([])\n const [selectedRows, setSelectedRows] = useState([])\n\n const [selectedLocation, setSelectedLocation] = useState(() => {\n const saved = localStorage.getItem('inventoryLocationFilter')\n return saved || ''\n })\n const { getMany, remove } = productApi()\n const { getMany: getProductGroups } = productGroupApi()\n const { dialog, displayMessage, closeDialog } = useDialog()\n const [action, setAction] = useState('')\n const [openMultiEdit, setOpenMultiEdit] = useState(false)\n const { filteredColumns, setFilteredColumns } = useColumnFiltering({\n displayMessage,\n })\n const { loadingLocations, locationsOptions } = useLocations()\n\n const { loading, setLoading } = useLoadingState(true)\n\n const { order, setOrder, orderBy, handleRequestSort, getVisibleRowsSorted } =\n useSortableHeader({\n defaultOrderBy: 'name',\n entity: 'inventory',\n nestedProps: [\n {\n columnValue: 'product_name',\n path: 'name',\n defaultValue: '',\n },\n {\n columnValue: 'cost',\n path: 'price',\n defaultValue: 0,\n },\n {\n columnValue: 'sale_price',\n path: 'sales_price',\n defaultValue: 0,\n },\n {\n columnValue: 'assigned_locker',\n path: 'devices[0].locker_number',\n defaultValue: '-',\n },\n {\n columnValue: 'assigned_location',\n path: 'devices[0].location.name',\n defaultValue: '-',\n },\n ],\n })\n\n const handleSelectRow = (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => {\n setSelectedRows((previousValue) =>\n checked\n ? [...previousValue, id]\n : previousValue.filter((rowId) => rowId !== id),\n )\n }\n const loadTableFilters = (firstItem: any) => {\n try {\n const storageKey = 'filteredColumns_inventory'\n const storedColumns = getStoredTableFilters(storageKey)\n\n if (storedColumns) {\n setFilteredColumns(storedColumns)\n } else {\n const generatedColumns = generateFilters(\n firstItem,\n PRODUCT_DEFAULTS,\n PRODUCT_SHORT_DEFAULTS,\n )\n setFilteredColumns(generatedColumns)\n const storedFilters = JSON.parse(\n localStorage.getItem('tableFilters') || '{}',\n )\n storedFilters[storageKey] = generatedColumns\n localStorage.setItem('tableFilters', JSON.stringify(storedFilters))\n }\n } catch (error) {\n console.error('Error loading table filters:', error)\n displayMessage(\n 'Error loading table filters: ' + (error as Error).message,\n 'error',\n )\n }\n }\n const handleSelectAll = (event: React.ChangeEvent, checked: boolean) => {\n setSelectedProducts(products.items)\n setSelectedRows(() =>\n checked ? products.items.map((product) => product.id) : [],\n )\n }\n\n const handleDeleteMany = async () => {\n try {\n await remove(selectedRows)\n displayMessage(\n `${selectedRows.length} item${\n selectedRows.length > 1 ? 's' : ''\n } deleted successfully`,\n 'success',\n )\n setSelectedRows([])\n fetchProducts()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleSearch = (event: ChangeEvent): void => {\n setSearch(event.target.value)\n }\n\n const handleEditProduct = (product: IProduct) => {\n setCurrentProduct(product)\n setOpenSidebar(true)\n }\n\n const handleCloseSidebar = () => {\n setOpenSidebar(false)\n setCurrentProduct(undefined)\n }\n\n const handleCloseMultiEdit = () => {\n setOpenMultiEdit(false)\n setAction('')\n }\n\n const fetchProducts = async (\n showNewestFirst: boolean = false,\n ): Promise => {\n setLoading(true)\n\n try {\n const data = await getMany(\n currentPage + 1,\n rowsPerPage,\n search,\n selectedLocation,\n )\n\n const items = data?.items ?? []\n\n setProducts({\n items,\n total: data?.total ?? 0,\n pages: data?.pages ?? 0,\n })\n\n setProductsBackup(items)\n\n if (showNewestFirst) {\n setOrder('default')\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n const fetchProductGroups = async (): Promise => {\n try {\n const productGroups = await getProductGroups(1, 1000)\n setProductGroups(productGroups.items)\n loadTableFilters(productGroups.items[0])\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleSelectLocation = (\n event: React.SyntheticEvent,\n value: DropdownOption | null,\n ) => {\n const newValue = value ? value.value : ''\n setSelectedLocation(newValue)\n localStorage.setItem('inventoryLocationFilter', newValue)\n }\n\n useEffect(() => {\n fetchProducts()\n fetchProductGroups()\n }, [])\n\n useEffect(() => {\n fetchProducts()\n }, [search, currentPage, rowsPerPage, selectedLocation])\n\n useEffect(() => {\n if (action === 'edit') {\n setOpenMultiEdit(true)\n }\n }, [action])\n\n const visibleRows = useMemo(\n () => getVisibleRowsSorted(products.items, productsBackup),\n [products, order, orderBy],\n )\n\n const controls: ToolbarControl[] = [\n {\n display: true,\n render: (\n setOpenSidebar(true)}\n >\n Add Product\n \n ),\n },\n\n {\n display: true,\n render: (\n option.value === selectedLocation,\n ) || null\n }\n renderInput={(params) => (\n \n )}\n onChange={handleSelectLocation}\n size=\"small\"\n disabled={loadingLocations || loading}\n loadingText=\"Loading...\"\n />\n ),\n },\n ]\n\n return (\n <>\n control.display)}>\n control.display)}\n />\n \n \n {selectedRows.length > 0 && (\n \n )}\n {!loading && visibleRows.length > 0 && (\n <>\n \n c.active)}\n handleSelectAll={handleSelectAll}\n />\n \n {visibleRows.map((product) => (\n \n ))}\n \n
    \n \n \n )}\n\n \n\n \n\n {openSidebar && (\n \n \n \n )}\n {openMultiEdit && (\n \n \n \n )}\n \n \n )\n}\n\nexport default Inventory\n","import {\n Autocomplete,\n Box,\n Checkbox,\n Typography,\n TextField as MUITextField,\n Chip,\n FormControl,\n FormControlLabel,\n Select,\n MenuItem,\n InputLabel,\n useTheme,\n} from '@mui/material'\nimport { useForm, FormProvider, SubmitHandler } from 'react-hook-form'\nimport { Form, IDialogType, TextField } from 'components'\nimport { IProduct } from 'models/Product'\nimport { useEffect, useMemo, useState } from 'react'\nimport { IProductGroup } from 'models/ProductGroup'\nimport productGroupApi from 'resources/product-group/api/productGroupApi'\nimport { productApi } from 'resources/product'\nimport CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'\nimport CheckBoxIcon from '@mui/icons-material/CheckBox'\nimport DeleteIcon from '@mui/icons-material/Delete'\nimport DoneIcon from '@mui/icons-material/Done'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport { RETURN_TO_OPTIONS } from 'pages/Products/constants'\nimport { ISize } from 'models'\nimport { sizeApi } from 'resources'\nimport useLoadingState from 'hooks/useLoadingState'\nimport LoadingFormData from 'components/PageBase/LoadingFormData'\nimport ImageUploader from 'components/ImageUploader/ImageUploader'\nimport { Image } from 'components'\ninterface IProductGroupFormProps {\n group: IProductGroup | undefined\n onClose: () => void\n displayMessage: (message: string, type?: IDialogType) => void\n success: (showNewestFirst?: boolean) => void\n}\n\nconst MAX_NAME_LENGTH = 50\nconst MAX_TRANSACTION_NUMBER_LENGTH = 10\n\nconst ProductGroupForm = ({\n group,\n onClose,\n displayMessage,\n success,\n}: IProductGroupFormProps) => {\n const [products, setProducts] = useState([])\n const [options, setOptions] = useState<\n {\n label: string\n value: string\n serial_number: string\n description: string\n }[]\n >([])\n const [productsToAdd, setProductsToAdd] = useState([])\n const [productsToRemove, setProductsToRemove] = useState([])\n const [previewImage, setImagePreview] = useState('')\n const [activateCharging, setActivateCharging] = useState(\n group ? group.charging_time > 0 : false,\n )\n const [returnTo, setReturnTo] = useState(() => {\n if (group && group.one_to_one) {\n return 'one_to_one'\n } else if (group && !group.one_to_one && group.size) {\n return 'any_locker_of_same_size_and_location'\n } else if (!group) {\n return ''\n } else return ''\n })\n const [sizes, setSizes] = useState([])\n const [selectedSize, setSelectedSize] = useState(\n group?.size?.id || '',\n )\n const [image, setImage] = useState(null)\n\n const theme = useTheme()\n\n const { create, update } = productGroupApi()\n const { getMany } = productApi()\n const { getMany: getSizes } = sizeApi()\n\n const { loading, setLoading } = useLoadingState()\n const { loading: productsLoading, setLoading: setProductsLoading } =\n useLoadingState()\n const { loading: sizesLoading, setLoading: setSizesLoading } =\n useLoadingState()\n\n const methods = useForm({\n defaultValues: { ...group },\n })\n\n const sizeOptions = useMemo(\n () =>\n sizes.map((size) => ({\n value: size.id,\n label: `${size.name} (${size.width}\" x ${size.depth}\" x ${size.height}\")`,\n })),\n [sizes],\n )\n\n const fetchProducts = async (): Promise => {\n try {\n setProductsLoading(true)\n const products = await getMany(1, 10000)\n setProducts(products.items)\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setProductsLoading(false)\n }\n }\n\n const fetchSizes = async (): Promise => {\n try {\n setSizesLoading(true)\n const sizes = await getSizes(1, 10000)\n setSizes(sizes.items)\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setSizesLoading(false)\n }\n }\n\n const handleToggle = (event: React.SyntheticEvent, value: any) => {\n const productsSelected: string[] = value.map((option) => option.value)\n setProductsToAdd(productsSelected)\n }\n\n const handleSelect = (userId: string) => {\n if (productsToRemove.includes(userId)) {\n setProductsToRemove(productsToRemove.filter((id) => id !== userId))\n } else {\n setProductsToRemove((prevState) => [...prevState, userId])\n }\n }\n\n const buildOptions = () => {\n if (products.length > 0) {\n const notAssignedProducts = products.filter(\n (product) => !group?.products.some((p) => p.id === product.id),\n )\n const autoCompleteOptions = notAssignedProducts.map((product) => ({\n label: product.name,\n value: product.id,\n serial_number: product.serial_number,\n description: product.description,\n }))\n const sortedOptions = autoCompleteOptions.sort((a, b) =>\n a.label.localeCompare(b.label),\n )\n setOptions(sortedOptions)\n }\n }\n\n const formatProductGroupPayload = (data): FormData => {\n const payload = new FormData()\n payload.append('total_inventory', data.total_inventory)\n data.products.forEach((productId: string) => {\n payload.append('products', productId)\n })\n if (data.id_size) {\n payload.append('id_size', data.id_size)\n }\n if (data.transaction_number) {\n payload.append('transaction_number', data.transaction_number)\n }\n payload.append('name', data.name)\n if (data.image) {\n payload.append('image', data.image)\n }\n payload.append('one_to_one', data.one_to_one)\n payload.append('charging_time', data.charging_time)\n payload.append('auto_repair', data.auto_repair)\n return payload\n }\n\n const onSubmit: SubmitHandler = async (\n newGroup: IProductGroup,\n ) => {\n try {\n setLoading(true)\n\n if (group) {\n const currentProducts = group.products.map((product) => product.id)\n const newProducts = [\n ...currentProducts.filter((id) => !productsToRemove.includes(id)),\n ...productsToAdd,\n ]\n\n const data = {\n ...newGroup,\n total_inventory: newProducts.length,\n one_to_one: returnTo === 'one_to_one',\n id_size: selectedSize ? selectedSize : null,\n charging_time:\n newGroup.charging_time > 0 && activateCharging\n ? newGroup.charging_time\n : 0,\n products: newProducts,\n image: image,\n }\n\n const payload = formatProductGroupPayload(data)\n await update(newGroup.id, payload)\n onClose()\n displayMessage('Product group updated successfully!', 'success')\n success()\n } else {\n const data = {\n ...newGroup,\n total_inventory: productsToAdd.length,\n one_to_one: returnTo === 'one_to_one',\n id_size: selectedSize ? selectedSize : null,\n charging_time:\n newGroup.charging_time > 0 && activateCharging\n ? newGroup.charging_time\n : 0,\n products: productsToAdd,\n image: image,\n }\n\n const payload = formatProductGroupPayload(data)\n await create(payload)\n onClose()\n displayMessage('Product group created successfully!', 'success')\n success(true)\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n useEffect(() => {\n fetchProducts()\n fetchSizes()\n }, [])\n\n useEffect(() => {\n buildOptions()\n }, [products])\n\n useEffect(() => {\n if (returnTo === 'one_to_one') {\n setSelectedSize('')\n }\n }, [returnTo])\n\n const disableSubmit = Object.keys(methods.formState.errors).length > 0\n\n const autoRepair = methods.watch('auto_repair')\n\n if (\n sizesLoading ||\n (productsLoading && (options.length === 0 || products.length === 0))\n ) {\n return \n }\n\n return (\n <>\n \n
    \n \n {previewImage && (\n <>\n \n \n )}\n\n {group?.image && previewImage === '' && (\n <>\n Group Image:\n \n \n )}\n ) => {\n const file = e.target.files?.[0]\n if (file) {\n setImage(file)\n const reader = new FileReader()\n reader.readAsDataURL(file)\n reader.onload = (e) =>\n e.target &&\n e.target.result &&\n setImagePreview(e.target.result as string)\n }\n }}\n />\n \n option.label}\n renderOption={(props, option, { selected }) => (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n \n {option.label}\n \n {option.serial_number}\n \n \n
  • \n )}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n onChange={handleToggle}\n loadingText=\"Loading...\"\n loading={productsLoading && options.length === 0}\n />\n\n {group && (\n <>\n Products assigned to group\n {group.products.length > 0 && (\n \n {group.products.length} products assigned to this group\n \n )}\n \n {group.products.length > 0\n ? 'Select the products that you want to remove from this group and hit submit'\n : 'No products assigned to this group'}\n \n \n {group.products.length > 0 &&\n group.products.map((product) => (\n handleSelect(product.id)}\n onDelete={() => handleSelect(product.id)}\n deleteIcon={\n productsToRemove.includes(product.id) ? (\n \n ) : (\n \n )\n }\n variant={\n productsToRemove.includes(product.id)\n ? 'filled'\n : 'outlined'\n }\n color={\n productsToRemove.includes(product.id)\n ? 'primary'\n : 'default'\n }\n />\n ))}\n \n \n )}\n \n \n \n setActivateCharging((previousValue) => !previousValue)\n }\n checked={activateCharging}\n />\n }\n label=\"Activate charging time\"\n />\n \n {activateCharging && (\n \n \n \n )}\n \n\n \n \n Product return to...\n \n setReturnTo(event.target.value)}\n inputProps={{\n MenuProps: {\n PaperProps: {\n sx: {\n backgroundImage: 'none',\n boxShadow: 3,\n backgroundColor:\n theme.palette.mode === 'dark' ? '#2A2E34' : '#f7f7f7',\n },\n },\n },\n }}\n >\n {RETURN_TO_OPTIONS.map((option) => (\n \n {option.label}\n \n ))}\n \n \n\n {returnTo && returnTo !== 'one_to_one' && (\n \n \n Locker Size\n \n setSelectedSize(event.target.value)}\n >\n {sizeOptions.map((option) => (\n \n {option.label}\n \n ))}\n \n \n )}\n\n \n \n \n }\n label=\"Auto Repair\"\n />\n \n\n {autoRepair && (\n \n \n \n )}\n \n\n \n \n \n
    \n \n )\n}\nexport default ProductGroupForm\n","import { DeleteForever, QrCode } from '@mui/icons-material'\nimport { Checkbox, Link, Tooltip, Typography } from '@mui/material'\nimport {\n ConfirmDialog,\n IDialogType,\n IconButton,\n TableCell,\n TableRow,\n QRGenerator,\n} from 'components'\nimport { IProductGroup } from 'models/ProductGroup'\nimport { useMemo, useState } from 'react'\nimport productGroupApi from 'resources/product-group/api/productGroupApi'\nimport { getUserRole } from 'utils/helpers'\n\ninterface IProductGroupRowProps {\n group: IProductGroup\n success: () => void\n displayMessage: (message: string, type?: IDialogType) => void\n filteredColumns: any[]\n handleEditGroup: (product: IProductGroup) => void\n handleSelectRow: (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => void\n selected: boolean\n}\n\nconst ProductGroupRow = ({\n group,\n success,\n displayMessage,\n filteredColumns,\n handleEditGroup,\n handleSelectRow,\n selected,\n}: IProductGroupRowProps) => {\n const [confirmationMessage, setConfirmationMessage] = useState({\n isOpen: false,\n message: '',\n })\n const { remove } = productGroupApi()\n const role = getUserRole()\n\n const { generateQRCode } = QRGenerator()\n\n const products = useMemo(() => {\n const skus = group.products.map((product) => product.sku)\n const legend = skus.slice(0, 2).join(', ')\n return legend\n }, [group])\n\n const handleRemoveGroup = async () => {\n try {\n await remove([group?.id])\n displayMessage('Product group deleted successfully', 'success')\n success()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleQRCode = () => {\n try {\n if (group?.products && group.products.length > 0) {\n group.products.forEach((product: any) => {\n if (product?.sku) {\n generateQRCode(product.id, product.id)\n } else {\n console.warn('Skipping product without a valid SKU:', product)\n }\n })\n } else {\n console.warn('No products found, cannot generate QR codes.')\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n return (\n <>\n \n {filteredColumns.findIndex((c) => c.value === 'select' && c.active) !==\n -1 && (\n \n {role === 'admin' ? (\n {\n handleSelectRow(event, checked, group.id)\n }}\n inputProps={{ 'aria-label': 'controlled' }}\n />\n ) : (\n \n )}\n \n )}\n {filteredColumns.findIndex(\n (c) => c.value === 'group_name' && c.active,\n ) !== -1 && (\n \n {role !== 'member' ? (\n handleEditGroup(group)}\n >\n {group?.name}\n \n ) : (\n <>{group?.name}\n )}\n \n )}\n {filteredColumns.findIndex(\n (c) => c.value === 'locker_size' && c.active,\n ) !== -1 && (\n {group.size?.name || '-'}\n )}\n {filteredColumns.findIndex(\n (c) => c.value === 'total_inventory' && c.active,\n ) !== -1 && (\n {group?.products.length}\n )}\n {filteredColumns.findIndex((c) => c.value === 'sku' && c.active) !==\n -1 && (\n \n {products}\n {group.products.length > 2 && (\n product.sku)\n .join(', ')}\n >\n \n {` +${group.products.length - 2} more`}\n \n \n )}\n \n )}\n {filteredColumns.findIndex((c) => c.value === 'qr_code' && c.active) !==\n -1 && (\n \n \n \n \n \n )}\n {filteredColumns.findIndex((c) => c.value === 'action' && c.active) !==\n -1 && (\n \n {\n setConfirmationMessage({\n isOpen: true,\n message:\n 'Are you sure you want to delete this product group?',\n })\n }}\n >\n \n \n \n \n \n )}\n \n \n setConfirmationMessage({\n isOpen: false,\n message: '',\n })\n }\n onClickConfirm={handleRemoveGroup}\n onClickCancel={() =>\n setConfirmationMessage({\n isOpen: false,\n message: '',\n })\n }\n confirmText=\"Yes\"\n cancelText=\"No\"\n />\n \n )\n}\n\nexport default ProductGroupRow\n","import {\n Button,\n NotificationDialog,\n SideBar,\n Table,\n TableBody,\n TablePagination,\n} from 'components'\nimport { DEFAULT_PAGE, DEVICES_PER_PAGE } from 'constants/pagination'\nimport useDialog from 'hooks/useDialog'\nimport { ChangeEvent, useEffect, useMemo, useState } from 'react'\nimport { IProductGroup, IProductGroupList } from 'models/ProductGroup'\nimport ProductGroupForm from './ProductGroupForm'\nimport { productGroupApi } from 'resources/product-group'\nimport ProductGroupRow from './ProductGroupRow'\nimport MultiSelectToolbar from 'components/Table/components/MultiSelectToolbar/MultiSelectToolbar'\nimport useSortableHeader from 'hooks/useSortableHeader'\nimport SortableTableHead from 'components/Table/components/TableHead/SortableTableHead'\nimport useColumnFiltering from 'hooks/useColumnFiltering'\nimport NoData from 'components/PageBase/NoData'\nimport LoadingTableData from 'components/Table/components/LoadingTableData/LoadingTableData'\nimport Toolbar from 'components/Toolbar/Toolbar'\nimport ToolbarControls from 'components/Toolbar/components/ToolbarControls'\nimport ToolbarSearchbar from 'components/Toolbar/components/ToolbarSearchbar'\nimport { ToolbarControl } from 'types'\nimport useLoadingState from 'hooks/useLoadingState'\n\nconst ProductGroups = () => {\n const [productGroups, setProductGroups] = useState({\n items: [],\n total: 0,\n pages: 0,\n })\n const [productGroupsBackup, setProductGroupsBackup] = useState<\n IProductGroup[]\n >([])\n const [currentGroup, setCurrentGroup] = useState()\n const [currentPage, setCurrentPage] = useState(DEFAULT_PAGE)\n const [rowsPerPage, setRowsPerPage] = useState(DEVICES_PER_PAGE)\n const [search, setSearch] = useState('')\n const [openSidebar, setOpenSidebar] = useState(false)\n const [selectedRows, setSelectedRows] = useState([])\n const [selectedRowsData, setSelectedRowsData] = useState([])\n\n const { getMany, remove } = productGroupApi()\n const { dialog, displayMessage, closeDialog } = useDialog()\n const { loading, setLoading } = useLoadingState(true)\n\n const { order, setOrder, orderBy, handleRequestSort, getVisibleRowsSorted } =\n useSortableHeader({\n defaultOrderBy: 'group_name',\n entity: 'product-groups',\n nestedProps: [\n {\n columnValue: 'group_name',\n path: 'name',\n defaultValue: '',\n },\n {\n columnValue: 'locker_size',\n path: 'size.name',\n defaultValue: '',\n },\n ],\n })\n\n const { filteredColumns, setFilteredColumns, getDefaultFilters } =\n useColumnFiltering({ displayMessage })\n\n const handleSelectRow = (\n event: React.ChangeEvent,\n checked: boolean,\n id: string,\n ) => {\n setSelectedRows((previousValue) =>\n checked\n ? [...previousValue, id]\n : previousValue.filter((rowId) => rowId !== id),\n )\n\n setSelectedRowsData((previousValue) =>\n checked\n ? [\n ...previousValue,\n productGroups.items.find((group) => group.id === id),\n ]\n : previousValue.filter((row) => row.id !== id),\n )\n }\n\n const handleSelectAll = (event: React.ChangeEvent, checked: boolean) => {\n setSelectedRows(() =>\n checked ? productGroups.items.map((device) => device.id) : [],\n )\n\n setSelectedRowsData(() => (checked ? productGroups.items : []))\n }\n\n const handleDeleteMany = async () => {\n try {\n await remove(selectedRows)\n displayMessage(\n `${selectedRows.length} item${\n selectedRows.length > 1 ? 's' : ''\n } deleted successfully`,\n 'success',\n )\n setSelectedRows([])\n fetchProductGroups()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n\n const handleSearch = (event: ChangeEvent): void => {\n setSearch(event.target.value)\n }\n\n const handleEditGroup = (group: IProductGroup) => {\n setCurrentGroup(group)\n setOpenSidebar(true)\n }\n\n const handleCloseSidebar = () => {\n setOpenSidebar(false)\n setCurrentGroup(undefined)\n }\n\n const fetchProductGroups = async (\n showNewestFirst: boolean = false,\n ): Promise => {\n try {\n setLoading(true)\n const productGroups = await getMany(currentPage + 1, rowsPerPage, search)\n setProductGroupsBackup([...productGroups.items])\n setProductGroups(productGroups)\n if (showNewestFirst) {\n setOrder('default')\n }\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n }\n }\n\n useEffect(() => {\n fetchProductGroups()\n }, [search, currentPage, rowsPerPage])\n\n useEffect(() => {\n fetchProductGroups()\n getDefaultFilters()\n }, [])\n\n const visibleRows = useMemo(\n () => getVisibleRowsSorted(productGroups.items, productGroupsBackup),\n [productGroups, order, orderBy],\n )\n\n const controls: ToolbarControl[] = [\n {\n display: true,\n render: (\n setOpenSidebar(true)}\n >\n Add Product Group\n \n ),\n },\n ]\n\n return (\n <>\n control.display)}>\n control.display)}\n />\n \n \n\n {selectedRows.length > 0 && (\n \n )}\n {!loading && productGroups.items.length > 0 && (\n <>\n \n c.active)}\n handleSelectAll={handleSelectAll}\n />\n \n {visibleRows.map((group) => (\n \n ))}\n \n
    \n \n \n )}\n\n \n\n \n\n {openSidebar && (\n \n \n \n )}\n \n \n )\n}\n\nexport default ProductGroups\n","import { Outlet } from 'react-router-dom'\n\nconst BlankLayout = () => (\n <>\n \n \n)\n\nexport default BlankLayout\n","var _path, _path2, _path3, _path4, _path5, _path6;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport * as React from \"react\";\nfunction SvgPricingSetUp(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 128 92\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M115.85 72.1246H104.513C102.957 72.1246 101.696 70.8708 101.696 69.3243C101.696 67.7779 102.957 66.5241 104.513 66.5241H115.85C119.364 66.5241 122.223 63.6767 122.223 60.1763V11.935C122.223 8.44187 119.364 5.60048 115.85 5.60048H31.6776C28.1632 5.60048 25.3046 8.44187 25.3046 11.935V23.1897C25.3046 24.7362 24.0432 25.99 22.4874 25.99C20.9315 25.99 19.6702 24.7362 19.6702 23.1897V11.935C19.6702 5.35424 25.0569 0 31.6776 0H115.85C122.47 0 127.857 5.35424 127.857 11.935V60.1763C127.857 66.7644 122.47 72.1246 115.85 72.1246Z\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M96.1759 91.7945H12.0109C5.38781 91.7945 0 86.4391 0 79.8559V31.6085C0 25.0253 5.38781 19.6699 12.0109 19.6699H96.1759C102.799 19.6699 108.187 25.0253 108.187 31.6085V79.8559C108.187 86.4391 102.799 91.7945 96.1759 91.7945ZM12.0109 25.2702C8.4947 25.2702 5.6342 28.1135 5.6342 31.6085V79.8559C5.6342 83.3509 8.4947 86.1942 12.0109 86.1942H96.1759C99.6922 86.1942 102.553 83.3509 102.553 79.8559V31.6085C102.553 28.1135 99.6922 25.2702 96.1759 25.2702H12.0109Z\"\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M29.6634 75.4034H22.7905C21.0672 75.4034 19.6702 74.6695 19.6702 73.7642C19.6702 72.8589 21.0672 72.125 22.7905 72.125H29.6634C31.3866 72.125 32.7837 72.8589 32.7837 73.7642C32.7837 74.6695 31.3866 75.4034 29.6634 75.4034Z\"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M46.0555 75.4034H39.1826C37.4593 75.4034 36.0623 74.6695 36.0623 73.7642C36.0623 72.8589 37.4593 72.125 39.1826 72.125H46.0555C47.7787 72.125 49.1758 72.8589 49.1758 73.7642C49.1758 74.6695 47.7787 75.4034 46.0555 75.4034Z\"\n })), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M79.237 75.4034H58.4554C56.9517 75.4034 55.7327 74.6695 55.7327 73.7642C55.7327 72.8589 56.9517 72.125 58.4554 72.125H79.237C80.7407 72.125 81.9598 72.8589 81.9598 73.7642C81.9598 74.6695 80.7407 75.4034 79.237 75.4034Z\"\n })), _path6 || (_path6 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M39.4088 55.7328H26.1586C22.5807 55.7328 19.6702 52.9031 19.6702 49.4245V42.3709C19.6702 38.8923 22.5807 36.0625 26.1586 36.0625H39.4088C42.9867 36.0625 45.8973 38.8923 45.8973 42.3709V49.4245C45.8973 52.9031 42.9867 55.7328 39.4088 55.7328ZM26.1586 41.4512C25.6371 41.4512 25.2128 41.8638 25.2128 42.3709V49.4245C25.2128 49.9316 25.6371 50.3441 26.1586 50.3441H39.4088C39.9304 50.3441 40.3547 49.9316 40.3547 49.4245V42.3709C40.3547 41.8638 39.9304 41.4512 39.4088 41.4512H26.1586Z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgPricingSetUp);\nexport default __webpack_public_path__ + \"static/media/pricing-set-up.753fa1aa.svg\";\nexport { ForwardRef as ReactComponent };","var _path, _path2, _path3;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport * as React from \"react\";\nfunction SvgPayPer(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 144 86\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M120.297 58.2796H66.0219L61.2271 53.5284L65.4137 51.338H78.9702C83.4876 51.338 87.1642 48.0616 87.1642 44.0323C87.1642 40.003 83.4876 36.7266 78.9702 36.7266H58.2205C56.5326 36.7266 54.8874 37.1961 53.4833 38.0669L43.5053 42.8657H23.6966V39.8664H0V82.0232H23.6966V79.2763H28.5554L39.6089 84.4184L41.4034 85.1651H68.0042L119.578 73.3151C120.039 73.2613 120.478 73.1723 120.826 73.0731L121.042 73.0234C122.053 72.7297 122.953 72.4546 123.641 72.0657C126.165 70.8164 127.731 68.3239 127.731 65.5605C127.729 61.5478 124.396 58.2796 120.297 58.2796ZM4.26774 44.0054H19.4289V77.8884H4.26774V44.0054ZM121.601 68.4336C121.272 68.6177 120.756 68.7893 119.926 69.0334L119.759 69.0727C119.512 69.141 119.26 69.1927 118.997 69.2175L67.5049 81.0303H42.2826L29.5285 75.1394H23.6987V47.0046H44.504L55.3355 41.8149L55.7708 41.5626C56.5048 41.1054 57.352 40.8634 58.2205 40.8634H78.9702C81.1361 40.8634 82.8965 42.2865 82.8965 44.0323C82.8965 45.778 81.1361 47.2011 78.9702 47.2011H64.3361L54.2195 52.4984L64.2273 62.4165H120.297C122.042 62.4165 123.461 63.8292 123.461 65.5626C123.461 66.7623 122.787 67.8441 121.601 68.4336Z\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M117.83 0C103.399 0 91.6604 11.3805 91.6604 25.3693C91.6604 39.3561 103.399 50.7345 117.83 50.7345C132.261 50.7345 144 39.3561 144 25.3693C143.998 11.3805 132.259 0 117.83 0ZM117.83 46.5956C105.755 46.5956 95.9281 37.0725 95.9281 25.3672C95.9281 13.6599 105.752 4.1348 117.83 4.1348C129.908 4.1348 139.732 13.6579 139.732 25.3672C139.73 37.0725 129.906 46.5956 117.83 46.5956Z\"\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M112.831 29.5842L108.763 25.6418L106.077 28.2439L110.144 32.1884L112.831 34.7904L129.581 18.5553L126.895 15.9512L112.831 29.5842Z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgPayPer);\nexport default __webpack_public_path__ + \"static/media/pay-per.a9517cf0.svg\";\nexport { ForwardRef as ReactComponent };","var _path, _path2, _path3, _path4, _path5, _path6, _path7;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport * as React from \"react\";\nfunction SvgMemberships(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 119 76\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M106.875 0H11.875C5.32713 0 0 5.32713 0 11.875V64.125C0 70.6729 5.32713 76 11.875 76H106.875C113.423 76 118.75 70.6729 118.75 64.125V11.875C118.75 5.32713 113.423 0 106.875 0ZM114 64.125C114 68.0533 110.803 71.25 106.875 71.25H11.875C7.94675 71.25 4.75 68.0533 4.75 64.125V11.875C4.75 7.94675 7.94675 4.75 11.875 4.75H106.875C110.803 4.75 114 7.94675 114 11.875V64.125Z\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M55.2209 29.754H45.177L42.0729 20.2041C41.4269 18.2091 39.6527 16.9219 37.5556 16.9219C35.4585 16.9219 33.6867 18.2091 33.0407 20.2041L29.9366 29.754H19.8927C17.7956 29.754 16.0239 31.0412 15.3755 33.0362C14.7295 35.0289 15.4064 37.1141 17.1021 38.3468L25.227 44.2486L22.1229 53.7985C21.4769 55.7911 22.1514 57.8764 23.8471 59.109C24.695 59.7265 25.6687 60.0352 26.6425 60.0352C27.6139 60.0352 28.5852 59.7265 29.4355 59.1114L37.558 53.2095L45.6829 59.1114C47.381 60.344 49.5731 60.344 51.2665 59.1114C52.9646 57.8787 53.6415 55.7959 52.9955 53.8009L49.8914 44.251L58.0162 38.3491C59.712 37.1165 60.3889 35.0312 59.7429 33.0386C59.0897 31.0436 57.318 29.754 55.2209 29.754ZM47.0984 40.4059C45.4264 41.6195 44.7329 43.7523 45.3694 45.7164L48.4735 55.2663L40.3486 49.3644C39.5126 48.7564 38.5341 48.4524 37.5556 48.4524C36.5771 48.4524 35.5986 48.7564 34.7626 49.362L26.6401 55.2639L29.7442 45.714C30.3831 43.7499 29.6896 41.6148 28.0176 40.4035L19.8927 34.5016H29.9366C31.9957 34.5016 33.8126 33.1835 34.4539 31.2194L37.5437 21.6386C37.5437 21.6386 37.5485 21.6457 37.5556 21.6671L40.6597 31.217C41.2986 33.1811 43.1131 34.4992 45.177 34.4992H55.2209L47.0984 40.4059Z\"\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M70.1812 55.0308C70.0625 54.9358 69.92 54.8646 69.7775 54.8171C69.6326 54.7458 69.4925 54.6983 69.3262 54.6746C68.5686 54.5083 67.735 54.7696 67.1911 55.3158C66.7589 55.7671 66.5 56.3846 66.5 57.0021C66.5 57.3108 66.5713 57.6196 66.69 57.9046C66.8088 58.1896 66.975 58.4508 67.1888 58.6883C67.6376 59.1158 68.2575 59.3771 68.875 59.3771C69.0175 59.3771 69.1837 59.3533 69.3239 59.3296C69.4901 59.3058 69.6326 59.2583 69.7751 59.1871C69.9176 59.1396 70.0601 59.0683 70.1789 58.9733C70.3214 58.9021 70.4401 58.7833 70.5351 58.6883C70.7726 58.4508 70.9389 58.2133 71.0576 57.9046C71.1787 57.6196 71.25 57.3108 71.25 57.0021C71.25 56.3846 70.9888 55.7671 70.5375 55.3158C70.4425 55.2208 70.3214 55.1258 70.1812 55.0308Z\"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M77.7812 59.375C79.0929 59.375 80.1562 58.3117 80.1562 57C80.1562 55.6883 79.0929 54.625 77.7812 54.625C76.4696 54.625 75.4062 55.6883 75.4062 57C75.4062 58.3117 76.4696 59.375 77.7812 59.375Z\"\n })), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M95.5938 59.375C96.9054 59.375 97.9688 58.3117 97.9688 57C97.9688 55.6883 96.9054 54.625 95.5938 54.625C94.2821 54.625 93.2188 55.6883 93.2188 57C93.2188 58.3117 94.2821 59.375 95.5938 59.375Z\"\n })), _path6 || (_path6 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M86.6875 59.375C87.9992 59.375 89.0625 58.3117 89.0625 57C89.0625 55.6883 87.9992 54.625 86.6875 54.625C85.3758 54.625 84.3125 55.6883 84.3125 57C84.3125 58.3117 85.3758 59.375 86.6875 59.375Z\"\n })), _path7 || (_path7 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M102.814 55.3114C102.384 55.7627 102.125 56.3802 102.125 56.9977C102.125 57.6152 102.384 58.2327 102.814 58.6839C103.051 58.8977 103.289 59.0639 103.597 59.1826C103.882 59.3014 104.191 59.3727 104.5 59.3727C105.118 59.3727 105.735 59.1114 106.186 58.6839C106.614 58.2327 106.875 57.6152 106.875 56.9977C106.875 56.3802 106.614 55.7627 106.186 55.3114C105.307 54.4327 103.716 54.4327 102.814 55.3114Z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgMemberships);\nexport default __webpack_public_path__ + \"static/media/memberships.a4371d20.svg\";\nexport { ForwardRef as ReactComponent };","var _path, _path2, _path3, _path4;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport * as React from \"react\";\nfunction SvgPromoCode(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 119 75\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M115.975 27.8047C116.777 27.8047 117.547 27.525 118.114 27.0271C118.681 26.5292 119 25.8539 119 25.1498V8.59803C118.997 6.31855 117.963 4.13324 116.127 2.52141C114.29 0.909572 111.799 0.00281012 109.202 0H9.79834C7.20064 0.00281012 4.71026 0.909572 2.8734 2.52141C1.03655 4.13324 0.00320243 6.31855 0 8.59803V25.1498C0 25.8539 0.318749 26.5292 0.886126 27.0271C1.4535 27.525 2.22303 27.8047 3.02542 27.8047C5.95576 27.8047 8.76608 28.8261 10.8381 30.6444C12.9102 32.4626 14.0743 34.9286 14.0743 37.5C14.0743 40.0714 12.9102 42.5374 10.8381 44.3556C8.76608 46.1739 5.95576 47.1954 3.02542 47.1954C2.22303 47.1954 1.4535 47.475 0.886126 47.9729C0.318749 48.4708 0 49.1461 0 49.8502V66.402C0.00320243 68.6815 1.03655 70.8668 2.8734 72.4786C4.71026 74.0904 7.20064 74.9972 9.79834 75H109.202C111.799 74.9972 114.29 74.0904 116.127 72.4786C117.963 70.8668 118.997 68.6815 119 66.402V49.8502C119 49.1461 118.681 48.4708 118.114 47.9729C117.547 47.475 116.777 47.1954 115.975 47.1954C113.044 47.1954 110.234 46.1739 108.162 44.3556C106.09 42.5374 104.926 40.0714 104.926 37.5C104.926 34.9286 106.09 32.4626 108.162 30.6444C110.234 28.8261 113.044 27.8047 115.975 27.8047ZM112.949 52.2713V66.402C112.948 67.2738 112.553 68.1097 111.85 68.7262C111.148 69.3427 110.195 69.6895 109.202 69.6904H9.79834C8.80477 69.6895 7.8522 69.3427 7.14964 68.7262C6.44708 68.1097 6.05192 67.2738 6.05085 66.402V52.2713C9.99838 51.6481 13.5708 49.8274 16.1436 47.1273C18.7164 44.4272 20.126 41.0196 20.126 37.5C20.126 33.9804 18.7164 30.5728 16.1436 27.8727C13.5708 25.1726 9.99838 23.3519 6.05085 22.7287V8.59803C6.05192 7.72617 6.44708 6.89029 7.14964 6.2738C7.8522 5.6573 8.80477 5.31055 9.79834 5.30961H109.202C110.195 5.31055 111.148 5.6573 111.85 6.2738C112.553 6.89029 112.948 7.72617 112.949 8.59803V22.7287C109.002 23.3519 105.429 25.1726 102.856 27.8727C100.284 30.5728 98.874 33.9804 98.874 37.5C98.874 41.0196 100.284 44.4272 102.856 47.1273C105.429 49.8274 109.002 51.6481 112.949 52.2713Z\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M81.8961 17.8465C81.6151 17.5998 81.2815 17.4041 80.9143 17.2706C80.5472 17.1371 80.1536 17.0684 79.7561 17.0684C79.3586 17.0684 78.9651 17.1371 78.5979 17.2706C78.2307 17.4041 77.8971 17.5998 77.6161 17.8465L37.1037 53.3961C36.5361 53.8942 36.2173 54.5696 36.2173 55.274C36.2173 55.9783 36.5361 56.6538 37.1037 57.1518C37.6713 57.6498 38.441 57.9296 39.2437 57.9296C40.0463 57.9296 40.8161 57.6498 41.3837 57.1518L81.8961 21.6022C82.1772 21.3557 82.4003 21.0629 82.5524 20.7407C82.7046 20.4185 82.7829 20.0731 82.7829 19.7244C82.7829 19.3756 82.7046 19.0302 82.5524 18.708C82.4003 18.3858 82.1772 18.0931 81.8961 17.8465Z\"\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.2851 34.4637C47.6938 34.4618 50.0032 33.6213 51.7064 32.1268C53.4096 30.6323 54.3673 28.6058 54.3695 26.4922V23.5896C54.4331 22.5091 54.2455 21.4285 53.8181 20.4137C53.3907 19.3988 52.7324 18.4709 51.8833 17.6863C51.0343 16.9018 50.0122 16.2771 48.8792 15.8502C47.7463 15.4233 46.5262 15.2031 45.2932 15.2031C44.0602 15.2031 42.8401 15.4233 41.7072 15.8502C40.5742 16.2771 39.5521 16.9018 38.7031 17.6863C37.854 18.4709 37.1958 19.3988 36.7683 20.4137C36.3409 21.4285 36.1533 22.5091 36.2169 23.5896V26.4922C36.2191 28.6033 37.1746 30.6277 38.8743 32.1218C40.574 33.6159 42.8793 34.458 45.2851 34.4637ZM42.2476 23.5896C42.21 23.221 42.2603 22.8496 42.3952 22.499C42.5302 22.1483 42.7469 21.8262 43.0315 21.5531C43.3161 21.28 43.6623 21.062 44.0483 20.9127C44.4342 20.7635 44.8513 20.6865 45.273 20.6865C45.6948 20.6865 46.1119 20.7635 46.4978 20.9127C46.8837 21.062 47.23 21.28 47.5146 21.5531C47.7992 21.8262 48.0159 22.1483 48.1508 22.499C48.2858 22.8496 48.3361 23.221 48.2985 23.5896V26.4922C48.2308 27.1553 47.8828 27.7722 47.3229 28.2215C46.763 28.6707 46.0317 28.9199 45.273 28.9199C44.5143 28.9199 43.7831 28.6707 43.2232 28.2215C42.6633 27.7722 42.3153 27.1553 42.2476 26.4922V23.5896Z\"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M73.7158 40.5312C71.3071 40.5331 68.9977 41.3736 67.2945 42.8681C65.5913 44.3627 64.6335 46.3891 64.6314 48.5027V51.4053C64.6059 52.4665 64.8221 53.5215 65.2673 54.5085C65.7125 55.4954 66.3777 56.3944 67.224 57.1528C68.0703 57.9112 69.0805 58.5138 70.1956 58.9251C71.3107 59.3365 72.5082 59.5484 73.7178 59.5484C74.9274 59.5484 76.1248 59.3365 77.2399 58.9251C78.355 58.5138 79.3653 57.9112 80.2116 57.1528C81.0578 56.3944 81.7231 55.4954 82.1682 54.5085C82.6134 53.5215 82.8296 52.4665 82.8041 51.4053V48.5027C82.802 46.3885 81.8437 44.3615 80.1396 42.8669C78.4355 41.3722 76.1251 40.5322 73.7158 40.5312ZM76.7533 51.4053C76.7682 51.7633 76.7006 52.1202 76.5548 52.4548C76.4089 52.7893 76.1877 53.0947 75.9044 53.3525C75.6211 53.6104 75.2814 53.8155 74.9057 53.9556C74.53 54.0957 74.126 54.1679 73.7178 54.1679C73.3096 54.1679 72.9055 54.0957 72.5298 53.9556C72.1541 53.8155 71.8145 53.6104 71.5311 53.3525C71.2478 53.0947 71.0266 52.7893 70.8807 52.4548C70.7349 52.1202 70.6674 51.7633 70.6823 51.4053V48.5027C70.7109 47.8131 71.0433 47.1601 71.6094 46.6811C72.1755 46.2021 72.9313 45.9344 73.7178 45.9344C74.5042 45.9344 75.26 46.2021 75.8261 46.6811C76.3923 47.1601 76.7246 47.8131 76.7533 48.5027V51.4053Z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgPromoCode);\nexport default __webpack_public_path__ + \"static/media/promo-code.2d80f9b4.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport * as React from \"react\";\nfunction SvgInventory(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 11 13\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10.1492 3.80191L8.09693 2.41924L3.44783 5.55119L5.50006 6.93387L10.1492 3.80191ZM7.55262 2.05247L5.49994 0.669795L0.850839 3.80175L2.90307 5.18442L7.55217 2.05247H7.55262ZM2.73699 5.80522C2.73335 5.80281 2.73018 5.80087 2.72692 5.79846L0.613376 4.37478V9.03632L5.19329 12.1218V7.46027L2.73704 5.80529L2.73699 5.80522ZM5.80688 7.46021V12.1217L10.3868 9.03626V4.37471L5.80688 7.46021ZM5.69542 12.9303C5.64248 12.9737 5.57435 13 5.50017 13C5.42598 13 5.35785 12.9741 5.30492 12.9303L0.159555 9.46411C0.0645854 9.41235 0 9.31198 0 9.1969V3.8022H0.00121157V3.79655C0.00205037 3.75674 0.0104383 3.71655 0.0276805 3.67868L0.0297309 3.67433L0.0309424 3.67192L0.0317812 3.67035C0.0338316 3.66636 0.0357887 3.66238 0.0378391 3.6584V3.65803C0.0510733 3.63377 0.0674763 3.61109 0.0871406 3.59072L0.0879794 3.58988L0.0904026 3.58711L0.0935713 3.58396L0.0972058 3.58081C0.11044 3.5685 0.124887 3.55729 0.140077 3.54738L5.32361 0.0553734C5.42464 -0.0150903 5.56249 -0.020644 5.67114 0.0522253L8.26625 1.80046L8.27063 1.80324L10.8404 3.53433C10.9354 3.58609 11 3.68646 11 3.80154V9.19624H10.9988C10.9988 9.29337 10.9519 9.38855 10.8645 9.44754L5.69503 12.9301L5.69542 12.9303Z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgInventory);\nexport default __webpack_public_path__ + \"static/media/inventory.33adbf8f.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport * as React from \"react\";\nfunction SvgProductGroups(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 15 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.9504 6.60651V1.63255L7.76316 0L2.66145 1.46994V4.56582L0 5.33278V10.4434L4.7105 12.1921V12.1995L9.56033 14L15 12.2481V7.2516L12.9504 6.60651ZM12.1717 6.87992L13.8883 7.41975L9.57286 8.84395L8.0295 8.21405L12.1717 6.87992ZM12.3371 6.34187L7.82172 7.70227V3.64858L12.3371 2.15827V6.34187ZM11.8387 1.80053L7.52346 3.22472L5.94888 2.58196L10.0763 1.24639L11.8387 1.80053ZM7.75311 0.515712L9.2596 0.989789L5.23718 2.29122L3.72804 1.6758L7.75311 0.515712ZM3.27703 2.03462L4.89323 2.694V3.66074L5.50898 3.92217V2.94542L7.20597 3.6384V7.66635L3.27703 6.31185V2.03462ZM2.66127 5.07939V6.12654L2.5759 6.15442L1.06659 5.53899L2.66127 5.07939ZM4.5447 11.5294L0.615578 10.1747V5.89817L2.23178 6.55719V7.52393L2.84753 7.78536V6.80862L4.5447 7.5016V11.5294ZM5.32643 11.9307V7.65384L6.94245 8.31305V9.27978L7.55821 9.54121V8.56447L9.25537 9.25745V13.2854L5.32643 11.9307ZM14.3865 11.9609L9.8713 13.3211V9.26763L14.3865 7.77732V11.9609Z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgProductGroups);\nexport default __webpack_public_path__ + \"static/media/product-groups.35d7cba7.svg\";\nexport { ForwardRef as ReactComponent };","import {\n CreditCard,\n MapOutlined,\n Devices,\n PublishedWithChanges,\n PersonOutline,\n WarningOutlined,\n Notifications,\n PlaceOutlined,\n Dashboard,\n Groups,\n Diversity1,\n} from '@mui/icons-material'\nimport { ReactComponent as PricingSetUp } from '../../../assets/images/icons/pricing-set-up.svg'\nimport { ReactComponent as PayPer } from '../../../assets/images/icons/pay-per.svg'\nimport { ReactComponent as Memberships } from '../../../assets/images/icons/memberships.svg'\nimport { ReactComponent as PromoCode } from '../../../assets/images/icons/promo-code.svg'\nimport { ReactComponent as Inventory } from '../../../assets/images/icons/inventory.svg'\nimport { ReactComponent as ProductGroup } from '../../../assets/images/icons/product-groups.svg'\nimport { SvgIcon } from '@mui/material'\nimport GroupsIcon from '@mui/icons-material/Groups'\nimport SubscriptionsIcon from '@mui/icons-material/Subscriptions'\nimport { getUserRole, isSuperTenant } from 'utils/helpers'\nimport SensorDoorOutlinedIcon from '@mui/icons-material/SensorDoorOutlined'\nimport SquareFootOutlinedIcon from '@mui/icons-material/SquareFootOutlined'\nimport ViewModuleOutlinedIcon from '@mui/icons-material/ViewModuleOutlined'\nimport CategoryIcon from '@mui/icons-material/Category'\nimport RuleIcon from '@mui/icons-material/Rule'\nimport BookmarkAddedOutlinedIcon from '@mui/icons-material/BookmarkAddedOutlined'\nimport EventAvailableOutlinedIcon from '@mui/icons-material/EventAvailableOutlined'\nimport AccountTreeOutlinedIcon from '@mui/icons-material/AccountTreeOutlined'\nimport EqualizerOutlinedIcon from '@mui/icons-material/EqualizerOutlined'\nimport FlagIcon from '@mui/icons-material/Flag'\nimport HomeRepairServiceOutlinedIcon from '@mui/icons-material/HomeRepairServiceOutlined'\nimport ApiOutlinedIcon from '@mui/icons-material/ApiOutlined'\nimport WidgetsOutlinedIcon from '@mui/icons-material/WidgetsOutlined'\nimport IntegrationInstructionsOutlinedIcon from '@mui/icons-material/IntegrationInstructionsOutlined'\n\nconst MenuItems = [\n {\n title: 'Analytics',\n featureName: 'analytics',\n icon: ,\n restriction: null,\n children: [\n {\n title: 'Dashboard',\n icon: ,\n href: '/home',\n restriction: null,\n },\n {\n title: 'Reporting',\n icon: ,\n href: '/reporting',\n restriction: null,\n },\n ],\n },\n {\n title: 'Pricing',\n featureName: 'pricing',\n icon: ,\n children: [\n {\n title: 'Pricing set-up',\n icon: (\n \n \n \n ),\n href: '/pricing-set-up',\n restriction: getUserRole() === 'viewer',\n },\n {\n title: 'Pay-per',\n icon: (\n \n \n \n ),\n href: '/pay-per',\n restriction: getUserRole() === 'viewer',\n },\n {\n title: 'Subscriptions',\n icon: (\n \n \n \n ),\n href: '/subscriptions',\n restriction: getUserRole() === 'viewer',\n },\n {\n title: 'Promo codes',\n icon: (\n \n \n \n ),\n href: '/promo-codes',\n restriction: getUserRole() === 'viewer',\n },\n ],\n },\n {\n title: 'Places',\n featureName: 'places',\n icon: ,\n restriction: getUserRole() === 'viewer',\n children: [\n {\n title: 'Locations',\n icon: ,\n href: '/locations',\n restriction: getUserRole() === 'viewer',\n },\n {\n title: 'Locker Wall',\n icon: ,\n href: '/locker-wall',\n restriction: getUserRole() === 'viewer',\n },\n ],\n },\n {\n title: 'Doors',\n featureName: 'doors',\n icon: ,\n restriction: getUserRole() === 'viewer',\n children: [\n {\n title: 'Sizes',\n icon: ,\n href: '/sizes',\n restriction: getUserRole() === 'viewer',\n },\n {\n title: 'Devices',\n icon: ,\n href: '/devices',\n restriction: getUserRole() === 'viewer',\n },\n ],\n },\n {\n title: 'Products',\n featureName: 'product',\n icon: ,\n restriction: getUserRole() === 'viewer',\n children: [\n {\n title: 'Inventory',\n icon: (\n \n \n \n ),\n href: '/inventory',\n restriction: getUserRole() === 'viewer',\n },\n {\n title: 'Products Groups',\n icon: (\n \n \n \n ),\n href: '/product-groups',\n restriction: getUserRole() === 'viewer',\n },\n {\n title: 'Conditions',\n icon: ,\n href: '/conditions',\n restriction: getUserRole() === 'viewer',\n },\n ],\n },\n {\n title: 'People',\n featureName: 'people',\n icon: ,\n restriction: getUserRole() === 'viewer',\n children: [\n {\n title: 'Users',\n icon: ,\n href: '/users',\n restriction: getUserRole() === 'viewer',\n },\n {\n title: 'Groups',\n icon: ,\n href: '/groups',\n restriction: getUserRole() === 'viewer',\n },\n {\n title: 'Team Members',\n icon: ,\n href: '/team-members',\n restriction: getUserRole() === 'viewer',\n },\n ],\n },\n {\n title: 'Events',\n featureName: 'event',\n icon: ,\n children: [\n {\n title: 'Transactions',\n icon: ,\n href: '/transactions',\n },\n {\n title: 'Reservations',\n icon: ,\n href: '/reservations',\n restriction: getUserRole() === 'viewer',\n },\n {\n title: 'Subscribers',\n icon: ,\n href: '/subscribers',\n restriction: getUserRole() === 'viewer',\n },\n ],\n },\n {\n title: 'Issues',\n featureName: 'issue',\n icon: ,\n href: '/issues',\n restriction: getUserRole() === 'viewer',\n },\n {\n title: 'Notifications',\n featureName: 'notifications',\n icon: ,\n href: '/notifications',\n restriction: getUserRole() === 'viewer',\n },\n {\n title: 'Multi-Tenant',\n featureName: 'multi_tenant',\n icon: ,\n href: '/multi-tenant',\n restriction: getUserRole() !== 'admin',\n },\n {\n title: 'Toolbox',\n featureName: 'toolbox',\n icon: ,\n // Hide access from UI only in production environment at the moment:\n restriction: process.env.REACT_APP_CURRENT_ENV === 'production',\n children: [\n {\n title: `API's`,\n icon: ,\n href: '/apis',\n restriction: getUserRole() === 'viewer',\n },\n {\n title: 'Apps & Widgets',\n icon: ,\n href: '/apps-widgets',\n restriction: getUserRole() === 'viewer',\n },\n {\n title: 'Integrations',\n icon: ,\n href: '/integrations',\n restriction: getUserRole() === 'viewer',\n },\n ],\n },\n]\n\nexport default MenuItems\n","import {\n AttachMoneyOutlined,\n DashboardOutlined,\n DevicesOutlined,\n Inventory2Outlined,\n InventoryOutlined,\n RoomOutlined,\n SquareFootOutlined,\n} from '@mui/icons-material'\n\nexport default [\n {\n step: 1,\n icon: AttachMoneyOutlined,\n path: '/pricing-set-up',\n title: 'Set default pricing',\n desc: 'This will be the default price for all transactions',\n nextPath: '/locations',\n sideBarIndex: 0,\n parentIndex: 1,\n child: true,\n position: '17.5em',\n },\n {\n step: 2,\n icon: RoomOutlined,\n path: '/locations',\n title: 'Set up a Location',\n desc: 'This location is where your lockers are set up',\n nextPath: '/sizes',\n sideBarIndex: 0,\n parentIndex: 2,\n child: true,\n position: '21em',\n },\n {\n step: 3,\n icon: SquareFootOutlined,\n path: '/sizes',\n title: 'Create locker sizes',\n desc: 'Add your locker dimensions here',\n nextPath: '/devices',\n sideBarIndex: 0,\n parentIndex: 3,\n child: true,\n position: '25em',\n },\n {\n step: 4,\n icon: DevicesOutlined,\n path: '/devices',\n title: 'Set devices',\n desc: 'Add device individually or bulk upload all devices at once',\n nextPath: '/inventory',\n sideBarIndex: 1,\n parentIndex: 3,\n child: true,\n position: '27.5em',\n },\n {\n step: 5,\n icon: InventoryOutlined,\n path: '/inventory',\n title: 'Add inventory',\n desc: 'A great way to manage your inventory for asset and vending lockers',\n nextPath: '/product-groups',\n sideBarIndex: 0,\n parentIndex: 4,\n child: true,\n position: '28em',\n },\n {\n step: 6,\n icon: Inventory2Outlined,\n path: '/product-groups',\n title: 'Create Product Groups',\n desc: 'Group inventory items together for easy access',\n nextPath: '/locker-wall',\n sideBarIndex: 1,\n parentIndex: 4,\n child: true,\n position: '31em',\n },\n {\n step: 7,\n icon: DashboardOutlined,\n path: '/locker-wall',\n title: 'Add locker wall',\n desc: 'A visual representation to manage your lockers',\n nextPath: false,\n sideBarIndex: 2,\n parentIndex: 2,\n child: true,\n position: '24em',\n },\n]\n","import { ArrowForwardOutlined, Circle } from '@mui/icons-material'\nimport {\n Box,\n Card,\n CardContent,\n CardHeader,\n Typography,\n useTheme,\n} from '@mui/material'\nimport { useNavigate } from 'react-router'\nimport GettingStartedItems from './GettingStartedItems'\n\ninterface IGettingStartedItem {\n icon: any\n path: string\n title: string\n desc: string\n nextPath: string | boolean\n sideBarIndex: number\n parentIndex: number\n child: boolean\n position: string | number\n step: number\n}\n\nconst TourItem = ({\n tour,\n onClose,\n}: {\n tour: IGettingStartedItem\n onClose: () => void\n}) => {\n const navigate = useNavigate()\n const theme = useTheme()\n return (\n <>\n \n \n \n \n Step {tour.step}:\n \n\n \n \n \n \n\n {tour.title}\n\n {tour.desc}\n \n\n \n {tour.nextPath ? (\n <>\n \n Skip\n \n\n \n {GettingStartedItems.map((item, index) => (\n navigate(`${item.path}?tour=1`)}\n sx={{\n cursor: 'pointer',\n color:\n item.step == tour.step\n ? 'primary.main'\n : 'text.secondary',\n fontSize: '8pt',\n\n ':not(:last-child)': {\n marginRight: '5px',\n },\n }}\n />\n ))}\n \n\n navigate(`${tour.nextPath}?tour=1`)}\n sx={{\n cursor: 'pointer',\n color: 'primary.main',\n fontSize: '2em',\n }}\n />\n \n ) : (\n \n Finish\n \n )}\n \n \n \n \n \n )\n}\n\nexport default TourItem\n","import { ORG_FEATURE_PAGES } from 'constants/pages'\nimport { useEffect, useState } from 'react'\nimport { organizationApi } from 'resources'\nimport { getErrorMessage } from 'utils/helpers'\n\nconst useOrgFeaturePages = () => {\n const [orgFeaturePages, setOrgFeaturePages] = useState(null)\n const [isLoadingFeaturePages, setIsLoadingFeaturePages] =\n useState(false)\n const { getSelfOrg } = organizationApi()\n\n const fetchOrgFeaturePagesTypes = async (): Promise => {\n try {\n setIsLoadingFeaturePages(true)\n const selfOrg = await getSelfOrg()\n setOrgFeaturePages(selfOrg)\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n } finally {\n setIsLoadingFeaturePages(false)\n }\n }\n\n useEffect(() => {\n fetchOrgFeaturePagesTypes()\n }, [])\n\n return {\n orgFeaturePages,\n isLoadingFeaturePages,\n }\n}\n\nexport default useOrgFeaturePages\n","import { useState, Fragment, useEffect } from 'react'\nimport { useLocation, useNavigate } from 'react-router'\nimport { NavLink, useSearchParams } from 'react-router-dom'\nimport PropTypes from 'prop-types'\nimport {\n Box,\n Drawer,\n useMediaQuery,\n List,\n ListItem,\n Collapse,\n ListItemIcon,\n ListItemText,\n Link,\n Typography,\n Skeleton,\n} from '@mui/material'\nimport { SidebarWidth } from '../../../assets/global/ThemeVariable'\nimport MenuItems from './SideMenuItems'\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore'\nimport ExpandLessIcon from '@mui/icons-material/ExpandLess'\n\nimport GettingStartedItems from './GettingStartedItems'\nimport TourItem from './TourItem'\nimport { settingsApi } from 'resources'\nimport { Image } from 'components'\nimport useOrgFeaturePages from 'hooks/useOrgFeaturePages'\n\nconst Sidebar = ({ isMobileSidebarOpen, onSidebarClose, isSidebarOpen }) => {\n const [open, setOpen] = useState(true)\n const [logo, setLogo] = useState('')\n const [currentTour, setCurrentTour] = useState(null)\n const navigate = useNavigate()\n\n const { pathname } = useLocation()\n const { getWhiteLabel } = settingsApi()\n\n const [searchParams, setSearchParams] = useSearchParams()\n const { orgFeaturePages, isLoadingFeaturePages } = useOrgFeaturePages()\n\n const pathDirect = pathname\n const pathWithoutLastPart = pathname.slice(0, pathname.lastIndexOf('/'))\n const lgUp = useMediaQuery((theme) => theme.breakpoints.up('lg'))\n\n const handleClick = (index) => {\n if (open === index) {\n setOpen((prevopen) => !prevopen)\n } else {\n setOpen(index)\n }\n }\n\n const handleTourOnClose = () => {\n setCurrentTour(null)\n\n navigate(pathname, { replace: true })\n }\n\n const isFeaturePageEnabled = (featureName) => {\n if (!orgFeaturePages) return\n\n // IMPORTANT: ################\n //\n // At the moment Brian only wants a certain amount of features to be toggable.\n // If the property processed in this function is not present in the payload\n // of useOrgFeaturePages, it means the sidebar item is not supported to be toggled on or off by the BE.\n //\n // Return \"true\" if the property is not supported by the BE:\n if (!orgFeaturePages.hasOwnProperty(featureName)) return true\n // #################\n\n return orgFeaturePages[featureName]\n }\n\n useEffect(() => {\n if (searchParams.get('tour') !== '1') return setCurrentTour(null)\n\n const tourFound = GettingStartedItems.find((item) => item.path === pathname)\n\n if (!tourFound) return setCurrentTour(null)\n\n setCurrentTour(tourFound)\n if (tourFound.child) setOpen(tourFound.parentIndex)\n else setOpen(tourFound.parentIndex || tourFound.sideBarIndex)\n }, [searchParams, pathname])\n\n useEffect(() => {\n const fetchLogo = async () => {\n try {\n const whiteLabelData = await getWhiteLabel()\n setLogo(whiteLabelData?.app_logo)\n } catch (error) {\n // tricky lad:\n // displayMessage(`${(error as Error).message}`, 'error')\n }\n }\n fetchLogo()\n }, [])\n\n const SidebarContent = (\n \n {logo ? (\n \n \n \n \n \n Powered by Koloni\n \n \n ) : (\n \n \n \n )}\n\n \n {isLoadingFeaturePages ? (\n \n {MenuItems.map((item, index) => {\n if (item.children) {\n return (\n \n )\n }\n })}\n \n ) : (\n <>\n \n {MenuItems.map((item, index) => {\n if (item.children) {\n return (\n \n {!item.restriction &&\n isFeaturePageEnabled(item.featureName) && (\n <>\n handleClick(index)}\n selected={pathWithoutLastPart === item.href}\n sx={{\n mb: 1,\n ...(pathWithoutLastPart === item.href && {\n color: 'white',\n backgroundColor: (theme) =>\n `${theme.palette.primary.main}!important`,\n }),\n }}\n >\n \n {item.icon}\n \n {item.title}\n \n {index === open ? (\n \n ) : (\n \n )}\n \n \n \n \n {item.children.map((child, childrenIndex) => (\n <>\n \n {!child.restriction && (\n \n \n \n `${theme.palette.primary.main}!important`,\n ...(pathDirect ===\n item.href && {\n color: 'white',\n }),\n },\n minWidth: '30px',\n }}\n >\n {child.icon}\n \n \n {child.title}\n \n \n \n )}\n \n \n ))}\n \n \n \n )}\n \n )\n // {/********If Sub No Menu**********/}\n } else {\n return (\n \n {!item.restriction &&\n isFeaturePageEnabled(item.featureName) && (\n handleClick(index)}\n button\n component={NavLink}\n to={item.href}\n selected={pathDirect === item.href}\n sx={{\n mb: 1,\n ...(pathDirect === item.href && {\n color: 'white',\n backgroundColor: (theme) =>\n `${theme.palette.primary.main}!important`,\n }),\n }}\n >\n \n {item.icon}\n \n \n {item.title}\n \n \n )}\n \n )\n }\n })}\n \n \n )}\n \n \n )\n\n if (lgUp) {\n return (\n <>\n \n {SidebarContent}\n \n\n {currentTour && (\n \n )}\n \n )\n }\n\n return (\n \n {SidebarContent}\n \n )\n}\n\nSidebar.propTypes = {\n isMobileSidebarOpen: PropTypes.bool,\n onSidebarClose: PropTypes.func,\n isSidebarOpen: PropTypes.bool,\n}\n\nexport default Sidebar\n","export const RESOURCES_DOCS_LINK =\n 'https://www.notion.so/koloni-resources/f8e56af57a664540b1e96d12bea03067?v=b76b51cb59d043ad83663903f27a4f13'\n\nexport const TRAINING_CENTER_LINK =\n 'https://www.notion.so/koloni-resources/Training-9c4bd0607dd84928b428c3239be41356'\n\nexport const SEND_FEEDBACK_LINK = 'https://forms.gle/mvJGrp1GQHZvxbKw7'\n\nexport const WHATS_NEW_LINK =\n 'https://www.notion.so/koloni-resources/What-s-New-b41268708bd846648198c51cad245515'\n\nexport const API_DOCS_LINK =\n process.env.REACT_APP_CURRENT_ENV === 'production'\n ? 'https://api.koloni.io'\n : `https://${process.env.REACT_APP_CURRENT_ENV}.api.koloni.io`\n","import {\n CodeOutlined,\n HelpOutline,\n InterestsOutlined,\n ListRounded,\n MenuBookOutlined,\n MonitorOutlined,\n QuestionAnswerOutlined,\n StarOutlineOutlined,\n} from '@mui/icons-material'\nimport {\n Accordion,\n AccordionDetails,\n AccordionSummary,\n Box,\n Link,\n List,\n ListItem,\n ListItemButton,\n ListItemIcon,\n ListItemText,\n TextField,\n Typography,\n} from '@mui/material'\nimport { SideBar } from 'components'\nimport {\n API_DOCS_LINK,\n RESOURCES_DOCS_LINK,\n TRAINING_CENTER_LINK,\n WHATS_NEW_LINK,\n} from '../../../constants/help.docs'\nimport { useMemo } from 'react'\nimport { useNavigate } from 'react-router'\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore'\nimport { openDoc } from 'utils/helpers'\nimport { PROJECT_VERSION } from 'constants/config'\n\ninterface IHelpItems {\n isOpen: boolean\n onClose: () => void\n setFeedbackFormOpen: React.Dispatch>\n}\n\nconst HelpItems = ({ isOpen, onClose, setFeedbackFormOpen }: IHelpItems) => {\n const navigate = useNavigate()\n\n const handleGettingStartedClick = () => {\n // Initiate interactive tour\n navigate('/pricing-set-up?tour=1')\n onClose()\n }\n\n const helpItems = useMemo(\n () => [\n {\n text: 'Getting Started',\n onClick: handleGettingStartedClick,\n icon: ,\n },\n {\n text: 'Resources',\n onClick: () => openDoc(RESOURCES_DOCS_LINK),\n icon: ,\n },\n {\n text: 'Training Center',\n onClick: () => openDoc(TRAINING_CENTER_LINK),\n icon: ,\n },\n {\n text: 'API Documentation',\n render: (\n \n }\n aria-controls=\"panel1a-content\"\n id=\"panel1a-header\"\n >\n \n \n \n API Documentation\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n ),\n },\n {\n text: 'FAQ',\n icon: ,\n onClick: () => {},\n },\n {\n text: 'Send Feedback',\n icon: ,\n onClick: () => setFeedbackFormOpen(true),\n },\n {\n text: `What's new?`,\n icon: ,\n onClick: () => openDoc(WHATS_NEW_LINK),\n },\n ],\n [],\n )\n\n return (\n \n \n \n \n Help\n \n \n\n \n\n \n How may we help?\n \n\n \n {helpItems.map((item) =>\n item.render ? (\n item.render\n ) : (\n \n \n {item.icon}\n \n \n \n ),\n )}\n \n\n \n version {PROJECT_VERSION}\n \n \n \n )\n}\n\nexport default HelpItems\n","export const DEPARTMENTS = [\n { label: 'Sales', value: 'Sales' },\n { label: 'Customer Support', value: 'Customer Support' },\n { label: 'Finance', value: 'Finance' },\n]\n","import { IFeedback } from 'models/Feedback'\nimport { useApiRequest } from 'utils'\nimport { getErrorMessage } from 'utils/helpers'\n\nconst feedbackApi = () => {\n const { fetchPartnerEndpoint } = useApiRequest()\n\n const create = async (feedback: FormData): Promise => {\n const endpoint = `feedback`\n const method = 'POST'\n try {\n const response = await fetchPartnerEndpoint({\n endpoint,\n method,\n body: feedback,\n })\n if (!response.ok) {\n const result = await response.json()\n throw result.detail\n }\n return response.json()\n } catch (error) {\n throw new Error('Something went wrong! ' + getErrorMessage(error))\n }\n }\n\n return {\n create,\n }\n}\nexport default feedbackApi\n","import {\n Autocomplete,\n Box,\n Checkbox,\n TextField as MUITextField,\n Typography,\n} from '@mui/material'\nimport {\n Form,\n Image,\n NotificationDialog,\n SelectField,\n SideBar,\n TextField,\n} from 'components'\nimport { FormActions } from 'components/Form/components/FormActions'\nimport { FormWrapper } from 'components/Form/components/FormWrapper'\nimport useLoadingState from 'hooks/useLoadingState'\nimport { ChangeEvent, useEffect, useState } from 'react'\nimport { FormProvider, SubmitHandler, useForm } from 'react-hook-form'\nimport CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'\nimport CheckBoxIcon from '@mui/icons-material/CheckBox'\nimport { deviceApi, locationApi, userApi } from 'resources'\nimport { IDevice, ILocation, IUser } from 'models'\nimport useDialog from 'hooks/useDialog'\nimport { DEPARTMENTS } from './constants'\nimport ImageUploader from 'components/ImageUploader/ImageUploader'\nimport { IFeedback } from 'models/Feedback'\nimport { SUCCESS_DIALOG } from '../../../constants'\nimport { feedbackApi } from 'resources/feedback'\nimport { DropdownOption } from 'types'\n\ninterface IFeedbackForm {\n isOpen: boolean\n onClose: () => void\n}\n\nconst FeedbackForm = ({ isOpen, onClose }: IFeedbackForm) => {\n const [images, setImages] = useState([])\n const [imagesPreviews, setImagesPreviews] = useState([])\n const [locationsOptions, setLocationsOptions] = useState([])\n const [devicesOptions, setDevicesOptions] = useState([])\n const [usersOptions, setUsersOptions] = useState([])\n const [locationId, setLocationId] = useState('')\n const [deviceId, setDeviceId] = useState('')\n const [userId, setUserId] = useState('')\n\n const methods = useForm()\n\n const { dialog, displayMessage, closeDialog } = useDialog()\n\n const { loading, setLoading } = useLoadingState()\n const { getMany: getLocations } = locationApi()\n const { getMany: getDevices } = deviceApi()\n const { getMany: getUsers } = userApi()\n const { create } = feedbackApi()\n\n const fetchLocations = async (): Promise => {\n try {\n const locations = await getLocations(1, 10000)\n return locations.items\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n return []\n }\n }\n\n const fetchDevices = async (): Promise => {\n try {\n const devices = await getDevices(1, 10000)\n return devices.items\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n return []\n }\n }\n\n const fetchUsers = async (): Promise => {\n try {\n const users = await getUsers(1, 10000)\n return users.items\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n return []\n }\n }\n\n const buildLocationsOptions = (locations: ILocation[]) => {\n if (locations.length > 0) {\n const autoCompleteOptions = locations.map((location) => ({\n label: location.name,\n value: location.id,\n }))\n const sortedOptions = autoCompleteOptions.sort((a, b) => {\n if (a.label < b.label) {\n return -1\n }\n if (a.label > b.label) {\n return 1\n }\n return 0\n })\n setLocationsOptions(sortedOptions)\n }\n }\n\n const buildDevicesOptions = (devices: IDevice[]) => {\n if (devices.length > 0) {\n const autoCompleteOptions = devices.map((device) => ({\n label: device.name,\n value: device.id,\n }))\n const sortedOptions = autoCompleteOptions.sort((a, b) => {\n if (a.label < b.label) {\n return -1\n }\n if (a.label > b.label) {\n return 1\n }\n return 0\n })\n setDevicesOptions(sortedOptions)\n }\n }\n\n const buildUsersOptions = (users: IUser[]) => {\n if (users.length > 0) {\n const autoCompleteOptions = users.map((user) => ({\n label: `${user.name || ''} (${user.email || user.phone_number})`,\n value: user.id,\n }))\n const sortedOptions = autoCompleteOptions.sort((a, b) => {\n if (a.label < b.label) {\n return -1\n }\n if (a.label > b.label) {\n return 1\n }\n return 0\n })\n setUsersOptions(sortedOptions)\n }\n }\n\n const handleImageUpload = (event: ChangeEvent): void => {\n const files: FileList | null = event?.target?.files\n\n if (files) {\n const fileArray = Array.from(files)\n\n fileArray.forEach((file) => {\n const isImage = file && /^image\\//.test(file.type)\n if (!isImage) {\n displayMessage?.(\n 'One or more of the selected files are not images. Please try again.',\n 'success',\n )\n return\n }\n const reader = new FileReader()\n reader.readAsDataURL(file)\n\n reader.onload = (e) => {\n if (e.target && e.target.result) {\n const preview = e.target.result as string\n setImagesPreviews((previousValue) => [...previousValue, preview])\n }\n }\n })\n\n setImages([...images, ...fileArray])\n }\n }\n\n const handleLocationSelection = (event: React.SyntheticEvent, value: any) => {\n setLocationId(value.label)\n }\n\n const handleDeviceSelection = (event: React.SyntheticEvent, value: any) => {\n setDeviceId(value.label)\n }\n\n const handleUserSelection = (event: React.SyntheticEvent, value: any) => {\n setUserId(value.label)\n }\n\n const onSubmit: SubmitHandler = async (feedback: IFeedback) => {\n try {\n setLoading(true)\n\n const payload = new FormData()\n\n payload.append('location', locationId)\n payload.append('device', deviceId)\n payload.append('member', userId)\n payload.append('department', feedback.department)\n payload.append('description', feedback.description)\n payload.append('notes', feedback.notes)\n\n if (images.length > 0) {\n images.forEach((image) => {\n payload.append('images', image)\n })\n }\n\n await create(payload)\n\n displayMessage('We will review it as soon as possible.', 'success', {\n titleColor: SUCCESS_DIALOG,\n titleText: 'Thanks for your Feedback!',\n })\n\n methods.reset()\n } catch (error) {\n displayMessage(`${(error as Error).message}`, 'error')\n } finally {\n setLoading(false)\n methods.reset()\n setImages([])\n }\n }\n\n useEffect(() => {\n const fetch = async () => {\n const locations = await fetchLocations()\n buildLocationsOptions(locations)\n\n const devices = await fetchDevices()\n buildDevicesOptions(devices)\n\n const users = await fetchUsers()\n buildUsersOptions(users)\n }\n fetch()\n }, [])\n\n const helpText = `Click the button below to upload the images\n related to the issue. You can upload one or\n multiple images.`\n\n return (\n {\n setImages([])\n setImagesPreviews([])\n onClose\n }}\n >\n \n
    \n \n {imagesPreviews.length > 0 && (\n <>\n Attached images\n \n {imagesPreviews.map((picture, index) => (\n \n ))}\n \n \n )}\n\n \n\n \n {`${imagesPreviews.length} image${\n imagesPreviews.length === 1 ? '' : 's'\n } selected`}\n \n option.label}\n renderOption={(props, option, { selected }) => (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n {option.label}\n
  • \n )}\n onChange={handleLocationSelection}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n loading={locationsOptions.length === 0}\n />\n\n option.label}\n renderOption={(props, option, { selected }) => (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n {option.label}\n
  • \n )}\n onChange={handleDeviceSelection}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n loading={devicesOptions.length === 0}\n />\n\n option.label}\n renderOption={(props, option, { selected }) => (\n
  • \n }\n checkedIcon={}\n style={{ marginRight: 8 }}\n checked={selected}\n />\n {option.label}\n
  • \n )}\n onChange={handleUserSelection}\n style={{ width: '100%' }}\n renderInput={(params) => (\n \n )}\n loading={usersOptions.length === 0}\n />\n\n \n\n \n\n \n\n \n
    \n
    \n
    \n {\n closeDialog()\n onClose()\n }}\n message={dialog.message}\n customTitle={dialog.customTitle}\n />\n \n )\n}\n\nexport default FeedbackForm\n","import { useMemo, useState } from 'react'\nimport { useLocation } from 'react-router-dom'\nimport {\n Menu as MenuIcon,\n KeyboardArrowDown,\n Person,\n QuestionMark,\n} from '@mui/icons-material'\nimport {\n AppBar,\n Box,\n IconButton,\n Toolbar,\n Menu,\n Typography,\n Button,\n CircularProgress,\n Link,\n Tooltip,\n useTheme,\n} from '@mui/material'\nimport { PAGES } from '../../../constants'\nimport PropTypes from 'prop-types'\nimport { ProfileDropdown } from 'components'\nimport HelpItems from './HelpItems'\nimport FeedbackForm from './FeedbackForm'\nimport DarkModeIcon from '@mui/icons-material/DarkMode'\nimport LightModeIcon from '@mui/icons-material/LightMode'\nimport { useDispatch } from 'react-redux'\nimport { setDarkMode } from 'redux/customizer/Action'\nimport { useUserSession } from 'hooks/useUserSession'\n\nconst Header = ({ sx, customClass, toggleSidebar, toggleMobileSidebar }) => {\n const [anchorEl4, setAnchorEl4] = useState(null)\n const [helpSideBarOpen, setHelpSideBarOpen] = useState(false)\n const [feedbackFormOpen, setFeedbackFormOpen] = useState(false)\n\n const { session } = useUserSession()\n\n const location = useLocation()\n const dispatch = useDispatch()\n const theme = useTheme()\n\n const pageTitle = useMemo(() => PAGES[location.pathname], [location])\n\n const handleClick4 = (event) => {\n setAnchorEl4(event.currentTarget)\n }\n\n const handleClose4 = () => {\n setAnchorEl4(null)\n }\n\n const handleLogout = () => {\n localStorage.clear()\n window.location.href = '/auth/login'\n }\n\n const toggleHelpSideBar = () => {\n setHelpSideBarOpen((previousValue) => !previousValue)\n }\n\n const handleThemeChange = () => {\n dispatch(setDarkMode(theme.palette.mode === 'light' ? 'dark' : 'light'))\n localStorage.setItem(\n 'themeMode',\n theme.palette.mode === 'light' ? 'dark' : 'light',\n )\n }\n\n return (\n <>\n \n \n \n \n \n\n \n \n \n {/* ------------ End Menu icon ------------- */}\n {pageTitle}\n \n \n {theme.palette.mode === 'light' ? (\n \n ) : (\n \n )}\n \n \n }\n variant=\"text\"\n sx={{\n color: '#949db2',\n }}\n onClick={toggleHelpSideBar}\n >\n Help\n \n {/* ------------------------------------------- */}\n {/* Profile Dropdown */}\n {/* ------------------------------------------- */}\n {!session.email && (\n \n \n \n )}\n {session.email && (\n \n \n \n \n Hi,{' '}\n {session.email.includes('helpdesk') && !session.name\n ? 'Helpdesk'\n : session.name}\n \n \n \n \n )}\n \n \n \n \n Logout\n \n \n \n \n \n\n \n\n setFeedbackFormOpen(false)}\n />\n \n )\n}\n\nHeader.propTypes = {\n sx: PropTypes.object,\n customClass: PropTypes.string,\n toggleSidebar: PropTypes.func,\n toggleMobileSidebar: PropTypes.func,\n}\n\nexport default Header\n","import { Box, Typography } from '@mui/material'\n\nconst Footer = () => {\n const currentYear = new Date().getFullYear()\n return (\n \n © {currentYear} All rights reserved by Koloni Inc\n \n )\n}\n\nexport default Footer\n","import { useState } from 'react'\nimport { experimentalStyled, useMediaQuery, Box, Theme } from '@mui/material'\nimport { Outlet } from 'react-router-dom'\nimport { useSelector, RootStateOrAny } from 'react-redux'\nimport Sidebar from './sidebar/Sidebar'\nimport Header from './header/Header'\nimport Footer from './footer/Footer'\nimport { TopbarHeight } from '../../assets/global/ThemeVariable'\n\nconst MainWrapper = experimentalStyled('div')(() => ({\n display: 'flex',\n minHeight: '100vh',\n overflow: 'hidden',\n width: '100%',\n}))\nconst PageWrapper = experimentalStyled('div')(({ theme }) => ({\n display: 'flex',\n flex: '1 1 auto',\n overflow: 'hidden',\n width: '100%',\n\n backgroundColor: theme.palette.background.default,\n [theme.breakpoints.up('lg')]: {\n paddingTop: TopbarHeight,\n },\n [theme.breakpoints.down('lg')]: {\n paddingTop: '64px',\n },\n}))\n\nconst FullLayout = () => {\n const [isSidebarOpen, setSidebarOpen] = useState(true)\n const [isMobileSidebarOpen, setMobileSidebarOpen] = useState(false)\n const customizer = useSelector(\n (state: RootStateOrAny) => state.CustomizerReducer,\n )\n const lgUp = useMediaQuery((theme: Theme) => theme.breakpoints.up('lg'))\n return (\n \n setSidebarOpen(!isSidebarOpen)}\n toggleMobileSidebar={() => setMobileSidebarOpen(true)}\n />\n\n setMobileSidebarOpen(false)}\n />\n\n \n \n \n \n \n