[Operator] Perbaikan Halaman Kurikulum

This commit is contained in:
Ariyutta
2026-11-12 16:10:18 +07:00
parent d592630f57
commit 15be51ebd6
13 changed files with 159 additions and 21 deletions
+7 -1
View File
@@ -1003,6 +1003,12 @@ Alpine.data('satuRemoteTable', (config) => ({
return params;
},
// Tingkat warna bar persen: 1 merah (0–25), 2 oranye (26–50), 3 kuning (51–75), 4 hijau (76–100)
meterScale(value) {
const n = Number(value) || 0;
return n > 75 ? 4 : n > 50 ? 3 : n > 25 ? 2 : 1;
},
// Tautan yang membawa filter dan kata cari saat ini (mis. Unduh CSV)
linkWith(url) {
const query = this.queryParams().toString();
@@ -1034,7 +1040,7 @@ Alpine.data('satuRemoteTable', (config) => ({
Object.assign(this, { view: data.rows, page: data.page, pages: data.last_page, total: data.total, per: data.per_page });
// Kolom dinamis (laporan): kepala tabel mengikuti kolom hasil terbaru
if (Array.isArray(data.columns) && data.columns.length) {
this.columns = data.columns.map((c) => ({ key: c.key, label: c.label, num: Boolean(c.num) }));
this.columns = data.columns.map((c) => ({ key: c.key, label: c.label, num: Boolean(c.num), meter: Boolean(c.meter) }));
}
this.picked = [];
console.info(`[SIAKAD] GET ${this.url}?${params}`, { total: data.total, halaman: `${data.page}/${data.last_page}`, waktu: `${Math.round(performance.now() - started)} ms` });