Change home page content #49

Merged
bilal.catic merged 2 commits from change-home-page-content into master 2019-08-28 13:56:19 +02:00
4 changed files with 33 additions and 22 deletions

View File

@@ -5,7 +5,7 @@ import { Menu } from 'semantic-ui-react';
import { mainMenuItems } from '../../constants/menuItems';
const MainMenu = () =>
(<Menu>
(<Menu size={'huge'}>
{
mainMenuItems.map(mainMenuItem => {
if (!mainMenuItem.showInMenu){

View File

@@ -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',
}
];

View File

@@ -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 (
<Container>
<MainMenu/>
<h3>Report</h3>
<h3>SIMA SPACE </h3>
<hr/>
<Form>
<Form.Group widths="equal">
<Form.Input
fluid
required
label="Start date"
type="date"
/>
<Form.Input
fluid
required
label="End date"
type="date"
/>
</Form.Group>
<Form.Button>Show report</Form.Button>
</Form>
{
mainMenuItems.map((menuItem) => {
const { showOnHomePage, title, description, url} = menuItem;
if (showOnHomePage){
return (
<Message size={'large'}>
<a href={url}><Message.Header>{title}</Message.Header></a>
<br/>
{description}
</Message>
);
}
})
}
</Container>
);
}

View File

@@ -50,7 +50,7 @@ class RoomOfficeNameMapping extends Component {
<Container>
<Loader active={pendingMappings} />
<MainMenu/>
<h3>Room-Office-Name Mappings</h3>
<h3>Room Office Mapping</h3>
<hr/>
<br/>
<Table singleLine unstackable>