Allow for Component Token Overrides.
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -40,50 +40,60 @@ export function TechSider({ technician, techLogout }) {
|
||||
collapsed={collapsed}
|
||||
onCollapse={onCollapse}
|
||||
>
|
||||
<Menu theme="dark" defaultSelectedKeys={["1"]} mode="inline">
|
||||
<Menu.Item
|
||||
key="1"
|
||||
disabled={!!technician}
|
||||
icon={<Icon component={FiLogIn} />}
|
||||
>
|
||||
<Link to={`/tech/login`}>{t("menus.tech.login")}</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="2" disabled={!!!technician} icon={<SearchOutlined />}>
|
||||
<Link to={`/tech/joblookup`}>{t("menus.tech.joblookup")}</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item
|
||||
key="3"
|
||||
disabled={!!!technician}
|
||||
icon={<Icon component={FaBusinessTime} />}
|
||||
>
|
||||
<Link to={`/tech/jobclock`}>{t("menus.tech.jobclockin")}</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item
|
||||
key="4"
|
||||
disabled={!!!technician}
|
||||
icon={<Icon component={MdTimer} />}
|
||||
>
|
||||
<Link to={`/tech/shiftclock`}>{t("menus.tech.shiftclockin")}</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="5" disabled={!!!technician} icon={<ScheduleOutlined />}>
|
||||
<Link to={`/tech/list`}>{t("menus.tech.productionlist")}</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item
|
||||
key="6"
|
||||
disabled={!!!technician}
|
||||
icon={<Icon component={BsKanban} />}
|
||||
>
|
||||
<Link to={`/tech/board`}> {t("menus.tech.productionboard")}</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item
|
||||
key="7"
|
||||
disabled={!!!technician}
|
||||
onClick={() => techLogout()}
|
||||
icon={<Icon component={FiLogOut} />}
|
||||
>
|
||||
{t("menus.tech.logout")}
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
<Menu
|
||||
theme="dark"
|
||||
defaultSelectedKeys={["1"]}
|
||||
mode="inline"
|
||||
onClick={(e) => {
|
||||
if (e.key === "7") {
|
||||
techLogout();
|
||||
}
|
||||
}}
|
||||
items={[
|
||||
{
|
||||
key: "1",
|
||||
icon: <Icon component={FiLogIn} />,
|
||||
disabled: !!technician,
|
||||
label: <Link to={`/tech/login`}>{t("menus.tech.login")}</Link>,
|
||||
},
|
||||
{
|
||||
key: "2",
|
||||
icon: <SearchOutlined />,
|
||||
disabled: !!!technician,
|
||||
label: <Link to={`/tech/joblookup`}>{t("menus.tech.joblookup")}</Link>,
|
||||
},
|
||||
{
|
||||
key: "3",
|
||||
icon: <Icon component={FaBusinessTime} />,
|
||||
disabled: !!!technician,
|
||||
label: <Link to={`/tech/jobclock`}>{t("menus.tech.jobclockin")}</Link>,
|
||||
},
|
||||
{
|
||||
key: "4",
|
||||
icon: <Icon component={MdTimer} />,
|
||||
disabled: !!!technician,
|
||||
label: <Link to={`/tech/shiftclock`}>{t("menus.tech.shiftclockin")}</Link>,
|
||||
},
|
||||
{
|
||||
key: "5",
|
||||
icon: <ScheduleOutlined />,
|
||||
disabled: !!!technician,
|
||||
label: <Link to={`/tech/list`}>{t("menus.tech.productionlist")}</Link>,
|
||||
},
|
||||
{
|
||||
key: "6",
|
||||
icon: <Icon component={BsKanban} />,
|
||||
disabled: !!!technician,
|
||||
label: <Link to={`/tech/board`}>{t("menus.tech.productionboard")}</Link>,
|
||||
},
|
||||
{
|
||||
key: "7",
|
||||
icon: <Icon component={FiLogOut} />,
|
||||
disabled: !!!technician,
|
||||
label: t("menus.tech.logout"),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Sider>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user