浏览代码

commit lagi

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,
     },
   ])