yazid138 пре 3 година
родитељ
комит
d2cb23c8d7
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      controller/graph.controller.js

+ 2 - 2
controller/graph.controller.js

@@ -282,7 +282,7 @@ exports.excel = handleError(async (req, res) => {
     .find({ ...w, ...berdasarkan_tahun })
     .populate('user')
 
-  const data = laporan.map((value) => ({
+  const dataDelegasi = laporan.map((value) => ({
     Tanggal: moment(value.createdAt).format('DD-MMMM-YYYY'),
     'No. Laporan': value.no_laporan,
     'Nama Perguruan Tinggi': value.pt.nama,
@@ -301,7 +301,7 @@ exports.excel = handleError(async (req, res) => {
   const buffer = excel.to_excel([
     {
       SheetNames: 'Laporan Delegasi',
-      data,
+      data: dataDelegasi,
     },
   ])