Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/components/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ function UpdateDocumentTitle() {
{ pattern: /^\/Logout$/, title: 'Logout' },
{ pattern: /^\/forcePasswordUpdate\/[^/]+$/, title: 'Force Password Update' },
{ pattern: /^\/$/, title: `Dashboard - ${fullName}` },
{ pattern: /^\/kitchenandinventory\/login$/, title: 'Kitchen and Inventory Login' },
{ pattern: /^\/kitchenandinventory$/, title: 'Kitchen and Inventory Dashboard' },
{ pattern: /.*/, title: 'HGN APP' }, // Default case
{
pattern: /^\/communityportal\/activity\/activityid\/feedback$/,
Expand Down
7 changes: 7 additions & 0 deletions src/components/Header/HeaderRenderer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import { Header } from './Header';
import { getHeaderData } from '../../actions/authActions';
import { getAllRoles } from '../../actions/role';
import hasPermission from '../../utils/permissions';
import KIHeader from '../KitchenandInventory/KIHeader/KIHeader';

export function HeaderRenderer(props) {
const location = useLocation();
const isKitchenAndInventory = location.pathname.startsWith('/kitchenandinventory');
const isCommunityPortal = location.pathname.startsWith('/communityportal');
const isEducationEvaluation = location.pathname.startsWith('/educationportal/evaluation-results');

Expand All @@ -17,6 +19,11 @@ export function HeaderRenderer(props) {
return null;
}

if (isKitchenAndInventory) {
// eslint-disable-next-line react/jsx-props-no-spreading
return <KIHeader {...props} />;
}

// eslint-disable-next-line react/jsx-props-no-spreading
return isCommunityPortal ? <CPHeader {...props} /> : <Header {...props}/>;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export function KIDashboard() {
return (
<div>
<h1>Welcome to Kitchen and Inventory Dashboard</h1>
</div>
);
}

export default KIDashboard;
Loading
Loading