From bb7384f1e54eb97edfd4fe5d500156c81382b65b Mon Sep 17 00:00:00 2001 From: nico Date: Thu, 5 Feb 2026 12:06:20 +0800 Subject: [PATCH] Fix Seed Profile PPID Fix Seed Visi Misi Desa Profile Desa --- .../desa/profile-desa/seed_profile_desa.ts | 21 +++++++++++++++++++ prisma/lib/create_file_share_folder.ts | 4 ++-- prisma/seed.ts | 4 ++++ public/manifest.json | 21 +++++++++++++++++++ 4 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 public/manifest.json diff --git a/prisma/_seeder_list/desa/profile-desa/seed_profile_desa.ts b/prisma/_seeder_list/desa/profile-desa/seed_profile_desa.ts index 9ab4bef3..68af0dca 100644 --- a/prisma/_seeder_list/desa/profile-desa/seed_profile_desa.ts +++ b/prisma/_seeder_list/desa/profile-desa/seed_profile_desa.ts @@ -4,6 +4,7 @@ import maskotDesa from "../../../data/desa/profile/maskot_desa.json"; import profilePerbekel from "../../../data/desa/profile/profil_perbekel.json"; import profileDesaImage from "../../../data/desa/profile/profileDesaImage.json"; import sejarahDesa from "../../../data/desa/profile/sejarah_desa.json"; +import visiMisiDesa from "../../../data/desa/profile/visi_misi_desa.json"; export async function seedProfileDesa() { // =========== SEJARAH DESA =========== @@ -26,6 +27,26 @@ export async function seedProfileDesa() { console.log("sejarah desa success ..."); + // =========== VISI MISI DESA =========== + for (const l of visiMisiDesa) { + await prisma.visiMisiDesa.upsert({ + where: { + id: l.id, + }, + update: { + visi: l.visi, + misi: l.misi, + }, + create: { + id: l.id, + visi: l.visi, + misi: l.misi, + }, + }); + } + + console.log("visi misi desa success ..."); + // =========== MASKOT DESA =========== for (const l of maskotDesa) { await prisma.maskotDesa.upsert({ diff --git a/prisma/lib/create_file_share_folder.ts b/prisma/lib/create_file_share_folder.ts index 3b4a881e..a9dabf84 100644 --- a/prisma/lib/create_file_share_folder.ts +++ b/prisma/lib/create_file_share_folder.ts @@ -11,14 +11,14 @@ type DirItem = { name: string; }; -const BASE_URL = "https://cld-dkr-makuro-seafile.wibudev.com"; +const BASE_URL = process.env.SEAFILE_BASE_URL!; const REPO_ID = process.env.SEAFILE_REPO_ID!; // folder yang dishare (RELATIVE, tanpa slash depan) const DIR_TARGET = "asset-web"; // 🔑 TOKEN DIRECTORY SHARE (/d/{token}) -const PUBLIC_SHARE_TOKEN = "3a9a9ecb5e244f4da8ae"; +const PUBLIC_SHARE_TOKEN = process.env.SEAFILE_PUBLIC_SHARE_TOKEN!; /** * Ambil list file dari repo (butuh token sekali) diff --git a/prisma/seed.ts b/prisma/seed.ts index 4b36eebe..3c645b5b 100644 --- a/prisma/seed.ts +++ b/prisma/seed.ts @@ -65,6 +65,7 @@ import { seedBimbinganBelajar } from "./_seeder_list/pendidikan/seed_bimbingan_b import { seedDataPendidikan } from "./_seeder_list/pendidikan/seed_data_pendidikan"; import { seedPendidikanNonFormal } from "./_seeder_list/pendidikan/seed_pendidikan_non_formal"; import { seedDataPerpustakaan } from "./_seeder_list/pendidikan/seed_data_perpustakaan"; +import { seedProfilPpd } from "./_seeder_list/ppid/profil-ppid/seed_profil_ppd"; (async () => { // Always run seedAssets to handle new images without duplication @@ -179,6 +180,9 @@ import { seedDataPerpustakaan } from "./_seeder_list/pendidikan/seed_data_perpus // // =========== MENU PPID =========== + // // =========== SUBMENU PROFIL PPID =========== + await seedProfilPpd(); + // // =========== SUBMENU STRUKTUR PPID =========== await seedPegawaiPpid(); diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 00000000..11c993b7 --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,21 @@ +{ + "name": "Desa Darmasaba", + "short_name": "Darmasaba", + "description": "Website resmi Desa Darmasaba, Kabupaten Badung, Bali", + "start_url": "/", + "display": "standalone", + "background_color": "#ffffff", + "theme_color": "#1e40af", + "icons": [ + { + "src": "/darmasaba-icon.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/darmasaba-icon.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} \ No newline at end of file