@acuteinfo/common-screens 1.0.17 → 1.0.19

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/index.d.ts CHANGED
@@ -2,3 +2,4 @@ import "regenerator-runtime/runtime";
2
2
  import "buffer";
3
3
  export * from "./pages/auth/authController";
4
4
  export * from "./pages/auth/forgotPassword";
5
+ export * from "./pages/branchSelection/branchSelectionGrid";
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import 'regenerator-runtime/runtime';
2
2
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
3
- import { TextField, GradientButton, utilFunction } from '@acuteinfo/common-base';
4
- import { useState, useRef, useEffect, Fragment, useMemo, useReducer } from 'react';
3
+ import { TextField, GradientButton, utilFunction, ClearCacheProvider, queryClient, Alert, GridWrapper } from '@acuteinfo/common-base';
4
+ import { useState, useRef, useEffect, Fragment, useMemo, useReducer, useCallback } from 'react';
5
5
  import { makeStyles } from '@mui/styles';
6
6
  import Visibility from '@mui/icons-material/Visibility';
7
7
  import VisibilityOff from '@mui/icons-material/VisibilityOff';
8
- import { Container, Grid, InputAdornment, IconButton, CircularProgress, FormHelperText, Typography, Tooltip } from '@mui/material';
8
+ import { Container, Grid, InputAdornment, IconButton, CircularProgress, FormHelperText, Typography, Tooltip, tooltipClasses, Stack, Box, Avatar, Button } from '@mui/material';
9
9
  import { useTranslation } from 'react-i18next';
10
10
  import OTPInput, { ResendOTP } from 'otp-input-react';
11
11
  import IconButton$1 from '@mui/material/IconButton';
@@ -13,8 +13,12 @@ import clsx from 'clsx';
13
13
  import { useSnackbar } from 'notistack';
14
14
  import FingerprintSharpIcon from '@mui/icons-material/FingerprintSharp';
15
15
  import CryptoJS from 'crypto-js';
16
+ import { useQuery, useMutation } from 'react-query';
17
+ import bank_logo_default from 'assets/images/BecomePartnerImg.svg';
18
+ import { styled } from '@mui/material/styles';
19
+ import USER_PROFILE_DEFAULT from 'assets/images/USER_PROFILE_DEFAULT.png';
16
20
 
