diff --git a/client/src/components/MainMenu/index.js b/client/src/components/MainMenu/index.js index 1fd8f65..7210e9c 100644 --- a/client/src/components/MainMenu/index.js +++ b/client/src/components/MainMenu/index.js @@ -5,7 +5,7 @@ import { Menu } from 'semantic-ui-react'; import { mainMenuItems } from '../../constants/menuItems'; const MainMenu = () => - ( + ( { mainMenuItems.map(mainMenuItem => { if (!mainMenuItem.showInMenu){ diff --git a/client/src/constants/menuItems.js b/client/src/constants/menuItems.js index 2a9102c..c07add6 100644 --- a/client/src/constants/menuItems.js +++ b/client/src/constants/menuItems.js @@ -9,6 +9,7 @@ export const mainMenuItems = [ { id: 'home', showInMenu: true, + showOnHomePage: false, title: 'Home', url: '/', component: Home, @@ -16,42 +17,53 @@ export const mainMenuItems = [ { id: 'memberPracticeSummaryReport', showInMenu: true, + showOnHomePage: true, title: 'Member Practice Summary Report', url: '/member-practice-summary-report', component: MemberPracticeSummaryReport, + description: 'Generate a report for a year, for all members', }, { id: 'specificMemberIncidentsReport', showInMenu: true, + showOnHomePage: true, title: 'Member Incidents Report', url: '/specific-member-incidents-report', component: SpecificMemberIncidentsReport, + description: 'Displays all incidents with a total charge amount in a selected month for a selected member. It is also possible to send displayed fees to the ORD', }, { id: 'specificMemberIncidentsReportWithMemberId', showInMenu: false, + showOnHomePage: false, url: '/specific-member-incidents-report/:memberId', component: SpecificMemberIncidentsReport, }, { id: 'report', showInMenu: true, + showOnHomePage: true, title: 'Incidents Report', url: '/incidents-report', component: IncidentsReport, + description: 'Display all incidents in a selected month for all members. It is also possible to send displayed fees to the ORD', }, { id: 'uploadDLockData', showInMenu: true, + showOnHomePage: true, title: 'DLock', url: '/dlock', component: UploadDLockData, + description: 'Upload DLock files to the system', }, { id: 'roomOfficeNameMapping', showInMenu: true, - title: 'Room Office Name Mapping', + showOnHomePage: true, + title: 'Room Office Mapping', url: '/room-office-name-mapping', component: RoomOfficeNameMapping, + description: 'Edit / delete existing office-room mappings', } ]; diff --git a/client/src/scenes/Home/index.js b/client/src/scenes/Home/index.js index 599ec3b..b344612 100644 --- a/client/src/scenes/Home/index.js +++ b/client/src/scenes/Home/index.js @@ -1,8 +1,9 @@ import React, { Component } from 'react'; -import { Container, Form } from 'semantic-ui-react'; +import { Container, Message } from 'semantic-ui-react'; import MainMenu from '../../components/MainMenu'; +import { mainMenuItems } from '../../constants/menuItems'; class Home extends Component { @@ -10,25 +11,23 @@ class Home extends Component { return ( -

Report

+

SIMA SPACE


-
- - - - - Show report -
+ { + mainMenuItems.map((menuItem) => { + const { showOnHomePage, title, description, url} = menuItem; + if (showOnHomePage){ + + return ( + + {title} +
+ {description} +
+ ); + } + }) + }
); } diff --git a/client/src/scenes/RoomOfficeNameMapping/index.js b/client/src/scenes/RoomOfficeNameMapping/index.js index efaebf2..19fa6ec 100644 --- a/client/src/scenes/RoomOfficeNameMapping/index.js +++ b/client/src/scenes/RoomOfficeNameMapping/index.js @@ -50,7 +50,7 @@ class RoomOfficeNameMapping extends Component { -

Room-Office-Name Mappings

+

Room Office Mapping