diff --git a/index.php b/index.php index 83178dd..ca3ec3e 100644 --- a/index.php +++ b/index.php @@ -10,28 +10,63 @@ -
+

Report Absensi

- -
-
-
- Start Date -
- -
-
-
- End Date -
- + + + - + + + +
+
+ +
+
+ +
+
+
@@ -39,8 +74,8 @@
Jenis Report
- + @@ -53,10 +88,10 @@
Office / Kantor
- + - + @@ -67,10 +102,10 @@
- +
- +
@@ -78,8 +113,29 @@
+ + + + + + + + + + + \ No newline at end of file diff --git a/prosesRekap.js b/prosesRekap.js new file mode 100644 index 0000000..6417a54 --- /dev/null +++ b/prosesRekap.js @@ -0,0 +1,85 @@ +function closeAlert() { + $('#alert_error').css({ "display": "none" }); +} + +function reportXlS() { + var bulan = $('#bulan').val(); + var tahun = $('#tahun').val(); + var jenis_report = $('#jenis_report').val(); + var kantor = $('#kantor').val(); + const now = Date.now(); + + if(bulan == "-") { + $('#alert_error').css({ "display": "inline" }); + $('#message_error').text('Silahkan Pilih bulan'); + } else{ + if(tahun == "-") { + $('#alert_error').css({ "display": "inline" }); + $('#message_error').text('Silahkan Pilih Tahun'); + } else{ + if (jenis_report == "-") { + $('#alert_error').css({ "display": "inline" }); + $('#message_error').text('Silahkan Pilih Jenis Report ex : Absensi'); + } else { + if (kantor == "-") { + $('#alert_error').css({ "display": "inline" }); + $('#message_error').text('Silahkan Pilih Kantor'); + } else { + $('#alert_error').css({ "display": "none" }); + + var pdfViewer = document.getElementById('pdf_viewer'); + // var modal = document.getElementById('modal_show_pdf'); + pdfViewer.src = "https://devone.aplikasi.web.id/birt/run?__report=report/one/absensi/rpt_r_ab_002.rptdesign&__format=xls&PYear="+tahun+"&PMonth="+bulan+"&PCompanyID="+kantor+"&username=adminsas%20&tm="+now; + // modal.showModal(); + + // document.getElementById('modal_show_pdf').showModal() + console.log('bulan : ' + bulan); + console.log('tahun : ' + tahun); + console.log('jenis_report : ' + jenis_report); + console.log('kantor : ' + kantor); + } + } + } + } +} + +function reportPDF() { + var bulan = $('#bulan').val(); + var tahun = $('#tahun').val(); + var jenis_report = $('#jenis_report').val(); + var kantor = $('#kantor').val(); + const now = Date.now(); + + if(bulan == "-") { + $('#alert_error').css({ "display": "inline" }); + $('#message_error').text('Silahkan Pilih bulan'); + } else{ + if(tahun == "-") { + $('#alert_error').css({ "display": "inline" }); + $('#message_error').text('Silahkan Pilih Tahun'); + } else{ + if (jenis_report == "-") { + $('#alert_error').css({ "display": "inline" }); + $('#message_error').text('Silahkan Pilih Jenis Report ex : Absensi'); + } else { + if (kantor == "-") { + $('#alert_error').css({ "display": "inline" }); + $('#message_error').text('Silahkan Pilih Kantor'); + } else { + $('#alert_error').css({ "display": "none" }); + + var pdfViewer = document.getElementById('pdf_viewer'); + var modal = document.getElementById('modal_show_pdf'); + pdfViewer.src = "https://devone.aplikasi.web.id/birt/run?__report=report/one/absensi/rpt_r_ab_002.rptdesign&__format=pdf&PYear="+tahun+"&PMonth="+bulan+"&PCompanyID="+kantor+"&username=adminsas%20&tm="+now; + modal.showModal(); + + // document.getElementById('modal_show_pdf').showModal() + console.log('bulan : ' + bulan); + console.log('tahun : ' + tahun); + console.log('jenis_report : ' + jenis_report); + console.log('kantor : ' + kantor); + } + } + } + } +} \ No newline at end of file