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