fetch and display door lock incidents on frontend

This commit is contained in:
Bilal Catic
2019-06-17 12:45:23 +02:00
parent f9bd84c9c5
commit 781943026a
7 changed files with 199 additions and 6 deletions

View File

@@ -0,0 +1,17 @@
export const UNLOCKED_INCIDENT = 2;
export const UNSCHEDULED_INCIDENT = 3;
export const incidentDescriptions = {};
incidentDescriptions[UNLOCKED_INCIDENT] = 'User left door unlocked';
incidentDescriptions[UNSCHEDULED_INCIDENT] = 'Unscheduled use';
export const incidentLevelDescriptions = {
UNLOCKED_0: 'First month',
UNLOCKED_1: 'Second month',
UNLOCKED_2: 'Third month',
UNLOCKED_3: 'Fourth month',
UNLOCKED_4: 'Fifth month',
UNLOCKED_5: 'Sixth month',
};

View File

@@ -1,5 +1,6 @@
import UploadDLockData from "../scenes/UploadDLockData";
import Home from "../scenes/Home";
import UploadDLockData from '../scenes/UploadDLockData';
import Home from '../scenes/Home';
import IncidentsReport from '../scenes/IncidentsReport';
export const mainMenuItems = [
{
@@ -8,6 +9,12 @@ export const mainMenuItems = [
url: '/',
component: Home,
},
{
id: 'report',
title: 'Incidents Report',
url: '/incidents-report',
component: IncidentsReport,
},
{
id: 'uploadDLockData',
title: 'DLock',
@@ -15,3 +22,14 @@ export const mainMenuItems = [
component: UploadDLockData,
},
];
export const incidentsReportHeaderTitles = {
officeName: 'Office',
resourceName: 'Room',
bookingStart: 'Reservation Start',
bookingEnd: 'Reservation End',
memberName: 'Member Name',
incidentType: 'Incident Type',
feeDescription: 'Fee description',
totalChargeFee: 'Total Fee',
};