From 485c95a9291fc7b12aa51e010bbff7ffe446c3e0 Mon Sep 17 00:00:00 2001 From: Bilal Catic Date: Wed, 28 Aug 2019 13:20:48 +0200 Subject: [PATCH 1/2] change mapping page title --- client/src/constants/menuItems.js | 2 +- client/src/scenes/RoomOfficeNameMapping/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/constants/menuItems.js b/client/src/constants/menuItems.js index 2a9102c..f85d1bb 100644 --- a/client/src/constants/menuItems.js +++ b/client/src/constants/menuItems.js @@ -50,7 +50,7 @@ export const mainMenuItems = [ { id: 'roomOfficeNameMapping', showInMenu: true, - title: 'Room Office Name Mapping', + title: 'Room Office Mapping', url: '/room-office-name-mapping', component: RoomOfficeNameMapping, } 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



-- 2.47.3 From 6f1645a479bc59405428087b19e700a3c5bf9e44 Mon Sep 17 00:00:00 2001 From: Bilal Catic Date: Wed, 28 Aug 2019 13:55:49 +0200 Subject: [PATCH 2/2] change home page --- client/src/components/MainMenu/index.js | 2 +- client/src/constants/menuItems.js | 12 ++++++++ client/src/scenes/Home/index.js | 37 ++++++++++++------------- 3 files changed, 31 insertions(+), 20 deletions(-) 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 f85d1bb..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, + 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} +
+ ); + } + }) + }
); } -- 2.47.3