Skip to content

Commit 9df9d9e

Browse files
Create access page for Kitchen and Inventory portal
Implement protected routes for Kitchen and Inventory portal Update header to include Kitchen and Inventory navigation Add routes for Kitchen and Inventory portal Update language files for Kitchen and Inventory portal
1 parent e58779a commit 9df9d9e

9 files changed

Lines changed: 684 additions & 1 deletion

File tree

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)