@@ -17,6 +17,7 @@ import Icon, {
|
||||
LineChartOutlined,
|
||||
PaperClipOutlined,
|
||||
PhoneOutlined,
|
||||
PlusCircleOutlined,
|
||||
QuestionCircleFilled,
|
||||
ScheduleOutlined,
|
||||
SettingOutlined,
|
||||
@@ -25,11 +26,11 @@ import Icon, {
|
||||
UnorderedListOutlined,
|
||||
UserOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { useSplitTreatments } from '@splitsoftware/splitio-react';
|
||||
import { Layout, Menu, Switch, Tooltip } from 'antd';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { BsKanban } from 'react-icons/bs';
|
||||
import {useSplitTreatments} from '@splitsoftware/splitio-react';
|
||||
import {Layout, Menu, Switch, Tooltip} from 'antd';
|
||||
import React, {useEffect, useState} from 'react';
|
||||
import {useTranslation} from 'react-i18next';
|
||||
import {BsKanban} from 'react-icons/bs';
|
||||
import {
|
||||
FaCalendarAlt,
|
||||
FaCarCrash,
|
||||
@@ -37,23 +38,23 @@ import {
|
||||
FaFileInvoiceDollar,
|
||||
FaTasks
|
||||
} from 'react-icons/fa';
|
||||
import { GiPayMoney, GiPlayerTime, GiSettingsKnobs } from 'react-icons/gi';
|
||||
import { IoBusinessOutline } from 'react-icons/io5';
|
||||
import { RiSurveyLine } from 'react-icons/ri';
|
||||
import { connect } from 'react-redux';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { createStructuredSelector } from 'reselect';
|
||||
import {GiPayMoney, GiPlayerTime, GiSettingsKnobs} from 'react-icons/gi';
|
||||
import {IoBusinessOutline} from 'react-icons/io5';
|
||||
import {RiSurveyLine} from 'react-icons/ri';
|
||||
import {connect} from 'react-redux';
|
||||
import {Link} from 'react-router-dom';
|
||||
import {createStructuredSelector} from 'reselect';
|
||||
import {
|
||||
selectRecentItems,
|
||||
selectSelectedHeader,
|
||||
} from '../../redux/application/application.selectors';
|
||||
import { setModalContext } from '../../redux/modals/modals.actions';
|
||||
import { signOutStart } from '../../redux/user/user.actions';
|
||||
import { selectBodyshop, selectCurrentUser } from '../../redux/user/user.selectors';
|
||||
import { FiLogOut } from 'react-icons/fi';
|
||||
import { checkBeta, handleBeta, setBeta } from '../../utils/betaHandler';
|
||||
import {setModalContext} from '../../redux/modals/modals.actions';
|
||||
import {signOutStart} from '../../redux/user/user.actions';
|
||||
import {selectBodyshop, selectCurrentUser} from '../../redux/user/user.selectors';
|
||||
import {FiLogOut} from 'react-icons/fi';
|
||||
import {checkBeta, handleBeta, setBeta} from '../../utils/betaHandler';
|
||||
import InstanceRenderManager from '../../utils/instanceRenderMgr';
|
||||
import { HasFeatureAccess } from '../feature-wrapper/feature-wrapper.component';
|
||||
import {HasFeatureAccess} from '../feature-wrapper/feature-wrapper.component';
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentUser: selectCurrentUser,
|
||||
@@ -73,6 +74,10 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
signOutStart: () => dispatch(signOutStart()),
|
||||
setCardPaymentContext: (context) =>
|
||||
dispatch(setModalContext({ context: context, modal: 'cardPayment' })),
|
||||
setTaskUpsertContext: (context) => dispatch(setModalContext({
|
||||
context: context,
|
||||
modal: 'taskUpsert'
|
||||
})),
|
||||
});
|
||||
|
||||
function Header({
|
||||
@@ -87,6 +92,7 @@ function Header({
|
||||
setReportCenterContext,
|
||||
recentItems,
|
||||
setCardPaymentContext,
|
||||
setTaskUpsertContext,
|
||||
}) {
|
||||
const {
|
||||
treatments: { ImEXPay, DmsAp, Simple_Inventory },
|
||||
@@ -470,7 +476,25 @@ function Header({
|
||||
key: 'tasks',
|
||||
id: 'tasks',
|
||||
icon: <FaTasks />,
|
||||
label: <Link to="/manage/tasks">{t('menus.header.tasks')}</Link>,
|
||||
label: t('menus.header.tasks'),
|
||||
children: [
|
||||
{
|
||||
key: 'createTask',
|
||||
icon: <PlusCircleOutlined/>,
|
||||
label: t('menus.header.create_task'),
|
||||
onClick: () => {
|
||||
setTaskUpsertContext({
|
||||
actions: {},
|
||||
context: {},
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'mytasks',
|
||||
icon: <FaTasks/>,
|
||||
label: <Link to="/manage/tasks">{t('menus.header.tasks')}</Link>,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
key: 'shopsubmenu',
|
||||
|
||||
Reference in New Issue
Block a user