From 5a73046112341b80f78e6f7247e5b0b9c1e5eda3 Mon Sep 17 00:00:00 2001 From: nugroho Date: Tue, 24 Jun 2025 15:41:43 +0700 Subject: [PATCH] working up to proker update --- assets/css/molybdenum.css | 15 ++-- assets/js/app.js | 36 +++++++++ assets/js/molybdenum.js | 37 +++++++-- index.html | 2 +- modules/agen-usermod.html | 8 +- modules/agen.html | 69 +++++++++-------- modules/kegiatan-proker-new.html | 103 +++++++++++++++++++++++++ modules/kegiatan-proker-view.html | 121 ++++++++++++++++++++++++++++++ modules/kegiatan.html | 99 ++++++++++++++++++++++++ modules/pdf-previewer.html | 13 ++++ 10 files changed, 456 insertions(+), 47 deletions(-) create mode 100644 modules/kegiatan-proker-new.html create mode 100644 modules/kegiatan-proker-view.html create mode 100644 modules/pdf-previewer.html diff --git a/assets/css/molybdenum.css b/assets/css/molybdenum.css index cf32fba..461f73e 100755 --- a/assets/css/molybdenum.css +++ b/assets/css/molybdenum.css @@ -44,7 +44,7 @@ thead background-color: var(--primary-accent); color: var(--primary-background); position: sticky; - top: 1px; + top: 0; z-index: 1; } button @@ -99,18 +99,23 @@ button:disabled table { isolation: isolate; + table-layout: fixed; + width: 100%; +} +table td +{ + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } table, table th, table td { border-collapse: collapse; - padding: .2ch .25ch .2ch .25ch; + padding: .35ch .25ch; margin: auto; } table.bordered, table.bordered th , table.bordered td { border: 1px solid var(--primary-background); } -table.fullwidth{ - width: calc(100% - 2ch); -} table.selectable tr:not(thead tr){ user-select: none; -webkit-user-select: none; diff --git a/assets/js/app.js b/assets/js/app.js index c761f6a..56957a5 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -50,4 +50,40 @@ async function postText(url,data = {},headers={}) { body: "" }); } +} +monthName = +[ + "#Inv#", + "Januari", + "Februari", + "Maret", + "April", + "Mei", + "Juni", + "Juli", + "Agustus", + "September", + "Oktober", + "November", + "Desember" +]; +monthShort = +[ + "###", + "Jan", + "Feb", + "Mar", + "Apr", + "Mei", + "Jun", + "Jul", + "Ags", + "Sep", + "Okt", + "Nov", + "Des" +] +function gen16BytesID() +{ + return Date.now().toString(36)+Math.random().toString(36).substring(2,10); } \ No newline at end of file diff --git a/assets/js/molybdenum.js b/assets/js/molybdenum.js index 80522ae..8ce1626 100755 --- a/assets/js/molybdenum.js +++ b/assets/js/molybdenum.js @@ -11,7 +11,11 @@ class molybdenum{ _dialogs = []; lastDialog() { - return this._dialogs.at(-1); + if(this._dialogs.length > 0) + { + return this._dialogs.at(-1); + } + return null; } lastLoadScreenId() { @@ -459,7 +463,7 @@ class molybdenum{ } FileInput = class extends HTMLElement { - static observedAttributes = ["disabled", "accept", "multiple"]; + static observedAttributes = ["disabled", "accept", "multiple", "label"]; constructor() { super(); this.attachShadow({ mode: "open" }); // Attach Shadow DOM @@ -513,7 +517,13 @@ class molybdenum{ { this._input.setAttribute("multiple", ""); this.multiple = this.hasAttribute("multiple"); - this._label.innerText = "Click to select files."; + this._label.innerText = this.hasAttribute("label") ? this.getAttribute("label") : "Click to select files."; + } + else + { + this._input.removeAttribute("multiple"); + this.multiple = this.hasAttribute("multiple"); + this._label.innerText = this.hasAttribute("label") ? this.getAttribute("label") : "Click to select a file."; } } disconnectedCallback() { @@ -531,7 +541,7 @@ class molybdenum{ } else if (this.hasAttribute("multiple")) { - this._label.innerText = "Click to select files."; + this._label.innerText = this.hasAttribute("label") ? this.getAttribute("label") : "Click to select files."; } else if (this._input.files.length == 1) { @@ -539,7 +549,7 @@ class molybdenum{ } else { - this._label.innerText = "Click to select a file."; + this._label.innerText = this.hasAttribute("label") ? this.getAttribute("label") : "Click to select a file."; } this.dispatchEvent(new CustomEvent("change", {bubble: true, composed: true, detail: this.files})); } @@ -575,7 +585,22 @@ class molybdenum{ get accept() { return this._input.accept; } - + + get label() + { + return this.getAttribute("label"); + } + set label(value) + { + if (value) + { + this._label.innerText = this.getAttribute("label"); + } + else + { + this._label.innerText = this.hasAttribute("multiple") ? "Click to select files." : "Click to select a file."; + } + } set multiple(value) { if (value) { this._input.setAttribute("multiple", ""); diff --git a/index.html b/index.html index 8f1ca95..9ab8d2a 100644 --- a/index.html +++ b/index.html @@ -202,7 +202,7 @@ nav moly.alert.show("Koneksi Gagal","Gagal menyambung ke server. Harap periksa koneksi jaringan."); return {data: []}; })).data; - const userDetails = detail.data; + window.userDetails = detail.data; const loggedInAgent = agents.find(a=>a.agentID == userDetails.agentID) // if (!window.evtSource) window.evtSource = new EventSource("/events"); window.addEventListener("viewChange", async ()=>{ diff --git a/modules/agen-usermod.html b/modules/agen-usermod.html index bbb97a6..6d431c6 100644 --- a/modules/agen-usermod.html +++ b/modules/agen-usermod.html @@ -1,5 +1,5 @@
- Username* + Username : Password* @@ -8,13 +8,15 @@ Password Konfirmasi* : - Level* + Level : -
+
+
diff --git a/modules/agen.html b/modules/agen.html index 316aafe..d66c846 100644 --- a/modules/agen.html +++ b/modules/agen.html @@ -1,37 +1,42 @@ - - - - - - - - - - - - - - -
NIPNama AgenJabatanUnit Kerja
 
+
+ + + + + + + + + + + + + + +
NIPNama AgenJabatanUnit Kerja
 
+
Tambah Agen
- - - - - - - - - - - - - - -
NIPUsernameLevelAktif
 
+
+ + + + + + + + + + + + + + +
NIPUsernameLevelAktif
 
+
+
\ No newline at end of file diff --git a/modules/kegiatan-proker-view.html b/modules/kegiatan-proker-view.html new file mode 100644 index 0000000..ffaafef --- /dev/null +++ b/modules/kegiatan-proker-view.html @@ -0,0 +1,121 @@ +
+ Kegiatan +   + + Target Waktu +   +
+ +   + +
+ + + + Bulan Mulai + + +
+ Sasaran Kegiatan:
+ +
+
+ Sasaran Entitas:
+ +
+
+ Indikator:
+ +
+
+ Rencana Aksi:
+ +
+ + +
+ Update +
+
+ \ No newline at end of file diff --git a/modules/kegiatan.html b/modules/kegiatan.html index e69de29..134019a 100644 --- a/modules/kegiatan.html +++ b/modules/kegiatan.html @@ -0,0 +1,99 @@ + +
+ Tambah Kegiatan +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NoKegiatanSasaranTarget WaktuWaktu MulaiStatus
Data Kosong
+
+
+ \ No newline at end of file diff --git a/modules/pdf-previewer.html b/modules/pdf-previewer.html new file mode 100644 index 0000000..5ce4039 --- /dev/null +++ b/modules/pdf-previewer.html @@ -0,0 +1,13 @@ + + \ No newline at end of file