Merge branch 'change-home-page-content' into 'master'
Change home page content See merge request saburly/psihologija!49
This commit was merged in pull request #49.
This commit is contained in:
@@ -5,7 +5,7 @@ import { Menu } from 'semantic-ui-react';
|
|||||||
import { mainMenuItems } from '../../constants/menuItems';
|
import { mainMenuItems } from '../../constants/menuItems';
|
||||||
|
|
||||||
const MainMenu = () =>
|
const MainMenu = () =>
|
||||||
(<Menu>
|
(<Menu size={'huge'}>
|
||||||
{
|
{
|
||||||
mainMenuItems.map(mainMenuItem => {
|
mainMenuItems.map(mainMenuItem => {
|
||||||
if (!mainMenuItem.showInMenu){
|
if (!mainMenuItem.showInMenu){
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export const mainMenuItems = [
|
|||||||
{
|
{
|
||||||
id: 'home',
|
id: 'home',
|
||||||
showInMenu: true,
|
showInMenu: true,
|
||||||
|
showOnHomePage: false,
|
||||||
title: 'Home',
|
title: 'Home',
|
||||||
url: '/',
|
url: '/',
|
||||||
component: Home,
|
component: Home,
|
||||||
@@ -16,42 +17,53 @@ export const mainMenuItems = [
|
|||||||
{
|
{
|
||||||
id: 'memberPracticeSummaryReport',
|
id: 'memberPracticeSummaryReport',
|
||||||
showInMenu: true,
|
showInMenu: true,
|
||||||
|
showOnHomePage: true,
|
||||||
title: 'Member Practice Summary Report',
|
title: 'Member Practice Summary Report',
|
||||||
url: '/member-practice-summary-report',
|
url: '/member-practice-summary-report',
|
||||||
component: MemberPracticeSummaryReport,
|
component: MemberPracticeSummaryReport,
|
||||||
|
description: 'Generate a report for a year, for all members',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'specificMemberIncidentsReport',
|
id: 'specificMemberIncidentsReport',
|
||||||
showInMenu: true,
|
showInMenu: true,
|
||||||
|
showOnHomePage: true,
|
||||||
title: 'Member Incidents Report',
|
title: 'Member Incidents Report',
|
||||||
url: '/specific-member-incidents-report',
|
url: '/specific-member-incidents-report',
|
||||||
component: SpecificMemberIncidentsReport,
|
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',
|
id: 'specificMemberIncidentsReportWithMemberId',
|
||||||
showInMenu: false,
|
showInMenu: false,
|
||||||
|
showOnHomePage: false,
|
||||||
url: '/specific-member-incidents-report/:memberId',
|
url: '/specific-member-incidents-report/:memberId',
|
||||||
component: SpecificMemberIncidentsReport,
|
component: SpecificMemberIncidentsReport,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'report',
|
id: 'report',
|
||||||
showInMenu: true,
|
showInMenu: true,
|
||||||
|
showOnHomePage: true,
|
||||||
title: 'Incidents Report',
|
title: 'Incidents Report',
|
||||||
url: '/incidents-report',
|
url: '/incidents-report',
|
||||||
component: IncidentsReport,
|
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',
|
id: 'uploadDLockData',
|
||||||
showInMenu: true,
|
showInMenu: true,
|
||||||
|
showOnHomePage: true,
|
||||||
title: 'DLock',
|
title: 'DLock',
|
||||||
url: '/dlock',
|
url: '/dlock',
|
||||||
component: UploadDLockData,
|
component: UploadDLockData,
|
||||||
|
description: 'Upload DLock files to the system',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'roomOfficeNameMapping',
|
id: 'roomOfficeNameMapping',
|
||||||
showInMenu: true,
|
showInMenu: true,
|
||||||
title: 'Room Office Name Mapping',
|
showOnHomePage: true,
|
||||||
|
title: 'Room Office Mapping',
|
||||||
url: '/room-office-name-mapping',
|
url: '/room-office-name-mapping',
|
||||||
component: RoomOfficeNameMapping,
|
component: RoomOfficeNameMapping,
|
||||||
|
description: 'Edit / delete existing office-room mappings',
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import React, { Component } from 'react';
|
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 MainMenu from '../../components/MainMenu';
|
||||||
|
import { mainMenuItems } from '../../constants/menuItems';
|
||||||
|
|
||||||
class Home extends Component {
|
class Home extends Component {
|
||||||
|
|
||||||
@@ -10,25 +11,23 @@ class Home extends Component {
|
|||||||
return (
|
return (
|
||||||
<Container>
|
<Container>
|
||||||
<MainMenu/>
|
<MainMenu/>
|
||||||
<h3>Report</h3>
|
<h3>SIMA SPACE </h3>
|
||||||
<hr/>
|
<hr/>
|
||||||
<Form>
|
{
|
||||||
<Form.Group widths="equal">
|
mainMenuItems.map((menuItem) => {
|
||||||
<Form.Input
|
const { showOnHomePage, title, description, url} = menuItem;
|
||||||
fluid
|
if (showOnHomePage){
|
||||||
required
|
|
||||||
label="Start date"
|
return (
|
||||||
type="date"
|
<Message size={'large'}>
|
||||||
/>
|
<a href={url}><Message.Header>{title}</Message.Header></a>
|
||||||
<Form.Input
|
<br/>
|
||||||
fluid
|
{description}
|
||||||
required
|
</Message>
|
||||||
label="End date"
|
);
|
||||||
type="date"
|
}
|
||||||
/>
|
})
|
||||||
</Form.Group>
|
}
|
||||||
<Form.Button>Show report</Form.Button>
|
|
||||||
</Form>
|
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class RoomOfficeNameMapping extends Component {
|
|||||||
<Container>
|
<Container>
|
||||||
<Loader active={pendingMappings} />
|
<Loader active={pendingMappings} />
|
||||||
<MainMenu/>
|
<MainMenu/>
|
||||||
<h3>Room-Office-Name Mappings</h3>
|
<h3>Room Office Mapping</h3>
|
||||||
<hr/>
|
<hr/>
|
||||||
<br/>
|
<br/>
|
||||||
<Table singleLine unstackable>
|
<Table singleLine unstackable>
|
||||||
|
|||||||
Reference in New Issue
Block a user