Moved recent items to header BOD-200
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user