17
- const useStyles = makeStyles((theme) => ({
21
+ const useStyles$1 = makeStyles((theme) => ({
18
22
  wrapper: {
19
23
  minHeight: "100vh",
20
24
  boxShadow: "0 3px 6px rgba(0,0,0,0.03)",
@@ -186,7 +190,7 @@ const useStyles = makeStyles((theme) => ({
186
190
  },
187
191
  }));
188
192
 
189
- const UsernamePasswordField = ({ classes, loginState, verifyUsernamePassword, forgotPasswordEndpoint }) => {
193
+ const UsernamePasswordField = ({ classes, loginState, verifyUsernamePassword, forgotPasswordEndpoint, }) => {
190
194
  const [input, setInput] = useState({ userName: "", password: "" });
191
195
  const [showPasswordTime, setShowPasswordTime] = useState(0);
192
196
  const showPassword = Date.now() < showPasswordTime;
@@ -600,8 +604,8 @@ function styleInject(css, ref) {
600
604
  }
601
605
  }
602
606
 
603
- var css_248z = ".spinner-wrap{position:relative}.spinner-item{animation:zoom 2s linear .75s infinite;border:1px solid #949597;border-radius:50%;height:250px;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);width:250px}.spinner-item--2{animation-delay:1.25s}.spinner-item--3{animation-delay:1.75s}@keyframes zoom{0%{opacity:0;transform:translate(-50%,-50%) scale(.1)}50%{opacity:1}to{opacity:0;transform:translate(-50%,-50%) scale(.6)}}.image{height:50px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.progress{backdrop-filter:blur(2px) brightness(101%);border:1px solid #b0b0b0;border-radius:4px;box-shadow:0 0 3px #b0b0;margin:0 auto;width:20em}.bar{background:#4263c7;height:4px;width:65%}";
604
- styleInject(css_248z);
607
+ var css_248z$1 = ".spinner-wrap{position:relative}.spinner-item{animation:zoom 2s linear .75s infinite;border:1px solid #949597;border-radius:50%;height:250px;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);width:250px}.spinner-item--2{animation-delay:1.25s}.spinner-item--3{animation-delay:1.75s}@keyframes zoom{0%{opacity:0;transform:translate(-50%,-50%) scale(.1)}50%{opacity:1}to{opacity:0;transform:translate(-50%,-50%) scale(.6)}}.image{height:50px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.progress{backdrop-filter:blur(2px) brightness(101%);border:1px solid #b0b0b0;border-radius:4px;box-shadow:0 0 3px #b0b0;margin:0 auto;width:20em}.bar{background:#4263c7;height:4px;width:65%}";
608
+ styleInject(css_248z$1);
605
609
 
606
610
  const VerifyFinger = ({ classes, loginState, verifyFinger, previousStep, }) => {
607
611
  const { t } = useTranslation();
@@ -812,7 +816,7 @@ const isBase64 = (str = "") => {
812
816
  const BankDetails = ({ bannerDetails }) => {
813
817
  const [loginImageURL, setLoginImageURL] = useState(null);
814
818
  const urlObj = useRef(null);
815
- const classes = useStyles();
819
+ const classes = useStyles$1();
816
820
  const banner = useMemo(() => bannerDetails, []);
817
821
  useEffect(() => {
818
822
  if (Boolean(banner?.bannerImg)) {
@@ -1203,8 +1207,8 @@ const reducer$1 = (state, action) => {
1203
1207
  }
1204
1208
  }
1205
1209
  };
1206
- const AuthControllerWrapper = ({ bannerDetails, logoUrl, logoTitle, loginFn, veirfyUsernameandPassword, verifyOTP, OTPResendRequest, ResetPassword, LanguageComponent, forgotPasswordEndpoint }) => {
1207
- const classes = useStyles();
1210
+ const AuthControllerWrapper = ({ bannerDetails, logoUrl, logoTitle, loginFn, veirfyUsernameandPassword, verifyOTP, OTPResendRequest, ResetPassword, LanguageComponent, forgotPasswordEndpoint, }) => {
1211
+ const classes = useStyles$1();
1208
1212
  const [loginState, dispath] = useReducer(reducer$1, inititalState$1);
1209
1213
  const [openpwdreset, setOpenPwdReset] = useState(false);
1210
1214
  const failureCount = useRef(0);
@@ -1455,7 +1459,7 @@ const AuthControllerWrapper = ({ bannerDetails, logoUrl, logoTitle, loginFn, vei
1455
1459
  }, otpresendCount: otpResendRef.current }, "OTPForm")] })) : (jsx(VerifyFinger, { classes: classes, loginState: loginState, verifyFinger: verifyFinger, previousStep: changeUserName }, "biometric")) })) }))] })] }) }));
1456
1460
  };
1457
1461
 
