Add cancelation charges
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user