From 045b7923bf2eda26c33944f697ecbf4fade32558 Mon Sep 17 00:00:00 2001 From: Jonathan Niles Date: Sat, 9 Sep 2017 12:14:34 -0400 Subject: [PATCH] fix(stock reports): use module.exports for exposure This commit fixes the stock reports links that use one to many `exports.fn` resulting in broken links. To avoid changing the API, I've refactored the code to use `module.exports` and only export the single function. --- server/controllers/stock/reports/stock/adjustment_receipt.js | 2 +- server/controllers/stock/reports/stock/entry_depot_receipt.js | 2 +- .../stock/reports/stock/entry_integration_receipt.js | 2 +- .../controllers/stock/reports/stock/entry_purchase_receipt.js | 2 +- server/controllers/stock/reports/stock/exit_depot_receipt.js | 2 +- server/controllers/stock/reports/stock/exit_loss_receipt.js | 2 +- server/controllers/stock/reports/stock/exit_patient_receipt.js | 2 +- server/controllers/stock/reports/stock/exit_service_receipt.js | 2 +- server/controllers/stock/reports/stock/inventories_report.js | 2 +- server/controllers/stock/reports/stock/inventory_report.js | 2 +- server/controllers/stock/reports/stock/lots_report.js | 2 +- server/controllers/stock/reports/stock/movements_report.js | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/server/controllers/stock/reports/stock/adjustment_receipt.js b/server/controllers/stock/reports/stock/adjustment_receipt.js index ae5eb7c630..2cc86eb3e3 100644 --- a/server/controllers/stock/reports/stock/adjustment_receipt.js +++ b/server/controllers/stock/reports/stock/adjustment_receipt.js @@ -65,4 +65,4 @@ function stockAdjustmentReceipt(req, res, next) { .done(); } -exports.stockAdjustmentReceipt = stockAdjustmentReceipt; +module.exports = stockAdjustmentReceipt; diff --git a/server/controllers/stock/reports/stock/entry_depot_receipt.js b/server/controllers/stock/reports/stock/entry_depot_receipt.js index fc26bea5b3..7d1e432271 100644 --- a/server/controllers/stock/reports/stock/entry_depot_receipt.js +++ b/server/controllers/stock/reports/stock/entry_depot_receipt.js @@ -28,4 +28,4 @@ function stockEntryDepotReceipt(req, res, next) { .done(); } -exports.stockEntryDepotReceipt = stockEntryDepotReceipt; +module.exports = stockEntryDepotReceipt; diff --git a/server/controllers/stock/reports/stock/entry_integration_receipt.js b/server/controllers/stock/reports/stock/entry_integration_receipt.js index 0de30b72ef..cede2038c6 100644 --- a/server/controllers/stock/reports/stock/entry_integration_receipt.js +++ b/server/controllers/stock/reports/stock/entry_integration_receipt.js @@ -73,4 +73,4 @@ function stockEntryIntegrationReceipt(req, res, next) { .done(); } -exports.stockEntryIntegrationReceipt = stockEntryIntegrationReceipt; +module.exports = stockEntryIntegrationReceipt; diff --git a/server/controllers/stock/reports/stock/entry_purchase_receipt.js b/server/controllers/stock/reports/stock/entry_purchase_receipt.js index a623a8d3d0..fa0b8951da 100644 --- a/server/controllers/stock/reports/stock/entry_purchase_receipt.js +++ b/server/controllers/stock/reports/stock/entry_purchase_receipt.js @@ -78,4 +78,4 @@ function stockEntryPurchaseReceipt(req, res, next) { .done(); } -exports.stockEntryPurchaseReceipt = stockEntryPurchaseReceipt; +module.exports = stockEntryPurchaseReceipt; diff --git a/server/controllers/stock/reports/stock/exit_depot_receipt.js b/server/controllers/stock/reports/stock/exit_depot_receipt.js index 2785e87c36..86a67ca209 100644 --- a/server/controllers/stock/reports/stock/exit_depot_receipt.js +++ b/server/controllers/stock/reports/stock/exit_depot_receipt.js @@ -28,4 +28,4 @@ function stockExitDepotReceipt(req, res, next) { .done(); } -exports.stockExitDepotReceipt = stockExitDepotReceipt; +module.exports = stockExitDepotReceipt; diff --git a/server/controllers/stock/reports/stock/exit_loss_receipt.js b/server/controllers/stock/reports/stock/exit_loss_receipt.js index 389e8c2ff0..932978de7e 100644 --- a/server/controllers/stock/reports/stock/exit_loss_receipt.js +++ b/server/controllers/stock/reports/stock/exit_loss_receipt.js @@ -64,4 +64,4 @@ function stockExitLossReceipt(req, res, next) { .done(); } -exports.stockExitLossReceipt = stockExitLossReceipt; +module.exports = stockExitLossReceipt; diff --git a/server/controllers/stock/reports/stock/exit_patient_receipt.js b/server/controllers/stock/reports/stock/exit_patient_receipt.js index c2a398d3a2..803c9b1472 100644 --- a/server/controllers/stock/reports/stock/exit_patient_receipt.js +++ b/server/controllers/stock/reports/stock/exit_patient_receipt.js @@ -70,4 +70,4 @@ function stockExitPatientReceipt(req, res, next) { .done(); } -exports.stockExitPatientReceipt = stockExitPatientReceipt; +module.exports = stockExitPatientReceipt; diff --git a/server/controllers/stock/reports/stock/exit_service_receipt.js b/server/controllers/stock/reports/stock/exit_service_receipt.js index c3a55dcd48..e6af11bf6d 100644 --- a/server/controllers/stock/reports/stock/exit_service_receipt.js +++ b/server/controllers/stock/reports/stock/exit_service_receipt.js @@ -66,4 +66,4 @@ function stockExitServiceReceipt(req, res, next) { .done(); } -exports.stockExitServiceReceipt = stockExitServiceReceipt; +module.exports = stockExitServiceReceipt; diff --git a/server/controllers/stock/reports/stock/inventories_report.js b/server/controllers/stock/reports/stock/inventories_report.js index d9ad23ac93..c236b0bdaf 100644 --- a/server/controllers/stock/reports/stock/inventories_report.js +++ b/server/controllers/stock/reports/stock/inventories_report.js @@ -73,4 +73,4 @@ function stockInventoriesReport(req, res, next) { .done(); } -exports.stockInventoriesReport = stockInventoriesReport; +module.exports = stockInventoriesReport; diff --git a/server/controllers/stock/reports/stock/inventory_report.js b/server/controllers/stock/reports/stock/inventory_report.js index 3ac08fbb81..f99a7b4bea 100644 --- a/server/controllers/stock/reports/stock/inventory_report.js +++ b/server/controllers/stock/reports/stock/inventory_report.js @@ -53,4 +53,4 @@ function stockInventoryReport(req, res, next) { .done(); } -exports.stockInventoyReport = stockInventoryReport; +module.exports = stockInventoryReport; diff --git a/server/controllers/stock/reports/stock/lots_report.js b/server/controllers/stock/reports/stock/lots_report.js index 1ed80054a9..81efec6dde 100644 --- a/server/controllers/stock/reports/stock/lots_report.js +++ b/server/controllers/stock/reports/stock/lots_report.js @@ -67,4 +67,4 @@ function stockLotsReport(req, res, next) { .done(); } -exports.stockLotsReport = stockLotsReport; +module.exports = stockLotsReport; diff --git a/server/controllers/stock/reports/stock/movements_report.js b/server/controllers/stock/reports/stock/movements_report.js index 1fe18bf18d..87a1dabea6 100644 --- a/server/controllers/stock/reports/stock/movements_report.js +++ b/server/controllers/stock/reports/stock/movements_report.js @@ -61,4 +61,4 @@ function stockMovementsReport(req, res, next) { .done(); } -exports.stockMovementsReport = stockMovementsReport; +module.exports = stockMovementsReport;