1458
- const ForgotPasswordFields = ({ classes, loginState, onSubmit, navigate, loginPageEndpoint }) => {
1462
+ const ForgotPasswordFields = ({ classes, loginState, onSubmit, navigate, loginPageEndpoint, }) => {
1459
1463
  const [input, setInput] = useState({
1460
1464
  userName: loginState.workingState === 1 ? loginState?.username : "",
1461
1465
  mobileno: "",
@@ -1719,8 +1723,8 @@ const reducer = (state, action) => {
1719
1723
  }
1720
1724
  }
1721
1725
  };
1722
- const ForgotPasswordControllerWrapper = ({ screenFlag, updatenewPassword, veirfyUsernameandMobileNo, verifyOTPForPWDReset, logoUrl, logoTitle, LanguageComponent, bannerDetails, navigate, loginPageEndpoint }) => {
1723
- const classes = useStyles();
1726
+ const ForgotPasswordControllerWrapper = ({ screenFlag, updatenewPassword, veirfyUsernameandMobileNo, verifyOTPForPWDReset, logoUrl, logoTitle, LanguageComponent, bannerDetails, navigate, loginPageEndpoint, }) => {
1727
+ const classes = useStyles$1();
1724
1728
  const [loginState, dispath] = useReducer(reducer, inititalState);
1725
1729
  const [open, setOpen] = useState(false);
1726
1730
  const { enqueueSnackbar } = useSnackbar();
@@ -1917,5 +1921,353 @@ const ForgotPasswordControllerWrapper = ({ screenFlag, updatenewPassword, veirfy
1917
1921
  }, otpresendCount: otpResendRef.current, OTPResendRequest: undefined })) : (jsx(ForgotPasswordFields, { classes: classes, loginState: loginState, onSubmit: onSubmitHandel, navigate: navigate, loginPageEndpoint: loginPageEndpoint }))] }) })] })] }) }));
1918
1922
  };
1919
1923
 
