Skip to content

Commit 5730cfc

Browse files
Merge pull request #4664 from OneCommunityGlobal/kitchen-and-inventory-portal-access
Bhanu Anish - Kitchen and inventory portal access and Navbar
2 parents 792b822 + 7ee4e1a commit 5730cfc

11 files changed

Lines changed: 919 additions & 1 deletion

File tree

src/components/App.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ function UpdateDocumentTitle() {
107107
{ pattern: /^\/Logout$/, title: 'Logout' },
108108
{ pattern: /^\/forcePasswordUpdate\/[^/]+$/, title: 'Force Password Update' },
109109
{ pattern: /^\/$/, title: `Dashboard - ${fullName}` },
110+
{ pattern: /^\/kitchenandinventory\/login$/, title: 'Kitchen and Inventory Login' },
111+
{ pattern: /^\/kitchenandinventory$/, title: 'Kitchen and Inventory Dashboard' },
110112
{ pattern: /.*/, title: 'HGN APP' }, // Default case
111113
{
112114
pattern: /^\/communityportal\/activity\/activityid\/feedback$/,

src/components/Header/HeaderRenderer.jsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ import { Header } from './Header';
66
import { getHeaderData } from '../../actions/authActions';
77
import { getAllRoles } from '../../actions/role';
88
import hasPermission from '../../utils/permissions';
9+
import KIHeader from '../KitchenandInventory/KIHeader/KIHeader';
910

1011
export function HeaderRenderer(props) {
1112
const location = useLocation();
13+
const isKitchenAndInventory = location.pathname.startsWith('/kitchenandinventory');
1214
const isCommunityPortal = location.pathname.startsWith('/communityportal');
1315
const isEducationEvaluation = location.pathname.startsWith('/educationportal/evaluation-results');
1416

@@ -17,6 +19,11 @@ export function HeaderRenderer(props) {
1719
return null;
1820
}
1921

22+
if (isKitchenAndInventory) {
23+
// eslint-disable-next-line react/jsx-props-no-spreading
24+
return <KIHeader {...props} />;
25+
}
26+
2027
// eslint-disable-next-line react/jsx-props-no-spreading
2128
return isCommunityPortal ? <CPHeader {...props} /> : <Header {...props}/>;
2229
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export function KIDashboard() {
2+
return (
3+
<div>
4+
<h1>Welcome to Kitchen and Inventory Dashboard</h1>
5+
</div>
6+
);
7+
}
8+
9+
export default KIDashboard;

0 commit comments

Comments
 (0)