diff --git a/modules/laporan-view.html b/modules/laporan-view.html index af1a208..b2e01dc 100644 --- a/modules/laporan-view.html +++ b/modules/laporan-view.html @@ -1,5 +1,11 @@ +
-
+
@@ -103,6 +144,41 @@ + + + +
+
+
+ Agen Perubahan +
+
+
+
+ NIP.  +
+
+ Mengetahui,
+ +
+
+
+
+ NIP.  +
+
+ Pekanbaru,   
+ +
+
+
+
+ NIP.  +
+
+ + +
@@ -165,9 +241,45 @@ + + + +
+
+
+ Agen Perubahan +
+
+
+
+ NIP.  +
+
+ Mengetahui,
+ +
+
+
+
+ NIP.  +
+
+ Pekanbaru,   
+ +
+
+
+
+ NIP.  +
+
+ + +
+
@@ -213,8 +325,19 @@ { moly.loadScreen.update(loadid,"Gagal mengumpulkan data. Harap ulangi beberapa saat lagi."); } + let users = await getJson("/api/getusers"); + if(users.status != 200) + { + moly.loadScreen.update(loadid,"Gagal mengumpulkan data. Harap ulangi beberapa saat lagi."); + } + const ourpeople = new Set(agents.map(a=>a.agentID)); + users = users.data.filter(u=>ourpeople.has(u.agentID)); + const spv = agents.find(a=>a.agentID == users.find(u=>u.level == 2).agentID); + const evr = agents.find(a=>a.agentID == users.find(u=>u.level == 1).agentID); + console.log(spv, evr) units = units.data; data.unitKerja = units.find(u=>u.deplID == data.deplID)?.unitKerja; + let printTitle="Cetak Laporan"; µ('#proker').click(()=>{ µ('.viewer').prop("hidden",true); µ('.viewer').removeClass("print"); @@ -222,61 +345,7 @@ µ('#vProker').addClass("print"); µ('.positive').removeClass("positive"); µ('#proker').addClass("positive"); - const printTitle = `Program Kerja Agen Perubahan ${data.name} Tahun ${data.prokers[0].year}`; - µ('#print').off("click").click(()=>{ - const content = µ('.print')[0]; - if(!content) return; - const pw = window.open('', '_blank'); - pw.document.write(` - - - ${printTitle} - - - - - - ${content.innerHTML} - \ No newline at end of file diff --git a/modules/laporan.html b/modules/laporan.html index 2eac6b1..270cc61 100644 --- a/modules/laporan.html +++ b/modules/laporan.html @@ -156,7 +156,7 @@ moly.alert.show("Belum Ada Program Kerja",`Agen ${v.name} belum memiliki program kerja yang disetujui.`); return; } - await moly.dialog.show({title:"Laporan Kerja Agen Perubahan "+v.name, content:"/modules/laporan-view.html",fetching:true, data: v}); + await moly.dialog.show({title:"Pratinjau Laporan Kerja Agen Perubahan "+v.name, content:"/modules/laporan-view.html",fetching:true, data: v}); }); ra.append(v.rating); $('#agContent').append(ro);