Moved recent items to header BOD-200
This commit is contained in:
@@ -14530,6 +14530,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>recent</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>schedule</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -1,41 +1,19 @@
|
||||
import { HomeFilled, ClockCircleFilled } from "@ant-design/icons";
|
||||
import { Breadcrumb, Menu, Dropdown } from "antd";
|
||||
import { HomeFilled } from "@ant-design/icons";
|
||||
import { Breadcrumb } from "antd";
|
||||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { Link } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import {
|
||||
selectBreadcrumbs,
|
||||
selectRecentItems,
|
||||
} from "../../redux/application/application.selectors";
|
||||
import { selectBreadcrumbs } from "../../redux/application/application.selectors";
|
||||
import "./breadcrumbs.styles.scss";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
breadcrumbs: selectBreadcrumbs,
|
||||
recentItems: selectRecentItems,
|
||||
});
|
||||
|
||||
export function BreadCrumbs({ breadcrumbs, recentItems }) {
|
||||
const menu = (
|
||||
<Menu>
|
||||
{recentItems.map((i, idx) => (
|
||||
<Menu.Item key={idx}>
|
||||
<Link to={i.url}>{i.label}</Link>
|
||||
</Menu.Item>
|
||||
))}
|
||||
</Menu>
|
||||
);
|
||||
|
||||
export function BreadCrumbs({ breadcrumbs }) {
|
||||
return (
|
||||
<div className="breadcrumb-container imex-flex-row">
|
||||
<Dropdown
|
||||
className="imex-flex-row__margin-large"
|
||||
overlay={menu}
|
||||
trigger={["click"]}
|
||||
>
|
||||
<ClockCircleFilled onClick={(e) => e.preventDefault()} />
|
||||
</Dropdown>
|
||||
|
||||
<Breadcrumb separator=">">
|
||||
<Breadcrumb.Item>
|
||||
<Link to={`/manage`}>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Icon, {
|
||||
ClockCircleFilled,
|
||||
CarFilled,
|
||||
DollarCircleFilled,
|
||||
FileAddFilled,
|
||||
@@ -23,10 +24,12 @@ import {
|
||||
} from "../../redux/user/user.selectors";
|
||||
import "./header.styles.scss";
|
||||
import GlobalSearch from "../global-search/global-search.component";
|
||||
import { selectRecentItems } from "../../redux/application/application.selectors";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentUser: selectCurrentUser,
|
||||
bodyshop: selectBodyshop,
|
||||
recentItems: selectRecentItems,
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
@@ -71,6 +74,7 @@ function Header({
|
||||
setInvoiceEnterContext,
|
||||
setTimeTicketContext,
|
||||
setPaymentContext,
|
||||
recentItems,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const { Header } = Layout;
|
||||
@@ -283,6 +287,13 @@ function Header({
|
||||
<Menu.Item>
|
||||
<GlobalSearch />
|
||||
</Menu.Item>
|
||||
<Menu.SubMenu title={<ClockCircleFilled />}>
|
||||
{recentItems.map((i, idx) => (
|
||||
<Menu.Item key={idx}>
|
||||
<Link to={i.url}>{i.label}</Link>
|
||||
</Menu.Item>
|
||||
))}
|
||||
</Menu.SubMenu>
|
||||
<Menu.SubMenu
|
||||
title={
|
||||
<div>
|
||||
|
||||
@@ -876,6 +876,7 @@
|
||||
"owners": "Owners",
|
||||
"productionboard": "Production Board",
|
||||
"productionlist": "Production - List",
|
||||
"recent": "Recent Items",
|
||||
"schedule": "Schedule",
|
||||
"scoreboard": "Scoreboard",
|
||||
"search": {
|
||||
|
||||
@@ -876,6 +876,7 @@
|
||||
"owners": "propietarios",
|
||||
"productionboard": "",
|
||||
"productionlist": "",
|
||||
"recent": "",
|
||||
"schedule": "Programar",
|
||||
"scoreboard": "",
|
||||
"search": {
|
||||
|
||||
@@ -876,6 +876,7 @@
|
||||
"owners": "Propriétaires",
|
||||
"productionboard": "",
|
||||
"productionlist": "",
|
||||
"recent": "",
|
||||
"schedule": "Programme",
|
||||
"scoreboard": "",
|
||||
"search": {
|
||||
|
||||
Reference in New Issue
Block a user