Add cancelation charges

This commit is contained in:
Senad Uka
2019-07-08 20:37:14 +02:00
parent 1e1c61882f
commit 9d96ac4772
21 changed files with 575 additions and 64 deletions

View File

@@ -1,7 +1,7 @@
'use strict';
const { getMappingsFromDatabase, fetchOffices, fetchResources, saveNewMappingToDatabase } = require('../services/officeRnD/resources');
const { getAllDoorLockIncidents } = require('../services/integration/reports');
const { getAllIncidents } = require('../services/integration/reports');
const getKnownOfficeResourceMappings = (req, res) => {
const dataToFetch = [getMappingsFromDatabase(), fetchOffices(), fetchResources() ];
@@ -32,13 +32,13 @@ const addNewMapping = (req, res) => {
}
};
const getAllIncidents = (req, res) => {
const getAllIncidentsController = (req, res) => {
const dateRange = {
startDate: req.params.startDate,
endDate: req.params.endDate,
};
getAllDoorLockIncidents(dateRange)
getAllIncidents(dateRange)
.then((incidents) => {
res.send(incidents);
})
@@ -55,7 +55,7 @@ const getMemberIncidents = (req, res) => {
endDate: req.params.endDate,
};
getAllDoorLockIncidents(dateRange, memberId)
getAllIncidents(dateRange, memberId)
.then((incidents) => {
res.send(incidents);
})
@@ -65,19 +65,9 @@ const getMemberIncidents = (req, res) => {
});
};
const getUnlockedIncidents = (req, res) => {
};
const getUnscheduledIncidents = (req, res) => {
};
module.exports = {
getKnownOfficeResourceMappings,
addNewMapping,
getAllIncidents,
getUnscheduledIncidents,
getUnlockedIncidents,
getAllIncidentsController,
getMemberIncidents,
};