1920
- export { AuthControllerWrapper, ForgotPasswordControllerWrapper, ValidatePassword };
1924
+ const BranchSelectionGridMetaData = {
1925
+ gridConfig: {
1926
+ dense: true,
1927
+ gridLabel: "Access Branch List",
1928
+ rowIdColumn: "BRANCH_CD",
1929
+ // searchPlaceholder: "Branches",
1930
+ defaultColumnConfig: {
1931
+ width: 400,
1932
+ maxWidth: 450,
1933
+ minWidth: 300,
1934
+ },
1935
+ allowColumnReordering: false,
1936
+ disableSorting: false,
1937
+ hideHeader: false,
1938
+ disableGroupBy: true,
1939
+ enablePagination: false,
1940
+ containerHeight: {
1941
+ min: "68vh",
1942
+ max: "68vh ",
1943
+ },
1944
+ allowFilter: false,
1945
+ allowColumnHiding: false,
1946
+ allowRowSelection: false,
1947
+ isCusrsorFocused: true,
1948
+ hideFooter: true,
1949
+ },
1950
+ columns: [
1951
+ {
1952
+ accessor: "BRANCH_CD",
1953
+ columnName: "Branch Code",
1954
+ sequence: 1,
1955
+ alignment: "left",
1956
+ componentType: "default",
1957
+ width: 200,
1958
+ minWidth: 140,
1959
+ maxWidth: 220,
1960
+ },
1961
+ {
1962
+ accessor: "BRANCH_NM",
1963
+ columnName: "Branch Name",
1964
+ sequence: 2,
1965
+ alignment: "left",
1966
+ componentType: "default",
1967
+ width: 280,
1968
+ minWidth: 280,
1969
+ maxWidth: 420,
1970
+ },
1971
+ {
1972
+ accessor: "DISP_STATUS",
1973
+ columnName: "Status",
1974
+ sequence: 3,
1975
+ alignment: "left",
1976
+ componentType: "default",
1977
+ width: 200,
1978
+ minWidth: 140,
1979
+ maxWidth: 220,
1980
+ },
1981
+ {
1982
+ accessor: "BEGIN_DATETIME",
1983
+ columnName: "Begin Time",
1984
+ sequence: 4,
1985
+ alignment: "left",
1986
+ componentType: "dateTime",
1987
+ width: 222,
1988
+ minWidth: 140,
1989
+ maxWidth: 240,
1990
+ },
1991
+ {
1992
+ accessor: "END_DATETIME",
1993
+ columnName: "End Time",
1994
+ sequence: 5,
1995
+ alignment: "left",
1996
+ componentType: "dateTime",
1997
+ width: 222,
1998
+ minWidth: 140,
1999
+ maxWidth: 240,
2000
+ },
2001
+ {
2002
+ accessor: "DAYEND_STATUS",
2003
+ columnName: "Dayend Status",
2004
+ sequence: 6,
2005
+ componentType: "default",
2006
+ isVisible: false,
2007
+ },
2008
+ {
2009
+ accessor: "EOD_RUNNING_STATUS",
2010
+ columnName: "EOD Running Status",
2011
+ sequence: 6,
2012
+ componentType: "default",
2013
+ isVisible: false,
2014
+ },
2015
+ {
2016
+ accessor: "BASE_COMP_CD",
2017
+ columnName: "Base Comp Cd",
2018
+ sequence: 6,
2019
+ componentType: "default",
2020
+ isVisible: false,
2021
+ },
2022
+ {
2023
+ accessor: "BASE_BRANCH_CD",
2024
+ columnName: "Base Branch Cd",
2025
+ sequence: 6,
2026
+ componentType: "default",
2027
+ isVisible: false,
2028
+ },
2029
+ {
2030
+ accessor: "COMP_CD",
2031
+ columnName: "Comp Cd",
2032
+ sequence: 6,
2033
+ componentType: "default",
2034
+ isVisible: false,
2035
+ },
2036
+ {
2037
+ accessor: "COMP_NM",
2038
+ columnName: "Comp Name",
2039
+ sequence: 6,
2040
+ componentType: "default",
2041
+ isVisible: false,
2042
+ },
2043
+ ],
2044
+ };
2045
+
2046
+ var css_248z = "*{box-sizing:border-box}*,.sideImage{margin:0;padding:0}.sideImage{display:flex;height:100%;position:relative;z-index:1}.bank-name,.emp-id{font-size:18px;font-weight:600;line-height:1em;margin:8px 0}.bank-name{word-wrap:break-word}.name-heading{color:var(--theme-color1);font-weight:400;position:relative;z-index:1}.name-heading span{color:var(--theme-color1);font-weight:700}";
2047
+ styleInject(css_248z);
2048
+
2049
+ var Waving_hand = "waving-hand.png";
2050
+
2051
+ const useStyles = makeStyles((theme) => ({
2052
+ heading_user_img: {
2053
+ width: "40px",
2054
+ height: "40px",
2055
+ // cursor: "pointer",
2056
+ },
2057
+ heading_user_img_border: {
2058
+ border: "2px dashed var(--theme-color3)",
2059
+ borderRadius: "50%",
2060
+ padding: "4px",
2061
+ },
2062
+ logo: {
2063
+ height: "38px",
2064
+ },
2065
+ }));
2066
+
2067
+ const actions = [
2068
+ {
2069
+ actionName: "back",
2070
+ actionLabel: "Back",
2071
+ multiple: false,
2072
+ rowDoubleClick: false,
2073
+ // actionTextColor: "var(--theme-color3)",
2074
+ // actionBackground: "var(--theme-color2)",
2075
+ // startsIcon: "West",
2076
+ // rotateIcon: "scale(1.4) rotateX(-360deg)",
2077
+ },
2078
+ {
2079
+ actionName: "proceed",
2080
+ actionLabel: "Proceed",
2081
+ multiple: false,
2082
+ rowDoubleClick: true,
2083
+ // actionTextColor: "var(--theme-color2)",
2084
+ // actionBackground: "var(--theme-color3)",
2085
+ // onEnterSubmit: true,
2086
+ // endsIcon: "East",
2087
+ // rotateIcon: "scale(1.4) rotateX(-360deg)",
2088
+ },
2089
+ ];
2090
+ const BranchSelectionGrid = ({ selectionMode, authState, isBranchSelectedFn, isLoggedInFn, logoutFn, logos, logo, navigate, BranchSelectionGridDataApiFn, GetMenuDataApiFn, sideImage, branchSelectFn, dashboardUrl, loginUrl, appTranCd, }) => {
2091
+ const classes = useStyles();
2092
+ const { enqueueSnackbar } = useSnackbar();
2093
+ const { data, isLoading, isFetching, refetch, error, isError } = useQuery(["BranchSelectionGridData"], () => BranchSelectionGridDataApiFn());
2094
+ useEffect(() => {
2095
+ return () => {
2096
+ queryClient.removeQueries(["BranchSelectionGridData", {}]);
2097
+ };
2098
+ }, []);
2099
+ // const imagesData = useQuery<any, any>(["getBankimgAndProfileimg"], () =>
2100
+ // getBankimgAndProfileimg({
2101
+ // userID: authController?.authState?.user?.id,
2102
+ // companyID: authController?.authState?.access_token?.companyID,
2103
+ // })
2104
+ // );
2105
+ useEffect(() => {
2106
+ if (!isLoggedInFn()) {
2107
+ navigate(loginUrl);
2108
+ }
2109
+ else if (isBranchSelectedFn() && selectionMode !== "C") {
2110
+ navigate(dashboardUrl);
2111
+ }
2112
+ }, [isBranchSelectedFn, isLoggedInFn]);
2113
+ const mutation = useMutation(GetMenuDataApiFn, {
2114
+ onSuccess: (data, extreData) => {
2115
+ branchSelectFn({
2116
+ menulistdata: data,
2117
+ branchCode: extreData?.BRANCH_CD,
2118
+ branch: extreData?.BRANCH_NM,
2119
+ baseBranchCode: extreData?.BASE_BRANCH_CD,
2120
+ });
2121
+ },
2122
+ });
2123
+ const getError = mutation.error;
2124
+ const setCurrentAction = useCallback((data) => {
2125
+ if (data.name === "proceed") {
2126
+ if (data.rows?.length === 0) {
2127
+ enqueueSnackbar("Please Select Branch", {
2128
+ variant: "error",
2129
+ });
2130
+ }
2131
+ else if (data.rows?.[0]?.data?.STATUS === "C") {
2132
+ enqueueSnackbar("Branch is in Day End Status.~rPlease contact system Vendor.", {
2133
+ variant: "error",
2134
+ });
2135
+ }
2136
+ else {
2137
+ mutation.mutate({
2138
+ BASE_COMP_CD: data.rows?.[0]?.data?.BASE_COMP_CD ?? "",
2139
+ BASE_BRANCH_CD: data.rows?.[0]?.data?.BASE_BRANCH_CD ?? "",
2140
+ COMP_CD: data.rows?.[0]?.data?.COMP_CD ?? "",
2141
+ BRANCH_CD: data.rows?.[0]?.data?.BRANCH_CD ?? "",
2142
+ GROUP_NAME: authState?.groupName ?? "",
2143
+ APP_TRAN_CD: appTranCd,
2144
+ COMP_NM: data.rows?.[0]?.data?.COMP_NM ?? "",
2145
+ BRANCH_NM: data.rows?.[0]?.data?.BRANCH_NM ?? "",
2146
+ DAYEND_STATUS: data.rows?.[0]?.data?.DAYEND_STATUS ?? "",
2147
+ EOD_RUNNING_STATUS: data.rows?.[0]?.data?.EOD_RUNNING_STATUS ?? "",
2148
+ IS_UPD_DEF_BRANCH: authState?.user?.isUpdDefBranch ?? "",
2149
+ COMP_BASE_BRANCH_CD: data.rows?.[0]?.data?.COMP_BASE_BRANCH_CD ?? "",
2150
+ selectionMode,
2151
+ });
2152
+ }
2153
+ }
2154
+ else if (data.name === "back") {
2155
+ if (selectionMode === "C") {
2156
+ navigate(dashboardUrl, {
2157
+ replace: true,
2158
+ });
2159
+ }
2160
+ else {
2161
+ logoutFn();
2162
+ }
2163
+ }
2164
+ }, [navigate, data, mutation]);
2165
+ useEffect(() => {
2166
+ var oneBranchOpen = data?.some((branch) => branch.STATUS === "O");
2167
+ if (oneBranchOpen === false) {
2168
+ enqueueSnackbar("Branch is in Day End Status.~rPlease contact system Vendor.", {
2169
+ variant: "error",
2170
+ });
2171
+ logoutFn();
2172
+ }
2173
+ if (data?.length === 1) {
2174
+ if (data?.[0]?.STATUS === "O") {
2175
+ setCurrentAction({ name: "proceed", rows: [{ data: { ...data[0] } }] });
2176
+ }
2177
+ }
2178
+ }, [JSON.stringify(data)]);
2179
+ const Greetings = () => {
2180
+ let hours = new Date().getHours();
2181
+ let greet;
2182
+ if (hours < 12)
2183
+ greet = "morning";
2184
+ else if (hours >= 12 && hours <= 16)
2185
+ greet = "afternoon";
2186
+ else if (hours >= 16 && hours <= 24)
2187
+ greet = "evening";
2188
+ return jsxs("span", { children: ["Good ", greet, ","] });
2189
+ };
2190
+ const LightTooltip = styled(({ className, ...props }) => (jsx(Tooltip, { ...props, classes: { popper: className } })))(({ theme }) => ({
2191
+ [`& .${tooltipClasses.tooltip}`]: {
2192
+ backgroundColor: theme.palette.common.white,
2193
+ color: "rgba(0, 0, 0, 0.87)",
2194
+ boxShadow: theme.shadows[1],
2195
+ fontSize: 13,
2196
+ },
2197
+ }));
2198
+ // const greet = Greetings();
2199
+ return (jsx(Fragment$1, { children: jsxs(Grid, { container: true, style: {
2200
+ margin: "0",
2201
+ padding: "0",
2202
+ height: "100vh",
2203
+ // overflowY: "hidden",
2204
+ }, children: [jsx(Grid, { item: true, lg: 1, md: 1, xl: 1, xs: 1, sm: 1, children: jsx("img", { className: "sideImage", src: sideImage, alt: "side-Image" }) }), jsx(Grid, { item: true, lg: 11, md: 11, xl: 11, xs: 11, style: {
2205
+ display: "flex",
2206
+ justifyContent: "center",
2207
+ }, children: jsxs(Grid, { container: true, style: {
2208
+ minHeight: "100vh",
2209
+ padding: "10px 0px 0px 0px",
2210
+ }, lg: 11, md: 11, xl: 11, xs: 11, children: [jsxs(Grid, { container: true, style: {
2211
+ margin: "0",
2212
+ padding: "0",
2213
+ // height: "12vh",
2214
+ }, lg: 12, md: 12, xl: 12, xs: 12, children: [jsx(Grid, { xs: 12, sm: 1, md: 1, lg: 1, xl: 1, sx: {
2215
+ display: "flex",
2216
+ alignItems: "center",
2217
+ // justifyContent: "center",
2218
+ }, children: jsx(Stack, { direction: "row", spacing: 4, ml: 1, children: jsx(Box, { className: classes.heading_user_img_border, sx: { cursor: "pointer" }, children: jsx(LightTooltip, { title: jsxs(Fragment$1, { children: [jsxs("div", { children: ["User ID : ", authState?.user?.id ?? ""] }), jsxs("div", { children: ["Role : ", authState?.roleName ?? ""] }), jsx("div", { children: "Last Unsuccessful Login : \"\"" })] }), placement: "bottom-start", children: jsx(Avatar, { className: classes.heading_user_img,
2219
+ // onClick={handleNavigate}
2220
+ alt: "Remy Sharp", src: Boolean(logos?.profile)
2221
+ ? logos?.profile
2222
+ : USER_PROFILE_DEFAULT }) }) }) }) }), jsxs(Grid, { xs: 12, sm: 5, md: 5, lg: 5, xl: 5, sx: {
2223
+ justifyContent: "center",
2224
+ display: "flex",
2225
+ flexDirection: "column",
2226
+ }, children: [jsxs("h1", { className: "name-heading", style: { fontSize: "24px", margin: "4px 0px" }, children: ["Welcome ", jsx("span", { children: `${authState?.user?.name ?? ""},` })] }), jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [jsx("h3", { style: { margin: "4px 0px" }, children: Greetings() }), jsx("img", { src: Waving_hand, alt: "", style: { height: "18px" } })] })] }), jsx(Grid, { xs: 12, sm: 1, md: 1, lg: 1, xl: 1, sx: {
2227
+ display: "flex",
2228
+ // flexDirection: "column",
2229
+ justifyContent: "center",
2230
+ alignItems: "center",
2231
+ }, children: jsx(Stack, { direction: "row", justifyContent: "flex-start", spacing: 2, children: jsx(Box, { className: classes.heading_user_img_border, children: jsx(Avatar, { className: classes.heading_user_img, alt: "Remy Sharp", src: Boolean(logos?.bank) ? logos?.bank : bank_logo_default }) }) }) }), jsxs(Grid, { xs: 12, sm: 3, md: 3, lg: 3, xl: 3, sx: {
2232
+ display: "flex",
2233
+ flexDirection: "column",
2234
+ justifyContent: "center",
2235
+ }, children: [jsx("div", { className: "bank-name-container", style: { fontSize: "14px" }, children: jsx("p", { className: "bank-name", children: `Bank Name: ${authState?.companyName ?? ""}` }) }), jsx("p", { className: "emp-id", children: `Emp. Id: ${authState?.user?.employeeID ?? ""}` })] }), jsxs(Grid, { xs: 12, sm: 3, md: 3, lg: 2, xl: 2, sx: {
2236
+ display: "flex",
2237
+ alignItems: "center",
2238
+ justifyContent: "right",
2239
+ }, children: [" ", jsx("div", { children: jsx("img", { src: Boolean(logos?.logo) ? logos?.logo : logo, alt: "CbsEnfinity", className: classes.logo }) })] })] }), isError ? (jsx(Fragment, { children: jsx("div", { style: { width: "100%", paddingTop: "10px" }, children: jsx(Alert, { severity: error?.severity ?? "error", errorMsg: error?.error_msg ?? "Error", errorDetail: error?.error_detail ?? "" }) }) })) : mutation.isError && mutation.error ? (jsx(Fragment, { children: jsx("div", { style: { width: "100%", paddingTop: "10px" }, children: jsx(Alert, { severity: getError.severity ?? "error", errorMsg: getError.error_msg ?? "Error", errorDetail: getError.error_detail ?? "" }) }) })) : null, jsx(GridWrapper, { finalMetaData: BranchSelectionGridMetaData, data: data ?? [], setData: () => null, actions: actions, setAction: setCurrentAction,
2240
+ // controlsAtBottom={true}
2241
+ // headerToolbarStyle={{
2242
+ // background: "var(--theme-color2)",
2243
+ // color: "black",
2244
+ // padding: "0",
2245
+ // }}
2246
+ // onlySingleSelectionAllow={true}
2247
+ // isNewRowStyle={true}
2248
+ loading: isLoading || isFetching || mutation.isLoading }, `branchSelection`), isError || data?.length === 0 ? (jsx(Button, { sx: {
2249
+ backgroundColor: "var(--theme-color3)",
2250
+ position: "absolute",
2251
+ right: "113px",
2252
+ bottom: "20px",
2253
+ width: "7rem",
2254
+ "&:hover": {
2255
+ backgroundColor: "var(--theme-color3)",
2256
+ },
2257
+ }, onClick: () => {
2258
+ if (selectionMode === "C") {
2259
+ navigate(dashboardUrl, {
2260
+ replace: true,
2261
+ });
2262
+ }
2263
+ else {
2264
+ logoutFn();
2265
+ }
2266
+ }, children: "Back" })) : null] }) })] }) }));
2267
+ };
2268
+ const BranchSelectionGridWrapper = (props) => {
2269
+ return (jsx(ClearCacheProvider, { children: jsx(BranchSelectionGrid, { ...props }) }));
2270
+ };
2271
+
2272
+ export { AuthControllerWrapper, BranchSelectionGridWrapper, ForgotPasswordControllerWrapper, ValidatePassword };
1921
2273
  //# sourceMappingURL=index.js.map