@erpsquad/common 1.10.1-test → 1.10.2-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Tooltip-0Msd6gJs.js → Tooltip-BWIywPIG.js} +2 -2
- package/dist/{Tooltip-0Msd6gJs.js.map → Tooltip-BWIywPIG.js.map} +1 -1
- package/dist/{Tooltip-DBg9E0nY.esm.js → Tooltip-BuKMQR27.esm.js} +5 -5
- package/dist/{Tooltip-DBg9E0nY.esm.js.map → Tooltip-BuKMQR27.esm.js.map} +1 -1
- package/dist/{android-12-switch-C2yR_ny0.js → android-12-switch-Cwoy0lqC.js} +2 -2
- package/dist/{android-12-switch-C2yR_ny0.js.map → android-12-switch-Cwoy0lqC.js.map} +1 -1
- package/dist/{android-12-switch-CFHHRoXl.esm.js → android-12-switch-DIRd6Hz1.esm.js} +10 -10
- package/dist/{android-12-switch-CFHHRoXl.esm.js.map → android-12-switch-DIRd6Hz1.esm.js.map} +1 -1
- package/dist/{apiHelper-C7xLzw2l.esm.js → apiHelper-BLkPhudw.esm.js} +5 -5
- package/dist/{apiHelper-C7xLzw2l.esm.js.map → apiHelper-BLkPhudw.esm.js.map} +1 -1
- package/dist/{apiHelper-uNnzNGPt.js → apiHelper-DurABKEn.js} +2 -2
- package/dist/{apiHelper-uNnzNGPt.js.map → apiHelper-DurABKEn.js.map} +1 -1
- package/dist/{arrow-up-RDVMEaNg.esm.js → arrow-up-BYufujcs.esm.js} +47 -48
- package/dist/arrow-up-BYufujcs.esm.js.map +1 -0
- package/dist/{arrow-up-CZCTjL2a.js → arrow-up-u2i6ArLB.js} +47 -47
- package/dist/arrow-up-u2i6ArLB.js.map +1 -0
- package/dist/components/icons/create-custom-icon.d.ts +16 -0
- package/dist/components/index.esm.js +14 -14
- package/dist/components/index.js +1 -1
- package/dist/contexts/index.esm.js +3 -3
- package/dist/contexts/index.js +1 -1
- package/dist/{dashboard-BU3Ivh-m.esm.js → dashboard-BHs900IA.esm.js} +3 -3
- package/dist/dashboard-BHs900IA.esm.js.map +1 -0
- package/dist/{dashboard-DC1wsH2n.js → dashboard-ecHBMV8C.js} +3 -3
- package/dist/dashboard-ecHBMV8C.js.map +1 -0
- package/dist/{default-data-DMRyIpbS.js → default-data-kq9UR-LT.js} +2 -2
- package/dist/{default-data-DMRyIpbS.js.map → default-data-kq9UR-LT.js.map} +1 -1
- package/dist/{default-data-DZ7_2K9V.esm.js → default-data-rqQOC7ed.esm.js} +10 -10
- package/dist/{default-data-DZ7_2K9V.esm.js.map → default-data-rqQOC7ed.esm.js.map} +1 -1
- package/dist/{document-MTw-RQlt.js → document-Dat2mYKY.js} +7 -7
- package/dist/document-Dat2mYKY.js.map +1 -0
- package/dist/{document-jQDTo49w.esm.js → document-Dc0e4Wgt.esm.js} +3 -4
- package/dist/document-Dc0e4Wgt.esm.js.map +1 -0
- package/dist/{form-builder-deconversion-DUwJpbWi.js → form-builder-deconversion-Bt6_FHty.js} +2 -2
- package/dist/{form-builder-deconversion-DUwJpbWi.js.map → form-builder-deconversion-Bt6_FHty.js.map} +1 -1
- package/dist/{form-builder-deconversion-BmnMG6UA.esm.js → form-builder-deconversion-CjCls618.esm.js} +3 -3
- package/dist/{form-builder-deconversion-BmnMG6UA.esm.js.map → form-builder-deconversion-CjCls618.esm.js.map} +1 -1
- package/dist/{fullScreen-bLbPf_Sx.esm.js → fullScreen-B7NBNLnc.esm.js} +2 -2
- package/dist/{fullScreen-bLbPf_Sx.esm.js.map → fullScreen-B7NBNLnc.esm.js.map} +1 -1
- package/dist/{fullScreen-z8Ci7IBM.js → fullScreen-Bk29OQHQ.js} +2 -2
- package/dist/{fullScreen-z8Ci7IBM.js.map → fullScreen-Bk29OQHQ.js.map} +1 -1
- package/dist/hooks/index.esm.js +5 -5
- package/dist/hooks/index.js +1 -1
- package/dist/icons/index.esm.js +7 -7
- package/dist/icons/index.js +1 -1
- package/dist/{index-abVANnYO.esm.js → index-CasNCevI.esm.js} +3 -3
- package/dist/{index-abVANnYO.esm.js.map → index-CasNCevI.esm.js.map} +1 -1
- package/dist/{index-C2m4EKMw.js → index-D6O6Gc88.js} +2 -2
- package/dist/{index-C2m4EKMw.js.map → index-D6O6Gc88.js.map} +1 -1
- package/dist/index.esm.js +19 -19
- package/dist/index.js +1 -1
- package/dist/{languageContext-z0EIAM7m.esm.js → languageContext-BqGnL8Sv.esm.js} +2 -2
- package/dist/{languageContext-z0EIAM7m.esm.js.map → languageContext-BqGnL8Sv.esm.js.map} +1 -1
- package/dist/{languageContext-7DprjT6b.js → languageContext-hAPMY56Y.js} +2 -2
- package/dist/{languageContext-7DprjT6b.js.map → languageContext-hAPMY56Y.js.map} +1 -1
- package/dist/layout/index.esm.js +4 -4
- package/dist/layout/index.js +1 -1
- package/dist/{migration-utils-DRGPH-n4.js → migration-utils-Bh98qTkC.js} +2 -2
- package/dist/{migration-utils-DRGPH-n4.js.map → migration-utils-Bh98qTkC.js.map} +1 -1
- package/dist/{migration-utils-BzRKOUW0.esm.js → migration-utils-byCdwgkF.esm.js} +2 -2
- package/dist/{migration-utils-BzRKOUW0.esm.js.map → migration-utils-byCdwgkF.esm.js.map} +1 -1
- package/dist/notification-BsWK2s3n.js +7 -0
- package/dist/notification-BsWK2s3n.js.map +1 -0
- package/dist/{notification-BNeR5Dyl.esm.js → notification-Dbo3l5Vw.esm.js} +27 -5
- package/dist/notification-Dbo3l5Vw.esm.js.map +1 -0
- package/dist/{sidebar-C6-wzTTF.esm.js → sidebar-DTv1DxTn.esm.js} +5 -5
- package/dist/{sidebar-C6-wzTTF.esm.js.map → sidebar-DTv1DxTn.esm.js.map} +1 -1
- package/dist/{sidebar-BT_zTOCc.js → sidebar-U2vsFarM.js} +2 -2
- package/dist/{sidebar-BT_zTOCc.js.map → sidebar-U2vsFarM.js.map} +1 -1
- package/dist/src/components/icons/create-custom-icon.d.ts +16 -0
- package/dist/{tick-CcyPwRXL.esm.js → tick-Cogsd5aG.esm.js} +8 -9
- package/dist/tick-Cogsd5aG.esm.js.map +1 -0
- package/dist/{tick-Ct-Ir-1S.js → tick-XKXM5oTD.js} +22 -22
- package/dist/tick-XKXM5oTD.js.map +1 -0
- package/dist/{toggle-switch-FMTO6609.esm.js → toggle-switch-Day9cZg5.esm.js} +3 -4
- package/dist/toggle-switch-Day9cZg5.esm.js.map +1 -0
- package/dist/{toggle-switch-BghzgMG8.js → toggle-switch-P3dX3iMp.js} +5 -5
- package/dist/toggle-switch-P3dX3iMp.js.map +1 -0
- package/dist/{trash-BTwzTBYO.esm.js → trash-cWyby5W5.esm.js} +36 -37
- package/dist/trash-cWyby5W5.esm.js.map +1 -0
- package/dist/{trash-5CZCQE4a.js → trash-iM5WzuPQ.js} +124 -124
- package/dist/trash-iM5WzuPQ.js.map +1 -0
- package/dist/{uom-field-wrapper-6F9MCc0-.js → uom-field-wrapper-D4vafbb3.js} +2 -2
- package/dist/{uom-field-wrapper-6F9MCc0-.js.map → uom-field-wrapper-D4vafbb3.js.map} +1 -1
- package/dist/{uom-field-wrapper-3usHZZm1.esm.js → uom-field-wrapper-DHzy94__.esm.js} +12 -12
- package/dist/{uom-field-wrapper-3usHZZm1.esm.js.map → uom-field-wrapper-DHzy94__.esm.js.map} +1 -1
- package/dist/{useAccountSetting-ChWt7JwC.js → useAccountSetting-CNoWakIN.js} +2 -2
- package/dist/{useAccountSetting-ChWt7JwC.js.map → useAccountSetting-CNoWakIN.js.map} +1 -1
- package/dist/{useAccountSetting-BEKGFdbo.esm.js → useAccountSetting-D2gUGGca.esm.js} +2 -2
- package/dist/{useAccountSetting-BEKGFdbo.esm.js.map → useAccountSetting-D2gUGGca.esm.js.map} +1 -1
- package/dist/{useAuth-C18aZa1n.esm.js → useAuth-Bvid1bpz.esm.js} +2 -2
- package/dist/{useAuth-C18aZa1n.esm.js.map → useAuth-Bvid1bpz.esm.js.map} +1 -1
- package/dist/{useAuth-Dpe5kDa6.js → useAuth-CVokk6Ra.js} +2 -2
- package/dist/{useAuth-Dpe5kDa6.js.map → useAuth-CVokk6Ra.js.map} +1 -1
- package/dist/{useLangauge-DKPl4qKr.esm.js → useLangauge-BQjH-l_B.esm.js} +2 -2
- package/dist/{useLangauge-DKPl4qKr.esm.js.map → useLangauge-BQjH-l_B.esm.js.map} +1 -1
- package/dist/{useLangauge-DaCaybJt.js → useLangauge-ySJIB0GV.js} +2 -2
- package/dist/{useLangauge-DaCaybJt.js.map → useLangauge-ySJIB0GV.js.map} +1 -1
- package/dist/utils/index.esm.js +3 -3
- package/dist/utils/index.js +1 -1
- package/dist/views/index.esm.js +5 -5
- package/dist/views/index.js +1 -1
- package/package.json +1 -1
- package/dist/arrow-up-CZCTjL2a.js.map +0 -1
- package/dist/arrow-up-RDVMEaNg.esm.js.map +0 -1
- package/dist/dashboard-BU3Ivh-m.esm.js.map +0 -1
- package/dist/dashboard-DC1wsH2n.js.map +0 -1
- package/dist/document-MTw-RQlt.js.map +0 -1
- package/dist/document-jQDTo49w.esm.js.map +0 -1
- package/dist/notification-BNeR5Dyl.esm.js.map +0 -1
- package/dist/notification-BmKHaKZF.js +0 -6
- package/dist/notification-BmKHaKZF.js.map +0 -1
- package/dist/tick-CcyPwRXL.esm.js.map +0 -1
- package/dist/tick-Ct-Ir-1S.js.map +0 -1
- package/dist/toggle-switch-BghzgMG8.js.map +0 -1
- package/dist/toggle-switch-FMTO6609.esm.js.map +0 -1
- package/dist/trash-5CZCQE4a.js.map +0 -1
- package/dist/trash-BTwzTBYO.esm.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip-0Msd6gJs.js","sources":["../src/components/button/button.tsx","../src/components/modal/modal.tsx","../src/components/select/select-search.tsx","../src/components/select/select.tsx","../src/components/search-bar/search-bar.tsx","../src/components/text-field/text-field.tsx","../src/components/avatar/avatar.tsx","../src/components/confirm-modal/confirm-modal.tsx","../src/components/form-control/form-builder/form-builder-element/text.tsx","../src/components/toast/toast.tsx","../src/components/reset-password-modal/reset-password-modal.tsx","../src/components/header/components/notification-menu/notification-menu.tsx","../src/components/header/header.tsx","../src/components/appbar/appbar.tsx","../src/components/activityArea/activityArea.tsx","../src/components/tooltip/Tooltip.tsx"],"sourcesContent":["import { Button as MUIButton, ButtonProps, styled } from '@mui/material';\r\n\r\nconst StyledButton = styled(MUIButton)(\r\n\t({ theme: { palette, } /* , variant */ }) => ({\r\n\t\tfontSize: '.875rem',\r\n\t\ttextTransform: 'none',\r\n\t\tminHeight: '0rem',\r\n\t\tminWidth: '0rem',\r\n\t\tpadding: '0.25rem .75rem',\r\n\t\tfontWeight: '500',\r\n\t\tlineHeight: '1.25rem',\r\n\t\tletterSpacing: '-0.01875rem',\r\n\r\n\t\t'&.MuiButton-startIcon': {\r\n\t\t\tbackgroundColor: 'red'\r\n\t\t},\r\n\r\n\t\t'&.MuiButton-contained': {\r\n\t\t\tbackgroundColor: palette.theme?.primary[700],\r\n\t\t\t// boxShadow: '0px 0px 2px 0px #E0E0E0, 0px 1px 4px -2px rgba(24, 39, 75, 0.02), 0px 4px 4px -2px rgba(24, 39, 75, 0.06)',\r\n\t\t\t'&:hover': {\r\n\t\t\t\tbackgroundColor: palette.theme?.primary[800]\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t'&.MuiButton-outlined': {\r\n\t\t\tborder: 'none',\r\n\t\t\tboxShadow: '0px 0px 2px 0px #E0E0E0, 0px 1px 4px -2px rgba(24, 39, 75, 0.02), 0px 4px 4px -2px rgba(24, 39, 75, 0.06)',\r\n\t\t\tcolor: palette.theme?.primary[700]\r\n\t\t},\r\n\r\n\t\t'&.MuiButton-text': {\r\n\t\t\tcolor: palette.theme?.secondary[1000],\r\n\t\t\tbackgroundColor: 'white',\r\n\t\t\t'&:hover': {\r\n\t\t\t\tcolor: palette.theme?.primary[700]\r\n\t\t\t},\r\n\t\t\t'& .MuiButton-startIcon': {\r\n\t\t\t\t// background: palette.theme?.primary[400],\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t'&.MuiButton-containedError': {\r\n\t\t\tbackgroundColor: palette.theme?.error[500],\r\n\t\t\t'&:hover': {\r\n\t\t\t\tbackgroundColor: palette.theme?.error[600]\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t'&.Mui-disabled': {\r\n\t\t\topacity: 0.5\r\n\t\t}\r\n\t})\r\n);\r\n\r\nconst Button = (props: ButtonProps) => {\r\n\tconst { children, variant = 'contained', ...rest } = props;\r\n\r\n\treturn (\r\n\t\t<StyledButton variant={variant} {...rest}>\r\n\t\t\t{children}\r\n\t\t</StyledButton>\r\n\t);\r\n};\r\n\r\nexport { Button };\r\nexport default Button;\r\n","import { Dialog, DialogProps, styled } from \"@mui/material\";\r\n\r\nconst StyledDialog = styled(Dialog)(() => ({\r\n \".MuiDialog-paper\": {\r\n borderRadius: \"1rem\",\r\n },\r\n\r\n \".MuiDialogTitle-root\": {\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n justifyContent: \"space-between\",\r\n padding: \"0.5rem 1.5rem\",\r\n },\r\n\r\n \".MuiDialogContent-root\": {\r\n padding: \"1.5rem\",\r\n },\r\n\r\n \".MuiDialogActions-root\": {\r\n padding: \"0.5rem 1rem\",\r\n },\r\n}));\r\n\r\nconst Modal = ({ children, open, onClose, ...rest }: DialogProps) => {\r\n return (\r\n <StyledDialog open={open} onClose={onClose} {...rest}>\r\n {children}\r\n </StyledDialog>\r\n );\r\n};\r\n\r\nexport { Modal };\r\nexport default Modal;\r\n","/* eslint-disable @typescript-eslint/no-unused-vars */\r\n/* eslint-disable unused-imports/no-unused-imports */\r\nimport { InputAdornment, TextField, styled } from \"@mui/material\";\r\nimport SearchIcon from \"@mui/icons-material/Search\";\r\nimport React, { forwardRef } from 'react';\r\n\r\nconst StyledSearch = styled(TextField)(({ theme: { palette } }) => ({\r\n padding: \"0rem 0.75rem 0.5rem 0.75rem\",\r\n borderBottom: `1px solid ${palette.theme?.secondary[200]}`,\r\n input: {\r\n padding: \"0.5rem 0rem\",\r\n },\r\n \".MuiOutlinedInput-notchedOutline\": {\r\n border: 0,\r\n },\r\n \"& .MuiOutlinedInput-root\": {\r\n fontSize: \"0.8125rem\",\r\n paddingLeft: \"0.5rem\",\r\n color: palette.theme?.secondary[800],\r\n // backgroundColor: palette.theme?.secondary[200],\r\n border: \"1px solid #F5F6F5\",\r\n borderRadius: \"0.5rem\",\r\n \":hover .MuiOutlinedInput-notchedOutline\": {\r\n border: 1,\r\n },\r\n \"&.Mui-focused fieldset\": {\r\n border: 0,\r\n },\r\n },\r\n}));\r\n\r\nconst SelectSearch = forwardRef<HTMLInputElement, any>(\r\n ({ searchPlaceholder, handleSearch, value, ...rest }, ref) => (\r\n <StyledSearch\r\n inputRef={ref} // Attach the ref here for focusing\r\n placeholder={searchPlaceholder}\r\n onChange={handleSearch}\r\n value={value}\r\n fullWidth\r\n variant=\"outlined\"\r\n InputProps={{\r\n startAdornment: (\r\n <InputAdornment position=\"start\">\r\n <SearchIcon fontSize=\"small\" />\r\n </InputAdornment>\r\n ),\r\n }}\r\n {...rest}\r\n />\r\n )\r\n);\r\n\r\nexport { SelectSearch };\r\nexport default SelectSearch;\r\n","/* eslint-disable no-mixed-spaces-and-tabs */\r\n\r\nimport {\r\n Box,\r\n\tCircularProgress,\r\n\tFormHelperText,\r\n\tSelect as MUISelect,\r\n\tstyled\r\n} from '@mui/material';\r\nimport Typography from '../typography/typography';\r\nimport SelectSearch from './select-search';\r\nimport { memo, useRef } from 'react';\r\nimport './controller/controller-select.scss'\r\nimport { ArrowDown } from '../icons';\r\nconst StyledSelect = styled(MUISelect)(({ theme: { palette } }) => ({\r\n\tcolor: palette.theme?.secondary[800],\r\n\tfontSize: ' 0.875rem',\r\n\t'.MuiOutlinedInput-notchedOutline': {\r\n\t\tborderColor: palette.theme?.secondary[300]\r\n\t},\r\n\t'&.Mui-focused .MuiOutlinedInput-notchedOutline': {\r\n\t\tborderWidth: '0.0625rem',\r\n\t\tborderColor: palette.theme?.primary[700]\r\n\t},\r\n\t'&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline': {\r\n\t\tborderWidth: '0.0625rem',\r\n\t\tborderColor: palette.theme?.error[600]\r\n\t},\r\n\t'&:hover .MuiOutlinedInput-notchedOutline': {\r\n\t\tborderColor: palette.theme?.secondary[400]\r\n\t},\r\n\t'&.Mui-error:hover .MuiOutlinedInput-notchedOutline': {\r\n\t\tborderColor: palette.theme?.error[600]\r\n\t},\r\n\t'&.Mui-disabled': {\r\n\t\tbackground: palette.theme?.secondary[200],\r\n\t\tcolor: palette.theme?.secondary[800]\r\n\t},\r\n\r\n\t'.MuiMenuItem-root': {\r\n\t\tfontSize: '10px'\r\n\t},\r\n\t'&.Mui-error': {\r\n\t\tcolor: palette.theme?.error[600],\r\n\t\t'&fieldset': {\r\n\t\t\tborderColor: 'grey'\r\n\t\t}\r\n\t}\r\n}));\r\n\r\nconst Select = memo((props: any) => {\r\n\tconst searchInputRef = useRef<HTMLInputElement>(null);\r\n\tconst {\r\n\t\tchildren,\r\n\t\tlabel,\r\n\t\thandleSearch,\r\n\t\tdataPosition,\r\n\t\tdataName,\r\n\t\tplaceholder,\r\n\t\tsearchPlaceholder,\r\n\t\trequired,\r\n\t\tsearchValue,\r\n\t\tfullWidth = false,\r\n\t\tonChange,\r\n\t\trenderValue,\r\n\t\terror,\r\n\t\thelperText,\r\n\t\tloading = false,\r\n\t\tCustomDropdownIcon = ArrowDown,\r\n\t\t...rest\r\n\t} = props;\r\n\r\n\t\r\n\tconst handleOpen = () => {\r\n setTimeout(() => {\r\n if (searchInputRef.current) {\r\n searchInputRef.current.focus(); // Focus the search input\r\n }\r\n }, 0);\r\n };\r\n\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{label && (\r\n\t\t\t\t<Typography\r\n\t\t\t\t\ttype='s5'\r\n\t\t\t\t\tweight='medium'\r\n\t\t\t\t\tdata-position={dataPosition}\r\n\t\t\t\t\tdata-name={dataName}\r\n\t\t\t\t\tmb={0.5}\r\n\t\t\t\t\tcolor={error ? 'theme.error.600' : 'theme.secondary.800'}>\r\n\t\t\t\t\t{label} {required && <span style={{ color: '#c64d4d' }}>*</span>}\r\n\t\t\t\t</Typography>\r\n\t\t\t)}\r\n<StyledSelect\r\n IconComponent={(iconProps) => <CustomDropdownIcon {...iconProps} fontSize='small' />}\r\n MenuProps={{\r\n PaperProps: {\r\n sx: {\r\n maxHeight: 300, // Scrollable area for dropdown\r\n overflowY: 'auto',\r\n },\r\n },\r\n anchorOrigin: {\r\n vertical: 'bottom',\r\n horizontal: 'center',\r\n },\r\n }}\r\n displayEmpty\r\n fullWidth={fullWidth}\r\n renderValue={\r\n renderValue ??\r\n ((value: any) =>\r\n value !== '' ? (\r\n (value as any)\r\n ) : (\r\n <Typography color='inherit' type='s3'>\r\n {placeholder}\r\n </Typography>\r\n ))\r\n }\r\n onChange={onChange}\r\n error={error}\r\n\tonOpen={handleOpen} \r\n {...rest}\r\n>\r\n {handleSearch && (\r\n <Box\r\n sx={{\r\n position: 'sticky',\r\n top: 0,\r\n zIndex: 1, // Ensure it's above the dropdown items\r\n backgroundColor: '#fff',\r\n // padding: '0.5rem',\r\n\t\t\t\tmargin: '-4px -4px 0 -4px',\r\n\t\t\t\tmb: 0.5\r\n }}\r\n >\r\n <SelectSearch\r\n\t\t\t\tref={searchInputRef}\r\n searchPlaceholder={searchPlaceholder}\r\n handleSearch={(e: any) => handleSearch(e.target.value)}\r\n value={searchValue}\r\n onClick={(e) => e.stopPropagation()}\r\n onKeyDown={(e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tif (props?.value) {\r\n\t\t\t\t\t\tsetTimeout(() => searchInputRef.current?.focus(), 0); \r\n\t\t\t\t\t}\r\n\t\t \t}}\r\n\t\t\t\tsx={{\r\n\t\t\t\t\tp: 1,\r\n\t\t\t\t}}\r\n />\r\n </Box>\r\n )}\r\n {loading ? (\r\n <Box\r\n sx={{\r\n display: 'flex',\r\n width: '100%',\r\n p: 2,\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n }}\r\n >\r\n <CircularProgress size={30} color='inherit' />\r\n </Box>\r\n ) : (\r\n children\r\n )}\r\n</StyledSelect>\r\n\r\n\t\t\t{helperText && <FormHelperText error={error}>{helperText}</FormHelperText>}\r\n\t\t</>\r\n\t);\r\n});\r\n\r\nexport { Select };\r\nexport default Select;\r\n","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport { debounce } from \"lodash\";\r\nimport React, { useState, useEffect, useRef } from \"react\";\r\nimport { SxProps, TextField, styled, Theme } from \"@mui/material\";\r\n// import images from \"../../assets/images\";\r\n\r\nimport \"./search-bar.scss\";\r\nimport { Search, SearchStatus } from \"../icons\";\r\n\r\nconst StyledSearch = styled(TextField)(({ theme: { palette } }) => ({\r\n \"&.MuiTextField-root\": {\r\n backgroundColor: palette.theme?.secondary[200],\r\n borderRadius: \"0.5rem\",\r\n padding: \"0.375rem 0.75rem\",\r\n },\r\n \"& .MuiOutlinedInput-input\": {\r\n fontSize: \"0.875rem\",\r\n padding: \"0rem\",\r\n paddingLeft: \"1.375rem\",\r\n },\r\n \".MuiOutlinedInput-notchedOutline\": {\r\n border: \"none\",\r\n },\r\n}));\r\n\r\ninterface ISearchBar {\r\n placeholder?: string;\r\n handleSearch: (key: string) => void;\r\n debounceTime?: number;\r\n className?: string;\r\n InputProps?: any;\r\n sx?: SxProps<Theme>;\r\n isDrivePage?: boolean;\r\n searchText?:string\r\n}\r\n\r\nconst SearchBar = ({\r\n handleSearch,\r\n debounceTime = 300,\r\n className,\r\n InputProps,\r\n isDrivePage,\r\n searchText,\r\n value = '',\r\n ...rest\r\n}: ISearchBar) => {\r\n const [searchTerm, setSearchTerm] = useState(\"\");\r\n\r\n const debouncedSearchRef = useRef<(value: string) => void>();\r\n\r\n // Set `searchTerm` from localStorage on mount and clear `localStorage` if needed\r\n useEffect(() => {\r\n const initialSearchTerm = isDrivePage ? localStorage.getItem(\"searchTerm\") || \"\" : \"\";\r\n setSearchTerm(initialSearchTerm);\r\n\r\n // Set `localStorage` to an empty string on the first render\r\n if (isDrivePage) {\r\n localStorage.setItem(\"searchTerm\", \"\");\r\n }\r\n }, [isDrivePage]);\r\n\r\n useEffect(() => {\r\n setSearchTerm((typeof searchText=='string' && searchText) || '')\r\n }, [searchText])\r\n\r\n // Initialize the debounced function only once\r\n useEffect(() => {\r\n debouncedSearchRef.current = debounce((value: string) => handleSearch(value), debounceTime);\r\n \r\n // Cleanup function to cancel debounced call on component unmount\r\n return () => {\r\n debouncedSearchRef.current?.cancel();\r\n };\r\n }, [handleSearch, debounceTime]);\r\n\r\n useEffect(() => {\r\n setSearchTerm(value || '')\r\n }, [])\r\n\r\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n const value = e.target.value;\r\n setSearchTerm(value);\r\n if (isDrivePage) {\r\n localStorage.setItem(\"searchTerm\", value);\r\n }\r\n\r\n // Call the debounced search function\r\n if (debouncedSearchRef.current) {\r\n debouncedSearchRef.current(value);\r\n }\r\n };\r\n\r\n const handleKeyDown = (event: any) => {\r\n event.stopPropagation();\r\n };\r\n\r\n const handleClick = (event: any) => {\r\n event.stopPropagation();\r\n };\r\n\r\n return (\r\n <div className={`${className} search-wrapper`}>\r\n <StyledSearch\r\n fullWidth\r\n className=\"s3\"\r\n value={searchTerm}\r\n onChange={handleChange}\r\n onKeyDown={handleKeyDown}\r\n onClick={handleClick}\r\n autoComplete=\"off\"\r\n InputProps={InputProps}\r\n {...rest}\r\n />\r\n <span className=\"search-icon\">\r\n {\r\n searchTerm ?\r\n <SearchStatus fontSize=\"small\" sx={{ color: searchTerm ? \"grey.900\": \"grey.700\" }}/> : \r\n <Search fontSize=\"small\" sx={{ color: searchTerm ? \"grey.900\": \"grey.700\" }}/>\r\n }\r\n </span>\r\n {/* <img src={images.search} alt=\"search icon\" /> */}\r\n </div>\r\n );\r\n};\r\n\r\nexport { SearchBar };\r\nexport default SearchBar;\r\n","import {\r\n TextField as MUITextField,\r\n // TextFieldProps,\r\n styled,\r\n} from \"@mui/material\";\r\nimport \"./text-field.scss\";\r\nimport Typography from \"../typography/typography\";\r\nimport { memo } from \"react\";\r\n\r\nconst StyledTextField = styled(MUITextField)(({ theme: { palette } }) => ({\r\n \"& .MuiOutlinedInput-root\": {\r\n padding: \"0\",\r\n color: palette.theme?.secondary[800],\r\n \"& fieldset\": {\r\n borderColor: palette.theme?.secondary[400],\r\n },\r\n \"&:hover fieldset\": {\r\n borderColor: palette.theme?.secondary[500],\r\n },\r\n \"&.Mui-focused fieldset\": {\r\n borderWidth: \"0.0625rem\",\r\n borderStyle: \"solid\",\r\n borderColor: palette.theme?.primary[700],\r\n },\r\n \"&.Mui-error fieldset\": {\r\n borderColor: palette.theme?.error[600],\r\n },\r\n \"&.Mui-error .MuiInputBase-input::placeholder\": {\r\n color: palette.theme?.error[600],\r\n },\r\n \"&.Mui-disabled\": {\r\n background: palette.theme?.secondary[200],\r\n color: palette.theme?.secondary[800],\r\n },\r\n \"& .MuiInputBase-input::placeholder\": {\r\n color: palette.theme?.secondary[800],\r\n opacity: 1,\r\n },\r\n },\r\n \"& .MuiFormHelperText-root\": {\r\n marginLeft: 0,\r\n color: palette.theme?.secondary[800],\r\n \"&.Mui-error\": {\r\n color: palette.theme?.error[600],\r\n },\r\n },\r\n \"& .MuiIconButton-root\": {\r\n marginRight: 0,\r\n },\r\n}));\r\n\r\nconst TextField = memo((props: any) => {\r\n const {\r\n required,\r\n placeholder,\r\n label,\r\n error = false,\r\n dataPosition,\r\n dataName,\r\n hidden,\r\n ...rest\r\n } = props;\r\n return (\r\n <>\r\n {label && !hidden && (\r\n <Typography\r\n type=\"s5\"\r\n weight={\"medium\"}\r\n mb={0.5}\r\n color={error ? \"theme.error.600\" : \"theme.secondary.800\"}\r\n data-position={dataPosition}\r\n data-name={dataName}\r\n >\r\n {label} {required && <span className=\"requiredStar\">*</span>}\r\n </Typography>\r\n )}\r\n <StyledTextField\r\n error={error}\r\n placeholder={placeholder}\r\n className=\"textfield\"\r\n hidden={hidden}\r\n {...rest}\r\n />\r\n </>\r\n );\r\n});\r\n\r\nexport { TextField };\r\nexport default TextField;\r\n","import { Avatar as AvatarMUI, SvgIcon } from \"@mui/material\";\nimport Person2OutlinedIcon from \"@mui/icons-material/Person2Outlined\";\nimport \"./avatar.scss\";\n\nexport const Avatar = (props: any) => {\n const { icon, badge, src, alt, size, altIcon, ...rest } = props;\n const avatarStyle = {\n height: size,\n width: size,\n };\n\n const fontSize = size * (alt && alt.split(\" \").length > 1 ? 0.025 : 0.035);\n const badgeSize = size * 0.0225;\n const badgeBorder = size * 0.004;\n let altFirstChar = \"\";\n\n if (alt && alt.length > 0) {\n const words = alt.split(\" \");\n altFirstChar = words.map((word: string) => word.charAt(0)).join(\"\");\n }\n\n return (\n <div className=\"Avatar\">\n <AvatarMUI\n alt={alt}\n src={src ? src : undefined}\n style={avatarStyle}\n {...rest}\n >\n {icon && (!src || (alt && alt.length === 0)) && (\n <>\n {altIcon ? (\n <SvgIcon>{altIcon}</SvgIcon>\n ) : (\n <Person2OutlinedIcon\n style={{ fontSize: `${fontSize + 0.8}rem` }}\n />\n )}\n </>\n )}\n {!icon && !src && (\n <span\n className=\"Avatar--FirstChar\"\n style={{ fontSize: `${fontSize}rem` }}\n >\n {altFirstChar}\n </span>\n )}\n </AvatarMUI>\n\n {badge && (\n <div\n className=\"Avatar--Badge\"\n style={{\n width: `${badgeSize}rem`,\n height: `${badgeSize}rem`,\n border: `${badgeBorder}rem solid #ffffff`,\n }}\n />\n )}\n </div>\n );\n};\n\nexport default Avatar;\n","import {\n\tBox,\n\tCircularProgress,\n\tDialog,\n\tDialogActions,\n\tDialogContent,\n\tDialogProps,\n\tDialogTitle,\n\tDivider,\n\tIconButton\n} from '@mui/material';\nimport CloseIcon from '@mui/icons-material/Close';\nimport Typography from '../typography/typography';\nimport Button from '../button/button';\nimport './confirm-modal.scss';\nimport images from '../../assets/images';\nimport { useLanguage } from '../../hooks/useLangauge';\nimport { useTranslation } from 'react-i18next';\n\ninterface ConfirmPopUpProps extends DialogProps {\n\ttitle: string;\n\tdescription: string | JSX.Element;\n\tonClose: () => void;\n\tonConfirm: () => void;\n\tbuttonTexts?: {\n\t\tconfirm: string;\n\t\tcancel: string;\n\t};\n\tbuttonColors?: {\n\t\tconfirm: string;\n\t\tcancel?: string;\n\t};\n\tmodalType?: 'alert' | 'info';\n\tloading?: boolean;\n\tshowAction?: boolean;\n}\n\nexport const ConfirmPopUp = (props: ConfirmPopUpProps) => {\n\tconst { t } = useTranslation();\n\tconst {\n\t\topen,\n\t\ttitle,\n\t\tdescription,\n\t\tonClose,\n\t\tonConfirm,\n\t\tmodalType = 'alert',\n\t\tbuttonTexts = { confirm: t('common.delete'), cancel: t('common.cancel') },\n\t\tbuttonColors = { confirm: 'error' },\n\t\tloading = false,\n\t\tshowAction=true,\n\t\t...rest\n\t} = props;\n\n\tconst icon = modalType === 'info' ? images.info : images.alert;\n const {isRtl}=useLanguage();\n\treturn (\n\t\t<>\n\t\t\t<Dialog open={open} onClose={onClose} className='confirm' {...rest}>\n\t\t\t\t<DialogTitle className='confirm--head'>\n\t\t\t\t\t<Box className='confirm--title'>\n\t\t\t\t\t\t<img src={icon} alt='alert icon' />{' '}\n\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\ttype='s3'\n\t\t\t\t\t\t\tml={1}\n\t\t\t\t\t\t\tweight='medium'\n\t\t\t\t\t\t\tcolor='theme.secondary.1000'>\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t</Typography>\n\t\t\t\t\t</Box>\n\t\t\t\t\t<IconButton disableRipple onClick={onClose} disabled={loading}>\n\t\t\t\t\t\t<CloseIcon />\n\t\t\t\t\t</IconButton>\n\t\t\t\t</DialogTitle>\n\t\t\t\t<Divider />\n\t\t\t\t<DialogContent className='confirm--content'>\n\t\t\t\t\t<Typography type='s3' color='theme.secondary.1000'>\n\t\t\t\t\t\t{description}\n\t\t\t\t\t</Typography>\n\t\t\t\t</DialogContent>\n\t\t\t\t<Divider />\n\t\t\t\t{showAction &&<DialogActions\n\t\t\t\t\tclassName='confirm--actions'\n\t\t\t\t\tsx={{ backgroundColor: 'theme.secondary.200' }}>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant='text'\n\t\t\t\t\t\tonClick={onClose}\n\t\t\t\t\t\tcolor={buttonColors?.cancel}\n\t\t\t\t\t\tdisabled={loading}>\n\t\t\t\t\t\t{buttonTexts.cancel}\n\t\t\t\t\t</Button>\n\t\t\t\t{buttonTexts.confirm &&<Button\n\t\t\t\t\t\tcolor={buttonColors.confirm}\n\t\t\t\t\t\tonClick={onConfirm}\n\t\t\t\t\t\tsx={isRtl?{mr: 1}:{}}\n\t\t\t\t\t\tendIcon={loading && <CircularProgress size={18} color='inherit' />}\n\t\t\t\t\t\tdisabled={loading}>\n\t\t\t\t\t\t{buttonTexts.confirm}\n\t\t\t\t\t</Button>}\n\t\t\t\t</DialogActions>}\n\t\t\t</Dialog>\n\t\t</>\n\t);\n};\n\nexport default ConfirmPopUp;\n","import { Controller } from \"react-hook-form\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport TextField from \"../../../text-field/text-field\";\r\n\r\nimport \"./element.scss\";\r\nimport { IconButton, InputAdornment } from \"@mui/material\";\r\nimport React from \"react\";\r\n\r\nconst DynamicInput = React.memo((props: any) => {\r\n\r\n return (\r\n <Controller\r\n control={props.formControl}\r\n name={`${props.fieldArrayName}.${props.name}`}\r\n // defaultValue={props.defaultValue || \"\"}\r\n render={({ field, fieldState }) => (\r\n <TextField\r\n {...field}\r\n dataPosition={props.position}\r\n dataName={`${props.fieldArrayName}.${props.name}`}\r\n fullWidth\r\n label={props.label}\r\n defaultValue={\r\n props.type === \"number\" ||\r\n props.type === \"currency\" ||\r\n props.type === \"geoLocation\"\r\n ? typeof props.defaultValue === 'string' ? props.defaultValue.replace(/[^0-9]/g, \"\") : props.defaultValue\r\n : props.defaultValue || \"\"\r\n }\r\n // value={props.formType === \"builder\" ? props.defaultValue : \"\"}\r\n placeholder={props.placeholder}\r\n // onChange={(e) => {\r\n // field.onChange(e);\r\n // props.formControl.fieldArrayDirty[props.fieldArrayName] = true;\r\n // }}\r\n type={\r\n props.type === \"currency\" ||\r\n props.type === \"geoLocation\" ||\r\n props.type === \"relation\"\r\n ? \"text\"\r\n : props.type || \"text\"\r\n }\r\n // value={\r\n // props.type === \"number\" && typeof field.value === 'number'\r\n // ? (props?.shouldApplyPrecission === false || ['exchange_rate'].includes(props.name)) ? field.value : field.value.toFixed(2)\r\n // : field.value || \"\"\r\n // }\r\n value={\r\n props.type === \"number\" && typeof field.value === 'number'\r\n ? (props?.shouldApplyPrecission === false || ['exchange_rate'].includes(props.name)) \r\n ? field.value \r\n : (() => {\r\n const step = props?.float_step\r\n const decimalPlaces = step && step !== 'any' \r\n ? (String(step).split('.')[1]?.length ?? 2)\r\n : 2\r\n console.log(\"+++++++\", field.value, decimalPlaces)\r\n return Number(field.value.toFixed(decimalPlaces)).toString()\r\n })()\r\n : field.value || \"\"\r\n }\r\n multiline={props.is_multiline || false}\r\n minRows={4}\r\n required={props.formType === \"builder\" ? false : props.required}\r\n // onChange={(e) => {\r\n // return;\r\n // }}\r\n InputProps={{\r\n // inputMode: 'numeric',\r\n // pattern: '[0-9]*',\r\n minLength: props.min || 1,\r\n // maxLength: props.max || 255,\r\n // step: props?.float_step || \"0\",\r\n endAdornment: props.endIcon ? (\r\n <InputAdornment position=\"end\">\r\n <IconButton edge=\"end\" onClick={props?.onIconClick}>\r\n {props.endIcon}\r\n </IconButton>\r\n </InputAdornment>\r\n ) : undefined,\r\n ...props.InputProps,\r\n }}\r\n inputProps={{\r\n step: props?.float_step || 'any',\r\n min: props.min_length || undefined,\r\n // max: props.max_length,\r\n }}\r\n disabled={props.disabled}\r\n hidden={props.hidden}\r\n error={Boolean(fieldState.error?.message)}\r\n helperText={fieldState.error?.message || \"\"}\r\n onBlur={(e: any) => {\r\n field.onBlur(e)\r\n if (props.onBlur && typeof props.onBlur === 'function') {\r\n props.onBlur(e)\r\n }\r\n }}\r\n />\r\n )}\r\n />\r\n );\r\n});\r\n\r\nDynamicInput.propTypes = {\r\n formControl: PropTypes.shape({\r\n register: PropTypes.func.isRequired,\r\n setValue: PropTypes.func,\r\n _formState: PropTypes.object.isRequired,\r\n }).isRequired,\r\n name: PropTypes.string.isRequired,\r\n placeholder: PropTypes.string.isRequired,\r\n label: PropTypes.node.isRequired,\r\n fieldArrayName: PropTypes.string,\r\n defaultValue: PropTypes.string,\r\n type: PropTypes.string,\r\n required: PropTypes.bool,\r\n is_multiline: PropTypes.bool,\r\n min: PropTypes.number,\r\n max: PropTypes.number,\r\n min_length: PropTypes.number,\r\n max_length: PropTypes.number,\r\n float_step: PropTypes.string,\r\n position: PropTypes.number,\r\n formType: PropTypes.string,\r\n disabled: PropTypes.bool,\r\n typeOfField: PropTypes.string,\r\n endIcon: PropTypes.node,\r\n onIconClick: PropTypes.func,\r\n onBlur: PropTypes.func, // This should be optional\r\n hidden: PropTypes.bool,\r\n InputProps: PropTypes.object,\r\n shouldApplyPrecission: PropTypes.bool\r\n};\r\nDynamicInput.defaultProps = {\r\n onBlur: () => { }\r\n};\r\n\r\n\r\n\r\n\r\nexport { DynamicInput };\r\nexport default DynamicInput;","import Close from \"@mui/icons-material/Close\";\r\nimport {\r\n Alert as MUIAlert,\r\n IconButton,\r\n Snackbar,\r\n SnackbarProps,\r\n styled,\r\n} from \"@mui/material\";\r\nimport WarningAmberIcon from \"@mui/icons-material/WarningAmber\";\r\nimport CheckCircleOutlineIcon from \"@mui/icons-material/CheckCircleOutline\";\r\nimport \"./toast.scss\";\r\nimport Typography from \"../typography/typography\";\r\n\r\ninterface IToast extends SnackbarProps {\r\n handleClose: () => void;\r\n type?: \"normal\" | \"alert\";\r\n handleUndo?: () => void;\r\n}\r\n\r\nconst StyledAlert = styled(MUIAlert)(({ theme: { palette } }) => ({\r\n color: \"white\",\r\n height: \"2.5rem\",\r\n padding: \"0rem 1rem\",\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n\r\n \"&.MuiAlert-standardWarning\": {\r\n backgroundColor: palette.theme?.error[600],\r\n },\r\n\r\n \"&.MuiAlert-standardInfo\": {\r\n backgroundColor: palette.theme?.secondary[900],\r\n },\r\n\r\n \".MuiAlert-action\": {\r\n padding: \"0rem\",\r\n marginLeft: \"0.5rem\",\r\n },\r\n\r\n \".MuiAlert-icon\": {\r\n marginRight: \"0.5rem\",\r\n },\r\n}));\r\n\r\nconst Toast = (props: IToast) => {\r\n const {\r\n open,\r\n message,\r\n type = \"alert\",\r\n handleUndo,\r\n handleClose,\r\n ...rest\r\n } = props;\r\n\r\n const action = (\r\n <>\r\n {handleUndo ? (\r\n <Typography\r\n className=\"toast-undo\"\r\n type=\"s4\"\r\n color={type === \"normal\" ? \"theme.primary.600\" : \"white\"}\r\n onClick={handleUndo}\r\n >\r\n Undo\r\n </Typography>\r\n ) : (\r\n <IconButton color=\"inherit\" className=\"icon\" onClick={handleClose}>\r\n <Close fontSize=\"inherit\" />\r\n </IconButton>\r\n )}\r\n </>\r\n );\r\n\r\n return (\r\n <>\r\n <Snackbar\r\n open={open}\r\n autoHideDuration={300000}\r\n onClose={handleClose}\r\n {...rest}\r\n >\r\n <StyledAlert\r\n action={action}\r\n onClose={handleClose}\r\n severity={type === \"normal\" ? \"info\" : \"warning\"}\r\n icon={\r\n type === \"normal\" ? (\r\n <CheckCircleOutlineIcon htmlColor=\"white\" className=\"icon\" />\r\n ) : (\r\n <WarningAmberIcon htmlColor=\"white\" className=\"icon\" />\r\n )\r\n }\r\n >\r\n <Typography color=\"inherit\" type=\"s4\">\r\n {message}\r\n </Typography>\r\n </StyledAlert>\r\n </Snackbar>\r\n </>\r\n );\r\n};\r\n\r\nexport { Toast };\r\nexport default Toast;\r\n","import { useState } from \"react\";\r\nimport Modal from \"../modal/modal\";\r\nimport { useForm } from \"react-hook-form\";\r\nimport { LoginFormValues } from \"../../contexts/AuthContext\";\r\nimport { yupResolver } from \"@hookform/resolvers/yup\";\r\nimport * as Yup from \"yup\";\r\nimport { useAuth } from \"../../hooks/useAuth\";\r\nimport { styled } from \"@mui/system\";\r\nimport Box from \"@mui/material/Box\";\r\nimport Typography from \"../typography/typography\";\r\nimport DynamicInput from \"../form-control/form-builder/form-builder-element/text\";\r\nimport { Eye, EyeOff } from \"../icons\";\r\nimport Button from \"../button/button\";\r\nimport Toast from \"../toast/toast\";\r\n\r\n\r\nconst validationSchema = Yup.object({\r\n login: Yup.object({\r\n current_password: Yup.string().required(\"Please enter current password\"),\r\n password: Yup.string()\r\n .required(\"Please enter password\")\r\n .min(8, \"Password must be at least 8 characters\")\r\n .matches(/[A-Z]/, \"Password must contain at least one uppercase letter\")\r\n .matches(/[!@#$%^&*(),.?\":{}|<>]/, \"Password must contain at least one special character\"),\r\n confirm_password: Yup.string().required(\"Please enter confirm password\").oneOf([Yup.ref('password')], \"Passwords must match\"),\r\n }),\r\n});\r\n\r\n\r\n\r\nconst ResetPasswordModal = ({showModal, setShowModal}) => {\r\n const { changeUserPassword } = useAuth();\r\n\r\n // const [showModal, setShowModal] = useState(false);\r\n const [toast, setToast] = useState<IToast | null>(null);\r\n\r\n interface FormValeus {\r\n login: LoginFormValues;\r\n }\r\n\r\n const { control, handleSubmit, trigger } = useForm<FormValeus>({\r\n resolver: yupResolver(validationSchema),\r\n mode: \"all\",\r\n });\r\n\r\n const onSubmit = async (values: FormValeus) => {\r\n const isValid = await trigger();\r\n if (!isValid) return;\r\n await changeUserPassword(values.login, (message, type) => {\r\n if (type) {\r\n setToast({ message: message, type: \"normal\" });\r\n setShowModal(false);\r\n } else {\r\n setToast({ message: message, type: \"alert\" });\r\n }\r\n // make logout\r\n });\r\n return values; \r\n };\r\n\r\n const [showPassword, setShowPassword] = useState<boolean>(false);\r\n const handleShowPassword = () => setShowPassword(!showPassword);\r\n\r\n const [showCurrentPassword, setShowCurrentPassword] = useState<boolean>(false);\r\n const handleShowCurrentPassword = () => setShowCurrentPassword(!showCurrentPassword);\r\n\r\n const [showConfirmPassword, setShowConfirmPassword] = useState<boolean>(false);\r\n const handleShowConfirmPassword = () => setShowConfirmPassword(!showConfirmPassword);\r\n\r\n const FlexBox = styled(Box)(() => ({\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n }));\r\n\r\n return (\r\n <>\r\n <Modal \r\n open={showModal}\r\n onClose={() => setShowModal(false)} \r\n children={\r\n <>\r\n <form onSubmit={handleSubmit(onSubmit)}>\r\n <FlexBox gap={4} className=\"popup-change-pass\">\r\n <FlexBox gap={2}>\r\n <Box>\r\n <Typography\r\n align=\"center\"\r\n type=\"h1\"\r\n weight=\"medium\"\r\n color=\"theme.secondary.1000\"\r\n >\r\n Change Password\r\n </Typography>\r\n <Typography\r\n align=\"center\"\r\n type=\"h5\"\r\n weight=\"normal\"\r\n color=\"theme.secondary81000\"\r\n >\r\n Enter Details below\r\n </Typography>\r\n </Box>\r\n <FlexBox gap={2}>\r\n <Box>\r\n <DynamicInput\r\n formControl={control}\r\n label=\"Current Password\"\r\n name=\"current_password\"\r\n type={showCurrentPassword ? \"text\" : \"password\"}\r\n placeholder=\"Enter Current Password\"\r\n fieldArrayName=\"login\"\r\n endIcon={\r\n <>\r\n {showCurrentPassword ? (\r\n <Eye fontSize=\"small\" htmlColor=\"#292D32\" />\r\n ) : (\r\n <EyeOff fontSize=\"small\" htmlColor=\"#292D32\" />\r\n )}\r\n </>\r\n }\r\n onIconClick={handleShowCurrentPassword}\r\n />\r\n </Box>\r\n <Box>\r\n <DynamicInput\r\n formControl={control}\r\n label=\"Password\"\r\n name=\"password\"\r\n type={showPassword ? \"text\" : \"password\"}\r\n placeholder=\"Enter Password\"\r\n fieldArrayName=\"login\"\r\n endIcon={\r\n <>\r\n {showPassword ? (\r\n <Eye fontSize=\"small\" htmlColor=\"#292D32\" />\r\n ) : (\r\n <EyeOff fontSize=\"small\" htmlColor=\"#292D32\" />\r\n )}\r\n </>\r\n }\r\n onIconClick={handleShowPassword}\r\n />\r\n </Box>\r\n <Box>\r\n <DynamicInput\r\n formControl={control}\r\n label=\"Confirm Password\"\r\n name=\"confirm_password\"\r\n type={showConfirmPassword ? \"text\" : \"password\"}\r\n fieldArrayName=\"login\"\r\n endIcon={\r\n <>\r\n {showConfirmPassword ? (\r\n <Eye fontSize=\"small\" htmlColor=\"#292D32\" />\r\n ) : (\r\n <EyeOff fontSize=\"small\" htmlColor=\"#292D32\" />\r\n )}\r\n </>\r\n }\r\n onIconClick={handleShowConfirmPassword} \r\n placeholder=\"Enter confirm password\"\r\n />\r\n </Box>\r\n </FlexBox>\r\n </FlexBox>\r\n <FlexBox gap={2}>\r\n <Button type=\"button\" onClick={handleSubmit(onSubmit)} size=\"large\" variant=\"contained\">\r\n Change Password\r\n </Button>\r\n </FlexBox>\r\n </FlexBox>\r\n </form> \r\n </>\r\n }\r\n />\r\n <Toast\r\n open={Boolean(toast)}\r\n message={toast?.message}\r\n type={toast?.type}\r\n handleClose={() => setToast(null)}\r\n anchorOrigin={{ horizontal: \"right\", vertical: \"bottom\" }}\r\n autoHideDuration={3000}\r\n />\r\n </>\r\n );\r\n}\r\n\r\nexport { ResetPasswordModal };\r\nexport default ResetPasswordModal;","import React, { useState, useCallback, useRef, useEffect } from 'react'\nimport {\n\tIconButton,\n\tMenu,\n\tMenuItem,\n\tBadge,\n\tBox,\n\tCircularProgress,\n\tAvatar,\n\tListItemText,\n\tListItemAvatar,\n\tAlert,\n\tSkeleton,\n} from '@mui/material'\nimport {\n\tPerson as PersonIcon,\n\tEmail as EmailIcon,\n\tWarning as WarningIcon,\n\tCheckCircle as CheckCircleIcon,\n\tAssignment as AssignmentIcon,\n\tAccountBalance as AccountBalanceIcon,\n} from '@mui/icons-material'\nimport {\n\tgetV1Notification,\n\tgetV1NotificationMarkAllAsRead,\n\tpatchV1NotificationMarkAsReadId,\n} from '../../../../api-client/api.system-feature/api'\nimport { getErrorMessage, getToken } from '../../../../utils/common'\nimport formatText, { convertToUnderscore, formatLabel } from '../../../../utils/format-text'\nimport Typography from '../../../typography/typography'\nimport images from '../../../../assets/images'\nimport { generateRouteWithId } from '../../../../utils/route-utils'\nimport { PathnameGenerator, PathnameAccounting } from '../../../../constants/pathnames/pathname.accounting'\nimport { ROUTES as RENTALROUTES } from '../../../../constants/pathnames/pathname.rental'\n\nimport { PathnameInventory, PathnameGenerator as PathnameGeneratorInventory } from '../../../../constants/pathnames/pathname.inventory'\n\nimport {\n\tPathnameManufacturing,\n\tPathnameGenerator as PathnameGeneratorManufacuring,\n} from '../../../../constants/pathnames/pathname.manufacturing.ts'\n\nimport {\n\tPathnamePurchase,\n\tPathnameGenerator as PathnameGeneratorPurchase,\n} from '../../../../constants/pathnames/pathname.procurement.ts'\n\nimport { PathnameCrm, PathnameGenerator as PathnameGeneratorCrm } from '../../../../constants/pathnames/pathname.crm.ts'\n\nimport { PathnameRental, PathnameGenerator as PathnameGeneratorRental } from '../../../../constants/pathnames/pathname.rental.ts'\n\nimport { useNavigate } from 'react-router-dom'\nimport { Notification, Tick } from '../../../icons'\nimport Button from '../../../button/button'\nimport { enqueueSnackbar } from 'notistack'\n\nconst getNotificationUrl = (data: any) => {\n\tconst { moduleName = '', moduleId = '', notificationData = {} } = data\n\tconst key = convertToUnderscore(moduleName)\n\n\tconst routeMap: Record<string, () => string> = {\n\t\tsales_invoice: () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_SALES_INVOICES), moduleId.toString()),\n\n\t\tasset_transfers: () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_ASSET_TRANSFER), moduleId.toString()),\n\n\t\tbudgets: () => generateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_BUDGET), moduleId.toString()),\n\n\t\tcash_expense: () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_CASH_EXPENSE), moduleId.toString()),\n\n\t\tcredit_notes: () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_CREDIT_NOTE), moduleId.toString()),\n\n\t\tdebit_notes: () => generateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_DEBIT_NOTE), moduleId.toString()),\n\n\t\texpense_reimbursement: () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_EXPENSE_REIMBURSEMENT), moduleId.toString()),\n\n\t\tjournal_entries: () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_JOURNAL_ENTRY), moduleId.toString()),\n\n\t\tpayment_entries: () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_PAYMENT_ENTRY), moduleId.toString()),\n\n\t\tpurchase_invoice: () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_PURCHASE_INVOICE), moduleId.toString()),\n\n\t\tstock_transfer: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorInventory(PathnameInventory.VIEW_STOCK_TRANSFER), moduleId.toString()),\n\n\t\tbills_of_materials: () =>\n\t\t\tgenerateRouteWithId(\n\t\t\t\tPathnameGeneratorManufacuring(PathnameManufacturing.VIEW_BILL_OF_MATERIAL),\n\t\t\t\tmoduleId.toString()\n\t\t\t),\n\n\t\tpurchase_agreement: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorPurchase(PathnamePurchase.VIEW_PURCHASE_AGREEMENT), moduleId.toString()),\n\n\t\tpurchase_orders: () =>\n\t\t\tgenerateRouteWithId(\n\t\t\t\tnotificationData?.data?.is_rental == 1\n\t\t\t\t\t? RENTALROUTES.VIEW\n\t\t\t\t\t: PathnameGeneratorPurchase(PathnamePurchase.VIEW_PURCHASE_ORDER),\n\t\t\t\tmoduleId.toString()\n\t\t\t),\n\n\t\tpurchase_request: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorPurchase(PathnamePurchase.VIEW_PURCHASE_ORDER), moduleId.toString()),\n\n\t\tvra: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorPurchase(PathnamePurchase.VIEW_VENDOR_RETURNS), moduleId.toString()),\n\n\t\tsales_customer_returns: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorCrm(PathnameCrm.VIEW_CUSTOMER_RETURNS), moduleId.toString()),\n\n\t\tsales_order: () => generateRouteWithId(PathnameGeneratorCrm(PathnameCrm.VIEW_SALES_ORDER), moduleId.toString()),\n\n\t\trental_order: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_RENTAL_ORDER), moduleId.toString()),\n\n\t\treplacement_order: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_RENTAL_ORDER), moduleId.toString()),\n\n\t\trental_agreement: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_AGREEMENT), moduleId.toString()),\n\n\t\tcross_hire_order: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_CROSS_HIRE_ORDER), moduleId.toString()),\n\n\t\tcross_hire_request: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_CROSS_HIRE_REQUEST), moduleId.toString()),\n\t}\n\n\treturn routeMap[key]?.() || '/dashboard'\n}\n\nconst mainModuleIcons = {\n\trbac: images.user,\n\tdocument: images.document,\n\t'accounts-and-finance': images.accounting,\n\tinventory: images.inventory,\n\tmanufacturing: images.manufacturing,\n\tsales: images.crm,\n\trental: images.rental,\n\tuser: images.user,\n\tpurchase: images.procurement,\n\thrms: images.hrms,\n}\nconst mainModuleBgColors = {\n\trbac: '#F3E5F5',\n\tdocument: '#FFF8E1',\n\t'accounts-and-finance': '#E8F5E8',\n\tinventory: '#E3F2FD',\n\tmanufacturing: '#FFF3E0',\n\tsales: '#F3E5F5',\n\trental: '#E8F5E8',\n\tuser: '#F3E5F5',\n\tpurchase: '#FCE4EC',\n\thrms: '#fcfcfc',\n}\n\nconst NotificationMenu = () => {\n\tconst [anchorEl, setAnchorEl] = useState(null)\n\tconst [notifications, setNotifications] = useState([])\n\tconst [loading, setLoading] = useState(false)\n\tconst [loadingMore, setLoadingMore] = useState(false)\n\tconst [error, setError] = useState(null)\n\tconst [unreadCount, setUnreadCount] = useState(0)\n\tconst [markingAllAsRead, setMarkingAllAsRead] = useState(false)\n\tconst [pagination, setPagination] = useState({\n\t\tskip: 0,\n\t\tlimit: 10,\n\t\ttotalCount: 0,\n\t\thasMore: true,\n\t})\n\n\tconst navigate = useNavigate()\n\n\tconst menuRef = useRef(null)\n\tconst isLoadingMoreRef = useRef(false)\n\tconst open = Boolean(anchorEl)\n\n\t// Transform API notification to display format\n\tconst transformNotification = (apiNotification) => {\n\t\tconst moduleIcons = {\n\t\t\t'accounts-and-finance': <AccountBalanceIcon color=\"primary\" />,\n\t\t\tuser: <PersonIcon color=\"action\" />,\n\t\t\tapproval: <AssignmentIcon color=\"warning\" />,\n\t\t}\n\n\t\tconst getInitials = (performedUser) => {\n\t\t\tif (!performedUser) return null\n\t\t\tconst firstName = performedUser.first_name || ''\n\t\t\tconst lastName = performedUser.last_name || ''\n\t\t\tif (!firstName && !lastName) return null\n\t\t\treturn (firstName.charAt(0) + lastName.charAt(0)).toUpperCase()\n\t\t}\n\n\t\tconst getFullName = (performedUser) => {\n\t\t\tif (!performedUser) return null\n\t\t\tconst firstName = performedUser.first_name || ''\n\t\t\tconst lastName = performedUser.last_name || ''\n\t\t\treturn `${firstName} ${lastName}`.trim() || null\n\t\t}\n\n\t\tconst formatTimestamp = (dateString) => {\n\t\t\tconst date = new Date(dateString)\n\t\t\tconst now = new Date()\n\t\t\tconst diffMs = now - date\n\t\t\tconst diffMins = Math.floor(diffMs / 60000)\n\t\t\tconst diffHours = Math.floor(diffMs / 3600000)\n\t\t\tconst diffDays = Math.floor(diffMs / 86400000)\n\n\t\t\tif (diffMins < 1) return 'Just now'\n\t\t\tif (diffMins < 60) return `${diffMins} minute${diffMins > 1 ? 's' : ''} ago`\n\t\t\tif (diffHours < 24) return `${diffHours} hour${diffHours > 1 ? 's' : ''} ago`\n\t\t\tif (diffDays < 7) return `${diffDays} day${diffDays > 1 ? 's' : ''} ago`\n\t\t\treturn date.toLocaleDateString()\n\t\t}\n\n\t\treturn {\n\t\t\tid: apiNotification.id,\n\t\t\ttype: apiNotification.action || apiNotification.notification_type || 'info',\n\t\t\ttitle: formatText(apiNotification.title),\n\t\t\tmessage: apiNotification.message,\n\t\t\ttimestamp: formatTimestamp(apiNotification.created_at),\n\t\t\tread: apiNotification.status === 'read', // Assuming 'pending' means unread\n\t\t\tavatar: getInitials(apiNotification.performed_user),\n\t\t\tperformedByName: getFullName(apiNotification.performed_user),\n\t\t\tmodule: apiNotification.module,\n\t\t\tsubModule: apiNotification.sub_module,\n\t\t\tsubModuleId: apiNotification.sub_module_id,\n\t\t\tstatus: apiNotification.status,\n\t\t\ticon: moduleIcons[apiNotification.module] || moduleIcons[apiNotification.action] || <PersonIcon color=\"action\" />,\n\t\t}\n\t}\n\n\t// Fetch notifications with pagination\n\tconst fetchNotifications = useCallback(async (isLoadMore = false) => {\n\t\t// Prevent multiple simultaneous load more requests\n\t\tif (isLoadMore && isLoadingMoreRef.current) {\n\t\t\treturn\n\t\t}\n\n\t\tif (isLoadMore) {\n\t\t\tisLoadingMoreRef.current = true\n\t\t\tsetLoadingMore(true)\n\t\t} else {\n\t\t\tsetLoading(true)\n\t\t\t// Reset pagination when loading fresh data\n\t\t\tsetPagination((prev) => ({\n\t\t\t\t...prev,\n\t\t\t\tskip: 0,\n\t\t\t\thasMore: true,\n\t\t\t}))\n\t\t}\n\t\tsetError(null)\n\n\t\ttry {\n\t\t\tconst currentSkip = isLoadMore ? pagination.skip : 0\n\t\t\tconst response = await getV1Notification({\n\t\t\t\tskip: currentSkip,\n\t\t\t\tlimit: pagination.limit,\n\t\t\t\t...getToken(),\n\t\t\t})\n\n\t\t\tif (response.success && response.data) {\n\t\t\t\tconst transformedNotifications = response.data.notifications.map(transformNotification)\n\n\t\t\t\tif (isLoadMore) {\n\t\t\t\t\tsetNotifications((prev) => [...prev, ...transformedNotifications])\n\t\t\t\t} else {\n\t\t\t\t\tsetNotifications(transformedNotifications)\n\t\t\t\t}\n\n\t\t\t\t// Update pagination\n\t\t\t\tconst newSkip = currentSkip + response.data.notifications.length\n\t\t\t\tconst hasMore = newSkip < response.data.pagination.totalCount\n\n\t\t\t\tsetPagination((prev) => ({\n\t\t\t\t\t...prev,\n\t\t\t\t\tskip: newSkip,\n\t\t\t\t\ttotalCount: response.data.pagination.totalCount,\n\t\t\t\t\thasMore,\n\t\t\t\t}))\n\n\t\t\t\t// Calculate unread count (assuming 'pending' status means unread)\n\t\t\t\tif (!isLoadMore) {\n\t\t\t\t\tconst unread = response.data.pagination.unreadCount\n\t\t\t\t\tsetUnreadCount(unread)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsetUnreadCount(0)\n\t\t\t\tthrow new Error(response.message || 'Failed to load notifications')\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tsetError('Failed to load notifications')\n\t\t} finally {\n\t\t\tsetLoading(false)\n\t\t\tsetLoadingMore(false)\n\t\t\tif (isLoadMore) {\n\t\t\t\tisLoadingMoreRef.current = false\n\t\t\t}\n\t\t}\n\t}, [pagination.limit, pagination.skip])\n\n\t// Handle scroll for infinite loading\n\tconst handleScroll = useCallback(\n\t\t(event) => {\n\t\t\tconst { scrollTop, scrollHeight, clientHeight } = event.target\n\t\t\tconst isNearBottom = scrollTop + clientHeight >= scrollHeight - 50 // Increased threshold\n\n\t\t\tif (isNearBottom && !isLoadingMoreRef.current && !loading && pagination.hasMore) {\n\t\t\t\tfetchNotifications(true)\n\t\t\t}\n\t\t},\n\t\t[fetchNotifications, loading, pagination.hasMore]\n\t)\n\n\tconst handleClick = (event) => {\n\t\tsetAnchorEl(event.currentTarget)\n\t\tif (notifications.length === 0) {\n\t\t\tfetchNotifications()\n\t\t}\n\t}\n\n\tconst handleClose = () => {\n\t\tsetAnchorEl(null)\n\n\t\t// Don't clear notifications immediately to avoid flickering\n\t\t// They will be refreshed when menu is opened again\n\t}\n\n\tconst handleNotificationClick = async (notificationId) => {\n\t\t// Mark notification as read\n\t\tconst n = notifications.find((n) => {\n\t\t\treturn n.id === notificationId\n\t\t})\n\t\tif (!n) return\n\n\t\thandleClose()\n\n\t\tif (n.status === 'pending') {\n\t\t\tawait patchV1NotificationMarkAsReadId({\n\t\t\t\tid: notificationId,\n\t\t\t\t...getToken(),\n\t\t\t})\n\t\t}\n\n\t\tsetNotifications((prev) => prev.map((n) => (n.id === notificationId ? { ...n, read: true } : n)))\n\t\tsetUnreadCount((prev) => Math.max(0, prev - 1))\n\t\tconst url = getNotificationUrl({\n\t\t\tmoduleName: n.subModule,\n\t\t\tmoduleId: n.subModuleId,\n\t\t\tnotificationData: n,\n\t\t})\n setTimeout(() => {\n navigate(url)\n }, 300)\n\t}\n\n\tconst getNotificationIcon = (notification) => {\n\t\tif (notification.icon) {\n\t\t\treturn notification.icon\n\t\t}\n\n\t\tswitch (notification.type) {\n\t\t\tcase 'approval':\n\t\t\t\treturn <AssignmentIcon color=\"warning\" />\n\t\t\tcase 'user':\n\t\t\t\treturn <PersonIcon color=\"action\" />\n\t\t\tcase 'message':\n\t\t\t\treturn <EmailIcon color=\"primary\" />\n\t\t\tcase 'warning':\n\t\t\t\treturn <WarningIcon color=\"warning\" />\n\t\t\tcase 'success':\n\t\t\t\treturn <CheckCircleIcon color=\"success\" />\n\t\t\tdefault:\n\t\t\t\treturn <PersonIcon color=\"action\" />\n\t\t}\n\t}\n\n\tconst handleMarkAllAsRead = useCallback(async () => {\n\t\tif (markingAllAsRead) return // Prevent multiple calls\n\n\t\tsetMarkingAllAsRead(true)\n\n\t\tif (!unreadCount) {\n\t\t\tenqueueSnackbar('No unread notifications!')\n\t\t\tsetMarkingAllAsRead(false)\n\t\t\treturn\n\t\t}\n\n\t\ttry {\n\t\t\tawait getV1NotificationMarkAllAsRead({ ...getToken() })\n\t\t\t// Update local state immediately for better UX\n\t\t\tsetNotifications((prev) => prev.map((n) => ({ ...n, read: true, status: 'read' })))\n\t\t\tsetUnreadCount(0)\n\t\t} catch (error) {\n\t\t\tconst m = getErrorMessage(error.message)\n\t\t\tenqueueSnackbar(m, { variant: 'error' })\n\t\t} finally {\n\t\t\tsetMarkingAllAsRead(false)\n\t\t}\n\t}, [markingAllAsRead, unreadCount])\n\n\t// Remove the problematic useEffect that was causing extra API calls\n\n useEffect(() => {\n if(!open) {\n setTimeout(() => {\n setNotifications([])\n }, 500)\n }\n }, [open])\n\n\treturn (\n\t\t<Box>\n\t\t\t<IconButton\n\t\t\t\t// size=\"small\"\n\t\t\t\taria-label=\"notifications\"\n\t\t\t\taria-controls={open ? 'notification-menu' : undefined}\n\t\t\t\taria-haspopup=\"true\"\n\t\t\t\taria-expanded={open ? 'true' : undefined}\n\t\t\t\tonClick={handleClick}\n\t\t\t>\n\t\t\t\t<Badge badgeContent={unreadCount} color=\"error\">\n\t\t\t\t\t<Notification fontSize=\"medium\" />\n\t\t\t\t</Badge>\n\t\t\t</IconButton>\n\n\t\t\t<Menu\n\t\t\t\tid=\"notification-menu\"\n\t\t\t\tanchorEl={anchorEl}\n\t\t\t\topen={open}\n\t\t\t\tonClose={handleClose}\n\t\t\t\tref={menuRef}\n\t\t\t\tslotProps={{\n\t\t\t\t\tpaper: {\n\t\t\t\t\t\tsx: {\n\t\t\t\t\t\t\toverflow: 'visible',\n\t\t\t\t\t\t\tminWidth: 400,\n\t\t\t\t\t\t\tmaxWidth: 450,\n\t\t\t\t\t\t\tmaxHeight: 520,\n\t\t\t\t\t\t\t'&:before': {\n\t\t\t\t\t\t\t\tcontent: '\"\"',\n\t\t\t\t\t\t\t\tdisplay: 'block',\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\t\tright: '50%',\n\t\t\t\t\t\t\t\twidth: 10,\n\t\t\t\t\t\t\t\theight: 10,\n\t\t\t\t\t\t\t\tbgcolor: 'background.paper',\n\t\t\t\t\t\t\t\ttransform: 'translateY(-50%) translateX(50%) rotate(45deg)',\n\t\t\t\t\t\t\t\tzIndex: 0,\n\t\t\t\t\t\t\t\tborder: '1px solid',\n\t\t\t\t\t\t\t\tborderColor: ({ palette }) => palette.grey[300],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}}\n\t\t\t\tsx={{\n\t\t\t\t\t'& .MuiList-root': {\n\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\tmaxHeight: 520,\n\t\t\t\t\t\toverflowY: 'auto',\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t},\n\t\t\t\t}}\n\t\t\t\ttransformOrigin={{ horizontal: 'center', vertical: 'top' }}\n\t\t\t\tanchorOrigin={{ horizontal: 'center', vertical: 'bottom' }}\n\t\t\t\tonScroll={handleScroll}\n\t\t\t>\n\t\t\t\t{/* Header */}\n\t\t\t\t<Box sx={{ px: 2, py: 1, borderBottom: '1px solid #e0e0e0', backgroundColor: '#fafafa' }}>\n\t\t\t\t\t<Typography type=\"h5\" weight=\"bold\" color=\"grey.1000\">\n\t\t\t\t\t\tNotifications\n\t\t\t\t\t</Typography>\n\t\t\t\t\t{unreadCount > 0 && (\n\t\t\t\t\t\t<Box sx={{ display: 'flex', justifyContent: 'space-between', width: '100%', alignItems: 'center' }}>\n\t\t\t\t\t\t\t<Typography type=\"s4\" color=\"grey.800\">\n\t\t\t\t\t\t\t\tYou have {unreadCount} unread notification{unreadCount > 1 ? 's' : ''}\n\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\tstartIcon={\n\t\t\t\t\t\t\t\t\tmarkingAllAsRead ? (\n\t\t\t\t\t\t\t\t\t\t<CircularProgress size={15} color=\"inherit\" />\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<Tick sx={{ fontSize: '0.75rem !important' }} color=\"grey.900\" />\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsx={{ p: 0 }}\n\t\t\t\t\t\t\t\tonClick={handleMarkAllAsRead}\n\t\t\t\t\t\t\t\tdisabled={unreadCount <= 0 || markingAllAsRead}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Typography type=\"s4\" color=\"grey.900\">\n\t\t\t\t\t\t\t\t\tMark all as read\n\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</Box>\n\t\t\t\t\t)}\n\t\t\t\t</Box>\n\n\t\t\t\t{/* Loading State */}\n\t\t\t\t{loading && notifications.length === 0 && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Box\n\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\tflexDirection: 'column',\n\t\t\t\t\t\t\t\tgap: 1,\n\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\tminWidth: 400,\n\t\t\t\t\t\t\t\tp: 1,\n\t\t\t\t\t\t\t\tm: 1,\n\t\t\t\t\t\t\t\tbackgroundColor: 'grey.200',\n\t\t\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Box sx={{ display: 'flex', gap: 1 }}>\n\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={40} height={40} />\n\t\t\t\t\t\t\t\t<Box sx={{ display: 'flex', flexDirection: 'column', gap: 0.5 }}>\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={360} height={25} />\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={150} height={11} />\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={360} height={11} />\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={360} height={11} />\n\t\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t<Box\n\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\tflexDirection: 'column',\n\t\t\t\t\t\t\t\tgap: 1,\n\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\tminWidth: 400,\n\t\t\t\t\t\t\t\tp: 1,\n\t\t\t\t\t\t\t\tm: 1,\n\t\t\t\t\t\t\t\tbackgroundColor: 'grey.200',\n\t\t\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Box sx={{ display: 'flex', gap: 1 }}>\n\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={40} height={40} />\n\t\t\t\t\t\t\t\t<Box sx={{ display: 'flex', flexDirection: 'column', gap: 0.5 }}>\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={360} height={25} />\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={150} height={11} />\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={360} height={11} />\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={360} height={11} />\n\t\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t<Box\n\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\tflexDirection: 'column',\n\t\t\t\t\t\t\t\tgap: 1,\n\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\tminWidth: 400,\n\t\t\t\t\t\t\t\tp: 1,\n\t\t\t\t\t\t\t\tm: 1,\n\t\t\t\t\t\t\t\tbackgroundColor: 'grey.200',\n\t\t\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Box sx={{ display: 'flex', gap: 1 }}>\n\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={40} height={40} />\n\t\t\t\t\t\t\t\t<Box sx={{ display: 'flex', flexDirection: 'column', gap: 0.5 }}>\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={360} height={25} />\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={150} height={11} />\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={360} height={11} />\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={360} height={11} />\n\t\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t</Box>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\n\t\t\t\t{/* Error State */}\n\t\t\t\t{error && (\n\t\t\t\t\t<Box sx={{ p: 2 }}>\n\t\t\t\t\t\t<Alert severity=\"error\">{error}</Alert>\n\t\t\t\t\t</Box>\n\t\t\t\t)}\n\n\t\t\t\t{/* Notifications List */}\n\t\t\t\t{!loading && !error && notifications.length > 0 && (\n\t\t\t\t\t<Box sx={{ maxHeight: 420, overflowY: 'auto', p: 1 }} onScroll={handleScroll}>\n\t\t\t\t\t\t{notifications.map((notification) => (\n\t\t\t\t\t\t\t<div key={notification.id}>\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={() => handleNotificationClick(notification.id)}\n\t\t\t\t\t\t\t\t\tsx={({ palette }) => ({\n\t\t\t\t\t\t\t\t\t\tpy: 1,\n\t\t\t\t\t\t\t\t\t\tpx: 1,\n\t\t\t\t\t\t\t\t\t\tbackgroundColor: !notification.read ? palette.theme.grey[200] : 'transparent',\n\t\t\t\t\t\t\t\t\t\tborder: `1px solid ${palette.grey[200]}`,\n\t\t\t\t\t\t\t\t\t\tmarginBottom: '4px !important',\n\t\t\t\t\t\t\t\t\t\t'&:hover': {\n\t\t\t\t\t\t\t\t\t\t\tbackgroundColor: palette.theme.grey[200],\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\talignItems: 'flex-start',\n\t\t\t\t\t\t\t\t\t\tminHeight: 'auto',\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<ListItemAvatar sx={{ minWidth: 48, mt: 0 }}>\n\t\t\t\t\t\t\t\t\t\t{mainModuleIcons?.[notification.module] ? (\n\t\t\t\t\t\t\t\t\t\t\t<Avatar\n\t\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 40,\n\t\t\t\t\t\t\t\t\t\t\t\t\theight: 40,\n\t\t\t\t\t\t\t\t\t\t\t\t\tfontSize: '0.875rem',\n\t\t\t\t\t\t\t\t\t\t\t\t\tbgcolor: mainModuleBgColors[notification.module] || 'primary.main',\n\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: 'white',\n\t\t\t\t\t\t\t\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\t\t\t\t\t\t\t\tboxShadow: '0 2px 8px rgba(0,0,0,0.1)',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'& img': {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: '28px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: '28px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tobjectFit: 'contain',\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tsrc={mainModuleIcons?.[notification.module]}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t{notification.avatar ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Avatar\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 40,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 40,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfontSize: '0.875rem',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbgcolor: 'primary.main',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: 'white',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tboxShadow: '0 2px 8px rgba(0,0,0,0.1)',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.avatar}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Avatar>\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Avatar\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 36,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 36,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbgcolor: 'grey.100',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: 'grey.600',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tboxShadow: '0 2px 8px rgba(0,0,0,0.1)',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{getNotificationIcon(notification)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Avatar>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</ListItemAvatar>\n\t\t\t\t\t\t\t\t\t<ListItemText\n\t\t\t\t\t\t\t\t\t\tsx={{ margin: 0, pr: 1 }}\n\t\t\t\t\t\t\t\t\t\tprimary={\n\t\t\t\t\t\t\t\t\t\t\t<Box sx={{ mb: 0.5 }}>\n\t\t\t\t\t\t\t\t\t\t\t\t<Typography type=\"s3\" weight=\"bold\" color=\"grey.1000\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.title}\n\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t\t\t\t\t{notification.performedByName && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"s5\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor=\"grey.500\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfontSize: `0.7rem !important`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfontStyle: 'italic',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: 'block',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tby {notification.performedByName}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tsecondary={\n\t\t\t\t\t\t\t\t\t\t\t<Box>\n\t\t\t\t\t\t\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"s4\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tcolor=\"grey.800\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmb: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlineHeight: 1.4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.message}\n\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t\t\t\t\t<Box\n\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgap: 0.5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.module && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"s5\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfontSize: `0.65rem !important`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: 'primary',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextTransform: 'capitalize',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.module.replace(/-/g, ' ')}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Box\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{ height: 5, width: 5, borderRadius: '100%', backgroundColor: 'primary.main' }}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t></Box>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.subModule && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"s5\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfontSize: `0.65rem !important`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: 'primary',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextTransform: 'capitalize',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{formatLabel(notification.subModule)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Box\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{ height: 5, width: 5, borderRadius: '100%', backgroundColor: 'primary.main' }}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t></Box>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"s5\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfontSize: `0.65rem !important`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.timestamp}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t{!notification.read && (\n\t\t\t\t\t\t\t\t\t\t<Box\n\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\twidth: 10,\n\t\t\t\t\t\t\t\t\t\t\t\theight: 10,\n\t\t\t\t\t\t\t\t\t\t\t\tborderRadius: '50%',\n\t\t\t\t\t\t\t\t\t\t\t\tbackgroundColor: 'primary.main',\n\t\t\t\t\t\t\t\t\t\t\t\tflexShrink: 0,\n\t\t\t\t\t\t\t\t\t\t\t\tmt: 0.5,\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t{/* Loading More Indicator */}\n\t\t\t\t\t\t{loadingMore && (\n\t\t\t\t\t\t\t<Box sx={{ display: 'flex', justifyContent: 'center', py: 2.5, px: 3 }}>\n\t\t\t\t\t\t\t\t<CircularProgress size={20} />\n\t\t\t\t\t\t\t\t<Typography variant=\"body2\" sx={{ ml: 1.5, color: 'text.secondary' }}>\n\t\t\t\t\t\t\t\t\tLoading more...\n\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{/* End of List Indicator */}\n\t\t\t\t\t\t{!pagination.hasMore && notifications.length > 0 && (\n\t\t\t\t\t\t\t<Box sx={{ textAlign: 'center', py: 1.5, px: 2 }}>\n\t\t\t\t\t\t\t\t<Typography type=\"s3\" color=\"grey.800\" textAlign=\"center\">\n\t\t\t\t\t\t\t\t\tNo more notifications\n\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Box>\n\t\t\t\t)}\n\n\t\t\t\t{/* Empty State */}\n\t\t\t\t{!loading && !error && notifications.length === 0 && (\n\t\t\t\t\t<Box sx={{ p: 4, textAlign: 'center' }}>\n\t\t\t\t\t\t<Notification sx={{ fontSize: 56, color: 'text.secondary', mb: 2 }} />\n\t\t\t\t\t\t<Typography type=\"s1\" color=\"grey.800\" sx={{ mb: 1 }} textAlign=\"center\">\n\t\t\t\t\t\t\tNo notifications yet\n\t\t\t\t\t\t</Typography>\n\t\t\t\t\t</Box>\n\t\t\t\t)}\n\t\t\t</Menu>\n\t\t</Box>\n\t)\n}\n\nexport { NotificationMenu };\nexport default NotificationMenu\n","// components/header/Header.tsx - Complete updated version with English fallback\r\nimport React, { useState, useCallback, useMemo } from \"react\";\r\nimport { Link, matchRoutes, useLocation, useNavigate } from \"react-router-dom\";\r\nimport Box from \"@mui/material/Box\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport LockIcon from \"@mui/icons-material/Lock\";\r\nimport IconButton from \"@mui/material/IconButton\";\r\nimport MenuItem from \"@mui/material/MenuItem\";\r\nimport Menu from \"@mui/material/Menu\";\r\nimport KeyboardBackspaceIcon from \"@mui/icons-material/KeyboardBackspace\";\r\nimport ListItemText from \"@mui/material/ListItemText\";\r\nimport Divider from \"@mui/material/Divider\";\r\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\r\n\r\n\r\nimport { Pathname } from \"../../constants/pathnames/pathname\"; // Removed - should be passed as props\r\nimport Typography from \"../typography/typography\";\r\nimport logo, { images } from \"../../assets/images\";\r\nimport Select from \"../select/select\";\r\nimport modules from \"../../constants/modules\"; // Removed - should be passed as props\r\nimport Avatar from \"../avatar/avatar\";\r\nimport { useAuth } from \"../../hooks/useAuth\";\r\nimport ConfirmPopUp from \"../confirm-modal/confirm-modal\";\r\nimport formatText from \"../../utils/format-text\";\r\nimport \"./header.scss\";\r\nimport { useLanguage } from \"../../hooks/useLangauge\";\r\nimport { Eye } from \"../icons\";\r\nimport ResetPasswordModal from \"../reset-password-modal/reset-password-modal\";\r\nimport NotificationMenu from \"./components/notification-menu/notification-menu\";\r\nimport { getApiConfig } from \"@/utils\";\r\n\r\ninterface ILanguage {\r\n label: string;\r\n code: string;\r\n direction: string;\r\n}\r\n\r\ninterface IModule {\r\n label: any;\r\n link: string;\r\n sidebar: string;\r\n icon: string;\r\n permission: string;\r\n bg: string;\r\n connectedRoutes: string[];\r\n translationModule: string;\r\n}\r\n\r\n\r\nexport function Header(props: any): React.ReactElement {\r\n const navigate = useNavigate();\r\n const { t } = useTranslation();\r\n const location = useLocation();\r\n const { logout, user } = useAuth();\r\n const config = getApiConfig();\r\n\r\n const {\r\n languages,\r\n currentLanguage,\r\n changeLanguage,\r\n isLoading: languagesLoading,\r\n error: languageContextError,\r\n isFallbackActive,\r\n fetchLanguages,\r\n isRtl\r\n } = useLanguage();\r\n\r\n const { pathname } = location;\r\n const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);\r\n const [logoutConfirmation, setLogoutConfirmation] = useState<boolean>(false);\r\n const [localLanguageError, setLocalLanguageError] = useState<string | null>(null);\r\n const [showModal, setShowModal] = useState(false);\r\n\r\n const u_data = localStorage.getItem(\"_u_data\") || undefined;\r\n const userData = u_data ? JSON.parse(u_data) : \"\";\r\n const isMenuOpen = Boolean(anchorEl);\r\n\r\n const handleLogoutConfirmation = () =>\r\n setLogoutConfirmation(!logoutConfirmation);\r\n\r\n const checkMatchedRoutes = useCallback(\r\n (paths: string[] | string) => {\r\n const shouldMatch: { path: string }[] = Array.isArray(paths)\r\n ? paths.map((path: string) => ({ path }))\r\n : [{ path: paths }];\r\n\r\n return Boolean(matchRoutes(shouldMatch, location));\r\n },\r\n [location],\r\n );\r\n\r\n const erp_modules = useMemo<IModule[]>(() => modules(t), [t]);\r\n\r\n const selectedModule = useMemo<IModule | null>(() => {\r\n return (\r\n erp_modules.find(\r\n (module: IModule) =>\r\n module?.link?.toLowerCase() === pathname.toLowerCase() ||\r\n checkMatchedRoutes(module.connectedRoutes),\r\n ) || null\r\n );\r\n }, [erp_modules, pathname, checkMatchedRoutes]);\r\n\r\n const handleChangePasswordView = () => {\r\n setShowModal(true);\r\n }\r\n\r\n // Enhanced language change handler with validation and error handling\r\n const onChangeLang = (e: React.ChangeEvent<HTMLSelectElement>) => {\r\n const lang_code = e.target.value;\r\n\r\n // Clear any previous errors\r\n setLocalLanguageError(null);\r\n\r\n // Validate the language exists before changing\r\n if (!languages || languages.length === 0) {\r\n const errorMsg = t('header.language_not_available') || 'Languages not available';\r\n setLocalLanguageError(errorMsg);\r\n return;\r\n }\r\n\r\n const languageExists = languages.some((lang: ILanguage) => lang.code === lang_code);\r\n\r\n if (languageExists) {\r\n try {\r\n changeLanguage(lang_code);\r\n } catch (error) {\r\n const errorMsg = error instanceof Error ? error.message : 'Failed to change language';\r\n setLocalLanguageError(errorMsg);\r\n }\r\n } else {\r\n const errorMsg = t('header.language_not_found', { language: lang_code }) ||\r\n `Selected language \"${lang_code}\" is not available`;\r\n setLocalLanguageError(errorMsg);\r\n }\r\n };\r\n\r\n // Retry language loading\r\n const handleRetryLanguages = async () => {\r\n setLocalLanguageError(null);\r\n try {\r\n await fetchLanguages();\r\n } catch (error) {\r\n const errorMsg = 'Failed to reload languages';\r\n setLocalLanguageError(errorMsg);\r\n }\r\n };\r\n\r\n\r\n const handleProfileMenuOpen = (event: React.MouseEvent<HTMLElement>) =>\r\n setAnchorEl(event.currentTarget);\r\n\r\n const handleMenuClose = () => {\r\n setAnchorEl(null);\r\n };\r\n\r\n const handleChange = (event: any) => {\r\n const selectedLink = event.target.value;\r\n setTimeout(() => {\r\n navigate(selectedLink);\r\n }, 300);\r\n };\r\n\r\n const handleBackButton = () => {\r\n window.history.back();\r\n };\r\n\r\n // Get current language display value with fallback indication\r\n const getCurrentLanguageDisplay = (): string => {\r\n if (!currentLanguage) return t('header.select_language') || 'Select Language';\r\n\r\n // Show fallback indicator for better UX\r\n if (isFallbackActive || languageContextError) {\r\n return `${currentLanguage.label}`;\r\n }\r\n\r\n return currentLanguage.label;\r\n };\r\n\r\n // Create English fallback for consistent display\r\n const createEnglishFallback = (): ILanguage => ({\r\n code: 'en',\r\n label: 'English',\r\n direction: 'ltr'\r\n });\r\n\r\n // Get languages for dropdown - ensure English is always available\r\n const getLanguagesForDropdown = (): ILanguage[] => {\r\n if (!languages || languages.length === 0) {\r\n // If no languages available, show only English\r\n return [createEnglishFallback()];\r\n }\r\n\r\n // Ensure English is in the list\r\n const hasEnglish = languages.some(lang => lang.code === 'en');\r\n if (!hasEnglish) {\r\n return [createEnglishFallback(), ...languages];\r\n }\r\n\r\n return languages;\r\n };\r\n\r\n // Render language selector based on different states\r\n const renderLanguageSelector = () => {\r\n const availableLanguages = getLanguagesForDropdown();\r\n const displayValue = currentLanguage?.code || 'en'; // Default to English\r\n\r\n // Loading state\r\n if (languagesLoading) {\r\n return (\r\n <Box className=\"language-loading\">\r\n <Typography variant=\"body2\" color=\"text.secondary\">\r\n {'Loading...'}\r\n </Typography>\r\n </Box>\r\n );\r\n }\r\n\r\n // Always show dropdown with at least English available\r\n return (\r\n <Select\r\n onChange={onChangeLang}\r\n size=\"small\"\r\n value={displayValue}\r\n renderValue={() => getCurrentLanguageDisplay()}\r\n error={!!localLanguageError}\r\n className={`language-select ${isFallbackActive || languageContextError ? 'language-fallback-active' : ''}`}\r\n\r\n >\r\n {availableLanguages.map(({ code, label }: ILanguage) => (\r\n <MenuItem key={code} value={code}>\r\n <Typography\r\n type=\"s4\"\r\n weight=\"medium\"\r\n color=\"theme.secondary.1000\"\r\n\r\n >\r\n {label}\r\n {/* Show fallback indicator in dropdown */}\r\n {/* {(isFallbackActive || languageContextError) && code === 'en' && \r\n ` (${t('header.fallback') || 'Fallback'})`\r\n } */}\r\n </Typography>\r\n </MenuItem>\r\n ))}\r\n\r\n {/* Show retry option if there's an error */}\r\n {languageContextError && (\r\n <MenuItem onClick={handleRetryLanguages} style={{ fontStyle: 'italic' }}>\r\n <Typography\r\n type=\"s4\"\r\n weight=\"medium\"\r\n color=\"theme.secondary.500\"\r\n >\r\n 🔄 {t('header.retry_languages') || 'Retry loading languages'}\r\n </Typography>\r\n </MenuItem>\r\n )}\r\n </Select>\r\n );\r\n };\r\n\r\n const menuId = \"primary-search-account-menu\";\r\n const renderMenu = (\r\n <Menu\r\n className=\"main-profile-menu\"\r\n anchorEl={anchorEl}\r\n id={menuId}\r\n keepMounted\r\n open={isMenuOpen}\r\n onClose={handleMenuClose}\r\n >\r\n <MenuItem className=\"user-assigned\">\r\n <span>{t('common.assigned_roles') || 'Assigned roles'}</span>\r\n </MenuItem>\r\n <MenuItem className=\"user-data-wrap\" value={userData.role_id}>\r\n <ListItemIcon>\r\n <Avatar size={27} alt={userData.role_name} />\r\n </ListItemIcon>\r\n <ListItemText className=\"size15\">\r\n {userData.role_name}\r\n </ListItemText>\r\n <Typography variant=\"body2\" color=\"text.secondary\">\r\n <img src={images.tickicon} alt=\"Active\" />\r\n </Typography>\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem\r\n className=\"user-assigned\"\r\n onClick={() => {\r\n handleChangePasswordView();\r\n setAnchorEl(null);\r\n }}\r\n >\r\n <ListItemIcon>\r\n <Eye fontSize=\"medium\" width={20} height={20} htmlColor=\"#292D32\" />\r\n </ListItemIcon>\r\n <ListItemText className=\"size15\">{t(\"common.change_password\")}</ListItemText>\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem\r\n className=\"menu-item-color\"\r\n onClick={() => {\r\n handleLogoutConfirmation();\r\n setAnchorEl(null);\r\n }}\r\n >\r\n <ListItemIcon>\r\n <img src={images.logout} alt=\"logout\" />\r\n </ListItemIcon>\r\n <ListItemText className=\"size15\">{t(\"common.logout\")}</ListItemText>\r\n </MenuItem>\r\n </Menu>\r\n );\r\n\r\n const appLogo = getApiConfig().appLogo || images.logo\r\n\r\n return (\r\n <>\r\n <Box className=\"main-box\">\r\n {!props.isDropdownShow && (\r\n <Link to={user ? Pathname.DASHBOARD : Pathname.LOGIN}>\r\n <img src={appLogo} alt=\"logo\" height={55}/>\r\n </Link>\r\n )}\r\n <Box className=\"second-box\">\r\n {props.isDropdownShow && (\r\n <>\r\n <IconButton onClick={handleBackButton}>\r\n <KeyboardBackspaceIcon\r\n className={isRtl ? \"arrow-pointer_rtl\" : \"arrow-pointer\"}\r\n />\r\n </IconButton>\r\n <Box width={250}>\r\n <Select\r\n fullWidth\r\n placeholder=\"Placeholder\"\r\n size={\"small\"}\r\n value={selectedModule?.link || \"\"}\r\n onChange={handleChange}\r\n className=\"select-box\"\r\n variant=\"outlined\"\r\n renderValue={(value: string) => (\r\n <>\r\n {selectedModule ? (\r\n <Box className=\"selected-menu-box\">\r\n <img\r\n src={selectedModule.icon}\r\n alt={selectedModule.label}\r\n />\r\n {selectedModule.label}\r\n </Box>\r\n ) : (\r\n value\r\n )}\r\n </>\r\n )}\r\n >\r\n {erp_modules.map((module: any, index: number) => (\r\n <MenuItem\r\n className=\"select-box-menu-item\"\r\n value={module.link}\r\n key={index}\r\n >\r\n <img src={module.icon} alt={module.label} />\r\n {module.label}\r\n </MenuItem>\r\n ))}\r\n </Select>\r\n </Box>\r\n </>\r\n )}\r\n </Box>\r\n <Box className=\"header-right-wrap\">\r\n {/* Language Selector with Enhanced Fallback Support */}\r\n <Box className=\"language-selector-wrapper\">\r\n {renderLanguageSelector()}\r\n </Box>\r\n\r\n {/* <IconButton\r\n size=\"small\"\r\n aria-label=\"notification bell\"\r\n className=\"p-0\"\r\n >\r\n <img src={logo.notification} alt=\"notification icon\" />\r\n </IconButton> */}\r\n <NotificationMenu />\r\n <IconButton\r\n size=\"small\"\r\n aria-label=\"help\"\r\n className=\"p-0\"\r\n >\r\n <img src={logo.question} alt=\"question icon\" />\r\n </IconButton>\r\n <img src={logo.vdivider} alt=\"divider icon\" />\r\n {localStorage.getItem(\"_tid\") ? (\r\n <Box className=\"user-profile-box\" onClick={handleProfileMenuOpen}>\r\n <Avatar\r\n size={32}\r\n src={user?.profile_image ? `${config?.s3BucketUrl}${user?.profile_image}` : undefined}\r\n alt={formatText(user?.full_name)}\r\n className=\"avatar-class\"\r\n />\r\n <div>\r\n <Typography className=\"profile-name\">\r\n {user?.full_name}\r\n </Typography>\r\n <Typography className=\"user-auth\">\r\n {user?.role_name}\r\n </Typography>\r\n </div>\r\n </Box>\r\n ) : (\r\n <IconButton\r\n size=\"large\"\r\n edge=\"end\"\r\n aria-label=\"account of current user\"\r\n aria-controls={menuId}\r\n aria-haspopup=\"true\"\r\n component={Link}\r\n to={Pathname.LOGIN}\r\n color=\"inherit\"\r\n >\r\n <LockIcon className=\"icon-btn\" />\r\n </IconButton>\r\n )}\r\n </Box>\r\n {renderMenu}\r\n </Box>\r\n\r\n {/* Logout Confirmation Dialog */}\r\n <ConfirmPopUp\r\n open={logoutConfirmation}\r\n title={t(\"common.logout\")}\r\n description={t('common.logout_confirmation') || \"Are you sure, you want to logout?\"}\r\n onConfirm={() => logout()}\r\n onClose={handleLogoutConfirmation}\r\n fullWidth\r\n maxWidth=\"xs\"\r\n buttonTexts={{\r\n confirm: t(\"common.logout\"),\r\n cancel: t(\"common.cancel\"),\r\n }}\r\n />\r\n\r\n <ResetPasswordModal showModal={showModal} setShowModal={setShowModal} />\r\n\r\n </>\r\n );\r\n}\r\n\r\nexport default Header;","import { styled } from \"@mui/material/styles\";\nimport MuiAppBar, { AppBarProps as MuiAppBarProps } from \"@mui/material/AppBar\";\nimport Toolbar from \"@mui/material/Toolbar\";\n// import MenuIcon from \"@mui/icons-material/Menu\";\nimport IconButton from \"@mui/material/IconButton\";\n\n// import { Box, FormControl, FormControlLabel, FormLabel, Radio, RadioGroup, ThemeProvider } from '@mui/material';\n\nimport Header from \"../header/header\";\n// import ThemeSelector from \"../../utils/themeSelector\";\n\nimport \"./appbar.scss\";\nimport images from \"../../assets/images\";\n// import { Box } from \"@mui/material\";\n\nlet drawerWidth: any;\n\ninterface AppBarProps extends MuiAppBarProps {\n open?: boolean;\n}\n\n// const getTheme = (selectedTheme: any) => {\n// switch (selectedTheme) {\n// case ThemeSelector.PRIMARY:\n// return themes.redStone;\n// case ThemeSelector.SECONDARY:\n// return themes.blueNavy;\n// case ThemeSelector.TERTIARY:\n// return themes.oliveGreen;\n// default:\n// return themes.redStone;\n// }\n// };\n\nconst AppBar = styled(MuiAppBar, {\n shouldForwardProp: (prop) => prop !== \"open\",\n})<AppBarProps>(({ theme, open }) => ({\n zIndex: theme.zIndex.drawer + 1,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n ...(open && {\n marginLeft: document.body.dir === \"ltr\" ? drawerWidth : 0,\n marginRight: document.body.dir === \"rtl\" ? drawerWidth : 0,\n width: `calc(100% - ${drawerWidth}px)`,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n }),\n boxShadow: \"none\",\n}));\n\nexport const AppBarWrapper = (props: any) => {\n drawerWidth = props.width;\n\n // const handleThemeChange = (e: any) => setSelectedTheme(e.target.value);\n\n return (\n <AppBar\n position=\"fixed\"\n open={props?.open}\n sx={(theme) => ({\n borderBottom: \"1px solid\",\n borderColor: theme.palette.theme?.secondary[200],\n backgroundColor: theme.palette.theme?.secondary[100],\n })}\n >\n {/* <FormControl>\n <FormLabel id=\"theme-radio-buttons-group-label\">Theme</FormLabel>\n <RadioGroup\n row\n value={selectedTheme}\n onChange={handleThemeChange}\n aria-labelledby=\"theme-radio-buttons-group-label\"\n name=\"row-radio-buttons-group\"\n >\n {Object.keys(ThemeSelector)?.map((variant: any, index: any) => (\n <FormControlLabel\n key={index}\n value={ThemeSelector[variant]}\n control={<Radio />}\n label={ThemeSelector[variant]}\n sx={{\n '.MuiFormControlLabel-label': {\n color: 'theme.text',\n },\n }}\n />\n ))}\n </RadioGroup>\n </FormControl> */}\n <Toolbar sx={{ backgroundColor: 'grey.100'}}>\n {props?.handleDrawerOpen ? (\n <>\n <IconButton\n color=\"inherit\"\n aria-label=\"open drawer\"\n // onClick={props.handleDrawerOpen}\n edge=\"start\"\n sx={{\n marginRight: 5,\n ...(props.open && { display: \"none\" }),\n }}\n >\n {/* <MenuIcon sx={{ color: \"theme.secondary.1000\" }} /> */}\n <img src={images.favicon} height={30} width={30}></img>\n </IconButton>\n {/* {!props.open && ( \n <Box marginRight={5}>\n <img src={images.favicon} height={30} width={30}></img>\n </Box>\n )} */}\n <Header isDropdownShow={true} />\n </>\n ) : (\n <>\n <Header isDropdownShow={false} />\n </>\n )}\n </Toolbar>\n {/* <Header /> */}\n </AppBar>\n );\n};\n\nexport default AppBarWrapper;\n","import Box from \"@mui/material/Box\";\r\nimport \"./activityArea.scss\";\r\n\r\nexport const ActivityArea = (props: any) => {\r\n return (\r\n <Box\r\n className=\"main-wrapper\"\r\n component=\"main\"\r\n width={\"100%\"}\r\n // sx={{ flexGrow: 1, p: 3, flexWrap: \"wrap\" }}\r\n marginTop=\"4.6875rem\"\r\n >\r\n {props.children}\r\n </Box>\r\n );\r\n};\r\n\r\nexport default ActivityArea;\r\n","import { Tooltip as MUITooltip, TooltipProps } from \"@mui/material\";\n\nconst Tooltip = ({ title, children, sx, ...rest }: TooltipProps) => {\n return (\n <MUITooltip\n componentsProps={{\n tooltip: {\n sx: {\n padding: \"0.5rem 0.75rem\",\n backgroundColor: \"#393B3E\",\n maxWidth: \"12rem\",\n '& .MuiTooltip-arrow': {\n color: \"#393B3E\"\n },\n ...sx\n },\n },\n }}\n title={title}\n {...rest}\n >\n {children}\n </MUITooltip>\n );\n};\n\nexport { Tooltip };\nexport default Tooltip;\n"],"names":["StyledButton","styled","MUIButton","theme","palette","fontSize","textTransform","minHeight","minWidth","padding","fontWeight","lineHeight","letterSpacing","backgroundColor","_a","primary","_b","border","boxShadow","color","_c","_d","secondary","_e","_f","error","_g","opacity","Button","props","children","variant","rest","jsx","StyledDialog","Dialog","borderRadius","display","alignItems","justifyContent","Modal","open","onClose","StyledSearch","TextField","borderBottom","input","paddingLeft","SelectSearch","forwardRef","searchPlaceholder","handleSearch","value","ref","inputRef","placeholder","onChange","fullWidth","InputProps","startAdornment","InputAdornment","position","SearchIcon","StyledSelect","MUISelect","borderColor","borderWidth","background","_h","_i","Select","memo","searchInputRef","useRef","label","dataPosition","dataName","required","searchValue","renderValue","helperText","loading","CustomDropdownIcon","ArrowDown","jsxs","Fragment","Typography","type","weight","mb","style","IconComponent","iconProps","MenuProps","PaperProps","sx","maxHeight","overflowY","anchorOrigin","vertical","horizontal","displayEmpty","onOpen","setTimeout","current","focus","Box","top","zIndex","margin","e","target","onClick","stopPropagation","onKeyDown","p","width","CircularProgress","size","FormHelperText","StyledTextField","MUITextField","borderStyle","marginLeft","_j","_k","marginRight","hidden","className","Avatar","icon","badge","src","alt","altIcon","avatarStyle","height","split","length","badgeSize","badgeBorder","altFirstChar","map","word","charAt","join","AvatarMUI","SvgIcon","Person2OutlinedIcon","ConfirmPopUp","t","useTranslation","title","description","onConfirm","modalType","buttonTexts","confirm","cancel","buttonColors","showAction","images","info","alert","isRtl","useLanguage","DialogTitle","ml","IconButton","disableRipple","disabled","CloseIcon","Divider","DialogContent","DialogActions","mr","endIcon","DynamicInput","React","Controller","control","formControl","name","fieldArrayName","render","field","fieldState","defaultValue","replace","shouldApplyPrecission","includes","step","float_step","decimalPlaces","String","Number","toFixed","toString","multiline","is_multiline","minRows","formType","minLength","min","endAdornment","edge","onIconClick","inputProps","min_length","Boolean","message","onBlur","propTypes","PropTypes","shape","register","func","isRequired","setValue","_formState","object","string","node","bool","number","max","max_length","typeOfField","defaultProps","StyledAlert","MUIAlert","Toast","handleUndo","handleClose","action","Close","Snackbar","autoHideDuration","severity","CheckCircleOutlineIcon","htmlColor","WarningAmberIcon","validationSchema","Yup","login","current_password","password","matches","confirm_password","oneOf","ResetPasswordModal","showModal","setShowModal","changeUserPassword","useAuth","toast","setToast","useState","handleSubmit","trigger","useForm","resolver","yupResolver","mode","onSubmit","async","values","showPassword","setShowPassword","showCurrentPassword","setShowCurrentPassword","showConfirmPassword","setShowConfirmPassword","FlexBox","flexDirection","gap","align","Eye","EyeOff","mainModuleIcons","rbac","user","document","accounting","inventory","manufacturing","sales","crm","rental","purchase","procurement","hrms","mainModuleBgColors","NotificationMenu","anchorEl","setAnchorEl","notifications","setNotifications","setLoading","loadingMore","setLoadingMore","setError","unreadCount","setUnreadCount","markingAllAsRead","setMarkingAllAsRead","pagination","setPagination","skip","limit","totalCount","hasMore","navigate","useNavigate","menuRef","isLoadingMoreRef","transformNotification","apiNotification","moduleIcons","AccountBalanceIcon","PersonIcon","approval","AssignmentIcon","id","notification_type","formatText","timestamp","dateString","date","Date","diffMs","diffMins","Math","floor","diffHours","diffDays","toLocaleDateString","formatTimestamp","created_at","read","status","avatar","performedUser","firstName","first_name","lastName","last_name","toUpperCase","getInitials","performed_user","performedByName","trim","getFullName","module","subModule","sub_module","subModuleId","sub_module_id","fetchNotifications","useCallback","isLoadMore","prev","currentSkip","response","getV1Notification","getToken","success","data","Error","transformedNotifications","newSkip","unread","err","handleScroll","event","scrollTop","scrollHeight","clientHeight","handleNotificationClick","notificationId","n","find","patchV1NotificationMarkAsReadId","url","moduleName","moduleId","notificationData","routeMap","sales_invoice","generateRouteWithId","PathnameGenerator","PathnameAccounting","VIEW_SALES_INVOICES","asset_transfers","VIEW_ASSET_TRANSFER","budgets","VIEW_BUDGET","cash_expense","VIEW_CASH_EXPENSE","credit_notes","VIEW_CREDIT_NOTE","debit_notes","VIEW_DEBIT_NOTE","expense_reimbursement","VIEW_EXPENSE_REIMBURSEMENT","journal_entries","VIEW_JOURNAL_ENTRY","payment_entries","VIEW_PAYMENT_ENTRY","purchase_invoice","VIEW_PURCHASE_INVOICE","stock_transfer","PathnameGeneratorInventory","PathnameInventory","VIEW_STOCK_TRANSFER","bills_of_materials","PathnameGeneratorManufacuring","PathnameManufacturing","VIEW_BILL_OF_MATERIAL","purchase_agreement","PathnameGeneratorPurchase","PathnamePurchase","VIEW_PURCHASE_AGREEMENT","purchase_orders","is_rental","RENTALROUTES","VIEW","VIEW_PURCHASE_ORDER","purchase_request","vra","VIEW_VENDOR_RETURNS","sales_customer_returns","PathnameGeneratorCrm","PathnameCrm","VIEW_CUSTOMER_RETURNS","sales_order","VIEW_SALES_ORDER","rental_order","PathnameGeneratorRental","PathnameRental","VIEW_RENTAL_ORDER","replacement_order","rental_agreement","VIEW_AGREEMENT","cross_hire_order","VIEW_CROSS_HIRE_ORDER","cross_hire_request","VIEW_CROSS_HIRE_REQUEST","convertToUnderscore","call","getNotificationUrl","getNotificationIcon","notification","EmailIcon","WarningIcon","CheckCircleIcon","handleMarkAllAsRead","enqueueSnackbar","getV1NotificationMarkAllAsRead","m","getErrorMessage","useEffect","currentTarget","Badge","badgeContent","Notification","Menu","slotProps","paper","overflow","maxWidth","content","right","bgcolor","transform","grey","transformOrigin","onScroll","px","py","startIcon","Tick","Skeleton","Alert","MenuItem","marginBottom","ListItemAvatar","mt","objectFit","ListItemText","pr","fontStyle","formatLabel","flexShrink","textAlign","Header","location","useLocation","logout","config","getApiConfig","languages","currentLanguage","changeLanguage","isLoading","languagesLoading","languageContextError","isFallbackActive","fetchLanguages","pathname","logoutConfirmation","setLogoutConfirmation","localLanguageError","setLocalLanguageError","u_data","localStorage","getItem","userData","JSON","parse","isMenuOpen","handleLogoutConfirmation","checkMatchedRoutes","paths","shouldMatch","Array","isArray","path","matchRoutes","erp_modules","useMemo","modules","selectedModule","link","toLowerCase","connectedRoutes","onChangeLang","lang_code","errorMsg","some","lang","code","language","handleRetryLanguages","menuId","renderMenu","keepMounted","role_id","ListItemIcon","role_name","tickicon","appLogo","logo","isDropdownShow","Link","to","Pathname","DASHBOARD","LOGIN","window","history","back","KeyboardBackspaceIcon","selectedLink","index","availableLanguages","direction","displayValue","renderLanguageSelector","question","vdivider","profile_image","s3BucketUrl","full_name","component","LockIcon","drawerWidth","AppBar","MuiAppBar","shouldForwardProp","prop","drawer","transition","transitions","create","easing","sharp","duration","leavingScreen","body","dir","enteringScreen","marginTop","Toolbar","handleDrawerOpen","favicon","debounceTime","isDrivePage","searchText","searchTerm","setSearchTerm","debouncedSearchRef","initialSearchTerm","setItem","debounce","autoComplete","SearchStatus","Search","MUITooltip","componentsProps","tooltip"],"mappings":"k/DAEMA,GAAeC,EAAAA,OAAOC,SAAPD,CACpB,EAAGE,OAASC,iCAAmC,MAAA,CAC9CC,SAAU,UACVC,cAAe,OACfC,UAAW,OACXC,SAAU,OACVC,QAAS,iBACTC,WAAY,MACZC,WAAY,UACZC,cAAe,cAEf,wBAAyB,CACxBC,gBAAiB,OAGlB,wBAAyB,CACxBA,gBAAiB,OAAAC,EAAAV,EAAQD,YAAR,EAAAW,EAAeC,QAAQ,KAExC,UAAW,CACVF,gBAAiB,OAAAG,EAAAZ,EAAQD,YAAR,EAAAa,EAAeD,QAAQ,OAI1C,uBAAwB,CACvBE,OAAQ,OACRC,UAAW,4GACXC,MAAO,OAAAC,EAAAhB,EAAQD,YAAR,EAAAiB,EAAeL,QAAQ,MAG/B,mBAAoB,CACnBI,MAAO,OAAAE,EAAAjB,EAAQD,YAAR,EAAAkB,EAAeC,UAAU,KAChCT,gBAAiB,QACjB,UAAW,CACVM,MAAO,OAAAI,EAAAnB,EAAQD,YAAR,EAAAoB,EAAeR,QAAQ,MAE/B,yBAA0B,CAAA,GAK3B,6BAA8B,CAC7BF,gBAAiB,OAAAW,EAAApB,EAAQD,YAAR,EAAAqB,EAAeC,MAAM,KACtC,UAAW,CACVZ,gBAAiB,OAAAa,EAAAtB,EAAQD,YAAR,EAAAuB,EAAeD,MAAM,OAIxC,iBAAkB,CACjBE,QAAS,OAKNC,GAAUC,IACf,MAAMC,SAAEA,EAAAC,QAAUA,EAAU,eAAgBC,GAASH;AAErD,OACCI,EAAAA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G.js","sources":["../src/components/button/button.tsx","../src/components/modal/modal.tsx","../src/components/select/select-search.tsx","../src/components/select/select.tsx","../src/components/search-bar/search-bar.tsx","../src/components/text-field/text-field.tsx","../src/components/avatar/avatar.tsx","../src/components/confirm-modal/confirm-modal.tsx","../src/components/form-control/form-builder/form-builder-element/text.tsx","../src/components/toast/toast.tsx","../src/components/reset-password-modal/reset-password-modal.tsx","../src/components/header/components/notification-menu/notification-menu.tsx","../src/components/header/header.tsx","../src/components/appbar/appbar.tsx","../src/components/activityArea/activityArea.tsx","../src/components/tooltip/Tooltip.tsx"],"sourcesContent":["import { Button as MUIButton, ButtonProps, styled } from '@mui/material';\r\n\r\nconst StyledButton = styled(MUIButton)(\r\n\t({ theme: { palette, } /* , variant */ }) => ({\r\n\t\tfontSize: '.875rem',\r\n\t\ttextTransform: 'none',\r\n\t\tminHeight: '0rem',\r\n\t\tminWidth: '0rem',\r\n\t\tpadding: '0.25rem .75rem',\r\n\t\tfontWeight: '500',\r\n\t\tlineHeight: '1.25rem',\r\n\t\tletterSpacing: '-0.01875rem',\r\n\r\n\t\t'&.MuiButton-startIcon': {\r\n\t\t\tbackgroundColor: 'red'\r\n\t\t},\r\n\r\n\t\t'&.MuiButton-contained': {\r\n\t\t\tbackgroundColor: palette.theme?.primary[700],\r\n\t\t\t// boxShadow: '0px 0px 2px 0px #E0E0E0, 0px 1px 4px -2px rgba(24, 39, 75, 0.02), 0px 4px 4px -2px rgba(24, 39, 75, 0.06)',\r\n\t\t\t'&:hover': {\r\n\t\t\t\tbackgroundColor: palette.theme?.primary[800]\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t'&.MuiButton-outlined': {\r\n\t\t\tborder: 'none',\r\n\t\t\tboxShadow: '0px 0px 2px 0px #E0E0E0, 0px 1px 4px -2px rgba(24, 39, 75, 0.02), 0px 4px 4px -2px rgba(24, 39, 75, 0.06)',\r\n\t\t\tcolor: palette.theme?.primary[700]\r\n\t\t},\r\n\r\n\t\t'&.MuiButton-text': {\r\n\t\t\tcolor: palette.theme?.secondary[1000],\r\n\t\t\tbackgroundColor: 'white',\r\n\t\t\t'&:hover': {\r\n\t\t\t\tcolor: palette.theme?.primary[700]\r\n\t\t\t},\r\n\t\t\t'& .MuiButton-startIcon': {\r\n\t\t\t\t// background: palette.theme?.primary[400],\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t'&.MuiButton-containedError': {\r\n\t\t\tbackgroundColor: palette.theme?.error[500],\r\n\t\t\t'&:hover': {\r\n\t\t\t\tbackgroundColor: palette.theme?.error[600]\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t'&.Mui-disabled': {\r\n\t\t\topacity: 0.5\r\n\t\t}\r\n\t})\r\n);\r\n\r\nconst Button = (props: ButtonProps) => {\r\n\tconst { children, variant = 'contained', ...rest } = props;\r\n\r\n\treturn (\r\n\t\t<StyledButton variant={variant} {...rest}>\r\n\t\t\t{children}\r\n\t\t</StyledButton>\r\n\t);\r\n};\r\n\r\nexport { Button };\r\nexport default Button;\r\n","import { Dialog, DialogProps, styled } from \"@mui/material\";\r\n\r\nconst StyledDialog = styled(Dialog)(() => ({\r\n \".MuiDialog-paper\": {\r\n borderRadius: \"1rem\",\r\n },\r\n\r\n \".MuiDialogTitle-root\": {\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n justifyContent: \"space-between\",\r\n padding: \"0.5rem 1.5rem\",\r\n },\r\n\r\n \".MuiDialogContent-root\": {\r\n padding: \"1.5rem\",\r\n },\r\n\r\n \".MuiDialogActions-root\": {\r\n padding: \"0.5rem 1rem\",\r\n },\r\n}));\r\n\r\nconst Modal = ({ children, open, onClose, ...rest }: DialogProps) => {\r\n return (\r\n <StyledDialog open={open} onClose={onClose} {...rest}>\r\n {children}\r\n </StyledDialog>\r\n );\r\n};\r\n\r\nexport { Modal };\r\nexport default Modal;\r\n","/* eslint-disable @typescript-eslint/no-unused-vars */\r\n/* eslint-disable unused-imports/no-unused-imports */\r\nimport { InputAdornment, TextField, styled } from \"@mui/material\";\r\nimport SearchIcon from \"@mui/icons-material/Search\";\r\nimport React, { forwardRef } from 'react';\r\n\r\nconst StyledSearch = styled(TextField)(({ theme: { palette } }) => ({\r\n padding: \"0rem 0.75rem 0.5rem 0.75rem\",\r\n borderBottom: `1px solid ${palette.theme?.secondary[200]}`,\r\n input: {\r\n padding: \"0.5rem 0rem\",\r\n },\r\n \".MuiOutlinedInput-notchedOutline\": {\r\n border: 0,\r\n },\r\n \"& .MuiOutlinedInput-root\": {\r\n fontSize: \"0.8125rem\",\r\n paddingLeft: \"0.5rem\",\r\n color: palette.theme?.secondary[800],\r\n // backgroundColor: palette.theme?.secondary[200],\r\n border: \"1px solid #F5F6F5\",\r\n borderRadius: \"0.5rem\",\r\n \":hover .MuiOutlinedInput-notchedOutline\": {\r\n border: 1,\r\n },\r\n \"&.Mui-focused fieldset\": {\r\n border: 0,\r\n },\r\n },\r\n}));\r\n\r\nconst SelectSearch = forwardRef<HTMLInputElement, any>(\r\n ({ searchPlaceholder, handleSearch, value, ...rest }, ref) => (\r\n <StyledSearch\r\n inputRef={ref} // Attach the ref here for focusing\r\n placeholder={searchPlaceholder}\r\n onChange={handleSearch}\r\n value={value}\r\n fullWidth\r\n variant=\"outlined\"\r\n InputProps={{\r\n startAdornment: (\r\n <InputAdornment position=\"start\">\r\n <SearchIcon fontSize=\"small\" />\r\n </InputAdornment>\r\n ),\r\n }}\r\n {...rest}\r\n />\r\n )\r\n);\r\n\r\nexport { SelectSearch };\r\nexport default SelectSearch;\r\n","/* eslint-disable no-mixed-spaces-and-tabs */\r\n\r\nimport {\r\n Box,\r\n\tCircularProgress,\r\n\tFormHelperText,\r\n\tSelect as MUISelect,\r\n\tstyled\r\n} from '@mui/material';\r\nimport Typography from '../typography/typography';\r\nimport SelectSearch from './select-search';\r\nimport { memo, useRef } from 'react';\r\nimport './controller/controller-select.scss'\r\nimport { ArrowDown } from '../icons';\r\nconst StyledSelect = styled(MUISelect)(({ theme: { palette } }) => ({\r\n\tcolor: palette.theme?.secondary[800],\r\n\tfontSize: ' 0.875rem',\r\n\t'.MuiOutlinedInput-notchedOutline': {\r\n\t\tborderColor: palette.theme?.secondary[300]\r\n\t},\r\n\t'&.Mui-focused .MuiOutlinedInput-notchedOutline': {\r\n\t\tborderWidth: '0.0625rem',\r\n\t\tborderColor: palette.theme?.primary[700]\r\n\t},\r\n\t'&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline': {\r\n\t\tborderWidth: '0.0625rem',\r\n\t\tborderColor: palette.theme?.error[600]\r\n\t},\r\n\t'&:hover .MuiOutlinedInput-notchedOutline': {\r\n\t\tborderColor: palette.theme?.secondary[400]\r\n\t},\r\n\t'&.Mui-error:hover .MuiOutlinedInput-notchedOutline': {\r\n\t\tborderColor: palette.theme?.error[600]\r\n\t},\r\n\t'&.Mui-disabled': {\r\n\t\tbackground: palette.theme?.secondary[200],\r\n\t\tcolor: palette.theme?.secondary[800]\r\n\t},\r\n\r\n\t'.MuiMenuItem-root': {\r\n\t\tfontSize: '10px'\r\n\t},\r\n\t'&.Mui-error': {\r\n\t\tcolor: palette.theme?.error[600],\r\n\t\t'&fieldset': {\r\n\t\t\tborderColor: 'grey'\r\n\t\t}\r\n\t}\r\n}));\r\n\r\nconst Select = memo((props: any) => {\r\n\tconst searchInputRef = useRef<HTMLInputElement>(null);\r\n\tconst {\r\n\t\tchildren,\r\n\t\tlabel,\r\n\t\thandleSearch,\r\n\t\tdataPosition,\r\n\t\tdataName,\r\n\t\tplaceholder,\r\n\t\tsearchPlaceholder,\r\n\t\trequired,\r\n\t\tsearchValue,\r\n\t\tfullWidth = false,\r\n\t\tonChange,\r\n\t\trenderValue,\r\n\t\terror,\r\n\t\thelperText,\r\n\t\tloading = false,\r\n\t\tCustomDropdownIcon = ArrowDown,\r\n\t\t...rest\r\n\t} = props;\r\n\r\n\t\r\n\tconst handleOpen = () => {\r\n setTimeout(() => {\r\n if (searchInputRef.current) {\r\n searchInputRef.current.focus(); // Focus the search input\r\n }\r\n }, 0);\r\n };\r\n\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{label && (\r\n\t\t\t\t<Typography\r\n\t\t\t\t\ttype='s5'\r\n\t\t\t\t\tweight='medium'\r\n\t\t\t\t\tdata-position={dataPosition}\r\n\t\t\t\t\tdata-name={dataName}\r\n\t\t\t\t\tmb={0.5}\r\n\t\t\t\t\tcolor={error ? 'theme.error.600' : 'theme.secondary.800'}>\r\n\t\t\t\t\t{label} {required && <span style={{ color: '#c64d4d' }}>*</span>}\r\n\t\t\t\t</Typography>\r\n\t\t\t)}\r\n<StyledSelect\r\n IconComponent={(iconProps) => <CustomDropdownIcon {...iconProps} fontSize='small' />}\r\n MenuProps={{\r\n PaperProps: {\r\n sx: {\r\n maxHeight: 300, // Scrollable area for dropdown\r\n overflowY: 'auto',\r\n },\r\n },\r\n anchorOrigin: {\r\n vertical: 'bottom',\r\n horizontal: 'center',\r\n },\r\n }}\r\n displayEmpty\r\n fullWidth={fullWidth}\r\n renderValue={\r\n renderValue ??\r\n ((value: any) =>\r\n value !== '' ? (\r\n (value as any)\r\n ) : (\r\n <Typography color='inherit' type='s3'>\r\n {placeholder}\r\n </Typography>\r\n ))\r\n }\r\n onChange={onChange}\r\n error={error}\r\n\tonOpen={handleOpen} \r\n {...rest}\r\n>\r\n {handleSearch && (\r\n <Box\r\n sx={{\r\n position: 'sticky',\r\n top: 0,\r\n zIndex: 1, // Ensure it's above the dropdown items\r\n backgroundColor: '#fff',\r\n // padding: '0.5rem',\r\n\t\t\t\tmargin: '-4px -4px 0 -4px',\r\n\t\t\t\tmb: 0.5\r\n }}\r\n >\r\n <SelectSearch\r\n\t\t\t\tref={searchInputRef}\r\n searchPlaceholder={searchPlaceholder}\r\n handleSearch={(e: any) => handleSearch(e.target.value)}\r\n value={searchValue}\r\n onClick={(e) => e.stopPropagation()}\r\n onKeyDown={(e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tif (props?.value) {\r\n\t\t\t\t\t\tsetTimeout(() => searchInputRef.current?.focus(), 0); \r\n\t\t\t\t\t}\r\n\t\t \t}}\r\n\t\t\t\tsx={{\r\n\t\t\t\t\tp: 1,\r\n\t\t\t\t}}\r\n />\r\n </Box>\r\n )}\r\n {loading ? (\r\n <Box\r\n sx={{\r\n display: 'flex',\r\n width: '100%',\r\n p: 2,\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n }}\r\n >\r\n <CircularProgress size={30} color='inherit' />\r\n </Box>\r\n ) : (\r\n children\r\n )}\r\n</StyledSelect>\r\n\r\n\t\t\t{helperText && <FormHelperText error={error}>{helperText}</FormHelperText>}\r\n\t\t</>\r\n\t);\r\n});\r\n\r\nexport { Select };\r\nexport default Select;\r\n","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport { debounce } from \"lodash\";\r\nimport React, { useState, useEffect, useRef } from \"react\";\r\nimport { SxProps, TextField, styled, Theme } from \"@mui/material\";\r\n// import images from \"../../assets/images\";\r\n\r\nimport \"./search-bar.scss\";\r\nimport { Search, SearchStatus } from \"../icons\";\r\n\r\nconst StyledSearch = styled(TextField)(({ theme: { palette } }) => ({\r\n \"&.MuiTextField-root\": {\r\n backgroundColor: palette.theme?.secondary[200],\r\n borderRadius: \"0.5rem\",\r\n padding: \"0.375rem 0.75rem\",\r\n },\r\n \"& .MuiOutlinedInput-input\": {\r\n fontSize: \"0.875rem\",\r\n padding: \"0rem\",\r\n paddingLeft: \"1.375rem\",\r\n },\r\n \".MuiOutlinedInput-notchedOutline\": {\r\n border: \"none\",\r\n },\r\n}));\r\n\r\ninterface ISearchBar {\r\n placeholder?: string;\r\n handleSearch: (key: string) => void;\r\n debounceTime?: number;\r\n className?: string;\r\n InputProps?: any;\r\n sx?: SxProps<Theme>;\r\n isDrivePage?: boolean;\r\n searchText?:string\r\n}\r\n\r\nconst SearchBar = ({\r\n handleSearch,\r\n debounceTime = 300,\r\n className,\r\n InputProps,\r\n isDrivePage,\r\n searchText,\r\n value = '',\r\n ...rest\r\n}: ISearchBar) => {\r\n const [searchTerm, setSearchTerm] = useState(\"\");\r\n\r\n const debouncedSearchRef = useRef<(value: string) => void>();\r\n\r\n // Set `searchTerm` from localStorage on mount and clear `localStorage` if needed\r\n useEffect(() => {\r\n const initialSearchTerm = isDrivePage ? localStorage.getItem(\"searchTerm\") || \"\" : \"\";\r\n setSearchTerm(initialSearchTerm);\r\n\r\n // Set `localStorage` to an empty string on the first render\r\n if (isDrivePage) {\r\n localStorage.setItem(\"searchTerm\", \"\");\r\n }\r\n }, [isDrivePage]);\r\n\r\n useEffect(() => {\r\n setSearchTerm((typeof searchText=='string' && searchText) || '')\r\n }, [searchText])\r\n\r\n // Initialize the debounced function only once\r\n useEffect(() => {\r\n debouncedSearchRef.current = debounce((value: string) => handleSearch(value), debounceTime);\r\n \r\n // Cleanup function to cancel debounced call on component unmount\r\n return () => {\r\n debouncedSearchRef.current?.cancel();\r\n };\r\n }, [handleSearch, debounceTime]);\r\n\r\n useEffect(() => {\r\n setSearchTerm(value || '')\r\n }, [])\r\n\r\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n const value = e.target.value;\r\n setSearchTerm(value);\r\n if (isDrivePage) {\r\n localStorage.setItem(\"searchTerm\", value);\r\n }\r\n\r\n // Call the debounced search function\r\n if (debouncedSearchRef.current) {\r\n debouncedSearchRef.current(value);\r\n }\r\n };\r\n\r\n const handleKeyDown = (event: any) => {\r\n event.stopPropagation();\r\n };\r\n\r\n const handleClick = (event: any) => {\r\n event.stopPropagation();\r\n };\r\n\r\n return (\r\n <div className={`${className} search-wrapper`}>\r\n <StyledSearch\r\n fullWidth\r\n className=\"s3\"\r\n value={searchTerm}\r\n onChange={handleChange}\r\n onKeyDown={handleKeyDown}\r\n onClick={handleClick}\r\n autoComplete=\"off\"\r\n InputProps={InputProps}\r\n {...rest}\r\n />\r\n <span className=\"search-icon\">\r\n {\r\n searchTerm ?\r\n <SearchStatus fontSize=\"small\" sx={{ color: searchTerm ? \"grey.900\": \"grey.700\" }}/> : \r\n <Search fontSize=\"small\" sx={{ color: searchTerm ? \"grey.900\": \"grey.700\" }}/>\r\n }\r\n </span>\r\n {/* <img src={images.search} alt=\"search icon\" /> */}\r\n </div>\r\n );\r\n};\r\n\r\nexport { SearchBar };\r\nexport default SearchBar;\r\n","import {\r\n TextField as MUITextField,\r\n // TextFieldProps,\r\n styled,\r\n} from \"@mui/material\";\r\nimport \"./text-field.scss\";\r\nimport Typography from \"../typography/typography\";\r\nimport { memo } from \"react\";\r\n\r\nconst StyledTextField = styled(MUITextField)(({ theme: { palette } }) => ({\r\n \"& .MuiOutlinedInput-root\": {\r\n padding: \"0\",\r\n color: palette.theme?.secondary[800],\r\n \"& fieldset\": {\r\n borderColor: palette.theme?.secondary[400],\r\n },\r\n \"&:hover fieldset\": {\r\n borderColor: palette.theme?.secondary[500],\r\n },\r\n \"&.Mui-focused fieldset\": {\r\n borderWidth: \"0.0625rem\",\r\n borderStyle: \"solid\",\r\n borderColor: palette.theme?.primary[700],\r\n },\r\n \"&.Mui-error fieldset\": {\r\n borderColor: palette.theme?.error[600],\r\n },\r\n \"&.Mui-error .MuiInputBase-input::placeholder\": {\r\n color: palette.theme?.error[600],\r\n },\r\n \"&.Mui-disabled\": {\r\n background: palette.theme?.secondary[200],\r\n color: palette.theme?.secondary[800],\r\n },\r\n \"& .MuiInputBase-input::placeholder\": {\r\n color: palette.theme?.secondary[800],\r\n opacity: 1,\r\n },\r\n },\r\n \"& .MuiFormHelperText-root\": {\r\n marginLeft: 0,\r\n color: palette.theme?.secondary[800],\r\n \"&.Mui-error\": {\r\n color: palette.theme?.error[600],\r\n },\r\n },\r\n \"& .MuiIconButton-root\": {\r\n marginRight: 0,\r\n },\r\n}));\r\n\r\nconst TextField = memo((props: any) => {\r\n const {\r\n required,\r\n placeholder,\r\n label,\r\n error = false,\r\n dataPosition,\r\n dataName,\r\n hidden,\r\n ...rest\r\n } = props;\r\n return (\r\n <>\r\n {label && !hidden && (\r\n <Typography\r\n type=\"s5\"\r\n weight={\"medium\"}\r\n mb={0.5}\r\n color={error ? \"theme.error.600\" : \"theme.secondary.800\"}\r\n data-position={dataPosition}\r\n data-name={dataName}\r\n >\r\n {label} {required && <span className=\"requiredStar\">*</span>}\r\n </Typography>\r\n )}\r\n <StyledTextField\r\n error={error}\r\n placeholder={placeholder}\r\n className=\"textfield\"\r\n hidden={hidden}\r\n {...rest}\r\n />\r\n </>\r\n );\r\n});\r\n\r\nexport { TextField };\r\nexport default TextField;\r\n","import { Avatar as AvatarMUI, SvgIcon } from \"@mui/material\";\nimport Person2OutlinedIcon from \"@mui/icons-material/Person2Outlined\";\nimport \"./avatar.scss\";\n\nexport const Avatar = (props: any) => {\n const { icon, badge, src, alt, size, altIcon, ...rest } = props;\n const avatarStyle = {\n height: size,\n width: size,\n };\n\n const fontSize = size * (alt && alt.split(\" \").length > 1 ? 0.025 : 0.035);\n const badgeSize = size * 0.0225;\n const badgeBorder = size * 0.004;\n let altFirstChar = \"\";\n\n if (alt && alt.length > 0) {\n const words = alt.split(\" \");\n altFirstChar = words.map((word: string) => word.charAt(0)).join(\"\");\n }\n\n return (\n <div className=\"Avatar\">\n <AvatarMUI\n alt={alt}\n src={src ? src : undefined}\n style={avatarStyle}\n {...rest}\n >\n {icon && (!src || (alt && alt.length === 0)) && (\n <>\n {altIcon ? (\n <SvgIcon>{altIcon}</SvgIcon>\n ) : (\n <Person2OutlinedIcon\n style={{ fontSize: `${fontSize + 0.8}rem` }}\n />\n )}\n </>\n )}\n {!icon && !src && (\n <span\n className=\"Avatar--FirstChar\"\n style={{ fontSize: `${fontSize}rem` }}\n >\n {altFirstChar}\n </span>\n )}\n </AvatarMUI>\n\n {badge && (\n <div\n className=\"Avatar--Badge\"\n style={{\n width: `${badgeSize}rem`,\n height: `${badgeSize}rem`,\n border: `${badgeBorder}rem solid #ffffff`,\n }}\n />\n )}\n </div>\n );\n};\n\nexport default Avatar;\n","import {\n\tBox,\n\tCircularProgress,\n\tDialog,\n\tDialogActions,\n\tDialogContent,\n\tDialogProps,\n\tDialogTitle,\n\tDivider,\n\tIconButton\n} from '@mui/material';\nimport CloseIcon from '@mui/icons-material/Close';\nimport Typography from '../typography/typography';\nimport Button from '../button/button';\nimport './confirm-modal.scss';\nimport images from '../../assets/images';\nimport { useLanguage } from '../../hooks/useLangauge';\nimport { useTranslation } from 'react-i18next';\n\ninterface ConfirmPopUpProps extends DialogProps {\n\ttitle: string;\n\tdescription: string | JSX.Element;\n\tonClose: () => void;\n\tonConfirm: () => void;\n\tbuttonTexts?: {\n\t\tconfirm: string;\n\t\tcancel: string;\n\t};\n\tbuttonColors?: {\n\t\tconfirm: string;\n\t\tcancel?: string;\n\t};\n\tmodalType?: 'alert' | 'info';\n\tloading?: boolean;\n\tshowAction?: boolean;\n}\n\nexport const ConfirmPopUp = (props: ConfirmPopUpProps) => {\n\tconst { t } = useTranslation();\n\tconst {\n\t\topen,\n\t\ttitle,\n\t\tdescription,\n\t\tonClose,\n\t\tonConfirm,\n\t\tmodalType = 'alert',\n\t\tbuttonTexts = { confirm: t('common.delete'), cancel: t('common.cancel') },\n\t\tbuttonColors = { confirm: 'error' },\n\t\tloading = false,\n\t\tshowAction=true,\n\t\t...rest\n\t} = props;\n\n\tconst icon = modalType === 'info' ? images.info : images.alert;\n const {isRtl}=useLanguage();\n\treturn (\n\t\t<>\n\t\t\t<Dialog open={open} onClose={onClose} className='confirm' {...rest}>\n\t\t\t\t<DialogTitle className='confirm--head'>\n\t\t\t\t\t<Box className='confirm--title'>\n\t\t\t\t\t\t<img src={icon} alt='alert icon' />{' '}\n\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\ttype='s3'\n\t\t\t\t\t\t\tml={1}\n\t\t\t\t\t\t\tweight='medium'\n\t\t\t\t\t\t\tcolor='theme.secondary.1000'>\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t</Typography>\n\t\t\t\t\t</Box>\n\t\t\t\t\t<IconButton disableRipple onClick={onClose} disabled={loading}>\n\t\t\t\t\t\t<CloseIcon />\n\t\t\t\t\t</IconButton>\n\t\t\t\t</DialogTitle>\n\t\t\t\t<Divider />\n\t\t\t\t<DialogContent className='confirm--content'>\n\t\t\t\t\t<Typography type='s3' color='theme.secondary.1000'>\n\t\t\t\t\t\t{description}\n\t\t\t\t\t</Typography>\n\t\t\t\t</DialogContent>\n\t\t\t\t<Divider />\n\t\t\t\t{showAction &&<DialogActions\n\t\t\t\t\tclassName='confirm--actions'\n\t\t\t\t\tsx={{ backgroundColor: 'theme.secondary.200' }}>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant='text'\n\t\t\t\t\t\tonClick={onClose}\n\t\t\t\t\t\tcolor={buttonColors?.cancel}\n\t\t\t\t\t\tdisabled={loading}>\n\t\t\t\t\t\t{buttonTexts.cancel}\n\t\t\t\t\t</Button>\n\t\t\t\t{buttonTexts.confirm &&<Button\n\t\t\t\t\t\tcolor={buttonColors.confirm}\n\t\t\t\t\t\tonClick={onConfirm}\n\t\t\t\t\t\tsx={isRtl?{mr: 1}:{}}\n\t\t\t\t\t\tendIcon={loading && <CircularProgress size={18} color='inherit' />}\n\t\t\t\t\t\tdisabled={loading}>\n\t\t\t\t\t\t{buttonTexts.confirm}\n\t\t\t\t\t</Button>}\n\t\t\t\t</DialogActions>}\n\t\t\t</Dialog>\n\t\t</>\n\t);\n};\n\nexport default ConfirmPopUp;\n","import { Controller } from \"react-hook-form\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport TextField from \"../../../text-field/text-field\";\r\n\r\nimport \"./element.scss\";\r\nimport { IconButton, InputAdornment } from \"@mui/material\";\r\nimport React from \"react\";\r\n\r\nconst DynamicInput = React.memo((props: any) => {\r\n\r\n return (\r\n <Controller\r\n control={props.formControl}\r\n name={`${props.fieldArrayName}.${props.name}`}\r\n // defaultValue={props.defaultValue || \"\"}\r\n render={({ field, fieldState }) => (\r\n <TextField\r\n {...field}\r\n dataPosition={props.position}\r\n dataName={`${props.fieldArrayName}.${props.name}`}\r\n fullWidth\r\n label={props.label}\r\n defaultValue={\r\n props.type === \"number\" ||\r\n props.type === \"currency\" ||\r\n props.type === \"geoLocation\"\r\n ? typeof props.defaultValue === 'string' ? props.defaultValue.replace(/[^0-9]/g, \"\") : props.defaultValue\r\n : props.defaultValue || \"\"\r\n }\r\n // value={props.formType === \"builder\" ? props.defaultValue : \"\"}\r\n placeholder={props.placeholder}\r\n // onChange={(e) => {\r\n // field.onChange(e);\r\n // props.formControl.fieldArrayDirty[props.fieldArrayName] = true;\r\n // }}\r\n type={\r\n props.type === \"currency\" ||\r\n props.type === \"geoLocation\" ||\r\n props.type === \"relation\"\r\n ? \"text\"\r\n : props.type || \"text\"\r\n }\r\n // value={\r\n // props.type === \"number\" && typeof field.value === 'number'\r\n // ? (props?.shouldApplyPrecission === false || ['exchange_rate'].includes(props.name)) ? field.value : field.value.toFixed(2)\r\n // : field.value || \"\"\r\n // }\r\n value={\r\n props.type === \"number\" && typeof field.value === 'number'\r\n ? (props?.shouldApplyPrecission === false || ['exchange_rate'].includes(props.name)) \r\n ? field.value \r\n : (() => {\r\n const step = props?.float_step\r\n const decimalPlaces = step && step !== 'any' \r\n ? (String(step).split('.')[1]?.length ?? 2)\r\n : 2\r\n console.log(\"+++++++\", field.value, decimalPlaces)\r\n return Number(field.value.toFixed(decimalPlaces)).toString()\r\n })()\r\n : field.value || \"\"\r\n }\r\n multiline={props.is_multiline || false}\r\n minRows={4}\r\n required={props.formType === \"builder\" ? false : props.required}\r\n // onChange={(e) => {\r\n // return;\r\n // }}\r\n InputProps={{\r\n // inputMode: 'numeric',\r\n // pattern: '[0-9]*',\r\n minLength: props.min || 1,\r\n // maxLength: props.max || 255,\r\n // step: props?.float_step || \"0\",\r\n endAdornment: props.endIcon ? (\r\n <InputAdornment position=\"end\">\r\n <IconButton edge=\"end\" onClick={props?.onIconClick}>\r\n {props.endIcon}\r\n </IconButton>\r\n </InputAdornment>\r\n ) : undefined,\r\n ...props.InputProps,\r\n }}\r\n inputProps={{\r\n step: props?.float_step || 'any',\r\n min: props.min_length || undefined,\r\n // max: props.max_length,\r\n }}\r\n disabled={props.disabled}\r\n hidden={props.hidden}\r\n error={Boolean(fieldState.error?.message)}\r\n helperText={fieldState.error?.message || \"\"}\r\n onBlur={(e: any) => {\r\n field.onBlur(e)\r\n if (props.onBlur && typeof props.onBlur === 'function') {\r\n props.onBlur(e)\r\n }\r\n }}\r\n />\r\n )}\r\n />\r\n );\r\n});\r\n\r\nDynamicInput.propTypes = {\r\n formControl: PropTypes.shape({\r\n register: PropTypes.func.isRequired,\r\n setValue: PropTypes.func,\r\n _formState: PropTypes.object.isRequired,\r\n }).isRequired,\r\n name: PropTypes.string.isRequired,\r\n placeholder: PropTypes.string.isRequired,\r\n label: PropTypes.node.isRequired,\r\n fieldArrayName: PropTypes.string,\r\n defaultValue: PropTypes.string,\r\n type: PropTypes.string,\r\n required: PropTypes.bool,\r\n is_multiline: PropTypes.bool,\r\n min: PropTypes.number,\r\n max: PropTypes.number,\r\n min_length: PropTypes.number,\r\n max_length: PropTypes.number,\r\n float_step: PropTypes.string,\r\n position: PropTypes.number,\r\n formType: PropTypes.string,\r\n disabled: PropTypes.bool,\r\n typeOfField: PropTypes.string,\r\n endIcon: PropTypes.node,\r\n onIconClick: PropTypes.func,\r\n onBlur: PropTypes.func, // This should be optional\r\n hidden: PropTypes.bool,\r\n InputProps: PropTypes.object,\r\n shouldApplyPrecission: PropTypes.bool\r\n};\r\nDynamicInput.defaultProps = {\r\n onBlur: () => { }\r\n};\r\n\r\n\r\n\r\n\r\nexport { DynamicInput };\r\nexport default DynamicInput;","import Close from \"@mui/icons-material/Close\";\r\nimport {\r\n Alert as MUIAlert,\r\n IconButton,\r\n Snackbar,\r\n SnackbarProps,\r\n styled,\r\n} from \"@mui/material\";\r\nimport WarningAmberIcon from \"@mui/icons-material/WarningAmber\";\r\nimport CheckCircleOutlineIcon from \"@mui/icons-material/CheckCircleOutline\";\r\nimport \"./toast.scss\";\r\nimport Typography from \"../typography/typography\";\r\n\r\ninterface IToast extends SnackbarProps {\r\n handleClose: () => void;\r\n type?: \"normal\" | \"alert\";\r\n handleUndo?: () => void;\r\n}\r\n\r\nconst StyledAlert = styled(MUIAlert)(({ theme: { palette } }) => ({\r\n color: \"white\",\r\n height: \"2.5rem\",\r\n padding: \"0rem 1rem\",\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n\r\n \"&.MuiAlert-standardWarning\": {\r\n backgroundColor: palette.theme?.error[600],\r\n },\r\n\r\n \"&.MuiAlert-standardInfo\": {\r\n backgroundColor: palette.theme?.secondary[900],\r\n },\r\n\r\n \".MuiAlert-action\": {\r\n padding: \"0rem\",\r\n marginLeft: \"0.5rem\",\r\n },\r\n\r\n \".MuiAlert-icon\": {\r\n marginRight: \"0.5rem\",\r\n },\r\n}));\r\n\r\nconst Toast = (props: IToast) => {\r\n const {\r\n open,\r\n message,\r\n type = \"alert\",\r\n handleUndo,\r\n handleClose,\r\n ...rest\r\n } = props;\r\n\r\n const action = (\r\n <>\r\n {handleUndo ? (\r\n <Typography\r\n className=\"toast-undo\"\r\n type=\"s4\"\r\n color={type === \"normal\" ? \"theme.primary.600\" : \"white\"}\r\n onClick={handleUndo}\r\n >\r\n Undo\r\n </Typography>\r\n ) : (\r\n <IconButton color=\"inherit\" className=\"icon\" onClick={handleClose}>\r\n <Close fontSize=\"inherit\" />\r\n </IconButton>\r\n )}\r\n </>\r\n );\r\n\r\n return (\r\n <>\r\n <Snackbar\r\n open={open}\r\n autoHideDuration={300000}\r\n onClose={handleClose}\r\n {...rest}\r\n >\r\n <StyledAlert\r\n action={action}\r\n onClose={handleClose}\r\n severity={type === \"normal\" ? \"info\" : \"warning\"}\r\n icon={\r\n type === \"normal\" ? (\r\n <CheckCircleOutlineIcon htmlColor=\"white\" className=\"icon\" />\r\n ) : (\r\n <WarningAmberIcon htmlColor=\"white\" className=\"icon\" />\r\n )\r\n }\r\n >\r\n <Typography color=\"inherit\" type=\"s4\">\r\n {message}\r\n </Typography>\r\n </StyledAlert>\r\n </Snackbar>\r\n </>\r\n );\r\n};\r\n\r\nexport { Toast };\r\nexport default Toast;\r\n","import { useState } from \"react\";\r\nimport Modal from \"../modal/modal\";\r\nimport { useForm } from \"react-hook-form\";\r\nimport { LoginFormValues } from \"../../contexts/AuthContext\";\r\nimport { yupResolver } from \"@hookform/resolvers/yup\";\r\nimport * as Yup from \"yup\";\r\nimport { useAuth } from \"../../hooks/useAuth\";\r\nimport { styled } from \"@mui/system\";\r\nimport Box from \"@mui/material/Box\";\r\nimport Typography from \"../typography/typography\";\r\nimport DynamicInput from \"../form-control/form-builder/form-builder-element/text\";\r\nimport { Eye, EyeOff } from \"../icons\";\r\nimport Button from \"../button/button\";\r\nimport Toast from \"../toast/toast\";\r\n\r\n\r\nconst validationSchema = Yup.object({\r\n login: Yup.object({\r\n current_password: Yup.string().required(\"Please enter current password\"),\r\n password: Yup.string()\r\n .required(\"Please enter password\")\r\n .min(8, \"Password must be at least 8 characters\")\r\n .matches(/[A-Z]/, \"Password must contain at least one uppercase letter\")\r\n .matches(/[!@#$%^&*(),.?\":{}|<>]/, \"Password must contain at least one special character\"),\r\n confirm_password: Yup.string().required(\"Please enter confirm password\").oneOf([Yup.ref('password')], \"Passwords must match\"),\r\n }),\r\n});\r\n\r\n\r\n\r\nconst ResetPasswordModal = ({showModal, setShowModal}) => {\r\n const { changeUserPassword } = useAuth();\r\n\r\n // const [showModal, setShowModal] = useState(false);\r\n const [toast, setToast] = useState<IToast | null>(null);\r\n\r\n interface FormValeus {\r\n login: LoginFormValues;\r\n }\r\n\r\n const { control, handleSubmit, trigger } = useForm<FormValeus>({\r\n resolver: yupResolver(validationSchema),\r\n mode: \"all\",\r\n });\r\n\r\n const onSubmit = async (values: FormValeus) => {\r\n const isValid = await trigger();\r\n if (!isValid) return;\r\n await changeUserPassword(values.login, (message, type) => {\r\n if (type) {\r\n setToast({ message: message, type: \"normal\" });\r\n setShowModal(false);\r\n } else {\r\n setToast({ message: message, type: \"alert\" });\r\n }\r\n // make logout\r\n });\r\n return values; \r\n };\r\n\r\n const [showPassword, setShowPassword] = useState<boolean>(false);\r\n const handleShowPassword = () => setShowPassword(!showPassword);\r\n\r\n const [showCurrentPassword, setShowCurrentPassword] = useState<boolean>(false);\r\n const handleShowCurrentPassword = () => setShowCurrentPassword(!showCurrentPassword);\r\n\r\n const [showConfirmPassword, setShowConfirmPassword] = useState<boolean>(false);\r\n const handleShowConfirmPassword = () => setShowConfirmPassword(!showConfirmPassword);\r\n\r\n const FlexBox = styled(Box)(() => ({\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n }));\r\n\r\n return (\r\n <>\r\n <Modal \r\n open={showModal}\r\n onClose={() => setShowModal(false)} \r\n children={\r\n <>\r\n <form onSubmit={handleSubmit(onSubmit)}>\r\n <FlexBox gap={4} className=\"popup-change-pass\">\r\n <FlexBox gap={2}>\r\n <Box>\r\n <Typography\r\n align=\"center\"\r\n type=\"h1\"\r\n weight=\"medium\"\r\n color=\"theme.secondary.1000\"\r\n >\r\n Change Password\r\n </Typography>\r\n <Typography\r\n align=\"center\"\r\n type=\"h5\"\r\n weight=\"normal\"\r\n color=\"theme.secondary81000\"\r\n >\r\n Enter Details below\r\n </Typography>\r\n </Box>\r\n <FlexBox gap={2}>\r\n <Box>\r\n <DynamicInput\r\n formControl={control}\r\n label=\"Current Password\"\r\n name=\"current_password\"\r\n type={showCurrentPassword ? \"text\" : \"password\"}\r\n placeholder=\"Enter Current Password\"\r\n fieldArrayName=\"login\"\r\n endIcon={\r\n <>\r\n {showCurrentPassword ? (\r\n <Eye fontSize=\"small\" htmlColor=\"#292D32\" />\r\n ) : (\r\n <EyeOff fontSize=\"small\" htmlColor=\"#292D32\" />\r\n )}\r\n </>\r\n }\r\n onIconClick={handleShowCurrentPassword}\r\n />\r\n </Box>\r\n <Box>\r\n <DynamicInput\r\n formControl={control}\r\n label=\"Password\"\r\n name=\"password\"\r\n type={showPassword ? \"text\" : \"password\"}\r\n placeholder=\"Enter Password\"\r\n fieldArrayName=\"login\"\r\n endIcon={\r\n <>\r\n {showPassword ? (\r\n <Eye fontSize=\"small\" htmlColor=\"#292D32\" />\r\n ) : (\r\n <EyeOff fontSize=\"small\" htmlColor=\"#292D32\" />\r\n )}\r\n </>\r\n }\r\n onIconClick={handleShowPassword}\r\n />\r\n </Box>\r\n <Box>\r\n <DynamicInput\r\n formControl={control}\r\n label=\"Confirm Password\"\r\n name=\"confirm_password\"\r\n type={showConfirmPassword ? \"text\" : \"password\"}\r\n fieldArrayName=\"login\"\r\n endIcon={\r\n <>\r\n {showConfirmPassword ? (\r\n <Eye fontSize=\"small\" htmlColor=\"#292D32\" />\r\n ) : (\r\n <EyeOff fontSize=\"small\" htmlColor=\"#292D32\" />\r\n )}\r\n </>\r\n }\r\n onIconClick={handleShowConfirmPassword} \r\n placeholder=\"Enter confirm password\"\r\n />\r\n </Box>\r\n </FlexBox>\r\n </FlexBox>\r\n <FlexBox gap={2}>\r\n <Button type=\"button\" onClick={handleSubmit(onSubmit)} size=\"large\" variant=\"contained\">\r\n Change Password\r\n </Button>\r\n </FlexBox>\r\n </FlexBox>\r\n </form> \r\n </>\r\n }\r\n />\r\n <Toast\r\n open={Boolean(toast)}\r\n message={toast?.message}\r\n type={toast?.type}\r\n handleClose={() => setToast(null)}\r\n anchorOrigin={{ horizontal: \"right\", vertical: \"bottom\" }}\r\n autoHideDuration={3000}\r\n />\r\n </>\r\n );\r\n}\r\n\r\nexport { ResetPasswordModal };\r\nexport default ResetPasswordModal;","import React, { useState, useCallback, useRef, useEffect } from 'react'\nimport {\n\tIconButton,\n\tMenu,\n\tMenuItem,\n\tBadge,\n\tBox,\n\tCircularProgress,\n\tAvatar,\n\tListItemText,\n\tListItemAvatar,\n\tAlert,\n\tSkeleton,\n} from '@mui/material'\nimport {\n\tPerson as PersonIcon,\n\tEmail as EmailIcon,\n\tWarning as WarningIcon,\n\tCheckCircle as CheckCircleIcon,\n\tAssignment as AssignmentIcon,\n\tAccountBalance as AccountBalanceIcon,\n} from '@mui/icons-material'\nimport {\n\tgetV1Notification,\n\tgetV1NotificationMarkAllAsRead,\n\tpatchV1NotificationMarkAsReadId,\n} from '../../../../api-client/api.system-feature/api'\nimport { getErrorMessage, getToken } from '../../../../utils/common'\nimport formatText, { convertToUnderscore, formatLabel } from '../../../../utils/format-text'\nimport Typography from '../../../typography/typography'\nimport images from '../../../../assets/images'\nimport { generateRouteWithId } from '../../../../utils/route-utils'\nimport { PathnameGenerator, PathnameAccounting } from '../../../../constants/pathnames/pathname.accounting'\nimport { ROUTES as RENTALROUTES } from '../../../../constants/pathnames/pathname.rental'\n\nimport { PathnameInventory, PathnameGenerator as PathnameGeneratorInventory } from '../../../../constants/pathnames/pathname.inventory'\n\nimport {\n\tPathnameManufacturing,\n\tPathnameGenerator as PathnameGeneratorManufacuring,\n} from '../../../../constants/pathnames/pathname.manufacturing.ts'\n\nimport {\n\tPathnamePurchase,\n\tPathnameGenerator as PathnameGeneratorPurchase,\n} from '../../../../constants/pathnames/pathname.procurement.ts'\n\nimport { PathnameCrm, PathnameGenerator as PathnameGeneratorCrm } from '../../../../constants/pathnames/pathname.crm.ts'\n\nimport { PathnameRental, PathnameGenerator as PathnameGeneratorRental } from '../../../../constants/pathnames/pathname.rental.ts'\n\nimport { useNavigate } from 'react-router-dom'\nimport { Notification, Tick } from '../../../icons'\nimport Button from '../../../button/button'\nimport { enqueueSnackbar } from 'notistack'\n\nconst getNotificationUrl = (data: any) => {\n\tconst { moduleName = '', moduleId = '', notificationData = {} } = data\n\tconst key = convertToUnderscore(moduleName)\n\n\tconst routeMap: Record<string, () => string> = {\n\t\tsales_invoice: () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_SALES_INVOICES), moduleId.toString()),\n\n\t\tasset_transfers: () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_ASSET_TRANSFER), moduleId.toString()),\n\n\t\tbudgets: () => generateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_BUDGET), moduleId.toString()),\n\n\t\tcash_expense: () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_CASH_EXPENSE), moduleId.toString()),\n\n\t\tcredit_notes: () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_CREDIT_NOTE), moduleId.toString()),\n\n\t\tdebit_notes: () => generateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_DEBIT_NOTE), moduleId.toString()),\n\n\t\texpense_reimbursement: () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_EXPENSE_REIMBURSEMENT), moduleId.toString()),\n\n\t\tjournal_entries: () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_JOURNAL_ENTRY), moduleId.toString()),\n\n\t\tpayment_entries: () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_PAYMENT_ENTRY), moduleId.toString()),\n\n\t\tpurchase_invoice: () =>\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_PURCHASE_INVOICE), moduleId.toString()),\n\n\t\tstock_transfer: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorInventory(PathnameInventory.VIEW_STOCK_TRANSFER), moduleId.toString()),\n\n\t\tbills_of_materials: () =>\n\t\t\tgenerateRouteWithId(\n\t\t\t\tPathnameGeneratorManufacuring(PathnameManufacturing.VIEW_BILL_OF_MATERIAL),\n\t\t\t\tmoduleId.toString()\n\t\t\t),\n\n\t\tpurchase_agreement: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorPurchase(PathnamePurchase.VIEW_PURCHASE_AGREEMENT), moduleId.toString()),\n\n\t\tpurchase_orders: () =>\n\t\t\tgenerateRouteWithId(\n\t\t\t\tnotificationData?.data?.is_rental == 1\n\t\t\t\t\t? RENTALROUTES.VIEW\n\t\t\t\t\t: PathnameGeneratorPurchase(PathnamePurchase.VIEW_PURCHASE_ORDER),\n\t\t\t\tmoduleId.toString()\n\t\t\t),\n\n\t\tpurchase_request: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorPurchase(PathnamePurchase.VIEW_PURCHASE_ORDER), moduleId.toString()),\n\n\t\tvra: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorPurchase(PathnamePurchase.VIEW_VENDOR_RETURNS), moduleId.toString()),\n\n\t\tsales_customer_returns: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorCrm(PathnameCrm.VIEW_CUSTOMER_RETURNS), moduleId.toString()),\n\n\t\tsales_order: () => generateRouteWithId(PathnameGeneratorCrm(PathnameCrm.VIEW_SALES_ORDER), moduleId.toString()),\n\n\t\trental_order: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_RENTAL_ORDER), moduleId.toString()),\n\n\t\treplacement_order: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_RENTAL_ORDER), moduleId.toString()),\n\n\t\trental_agreement: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_AGREEMENT), moduleId.toString()),\n\n\t\tcross_hire_order: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_CROSS_HIRE_ORDER), moduleId.toString()),\n\n\t\tcross_hire_request: () =>\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_CROSS_HIRE_REQUEST), moduleId.toString()),\n\t}\n\n\treturn routeMap[key]?.() || '/dashboard'\n}\n\nconst mainModuleIcons = {\n\trbac: images.user,\n\tdocument: images.document,\n\t'accounts-and-finance': images.accounting,\n\tinventory: images.inventory,\n\tmanufacturing: images.manufacturing,\n\tsales: images.crm,\n\trental: images.rental,\n\tuser: images.user,\n\tpurchase: images.procurement,\n\thrms: images.hrms,\n}\nconst mainModuleBgColors = {\n\trbac: '#F3E5F5',\n\tdocument: '#FFF8E1',\n\t'accounts-and-finance': '#E8F5E8',\n\tinventory: '#E3F2FD',\n\tmanufacturing: '#FFF3E0',\n\tsales: '#F3E5F5',\n\trental: '#E8F5E8',\n\tuser: '#F3E5F5',\n\tpurchase: '#FCE4EC',\n\thrms: '#fcfcfc',\n}\n\nconst NotificationMenu = () => {\n\tconst [anchorEl, setAnchorEl] = useState(null)\n\tconst [notifications, setNotifications] = useState([])\n\tconst [loading, setLoading] = useState(false)\n\tconst [loadingMore, setLoadingMore] = useState(false)\n\tconst [error, setError] = useState(null)\n\tconst [unreadCount, setUnreadCount] = useState(0)\n\tconst [markingAllAsRead, setMarkingAllAsRead] = useState(false)\n\tconst [pagination, setPagination] = useState({\n\t\tskip: 0,\n\t\tlimit: 10,\n\t\ttotalCount: 0,\n\t\thasMore: true,\n\t})\n\n\tconst navigate = useNavigate()\n\n\tconst menuRef = useRef(null)\n\tconst isLoadingMoreRef = useRef(false)\n\tconst open = Boolean(anchorEl)\n\n\t// Transform API notification to display format\n\tconst transformNotification = (apiNotification) => {\n\t\tconst moduleIcons = {\n\t\t\t'accounts-and-finance': <AccountBalanceIcon color=\"primary\" />,\n\t\t\tuser: <PersonIcon color=\"action\" />,\n\t\t\tapproval: <AssignmentIcon color=\"warning\" />,\n\t\t}\n\n\t\tconst getInitials = (performedUser) => {\n\t\t\tif (!performedUser) return null\n\t\t\tconst firstName = performedUser.first_name || ''\n\t\t\tconst lastName = performedUser.last_name || ''\n\t\t\tif (!firstName && !lastName) return null\n\t\t\treturn (firstName.charAt(0) + lastName.charAt(0)).toUpperCase()\n\t\t}\n\n\t\tconst getFullName = (performedUser) => {\n\t\t\tif (!performedUser) return null\n\t\t\tconst firstName = performedUser.first_name || ''\n\t\t\tconst lastName = performedUser.last_name || ''\n\t\t\treturn `${firstName} ${lastName}`.trim() || null\n\t\t}\n\n\t\tconst formatTimestamp = (dateString) => {\n\t\t\tconst date = new Date(dateString)\n\t\t\tconst now = new Date()\n\t\t\tconst diffMs = now - date\n\t\t\tconst diffMins = Math.floor(diffMs / 60000)\n\t\t\tconst diffHours = Math.floor(diffMs / 3600000)\n\t\t\tconst diffDays = Math.floor(diffMs / 86400000)\n\n\t\t\tif (diffMins < 1) return 'Just now'\n\t\t\tif (diffMins < 60) return `${diffMins} minute${diffMins > 1 ? 's' : ''} ago`\n\t\t\tif (diffHours < 24) return `${diffHours} hour${diffHours > 1 ? 's' : ''} ago`\n\t\t\tif (diffDays < 7) return `${diffDays} day${diffDays > 1 ? 's' : ''} ago`\n\t\t\treturn date.toLocaleDateString()\n\t\t}\n\n\t\treturn {\n\t\t\tid: apiNotification.id,\n\t\t\ttype: apiNotification.action || apiNotification.notification_type || 'info',\n\t\t\ttitle: formatText(apiNotification.title),\n\t\t\tmessage: apiNotification.message,\n\t\t\ttimestamp: formatTimestamp(apiNotification.created_at),\n\t\t\tread: apiNotification.status === 'read', // Assuming 'pending' means unread\n\t\t\tavatar: getInitials(apiNotification.performed_user),\n\t\t\tperformedByName: getFullName(apiNotification.performed_user),\n\t\t\tmodule: apiNotification.module,\n\t\t\tsubModule: apiNotification.sub_module,\n\t\t\tsubModuleId: apiNotification.sub_module_id,\n\t\t\tstatus: apiNotification.status,\n\t\t\ticon: moduleIcons[apiNotification.module] || moduleIcons[apiNotification.action] || <PersonIcon color=\"action\" />,\n\t\t}\n\t}\n\n\t// Fetch notifications with pagination\n\tconst fetchNotifications = useCallback(async (isLoadMore = false) => {\n\t\t// Prevent multiple simultaneous load more requests\n\t\tif (isLoadMore && isLoadingMoreRef.current) {\n\t\t\treturn\n\t\t}\n\n\t\tif (isLoadMore) {\n\t\t\tisLoadingMoreRef.current = true\n\t\t\tsetLoadingMore(true)\n\t\t} else {\n\t\t\tsetLoading(true)\n\t\t\t// Reset pagination when loading fresh data\n\t\t\tsetPagination((prev) => ({\n\t\t\t\t...prev,\n\t\t\t\tskip: 0,\n\t\t\t\thasMore: true,\n\t\t\t}))\n\t\t}\n\t\tsetError(null)\n\n\t\ttry {\n\t\t\tconst currentSkip = isLoadMore ? pagination.skip : 0\n\t\t\tconst response = await getV1Notification({\n\t\t\t\tskip: currentSkip,\n\t\t\t\tlimit: pagination.limit,\n\t\t\t\t...getToken(),\n\t\t\t})\n\n\t\t\tif (response.success && response.data) {\n\t\t\t\tconst transformedNotifications = response.data.notifications.map(transformNotification)\n\n\t\t\t\tif (isLoadMore) {\n\t\t\t\t\tsetNotifications((prev) => [...prev, ...transformedNotifications])\n\t\t\t\t} else {\n\t\t\t\t\tsetNotifications(transformedNotifications)\n\t\t\t\t}\n\n\t\t\t\t// Update pagination\n\t\t\t\tconst newSkip = currentSkip + response.data.notifications.length\n\t\t\t\tconst hasMore = newSkip < response.data.pagination.totalCount\n\n\t\t\t\tsetPagination((prev) => ({\n\t\t\t\t\t...prev,\n\t\t\t\t\tskip: newSkip,\n\t\t\t\t\ttotalCount: response.data.pagination.totalCount,\n\t\t\t\t\thasMore,\n\t\t\t\t}))\n\n\t\t\t\t// Calculate unread count (assuming 'pending' status means unread)\n\t\t\t\tif (!isLoadMore) {\n\t\t\t\t\tconst unread = response.data.pagination.unreadCount\n\t\t\t\t\tsetUnreadCount(unread)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsetUnreadCount(0)\n\t\t\t\tthrow new Error(response.message || 'Failed to load notifications')\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tsetError('Failed to load notifications')\n\t\t} finally {\n\t\t\tsetLoading(false)\n\t\t\tsetLoadingMore(false)\n\t\t\tif (isLoadMore) {\n\t\t\t\tisLoadingMoreRef.current = false\n\t\t\t}\n\t\t}\n\t}, [pagination.limit, pagination.skip])\n\n\t// Handle scroll for infinite loading\n\tconst handleScroll = useCallback(\n\t\t(event) => {\n\t\t\tconst { scrollTop, scrollHeight, clientHeight } = event.target\n\t\t\tconst isNearBottom = scrollTop + clientHeight >= scrollHeight - 50 // Increased threshold\n\n\t\t\tif (isNearBottom && !isLoadingMoreRef.current && !loading && pagination.hasMore) {\n\t\t\t\tfetchNotifications(true)\n\t\t\t}\n\t\t},\n\t\t[fetchNotifications, loading, pagination.hasMore]\n\t)\n\n\tconst handleClick = (event) => {\n\t\tsetAnchorEl(event.currentTarget)\n\t\tif (notifications.length === 0) {\n\t\t\tfetchNotifications()\n\t\t}\n\t}\n\n\tconst handleClose = () => {\n\t\tsetAnchorEl(null)\n\n\t\t// Don't clear notifications immediately to avoid flickering\n\t\t// They will be refreshed when menu is opened again\n\t}\n\n\tconst handleNotificationClick = async (notificationId) => {\n\t\t// Mark notification as read\n\t\tconst n = notifications.find((n) => {\n\t\t\treturn n.id === notificationId\n\t\t})\n\t\tif (!n) return\n\n\t\thandleClose()\n\n\t\tif (n.status === 'pending') {\n\t\t\tawait patchV1NotificationMarkAsReadId({\n\t\t\t\tid: notificationId,\n\t\t\t\t...getToken(),\n\t\t\t})\n\t\t}\n\n\t\tsetNotifications((prev) => prev.map((n) => (n.id === notificationId ? { ...n, read: true } : n)))\n\t\tsetUnreadCount((prev) => Math.max(0, prev - 1))\n\t\tconst url = getNotificationUrl({\n\t\t\tmoduleName: n.subModule,\n\t\t\tmoduleId: n.subModuleId,\n\t\t\tnotificationData: n,\n\t\t})\n setTimeout(() => {\n navigate(url)\n }, 300)\n\t}\n\n\tconst getNotificationIcon = (notification) => {\n\t\tif (notification.icon) {\n\t\t\treturn notification.icon\n\t\t}\n\n\t\tswitch (notification.type) {\n\t\t\tcase 'approval':\n\t\t\t\treturn <AssignmentIcon color=\"warning\" />\n\t\t\tcase 'user':\n\t\t\t\treturn <PersonIcon color=\"action\" />\n\t\t\tcase 'message':\n\t\t\t\treturn <EmailIcon color=\"primary\" />\n\t\t\tcase 'warning':\n\t\t\t\treturn <WarningIcon color=\"warning\" />\n\t\t\tcase 'success':\n\t\t\t\treturn <CheckCircleIcon color=\"success\" />\n\t\t\tdefault:\n\t\t\t\treturn <PersonIcon color=\"action\" />\n\t\t}\n\t}\n\n\tconst handleMarkAllAsRead = useCallback(async () => {\n\t\tif (markingAllAsRead) return // Prevent multiple calls\n\n\t\tsetMarkingAllAsRead(true)\n\n\t\tif (!unreadCount) {\n\t\t\tenqueueSnackbar('No unread notifications!')\n\t\t\tsetMarkingAllAsRead(false)\n\t\t\treturn\n\t\t}\n\n\t\ttry {\n\t\t\tawait getV1NotificationMarkAllAsRead({ ...getToken() })\n\t\t\t// Update local state immediately for better UX\n\t\t\tsetNotifications((prev) => prev.map((n) => ({ ...n, read: true, status: 'read' })))\n\t\t\tsetUnreadCount(0)\n\t\t} catch (error) {\n\t\t\tconst m = getErrorMessage(error.message)\n\t\t\tenqueueSnackbar(m, { variant: 'error' })\n\t\t} finally {\n\t\t\tsetMarkingAllAsRead(false)\n\t\t}\n\t}, [markingAllAsRead, unreadCount])\n\n\t// Remove the problematic useEffect that was causing extra API calls\n\n useEffect(() => {\n if(!open) {\n setTimeout(() => {\n setNotifications([])\n }, 500)\n }\n }, [open])\n\n\treturn (\n\t\t<Box>\n\t\t\t<IconButton\n\t\t\t\t// size=\"small\"\n\t\t\t\taria-label=\"notifications\"\n\t\t\t\taria-controls={open ? 'notification-menu' : undefined}\n\t\t\t\taria-haspopup=\"true\"\n\t\t\t\taria-expanded={open ? 'true' : undefined}\n\t\t\t\tonClick={handleClick}\n\t\t\t>\n\t\t\t\t<Badge badgeContent={unreadCount} color=\"error\">\n\t\t\t\t\t<Notification fontSize=\"medium\" />\n\t\t\t\t</Badge>\n\t\t\t</IconButton>\n\n\t\t\t<Menu\n\t\t\t\tid=\"notification-menu\"\n\t\t\t\tanchorEl={anchorEl}\n\t\t\t\topen={open}\n\t\t\t\tonClose={handleClose}\n\t\t\t\tref={menuRef}\n\t\t\t\tslotProps={{\n\t\t\t\t\tpaper: {\n\t\t\t\t\t\tsx: {\n\t\t\t\t\t\t\toverflow: 'visible',\n\t\t\t\t\t\t\tminWidth: 400,\n\t\t\t\t\t\t\tmaxWidth: 450,\n\t\t\t\t\t\t\tmaxHeight: 520,\n\t\t\t\t\t\t\t'&:before': {\n\t\t\t\t\t\t\t\tcontent: '\"\"',\n\t\t\t\t\t\t\t\tdisplay: 'block',\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\t\tright: '50%',\n\t\t\t\t\t\t\t\twidth: 10,\n\t\t\t\t\t\t\t\theight: 10,\n\t\t\t\t\t\t\t\tbgcolor: 'background.paper',\n\t\t\t\t\t\t\t\ttransform: 'translateY(-50%) translateX(50%) rotate(45deg)',\n\t\t\t\t\t\t\t\tzIndex: 0,\n\t\t\t\t\t\t\t\tborder: '1px solid',\n\t\t\t\t\t\t\t\tborderColor: ({ palette }) => palette.grey[300],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}}\n\t\t\t\tsx={{\n\t\t\t\t\t'& .MuiList-root': {\n\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\tmaxHeight: 520,\n\t\t\t\t\t\toverflowY: 'auto',\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t},\n\t\t\t\t}}\n\t\t\t\ttransformOrigin={{ horizontal: 'center', vertical: 'top' }}\n\t\t\t\tanchorOrigin={{ horizontal: 'center', vertical: 'bottom' }}\n\t\t\t\tonScroll={handleScroll}\n\t\t\t>\n\t\t\t\t{/* Header */}\n\t\t\t\t<Box sx={{ px: 2, py: 1, borderBottom: '1px solid #e0e0e0', backgroundColor: '#fafafa' }}>\n\t\t\t\t\t<Typography type=\"h5\" weight=\"bold\" color=\"grey.1000\">\n\t\t\t\t\t\tNotifications\n\t\t\t\t\t</Typography>\n\t\t\t\t\t{unreadCount > 0 && (\n\t\t\t\t\t\t<Box sx={{ display: 'flex', justifyContent: 'space-between', width: '100%', alignItems: 'center' }}>\n\t\t\t\t\t\t\t<Typography type=\"s4\" color=\"grey.800\">\n\t\t\t\t\t\t\t\tYou have {unreadCount} unread notification{unreadCount > 1 ? 's' : ''}\n\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\tstartIcon={\n\t\t\t\t\t\t\t\t\tmarkingAllAsRead ? (\n\t\t\t\t\t\t\t\t\t\t<CircularProgress size={15} color=\"inherit\" />\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<Tick sx={{ fontSize: '0.75rem !important' }} color=\"grey.900\" />\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsx={{ p: 0 }}\n\t\t\t\t\t\t\t\tonClick={handleMarkAllAsRead}\n\t\t\t\t\t\t\t\tdisabled={unreadCount <= 0 || markingAllAsRead}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Typography type=\"s4\" color=\"grey.900\">\n\t\t\t\t\t\t\t\t\tMark all as read\n\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</Box>\n\t\t\t\t\t)}\n\t\t\t\t</Box>\n\n\t\t\t\t{/* Loading State */}\n\t\t\t\t{loading && notifications.length === 0 && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Box\n\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\tflexDirection: 'column',\n\t\t\t\t\t\t\t\tgap: 1,\n\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\tminWidth: 400,\n\t\t\t\t\t\t\t\tp: 1,\n\t\t\t\t\t\t\t\tm: 1,\n\t\t\t\t\t\t\t\tbackgroundColor: 'grey.200',\n\t\t\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Box sx={{ display: 'flex', gap: 1 }}>\n\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={40} height={40} />\n\t\t\t\t\t\t\t\t<Box sx={{ display: 'flex', flexDirection: 'column', gap: 0.5 }}>\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={360} height={25} />\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={150} height={11} />\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={360} height={11} />\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={360} height={11} />\n\t\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t<Box\n\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\tflexDirection: 'column',\n\t\t\t\t\t\t\t\tgap: 1,\n\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\tminWidth: 400,\n\t\t\t\t\t\t\t\tp: 1,\n\t\t\t\t\t\t\t\tm: 1,\n\t\t\t\t\t\t\t\tbackgroundColor: 'grey.200',\n\t\t\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Box sx={{ display: 'flex', gap: 1 }}>\n\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={40} height={40} />\n\t\t\t\t\t\t\t\t<Box sx={{ display: 'flex', flexDirection: 'column', gap: 0.5 }}>\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={360} height={25} />\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={150} height={11} />\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={360} height={11} />\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={360} height={11} />\n\t\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t<Box\n\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\tflexDirection: 'column',\n\t\t\t\t\t\t\t\tgap: 1,\n\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\tminWidth: 400,\n\t\t\t\t\t\t\t\tp: 1,\n\t\t\t\t\t\t\t\tm: 1,\n\t\t\t\t\t\t\t\tbackgroundColor: 'grey.200',\n\t\t\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Box sx={{ display: 'flex', gap: 1 }}>\n\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={40} height={40} />\n\t\t\t\t\t\t\t\t<Box sx={{ display: 'flex', flexDirection: 'column', gap: 0.5 }}>\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={360} height={25} />\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={150} height={11} />\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={360} height={11} />\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={360} height={11} />\n\t\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t</Box>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\n\t\t\t\t{/* Error State */}\n\t\t\t\t{error && (\n\t\t\t\t\t<Box sx={{ p: 2 }}>\n\t\t\t\t\t\t<Alert severity=\"error\">{error}</Alert>\n\t\t\t\t\t</Box>\n\t\t\t\t)}\n\n\t\t\t\t{/* Notifications List */}\n\t\t\t\t{!loading && !error && notifications.length > 0 && (\n\t\t\t\t\t<Box sx={{ maxHeight: 420, overflowY: 'auto', p: 1 }} onScroll={handleScroll}>\n\t\t\t\t\t\t{notifications.map((notification) => (\n\t\t\t\t\t\t\t<div key={notification.id}>\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={() => handleNotificationClick(notification.id)}\n\t\t\t\t\t\t\t\t\tsx={({ palette }) => ({\n\t\t\t\t\t\t\t\t\t\tpy: 1,\n\t\t\t\t\t\t\t\t\t\tpx: 1,\n\t\t\t\t\t\t\t\t\t\tbackgroundColor: !notification.read ? palette.theme.grey[200] : 'transparent',\n\t\t\t\t\t\t\t\t\t\tborder: `1px solid ${palette.grey[200]}`,\n\t\t\t\t\t\t\t\t\t\tmarginBottom: '4px !important',\n\t\t\t\t\t\t\t\t\t\t'&:hover': {\n\t\t\t\t\t\t\t\t\t\t\tbackgroundColor: palette.theme.grey[200],\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\talignItems: 'flex-start',\n\t\t\t\t\t\t\t\t\t\tminHeight: 'auto',\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<ListItemAvatar sx={{ minWidth: 48, mt: 0 }}>\n\t\t\t\t\t\t\t\t\t\t{mainModuleIcons?.[notification.module] ? (\n\t\t\t\t\t\t\t\t\t\t\t<Avatar\n\t\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 40,\n\t\t\t\t\t\t\t\t\t\t\t\t\theight: 40,\n\t\t\t\t\t\t\t\t\t\t\t\t\tfontSize: '0.875rem',\n\t\t\t\t\t\t\t\t\t\t\t\t\tbgcolor: mainModuleBgColors[notification.module] || 'primary.main',\n\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: 'white',\n\t\t\t\t\t\t\t\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\t\t\t\t\t\t\t\tboxShadow: '0 2px 8px rgba(0,0,0,0.1)',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'& img': {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: '28px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: '28px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tobjectFit: 'contain',\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tsrc={mainModuleIcons?.[notification.module]}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t{notification.avatar ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Avatar\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 40,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 40,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfontSize: '0.875rem',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbgcolor: 'primary.main',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: 'white',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tboxShadow: '0 2px 8px rgba(0,0,0,0.1)',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.avatar}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Avatar>\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Avatar\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 36,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 36,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbgcolor: 'grey.100',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: 'grey.600',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tboxShadow: '0 2px 8px rgba(0,0,0,0.1)',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{getNotificationIcon(notification)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Avatar>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</ListItemAvatar>\n\t\t\t\t\t\t\t\t\t<ListItemText\n\t\t\t\t\t\t\t\t\t\tsx={{ margin: 0, pr: 1 }}\n\t\t\t\t\t\t\t\t\t\tprimary={\n\t\t\t\t\t\t\t\t\t\t\t<Box sx={{ mb: 0.5 }}>\n\t\t\t\t\t\t\t\t\t\t\t\t<Typography type=\"s3\" weight=\"bold\" color=\"grey.1000\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.title}\n\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t\t\t\t\t{notification.performedByName && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"s5\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor=\"grey.500\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfontSize: `0.7rem !important`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfontStyle: 'italic',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: 'block',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tby {notification.performedByName}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tsecondary={\n\t\t\t\t\t\t\t\t\t\t\t<Box>\n\t\t\t\t\t\t\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"s4\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tcolor=\"grey.800\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmb: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlineHeight: 1.4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.message}\n\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t\t\t\t\t<Box\n\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgap: 0.5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.module && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"s5\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfontSize: `0.65rem !important`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: 'primary',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextTransform: 'capitalize',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.module.replace(/-/g, ' ')}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Box\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{ height: 5, width: 5, borderRadius: '100%', backgroundColor: 'primary.main' }}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t></Box>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.subModule && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"s5\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfontSize: `0.65rem !important`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: 'primary',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextTransform: 'capitalize',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{formatLabel(notification.subModule)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Box\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{ height: 5, width: 5, borderRadius: '100%', backgroundColor: 'primary.main' }}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t></Box>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"s5\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfontSize: `0.65rem !important`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.timestamp}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t{!notification.read && (\n\t\t\t\t\t\t\t\t\t\t<Box\n\t\t\t\t\t\t\t\t\t\t\tsx={{\n\t\t\t\t\t\t\t\t\t\t\t\twidth: 10,\n\t\t\t\t\t\t\t\t\t\t\t\theight: 10,\n\t\t\t\t\t\t\t\t\t\t\t\tborderRadius: '50%',\n\t\t\t\t\t\t\t\t\t\t\t\tbackgroundColor: 'primary.main',\n\t\t\t\t\t\t\t\t\t\t\t\tflexShrink: 0,\n\t\t\t\t\t\t\t\t\t\t\t\tmt: 0.5,\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t{/* Loading More Indicator */}\n\t\t\t\t\t\t{loadingMore && (\n\t\t\t\t\t\t\t<Box sx={{ display: 'flex', justifyContent: 'center', py: 2.5, px: 3 }}>\n\t\t\t\t\t\t\t\t<CircularProgress size={20} />\n\t\t\t\t\t\t\t\t<Typography variant=\"body2\" sx={{ ml: 1.5, color: 'text.secondary' }}>\n\t\t\t\t\t\t\t\t\tLoading more...\n\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{/* End of List Indicator */}\n\t\t\t\t\t\t{!pagination.hasMore && notifications.length > 0 && (\n\t\t\t\t\t\t\t<Box sx={{ textAlign: 'center', py: 1.5, px: 2 }}>\n\t\t\t\t\t\t\t\t<Typography type=\"s3\" color=\"grey.800\" textAlign=\"center\">\n\t\t\t\t\t\t\t\t\tNo more notifications\n\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Box>\n\t\t\t\t)}\n\n\t\t\t\t{/* Empty State */}\n\t\t\t\t{!loading && !error && notifications.length === 0 && (\n\t\t\t\t\t<Box sx={{ p: 4, textAlign: 'center' }}>\n\t\t\t\t\t\t<Notification sx={{ fontSize: 56, color: 'text.secondary', mb: 2 }} />\n\t\t\t\t\t\t<Typography type=\"s1\" color=\"grey.800\" sx={{ mb: 1 }} textAlign=\"center\">\n\t\t\t\t\t\t\tNo notifications yet\n\t\t\t\t\t\t</Typography>\n\t\t\t\t\t</Box>\n\t\t\t\t)}\n\t\t\t</Menu>\n\t\t</Box>\n\t)\n}\n\nexport { NotificationMenu };\nexport default NotificationMenu\n","// components/header/Header.tsx - Complete updated version with English fallback\r\nimport React, { useState, useCallback, useMemo } from \"react\";\r\nimport { Link, matchRoutes, useLocation, useNavigate } from \"react-router-dom\";\r\nimport Box from \"@mui/material/Box\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport LockIcon from \"@mui/icons-material/Lock\";\r\nimport IconButton from \"@mui/material/IconButton\";\r\nimport MenuItem from \"@mui/material/MenuItem\";\r\nimport Menu from \"@mui/material/Menu\";\r\nimport KeyboardBackspaceIcon from \"@mui/icons-material/KeyboardBackspace\";\r\nimport ListItemText from \"@mui/material/ListItemText\";\r\nimport Divider from \"@mui/material/Divider\";\r\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\r\n\r\n\r\nimport { Pathname } from \"../../constants/pathnames/pathname\"; // Removed - should be passed as props\r\nimport Typography from \"../typography/typography\";\r\nimport logo, { images } from \"../../assets/images\";\r\nimport Select from \"../select/select\";\r\nimport modules from \"../../constants/modules\"; // Removed - should be passed as props\r\nimport Avatar from \"../avatar/avatar\";\r\nimport { useAuth } from \"../../hooks/useAuth\";\r\nimport ConfirmPopUp from \"../confirm-modal/confirm-modal\";\r\nimport formatText from \"../../utils/format-text\";\r\nimport \"./header.scss\";\r\nimport { useLanguage } from \"../../hooks/useLangauge\";\r\nimport { Eye } from \"../icons\";\r\nimport ResetPasswordModal from \"../reset-password-modal/reset-password-modal\";\r\nimport NotificationMenu from \"./components/notification-menu/notification-menu\";\r\nimport { getApiConfig } from \"@/utils\";\r\n\r\ninterface ILanguage {\r\n label: string;\r\n code: string;\r\n direction: string;\r\n}\r\n\r\ninterface IModule {\r\n label: any;\r\n link: string;\r\n sidebar: string;\r\n icon: string;\r\n permission: string;\r\n bg: string;\r\n connectedRoutes: string[];\r\n translationModule: string;\r\n}\r\n\r\n\r\nexport function Header(props: any): React.ReactElement {\r\n const navigate = useNavigate();\r\n const { t } = useTranslation();\r\n const location = useLocation();\r\n const { logout, user } = useAuth();\r\n const config = getApiConfig();\r\n\r\n const {\r\n languages,\r\n currentLanguage,\r\n changeLanguage,\r\n isLoading: languagesLoading,\r\n error: languageContextError,\r\n isFallbackActive,\r\n fetchLanguages,\r\n isRtl\r\n } = useLanguage();\r\n\r\n const { pathname } = location;\r\n const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);\r\n const [logoutConfirmation, setLogoutConfirmation] = useState<boolean>(false);\r\n const [localLanguageError, setLocalLanguageError] = useState<string | null>(null);\r\n const [showModal, setShowModal] = useState(false);\r\n\r\n const u_data = localStorage.getItem(\"_u_data\") || undefined;\r\n const userData = u_data ? JSON.parse(u_data) : \"\";\r\n const isMenuOpen = Boolean(anchorEl);\r\n\r\n const handleLogoutConfirmation = () =>\r\n setLogoutConfirmation(!logoutConfirmation);\r\n\r\n const checkMatchedRoutes = useCallback(\r\n (paths: string[] | string) => {\r\n const shouldMatch: { path: string }[] = Array.isArray(paths)\r\n ? paths.map((path: string) => ({ path }))\r\n : [{ path: paths }];\r\n\r\n return Boolean(matchRoutes(shouldMatch, location));\r\n },\r\n [location],\r\n );\r\n\r\n const erp_modules = useMemo<IModule[]>(() => modules(t), [t]);\r\n\r\n const selectedModule = useMemo<IModule | null>(() => {\r\n return (\r\n erp_modules.find(\r\n (module: IModule) =>\r\n module?.link?.toLowerCase() === pathname.toLowerCase() ||\r\n checkMatchedRoutes(module.connectedRoutes),\r\n ) || null\r\n );\r\n }, [erp_modules, pathname, checkMatchedRoutes]);\r\n\r\n const handleChangePasswordView = () => {\r\n setShowModal(true);\r\n }\r\n\r\n // Enhanced language change handler with validation and error handling\r\n const onChangeLang = (e: React.ChangeEvent<HTMLSelectElement>) => {\r\n const lang_code = e.target.value;\r\n\r\n // Clear any previous errors\r\n setLocalLanguageError(null);\r\n\r\n // Validate the language exists before changing\r\n if (!languages || languages.length === 0) {\r\n const errorMsg = t('header.language_not_available') || 'Languages not available';\r\n setLocalLanguageError(errorMsg);\r\n return;\r\n }\r\n\r\n const languageExists = languages.some((lang: ILanguage) => lang.code === lang_code);\r\n\r\n if (languageExists) {\r\n try {\r\n changeLanguage(lang_code);\r\n } catch (error) {\r\n const errorMsg = error instanceof Error ? error.message : 'Failed to change language';\r\n setLocalLanguageError(errorMsg);\r\n }\r\n } else {\r\n const errorMsg = t('header.language_not_found', { language: lang_code }) ||\r\n `Selected language \"${lang_code}\" is not available`;\r\n setLocalLanguageError(errorMsg);\r\n }\r\n };\r\n\r\n // Retry language loading\r\n const handleRetryLanguages = async () => {\r\n setLocalLanguageError(null);\r\n try {\r\n await fetchLanguages();\r\n } catch (error) {\r\n const errorMsg = 'Failed to reload languages';\r\n setLocalLanguageError(errorMsg);\r\n }\r\n };\r\n\r\n\r\n const handleProfileMenuOpen = (event: React.MouseEvent<HTMLElement>) =>\r\n setAnchorEl(event.currentTarget);\r\n\r\n const handleMenuClose = () => {\r\n setAnchorEl(null);\r\n };\r\n\r\n const handleChange = (event: any) => {\r\n const selectedLink = event.target.value;\r\n setTimeout(() => {\r\n navigate(selectedLink);\r\n }, 300);\r\n };\r\n\r\n const handleBackButton = () => {\r\n window.history.back();\r\n };\r\n\r\n // Get current language display value with fallback indication\r\n const getCurrentLanguageDisplay = (): string => {\r\n if (!currentLanguage) return t('header.select_language') || 'Select Language';\r\n\r\n // Show fallback indicator for better UX\r\n if (isFallbackActive || languageContextError) {\r\n return `${currentLanguage.label}`;\r\n }\r\n\r\n return currentLanguage.label;\r\n };\r\n\r\n // Create English fallback for consistent display\r\n const createEnglishFallback = (): ILanguage => ({\r\n code: 'en',\r\n label: 'English',\r\n direction: 'ltr'\r\n });\r\n\r\n // Get languages for dropdown - ensure English is always available\r\n const getLanguagesForDropdown = (): ILanguage[] => {\r\n if (!languages || languages.length === 0) {\r\n // If no languages available, show only English\r\n return [createEnglishFallback()];\r\n }\r\n\r\n // Ensure English is in the list\r\n const hasEnglish = languages.some(lang => lang.code === 'en');\r\n if (!hasEnglish) {\r\n return [createEnglishFallback(), ...languages];\r\n }\r\n\r\n return languages;\r\n };\r\n\r\n // Render language selector based on different states\r\n const renderLanguageSelector = () => {\r\n const availableLanguages = getLanguagesForDropdown();\r\n const displayValue = currentLanguage?.code || 'en'; // Default to English\r\n\r\n // Loading state\r\n if (languagesLoading) {\r\n return (\r\n <Box className=\"language-loading\">\r\n <Typography variant=\"body2\" color=\"text.secondary\">\r\n {'Loading...'}\r\n </Typography>\r\n </Box>\r\n );\r\n }\r\n\r\n // Always show dropdown with at least English available\r\n return (\r\n <Select\r\n onChange={onChangeLang}\r\n size=\"small\"\r\n value={displayValue}\r\n renderValue={() => getCurrentLanguageDisplay()}\r\n error={!!localLanguageError}\r\n className={`language-select ${isFallbackActive || languageContextError ? 'language-fallback-active' : ''}`}\r\n\r\n >\r\n {availableLanguages.map(({ code, label }: ILanguage) => (\r\n <MenuItem key={code} value={code}>\r\n <Typography\r\n type=\"s4\"\r\n weight=\"medium\"\r\n color=\"theme.secondary.1000\"\r\n\r\n >\r\n {label}\r\n {/* Show fallback indicator in dropdown */}\r\n {/* {(isFallbackActive || languageContextError) && code === 'en' && \r\n ` (${t('header.fallback') || 'Fallback'})`\r\n } */}\r\n </Typography>\r\n </MenuItem>\r\n ))}\r\n\r\n {/* Show retry option if there's an error */}\r\n {languageContextError && (\r\n <MenuItem onClick={handleRetryLanguages} style={{ fontStyle: 'italic' }}>\r\n <Typography\r\n type=\"s4\"\r\n weight=\"medium\"\r\n color=\"theme.secondary.500\"\r\n >\r\n 🔄 {t('header.retry_languages') || 'Retry loading languages'}\r\n </Typography>\r\n </MenuItem>\r\n )}\r\n </Select>\r\n );\r\n };\r\n\r\n const menuId = \"primary-search-account-menu\";\r\n const renderMenu = (\r\n <Menu\r\n className=\"main-profile-menu\"\r\n anchorEl={anchorEl}\r\n id={menuId}\r\n keepMounted\r\n open={isMenuOpen}\r\n onClose={handleMenuClose}\r\n >\r\n <MenuItem className=\"user-assigned\">\r\n <span>{t('common.assigned_roles') || 'Assigned roles'}</span>\r\n </MenuItem>\r\n <MenuItem className=\"user-data-wrap\" value={userData.role_id}>\r\n <ListItemIcon>\r\n <Avatar size={27} alt={userData.role_name} />\r\n </ListItemIcon>\r\n <ListItemText className=\"size15\">\r\n {userData.role_name}\r\n </ListItemText>\r\n <Typography variant=\"body2\" color=\"text.secondary\">\r\n <img src={images.tickicon} alt=\"Active\" />\r\n </Typography>\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem\r\n className=\"user-assigned\"\r\n onClick={() => {\r\n handleChangePasswordView();\r\n setAnchorEl(null);\r\n }}\r\n >\r\n <ListItemIcon>\r\n <Eye fontSize=\"medium\" width={20} height={20} htmlColor=\"#292D32\" />\r\n </ListItemIcon>\r\n <ListItemText className=\"size15\">{t(\"common.change_password\")}</ListItemText>\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem\r\n className=\"menu-item-color\"\r\n onClick={() => {\r\n handleLogoutConfirmation();\r\n setAnchorEl(null);\r\n }}\r\n >\r\n <ListItemIcon>\r\n <img src={images.logout} alt=\"logout\" />\r\n </ListItemIcon>\r\n <ListItemText className=\"size15\">{t(\"common.logout\")}</ListItemText>\r\n </MenuItem>\r\n </Menu>\r\n );\r\n\r\n const appLogo = getApiConfig().appLogo || images.logo\r\n\r\n return (\r\n <>\r\n <Box className=\"main-box\">\r\n {!props.isDropdownShow && (\r\n <Link to={user ? Pathname.DASHBOARD : Pathname.LOGIN}>\r\n <img src={appLogo} alt=\"logo\" height={55}/>\r\n </Link>\r\n )}\r\n <Box className=\"second-box\">\r\n {props.isDropdownShow && (\r\n <>\r\n <IconButton onClick={handleBackButton}>\r\n <KeyboardBackspaceIcon\r\n className={isRtl ? \"arrow-pointer_rtl\" : \"arrow-pointer\"}\r\n />\r\n </IconButton>\r\n <Box width={250}>\r\n <Select\r\n fullWidth\r\n placeholder=\"Placeholder\"\r\n size={\"small\"}\r\n value={selectedModule?.link || \"\"}\r\n onChange={handleChange}\r\n className=\"select-box\"\r\n variant=\"outlined\"\r\n renderValue={(value: string) => (\r\n <>\r\n {selectedModule ? (\r\n <Box className=\"selected-menu-box\">\r\n <img\r\n src={selectedModule.icon}\r\n alt={selectedModule.label}\r\n />\r\n {selectedModule.label}\r\n </Box>\r\n ) : (\r\n value\r\n )}\r\n </>\r\n )}\r\n >\r\n {erp_modules.map((module: any, index: number) => (\r\n <MenuItem\r\n className=\"select-box-menu-item\"\r\n value={module.link}\r\n key={index}\r\n >\r\n <img src={module.icon} alt={module.label} />\r\n {module.label}\r\n </MenuItem>\r\n ))}\r\n </Select>\r\n </Box>\r\n </>\r\n )}\r\n </Box>\r\n <Box className=\"header-right-wrap\">\r\n {/* Language Selector with Enhanced Fallback Support */}\r\n <Box className=\"language-selector-wrapper\">\r\n {renderLanguageSelector()}\r\n </Box>\r\n\r\n {/* <IconButton\r\n size=\"small\"\r\n aria-label=\"notification bell\"\r\n className=\"p-0\"\r\n >\r\n <img src={logo.notification} alt=\"notification icon\" />\r\n </IconButton> */}\r\n <NotificationMenu />\r\n <IconButton\r\n size=\"small\"\r\n aria-label=\"help\"\r\n className=\"p-0\"\r\n >\r\n <img src={logo.question} alt=\"question icon\" />\r\n </IconButton>\r\n <img src={logo.vdivider} alt=\"divider icon\" />\r\n {localStorage.getItem(\"_tid\") ? (\r\n <Box className=\"user-profile-box\" onClick={handleProfileMenuOpen}>\r\n <Avatar\r\n size={32}\r\n src={user?.profile_image ? `${config?.s3BucketUrl}${user?.profile_image}` : undefined}\r\n alt={formatText(user?.full_name)}\r\n className=\"avatar-class\"\r\n />\r\n <div>\r\n <Typography className=\"profile-name\">\r\n {user?.full_name}\r\n </Typography>\r\n <Typography className=\"user-auth\">\r\n {user?.role_name}\r\n </Typography>\r\n </div>\r\n </Box>\r\n ) : (\r\n <IconButton\r\n size=\"large\"\r\n edge=\"end\"\r\n aria-label=\"account of current user\"\r\n aria-controls={menuId}\r\n aria-haspopup=\"true\"\r\n component={Link}\r\n to={Pathname.LOGIN}\r\n color=\"inherit\"\r\n >\r\n <LockIcon className=\"icon-btn\" />\r\n </IconButton>\r\n )}\r\n </Box>\r\n {renderMenu}\r\n </Box>\r\n\r\n {/* Logout Confirmation Dialog */}\r\n <ConfirmPopUp\r\n open={logoutConfirmation}\r\n title={t(\"common.logout\")}\r\n description={t('common.logout_confirmation') || \"Are you sure, you want to logout?\"}\r\n onConfirm={() => logout()}\r\n onClose={handleLogoutConfirmation}\r\n fullWidth\r\n maxWidth=\"xs\"\r\n buttonTexts={{\r\n confirm: t(\"common.logout\"),\r\n cancel: t(\"common.cancel\"),\r\n }}\r\n />\r\n\r\n <ResetPasswordModal showModal={showModal} setShowModal={setShowModal} />\r\n\r\n </>\r\n );\r\n}\r\n\r\nexport default Header;","import { styled } from \"@mui/material/styles\";\nimport MuiAppBar, { AppBarProps as MuiAppBarProps } from \"@mui/material/AppBar\";\nimport Toolbar from \"@mui/material/Toolbar\";\n// import MenuIcon from \"@mui/icons-material/Menu\";\nimport IconButton from \"@mui/material/IconButton\";\n\n// import { Box, FormControl, FormControlLabel, FormLabel, Radio, RadioGroup, ThemeProvider } from '@mui/material';\n\nimport Header from \"../header/header\";\n// import ThemeSelector from \"../../utils/themeSelector\";\n\nimport \"./appbar.scss\";\nimport images from \"../../assets/images\";\n// import { Box } from \"@mui/material\";\n\nlet drawerWidth: any;\n\ninterface AppBarProps extends MuiAppBarProps {\n open?: boolean;\n}\n\n// const getTheme = (selectedTheme: any) => {\n// switch (selectedTheme) {\n// case ThemeSelector.PRIMARY:\n// return themes.redStone;\n// case ThemeSelector.SECONDARY:\n// return themes.blueNavy;\n// case ThemeSelector.TERTIARY:\n// return themes.oliveGreen;\n// default:\n// return themes.redStone;\n// }\n// };\n\nconst AppBar = styled(MuiAppBar, {\n shouldForwardProp: (prop) => prop !== \"open\",\n})<AppBarProps>(({ theme, open }) => ({\n zIndex: theme.zIndex.drawer + 1,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n ...(open && {\n marginLeft: document.body.dir === \"ltr\" ? drawerWidth : 0,\n marginRight: document.body.dir === \"rtl\" ? drawerWidth : 0,\n width: `calc(100% - ${drawerWidth}px)`,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n }),\n boxShadow: \"none\",\n}));\n\nexport const AppBarWrapper = (props: any) => {\n drawerWidth = props.width;\n\n // const handleThemeChange = (e: any) => setSelectedTheme(e.target.value);\n\n return (\n <AppBar\n position=\"fixed\"\n open={props?.open}\n sx={(theme) => ({\n borderBottom: \"1px solid\",\n borderColor: theme.palette.theme?.secondary[200],\n backgroundColor: theme.palette.theme?.secondary[100],\n })}\n >\n {/* <FormControl>\n <FormLabel id=\"theme-radio-buttons-group-label\">Theme</FormLabel>\n <RadioGroup\n row\n value={selectedTheme}\n onChange={handleThemeChange}\n aria-labelledby=\"theme-radio-buttons-group-label\"\n name=\"row-radio-buttons-group\"\n >\n {Object.keys(ThemeSelector)?.map((variant: any, index: any) => (\n <FormControlLabel\n key={index}\n value={ThemeSelector[variant]}\n control={<Radio />}\n label={ThemeSelector[variant]}\n sx={{\n '.MuiFormControlLabel-label': {\n color: 'theme.text',\n },\n }}\n />\n ))}\n </RadioGroup>\n </FormControl> */}\n <Toolbar sx={{ backgroundColor: 'grey.100'}}>\n {props?.handleDrawerOpen ? (\n <>\n <IconButton\n color=\"inherit\"\n aria-label=\"open drawer\"\n // onClick={props.handleDrawerOpen}\n edge=\"start\"\n sx={{\n marginRight: 5,\n ...(props.open && { display: \"none\" }),\n }}\n >\n {/* <MenuIcon sx={{ color: \"theme.secondary.1000\" }} /> */}\n <img src={images.favicon} height={30} width={30}></img>\n </IconButton>\n {/* {!props.open && ( \n <Box marginRight={5}>\n <img src={images.favicon} height={30} width={30}></img>\n </Box>\n )} */}\n <Header isDropdownShow={true} />\n </>\n ) : (\n <>\n <Header isDropdownShow={false} />\n </>\n )}\n </Toolbar>\n {/* <Header /> */}\n </AppBar>\n );\n};\n\nexport default AppBarWrapper;\n","import Box from \"@mui/material/Box\";\r\nimport \"./activityArea.scss\";\r\n\r\nexport const ActivityArea = (props: any) => {\r\n return (\r\n <Box\r\n className=\"main-wrapper\"\r\n component=\"main\"\r\n width={\"100%\"}\r\n // sx={{ flexGrow: 1, p: 3, flexWrap: \"wrap\" }}\r\n marginTop=\"4.6875rem\"\r\n >\r\n {props.children}\r\n </Box>\r\n );\r\n};\r\n\r\nexport default ActivityArea;\r\n","import { Tooltip as MUITooltip, TooltipProps } from \"@mui/material\";\n\nconst Tooltip = ({ title, children, sx, ...rest }: TooltipProps) => {\n return (\n <MUITooltip\n componentsProps={{\n tooltip: {\n sx: {\n padding: \"0.5rem 0.75rem\",\n backgroundColor: \"#393B3E\",\n maxWidth: \"12rem\",\n '& .MuiTooltip-arrow': {\n color: \"#393B3E\"\n },\n ...sx\n },\n },\n }}\n title={title}\n {...rest}\n >\n {children}\n </MUITooltip>\n );\n};\n\nexport { Tooltip };\nexport default Tooltip;\n"],"names":["StyledButton","styled","MUIButton","theme","palette","fontSize","textTransform","minHeight","minWidth","padding","fontWeight","lineHeight","letterSpacing","backgroundColor","_a","primary","_b","border","boxShadow","color","_c","_d","secondary","_e","_f","error","_g","opacity","Button","props","children","variant","rest","jsx","StyledDialog","Dialog","borderRadius","display","alignItems","justifyContent","Modal","open","onClose","StyledSearch","TextField","borderBottom","input","paddingLeft","SelectSearch","forwardRef","searchPlaceholder","handleSearch","value","ref","inputRef","placeholder","onChange","fullWidth","InputProps","startAdornment","InputAdornment","position","SearchIcon","StyledSelect","MUISelect","borderColor","borderWidth","background","_h","_i","Select","memo","searchInputRef","useRef","label","dataPosition","dataName","required","searchValue","renderValue","helperText","loading","CustomDropdownIcon","ArrowDown","jsxs","Fragment","Typography","type","weight","mb","style","IconComponent","iconProps","MenuProps","PaperProps","sx","maxHeight","overflowY","anchorOrigin","vertical","horizontal","displayEmpty","onOpen","setTimeout","current","focus","Box","top","zIndex","margin","e","target","onClick","stopPropagation","onKeyDown","p","width","CircularProgress","size","FormHelperText","StyledTextField","MUITextField","borderStyle","marginLeft","_j","_k","marginRight","hidden","className","Avatar","icon","badge","src","alt","altIcon","avatarStyle","height","split","length","badgeSize","badgeBorder","altFirstChar","map","word","charAt","join","AvatarMUI","SvgIcon","Person2OutlinedIcon","ConfirmPopUp","t","useTranslation","title","description","onConfirm","modalType","buttonTexts","confirm","cancel","buttonColors","showAction","images","info","alert","isRtl","useLanguage","DialogTitle","ml","IconButton","disableRipple","disabled","CloseIcon","Divider","DialogContent","DialogActions","mr","endIcon","DynamicInput","React","Controller","control","formControl","name","fieldArrayName","render","field","fieldState","defaultValue","replace","shouldApplyPrecission","includes","step","float_step","decimalPlaces","String","Number","toFixed","toString","multiline","is_multiline","minRows","formType","minLength","min","endAdornment","edge","onIconClick","inputProps","min_length","Boolean","message","onBlur","propTypes","PropTypes","shape","register","func","isRequired","setValue","_formState","object","string","node","bool","number","max","max_length","typeOfField","defaultProps","StyledAlert","MUIAlert","Toast","handleUndo","handleClose","action","Close","Snackbar","autoHideDuration","severity","CheckCircleOutlineIcon","htmlColor","WarningAmberIcon","validationSchema","Yup","login","current_password","password","matches","confirm_password","oneOf","ResetPasswordModal","showModal","setShowModal","changeUserPassword","useAuth","toast","setToast","useState","handleSubmit","trigger","useForm","resolver","yupResolver","mode","onSubmit","async","values","showPassword","setShowPassword","showCurrentPassword","setShowCurrentPassword","showConfirmPassword","setShowConfirmPassword","FlexBox","flexDirection","gap","align","Eye","EyeOff","mainModuleIcons","rbac","user","document","accounting","inventory","manufacturing","sales","crm","rental","purchase","procurement","hrms","mainModuleBgColors","NotificationMenu","anchorEl","setAnchorEl","notifications","setNotifications","setLoading","loadingMore","setLoadingMore","setError","unreadCount","setUnreadCount","markingAllAsRead","setMarkingAllAsRead","pagination","setPagination","skip","limit","totalCount","hasMore","navigate","useNavigate","menuRef","isLoadingMoreRef","transformNotification","apiNotification","moduleIcons","AccountBalanceIcon","PersonIcon","approval","AssignmentIcon","id","notification_type","formatText","timestamp","dateString","date","Date","diffMs","diffMins","Math","floor","diffHours","diffDays","toLocaleDateString","formatTimestamp","created_at","read","status","avatar","performedUser","firstName","first_name","lastName","last_name","toUpperCase","getInitials","performed_user","performedByName","trim","getFullName","module","subModule","sub_module","subModuleId","sub_module_id","fetchNotifications","useCallback","isLoadMore","prev","currentSkip","response","getV1Notification","getToken","success","data","Error","transformedNotifications","newSkip","unread","err","handleScroll","event","scrollTop","scrollHeight","clientHeight","handleNotificationClick","notificationId","n","find","patchV1NotificationMarkAsReadId","url","moduleName","moduleId","notificationData","routeMap","sales_invoice","generateRouteWithId","PathnameGenerator","PathnameAccounting","VIEW_SALES_INVOICES","asset_transfers","VIEW_ASSET_TRANSFER","budgets","VIEW_BUDGET","cash_expense","VIEW_CASH_EXPENSE","credit_notes","VIEW_CREDIT_NOTE","debit_notes","VIEW_DEBIT_NOTE","expense_reimbursement","VIEW_EXPENSE_REIMBURSEMENT","journal_entries","VIEW_JOURNAL_ENTRY","payment_entries","VIEW_PAYMENT_ENTRY","purchase_invoice","VIEW_PURCHASE_INVOICE","stock_transfer","PathnameGeneratorInventory","PathnameInventory","VIEW_STOCK_TRANSFER","bills_of_materials","PathnameGeneratorManufacuring","PathnameManufacturing","VIEW_BILL_OF_MATERIAL","purchase_agreement","PathnameGeneratorPurchase","PathnamePurchase","VIEW_PURCHASE_AGREEMENT","purchase_orders","is_rental","RENTALROUTES","VIEW","VIEW_PURCHASE_ORDER","purchase_request","vra","VIEW_VENDOR_RETURNS","sales_customer_returns","PathnameGeneratorCrm","PathnameCrm","VIEW_CUSTOMER_RETURNS","sales_order","VIEW_SALES_ORDER","rental_order","PathnameGeneratorRental","PathnameRental","VIEW_RENTAL_ORDER","replacement_order","rental_agreement","VIEW_AGREEMENT","cross_hire_order","VIEW_CROSS_HIRE_ORDER","cross_hire_request","VIEW_CROSS_HIRE_REQUEST","convertToUnderscore","call","getNotificationUrl","getNotificationIcon","notification","EmailIcon","WarningIcon","CheckCircleIcon","handleMarkAllAsRead","enqueueSnackbar","getV1NotificationMarkAllAsRead","m","getErrorMessage","useEffect","currentTarget","Badge","badgeContent","Notification","Menu","slotProps","paper","overflow","maxWidth","content","right","bgcolor","transform","grey","transformOrigin","onScroll","px","py","startIcon","Tick","Skeleton","Alert","MenuItem","marginBottom","ListItemAvatar","mt","objectFit","ListItemText","pr","fontStyle","formatLabel","flexShrink","textAlign","Header","location","useLocation","logout","config","getApiConfig","languages","currentLanguage","changeLanguage","isLoading","languagesLoading","languageContextError","isFallbackActive","fetchLanguages","pathname","logoutConfirmation","setLogoutConfirmation","localLanguageError","setLocalLanguageError","u_data","localStorage","getItem","userData","JSON","parse","isMenuOpen","handleLogoutConfirmation","checkMatchedRoutes","paths","shouldMatch","Array","isArray","path","matchRoutes","erp_modules","useMemo","modules","selectedModule","link","toLowerCase","connectedRoutes","onChangeLang","lang_code","errorMsg","some","lang","code","language","handleRetryLanguages","menuId","renderMenu","keepMounted","role_id","ListItemIcon","role_name","tickicon","appLogo","logo","isDropdownShow","Link","to","Pathname","DASHBOARD","LOGIN","window","history","back","KeyboardBackspaceIcon","selectedLink","index","availableLanguages","direction","displayValue","renderLanguageSelector","question","vdivider","profile_image","s3BucketUrl","full_name","component","LockIcon","drawerWidth","AppBar","MuiAppBar","shouldForwardProp","prop","drawer","transition","transitions","create","easing","sharp","duration","leavingScreen","body","dir","enteringScreen","marginTop","Toolbar","handleDrawerOpen","favicon","debounceTime","isDrivePage","searchText","searchTerm","setSearchTerm","debouncedSearchRef","initialSearchTerm","setItem","debounce","autoComplete","SearchStatus","Search","MUITooltip","componentsProps","tooltip"],"mappings":"k/DAEMA,GAAeC,EAAAA,OAAOC,SAAPD,CACpB,EAAGE,OAASC,iCAAmC,MAAA,CAC9CC,SAAU,UACVC,cAAe,OACfC,UAAW,OACXC,SAAU,OACVC,QAAS,iBACTC,WAAY,MACZC,WAAY,UACZC,cAAe,cAEf,wBAAyB,CACxBC,gBAAiB,OAGlB,wBAAyB,CACxBA,gBAAiB,OAAAC,EAAAV,EAAQD,YAAR,EAAAW,EAAeC,QAAQ,KAExC,UAAW,CACVF,gBAAiB,OAAAG,EAAAZ,EAAQD,YAAR,EAAAa,EAAeD,QAAQ,OAI1C,uBAAwB,CACvBE,OAAQ,OACRC,UAAW,4GACXC,MAAO,OAAAC,EAAAhB,EAAQD,YAAR,EAAAiB,EAAeL,QAAQ,MAG/B,mBAAoB,CACnBI,MAAO,OAAAE,EAAAjB,EAAQD,YAAR,EAAAkB,EAAeC,UAAU,KAChCT,gBAAiB,QACjB,UAAW,CACVM,MAAO,OAAAI,EAAAnB,EAAQD,YAAR,EAAAoB,EAAeR,QAAQ,MAE/B,yBAA0B,CAAA,GAK3B,6BAA8B,C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