@acuteinfo/common-screens 1.0.23 → 1.0.24

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.js CHANGED
@@ -2469,7 +2469,7 @@ const useStyles = makeStyles((theme) => ({
2469
2469
  },
2470
2470
  }));
2471
2471
 
2472
- const AppbarWrapper = ({ handleDrawerOpen, handleDrawerClose, open, authState, LanguageComponent, SearchComponent, dashboardUrl, logos, bankLogo, profilePic, handleLogout, handleProfile, navigate, hideGreetings }) => {
2472
+ const AppbarWrapper = ({ handleDrawerOpen, handleDrawerClose, open, authState, LanguageComponent, SearchComponent, dashboardUrl, logos, bankLogo, profilePic, handleLogout, handleProfile, navigate, hideGreetings, menuIconToRight = false, }) => {
2473
2473
  const classes = useStyles();
2474
2474
  const { t } = useTranslation();
2475
2475
  const LightTooltip = styled(({ className, ...props }) => (jsx(Tooltip, { ...props, classes: { popper: className } })))(({ theme }) => ({
@@ -2497,9 +2497,10 @@ const AppbarWrapper = ({ handleDrawerOpen, handleDrawerClose, open, authState, L
2497
2497
  alignItems: "center",
2498
2498
  height: "80px",
2499
2499
  width: "227px",
2500
+ flexDirection: menuIconToRight ? "row-reverse" : "row"
2500
2501
  }, children: [open ? (jsx(IconButton$1, { disableRipple: true, onClick: () => handleDrawerClose(), className: classes.DrawerClose_icon, children: jsx(MenuOutlinedIcon, { fontSize: "large" }) })) : (jsx(IconButton$1, { disableRipple: true, "aria-label": "open drawer", onClick: () => handleDrawerOpen(), className: classes.DrawerClose_icon, children: jsx(MenuOutlinedIcon, { fontSize: "large" }) })), jsxs("div", { children: [jsx("img", { src: Boolean(logos?.logo) ? logos?.logo : bankLogo, alt: "CbsEnfinity", className: classes.logo, onClick: (e) => {
2501
2502
  e.preventDefault();
2502
- navigate(dashboardUrl ?? "");
2503
+ navigate(dashboardUrl ?? "./dashboard");
2503
2504
  } }), jsx("p", { className: classes.version01, children: logos?.version })] })] }), jsx(Stack, { direction: "row", spacing: 4, mx: 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(Typography, { component: "h1", variant: "h6", color: "inherit", noWrap: true, className: classes.title, children: [jsx(Box, { style: {
2504
2505
  marginBottom: "8px",
2505
2506
  fontSize: "17px",
@@ -2509,7 +2510,7 @@ const AppbarWrapper = ({ handleDrawerOpen, handleDrawerClose, open, authState, L
2509
2510
  [classes.marquee]: authState?.companyName.length > 55,
2510
2511
  }), children: authState?.companyName || "" }), jsx("div", { style: { display: "flex", gap: "8px" }, children: jsxs("div", { style: { color: "var(--theme-color6)" }, children: [jsxs(Typography, { variant: "caption", display: "block", lineHeight: 0, fontSize: "11px", children: [t("appBar.Branch"), ":", authState?.user?.branchCode ?? "001 ", "-", authState?.user?.branch ?? ""] }), jsxs(Typography, { variant: "caption", display: "inline", fontSize: "11px", children: [t("appBar.WorkingDate"), ":", " ", Boolean(authState?.workingDate)
2511
2512
  ? checkDateAndDisplay(format(new Date(authState?.workingDate), "dd/MM/yyyy"))
2512
- : "not found"] }), jsxs(Typography, { marginLeft: 1, variant: "caption", display: "inline", fontSize: "11px", children: [t("appBar.LastLoginDate"), " :", " ", checkDateAndDisplay(authState?.user?.lastLogin ?? "Vastrapur")] })] }) })] }), jsxs(Box, { children: [hideGreetings ? (jsx(Box, { sx: { marginBottom: "3px", paddingRight: "15px" }, children: jsxs(Stack, { direction: "row", spacing: 2, justifyContent: "flex-end", alignItems: "center", children: [jsxs(Typography, { fontSize: "17px", color: "#1C1C1C", children: [Greetings(), " ", authState?.user?.id ?? ""] }), jsx("img", { src: Waving_hand$1, alt: "", style: { height: "18px" } })] }) })) : null, jsxs(Box, { display: "flex", justifyContent: "space-evenly", alignItems: "center", children: [SearchComponent ? jsx(SearchComponent, {}) : null, LanguageComponent ? jsx(LanguageComponent, {}) : null, jsx(Box, { maxWidth: 170, display: "flex", justifyContent: "end", children: jsx(Tooltip, { title: "Logout", placement: "bottom", arrow: true, children: jsx(IconButton$1, { onClick: () => typeof handleLogout === "function" ? handleLogout() : null, color: "error", sx: {
2513
+ : "not found"] }), jsxs(Typography, { marginLeft: 1, variant: "caption", display: "inline", fontSize: "11px", children: [t("appBar.LastLoginDate"), " :", " ", checkDateAndDisplay(authState?.user?.lastLogin ?? "Vastrapur")] })] }) })] }), jsxs(Box, { children: [!hideGreetings ? (jsx(Box, { sx: { marginBottom: "3px", paddingRight: "15px" }, children: jsxs(Stack, { direction: "row", spacing: 2, justifyContent: "flex-end", alignItems: "center", children: [jsxs(Typography, { fontSize: "17px", color: "#1C1C1C", children: [Greetings(), " ", authState?.user?.id ?? ""] }), jsx("img", { src: Waving_hand$1, alt: "", style: { height: "18px" } })] }) })) : null, jsxs(Box, { display: "flex", justifyContent: "space-evenly", alignItems: "center", children: [SearchComponent ? jsx(SearchComponent, {}) : null, LanguageComponent ? jsx(LanguageComponent, {}) : null, jsx(Box, { maxWidth: 170, display: "flex", justifyContent: "end", children: jsx(Tooltip, { title: "Logout", placement: "bottom", arrow: true, children: jsx(IconButton$1, { onClick: () => typeof handleLogout === "function" ? handleLogout() : null, color: "error", sx: {
2513
2514
  backgroundColor: "rgba(235, 237, 238, 0.45)",
2514
2515
  borderRadius: "10px",
2515
2516
  height: "30px",