Member Practice Summary Report and bugfixes
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const { getMappingsFromDatabase, fetchOffices, fetchResources, saveNewMappingToDatabase } = require('../services/officeRnD/resources');
|
||||
const { getAllIncidents } = require('../services/integration/reports');
|
||||
const { getAllIncidents, getMemberPracticeSummaryReport } = require('../services/integration/reports');
|
||||
const { getMembersFeesForDateRange } = require('../services/integration/invoiceIntegration');
|
||||
const { deleteFeesFromORD, addFeesToORD } = require('../services/officeRnD/fees');
|
||||
const { checkBookingChanges } = require('../services/integration/checkBookingChange');
|
||||
@@ -126,6 +126,19 @@ const checkProcessingStatus = (req, res) => {
|
||||
});
|
||||
};
|
||||
|
||||
const getPracticeSummaryReport = (req, res) => {
|
||||
getMemberPracticeSummaryReport()
|
||||
.then((result) => {
|
||||
const pathToDownloadFile = `${__dirname}/../${result.reportPath}`;
|
||||
res.download(pathToDownloadFile);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log('Error - Member Practice Summary Report');
|
||||
console.log(error);
|
||||
res.status(500).send(error);
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
getKnownOfficeResourceMappings,
|
||||
addNewMapping,
|
||||
@@ -133,4 +146,5 @@ module.exports = {
|
||||
getMemberIncidents,
|
||||
addFees,
|
||||
checkProcessingStatus,
|
||||
getPracticeSummaryReport,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user