diff --git a/prisma/migrations/20250602082355_perubahan_dikategori_berita/migration.sql b/prisma/migrations/20250602082355_perubahan_dikategori_berita/migration.sql new file mode 100644 index 00000000..345a6de3 --- /dev/null +++ b/prisma/migrations/20250602082355_perubahan_dikategori_berita/migration.sql @@ -0,0 +1,582 @@ +/* + Warnings: + + - You are about to drop the column `image` on the `Berita` table. All the data in the column will be lost. + - You are about to drop the column `katagoryBeritaId` on the `Berita` table. All the data in the column will be lost. + - You are about to drop the column `name` on the `FasilitasPendukung` table. All the data in the column will be lost. + - You are about to drop the column `fasilitasKesehatanId` on the `InformasiUmum` table. All the data in the column will be lost. + - You are about to drop the `KatagoryBerita` table. If the table is not empty, all the data it contains will be lost. + - Added the required column `imageId` to the `Berita` table without a default value. This is not possible if the table is not empty. + - Added the required column `jadwal` to the `DokterdanTenagaMedis` table without a default value. This is not possible if the table is not empty. + - Added the required column `specialist` to the `DokterdanTenagaMedis` table without a default value. This is not possible if the table is not empty. + - Added the required column `content` to the `FasilitasPendukung` table without a default value. This is not possible if the table is not empty. + +*/ +-- DropForeignKey +ALTER TABLE "Berita" DROP CONSTRAINT "Berita_katagoryBeritaId_fkey"; + +-- DropForeignKey +ALTER TABLE "InformasiUmum" DROP CONSTRAINT "InformasiUmum_fasilitasKesehatanId_fkey"; + +-- AlterTable +ALTER TABLE "Berita" DROP COLUMN "image", +DROP COLUMN "katagoryBeritaId", +ADD COLUMN "imageId" TEXT NOT NULL, +ADD COLUMN "kategoriBeritaId" TEXT; + +-- AlterTable +ALTER TABLE "DataKematian_Kelahiran" ADD COLUMN "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, +ADD COLUMN "isActive" BOOLEAN NOT NULL DEFAULT true; + +-- AlterTable +ALTER TABLE "DokterdanTenagaMedis" ADD COLUMN "jadwal" TEXT NOT NULL, +ADD COLUMN "specialist" TEXT NOT NULL; + +-- AlterTable +ALTER TABLE "FasilitasPendukung" DROP COLUMN "name", +ADD COLUMN "content" TEXT NOT NULL; + +-- AlterTable +ALTER TABLE "InformasiUmum" DROP COLUMN "fasilitasKesehatanId"; + +-- DropTable +DROP TABLE "KatagoryBerita"; + +-- CreateTable +CREATE TABLE "FileStorage" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "realName" TEXT NOT NULL, + "path" TEXT NOT NULL, + "mimeType" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3), + "isActive" BOOLEAN NOT NULL DEFAULT true, + "link" TEXT NOT NULL, + + CONSTRAINT "FileStorage_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "VisiMisiPPID" ( + "id" TEXT NOT NULL, + "visi" TEXT NOT NULL, + "misi" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "VisiMisiPPID_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "DasarHukumPPID" ( + "id" TEXT NOT NULL, + "judul" TEXT NOT NULL, + "content" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "DasarHukumPPID_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "ProfilePPID" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "biodata" TEXT NOT NULL, + "riwayat" TEXT NOT NULL, + "pengalaman" TEXT NOT NULL, + "unggulan" TEXT NOT NULL, + "imageUrl" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "ProfilePPID_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "DaftarInformasiPublik" ( + "id" TEXT NOT NULL, + "nomor" SERIAL NOT NULL, + "jenisInformasi" TEXT NOT NULL, + "deskripsi" TEXT NOT NULL, + "tanggal" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "DaftarInformasiPublik_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "PermohonanInformasiPublik" ( + "id" TEXT NOT NULL, + "nomor" SERIAL NOT NULL, + "name" TEXT NOT NULL, + "nik" TEXT NOT NULL, + "notelp" TEXT NOT NULL, + "alamat" TEXT NOT NULL, + "email" TEXT NOT NULL, + "jenisInformasiDimintaId" TEXT, + "caraMemperolehInformasiId" TEXT, + "caraMemperolehSalinanInformasiId" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "PermohonanInformasiPublik_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "JenisInformasiDiminta" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "JenisInformasiDiminta_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "CaraMemperolehInformasi" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "CaraMemperolehInformasi_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "CaraMemperolehSalinanInformasi" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "CaraMemperolehSalinanInformasi_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "FormulirPermohonanKeberatan" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "email" TEXT NOT NULL, + "notelp" TEXT NOT NULL, + "alasan" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "FormulirPermohonanKeberatan_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "IndeksKepuasanMasyarakat" ( + "id" SERIAL NOT NULL, + "label" TEXT NOT NULL, + "kepuasan" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "IndeksKepuasanMasyarakat_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "GrafikBerdasarkanJenisKelamin" ( + "id" TEXT NOT NULL, + "perempuan" TEXT NOT NULL, + "laki" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "GrafikBerdasarkanJenisKelamin_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "GrafikBerdasarkanResponden" ( + "id" TEXT NOT NULL, + "sangatbaik" TEXT NOT NULL, + "baik" TEXT NOT NULL, + "kurangbaik" TEXT NOT NULL, + "tidakbaik" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "GrafikBerdasarkanResponden_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "GrafikBerdasarkanUmur" ( + "id" TEXT NOT NULL, + "remaja" TEXT NOT NULL, + "dewasa" TEXT NOT NULL, + "orangtua" TEXT NOT NULL, + "lansia" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "GrafikBerdasarkanUmur_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "ProfileDesa" ( + "id" TEXT NOT NULL, + "sejarah" TEXT NOT NULL, + "visi" TEXT NOT NULL, + "misi" TEXT NOT NULL, + "lambang" TEXT NOT NULL, + "maskot" TEXT NOT NULL, + "profilPerbekelId" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "ProfileDesa_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "ProfilPerbekel" ( + "id" TEXT NOT NULL, + "biodata" TEXT NOT NULL, + "pengalaman" TEXT NOT NULL, + "pengalamanOrganisasi" TEXT NOT NULL, + "programUnggulan" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "ProfilPerbekel_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "KategoriBerita" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "KategoriBerita_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "PotensiDesa" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "deskripsi" TEXT NOT NULL, + "kategori" TEXT NOT NULL, + "imageId" TEXT NOT NULL, + "content" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "PotensiDesa_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "TarifDanLayanan" ( + "id" TEXT NOT NULL, + "layanan" TEXT NOT NULL, + "tarif" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "TarifDanLayanan_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "JadwalKegiatan" ( + "id" TEXT NOT NULL, + "content" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "JadwalKegiatan_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "InformasiJadwalKegiatan" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "tanggal" TEXT NOT NULL, + "waktu" TEXT NOT NULL, + "lokasi" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "InformasiJadwalKegiatan_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "DeskripsiJadwalKegiatan" ( + "id" TEXT NOT NULL, + "deskripsi" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "DeskripsiJadwalKegiatan_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "LayananJadwalKegiatan" ( + "id" TEXT NOT NULL, + "content" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "LayananJadwalKegiatan_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "SyaratKetentuanJadwalKegiatan" ( + "id" TEXT NOT NULL, + "content" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "SyaratKetentuanJadwalKegiatan_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "DokumenJadwalKegiatan" ( + "id" TEXT NOT NULL, + "content" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "DokumenJadwalKegiatan_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "PendaftaranJadwalKegiatan" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "tanggal" TEXT NOT NULL, + "namaOrangtua" TEXT NOT NULL, + "nomor" TEXT NOT NULL, + "alamat" TEXT NOT NULL, + "catatan" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "PendaftaranJadwalKegiatan_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "GrafikKepuasan" ( + "id" SERIAL NOT NULL, + "label" TEXT NOT NULL, + "jumlah" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "GrafikKepuasan_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "ArtikelKesehatan" ( + "id" SERIAL NOT NULL, + "title" TEXT NOT NULL, + "content" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "ArtikelKesehatan_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Introduction" ( + "id" SERIAL NOT NULL, + "content" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "Introduction_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Symptom" ( + "id" SERIAL NOT NULL, + "title" TEXT NOT NULL, + "content" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "Symptom_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Prevention" ( + "id" SERIAL NOT NULL, + "title" TEXT NOT NULL, + "content" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "Prevention_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "FirstAid" ( + "id" SERIAL NOT NULL, + "title" TEXT NOT NULL, + "content" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "FirstAid_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "MythVsFact" ( + "id" SERIAL NOT NULL, + "title" TEXT NOT NULL, + "mitos" TEXT NOT NULL, + "fakta" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "MythVsFact_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "DoctorSign" ( + "id" SERIAL NOT NULL, + "content" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "deletedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "DoctorSign_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "_FasilitasKesehatanToInformasiUmum" ( + "A" TEXT NOT NULL, + "B" TEXT NOT NULL, + + CONSTRAINT "_FasilitasKesehatanToInformasiUmum_AB_pkey" PRIMARY KEY ("A","B") +); + +-- CreateTable +CREATE TABLE "_FasilitasKesehatanToTarifDanLayanan" ( + "A" TEXT NOT NULL, + "B" TEXT NOT NULL, + + CONSTRAINT "_FasilitasKesehatanToTarifDanLayanan_AB_pkey" PRIMARY KEY ("A","B") +); + +-- CreateIndex +CREATE UNIQUE INDEX "FileStorage_name_key" ON "FileStorage"("name"); + +-- CreateIndex +CREATE UNIQUE INDEX "JenisInformasiDiminta_name_key" ON "JenisInformasiDiminta"("name"); + +-- CreateIndex +CREATE UNIQUE INDEX "CaraMemperolehInformasi_name_key" ON "CaraMemperolehInformasi"("name"); + +-- CreateIndex +CREATE UNIQUE INDEX "CaraMemperolehSalinanInformasi_name_key" ON "CaraMemperolehSalinanInformasi"("name"); + +-- CreateIndex +CREATE UNIQUE INDEX "KategoriBerita_name_key" ON "KategoriBerita"("name"); + +-- CreateIndex +CREATE INDEX "_FasilitasKesehatanToInformasiUmum_B_index" ON "_FasilitasKesehatanToInformasiUmum"("B"); + +-- CreateIndex +CREATE INDEX "_FasilitasKesehatanToTarifDanLayanan_B_index" ON "_FasilitasKesehatanToTarifDanLayanan"("B"); + +-- AddForeignKey +ALTER TABLE "PermohonanInformasiPublik" ADD CONSTRAINT "PermohonanInformasiPublik_jenisInformasiDimintaId_fkey" FOREIGN KEY ("jenisInformasiDimintaId") REFERENCES "JenisInformasiDiminta"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "PermohonanInformasiPublik" ADD CONSTRAINT "PermohonanInformasiPublik_caraMemperolehInformasiId_fkey" FOREIGN KEY ("caraMemperolehInformasiId") REFERENCES "CaraMemperolehInformasi"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "PermohonanInformasiPublik" ADD CONSTRAINT "PermohonanInformasiPublik_caraMemperolehSalinanInformasiId_fkey" FOREIGN KEY ("caraMemperolehSalinanInformasiId") REFERENCES "CaraMemperolehSalinanInformasi"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "ProfileDesa" ADD CONSTRAINT "ProfileDesa_profilPerbekelId_fkey" FOREIGN KEY ("profilPerbekelId") REFERENCES "ProfilPerbekel"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Berita" ADD CONSTRAINT "Berita_imageId_fkey" FOREIGN KEY ("imageId") REFERENCES "FileStorage"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Berita" ADD CONSTRAINT "Berita_kategoriBeritaId_fkey" FOREIGN KEY ("kategoriBeritaId") REFERENCES "KategoriBerita"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "PotensiDesa" ADD CONSTRAINT "PotensiDesa_imageId_fkey" FOREIGN KEY ("imageId") REFERENCES "FileStorage"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "_FasilitasKesehatanToInformasiUmum" ADD CONSTRAINT "_FasilitasKesehatanToInformasiUmum_A_fkey" FOREIGN KEY ("A") REFERENCES "FasilitasKesehatan"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "_FasilitasKesehatanToInformasiUmum" ADD CONSTRAINT "_FasilitasKesehatanToInformasiUmum_B_fkey" FOREIGN KEY ("B") REFERENCES "InformasiUmum"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "_FasilitasKesehatanToTarifDanLayanan" ADD CONSTRAINT "_FasilitasKesehatanToTarifDanLayanan_A_fkey" FOREIGN KEY ("A") REFERENCES "FasilitasKesehatan"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "_FasilitasKesehatanToTarifDanLayanan" ADD CONSTRAINT "_FasilitasKesehatanToTarifDanLayanan_B_fkey" FOREIGN KEY ("B") REFERENCES "TarifDanLayanan"("id") ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/prisma/seed.ts b/prisma/seed.ts index 6cd35bf2..e3fe12c8 100644 --- a/prisma/seed.ts +++ b/prisma/seed.ts @@ -8,8 +8,6 @@ import layanan from "./data/list-layanan.json"; import potensi from "./data/list-potensi.json"; import visiMisiPPID from "./data/ppid/visi-misi-ppid/visimisiPPID.json"; import dasarHukumPPID from "./data/ppid/dasar-hukum-ppid/dasarhukumPPID.json"; -import profileDesa from "./data/desa/profile/profile_desa.json"; -import profilePerbekel from "./data/desa/profile/profil_perbekel.json"; import profilePPID from "./data/ppid/profile-ppid/profilePPid.json"; import path from "path"; import fs from "fs"; @@ -213,53 +211,7 @@ import { v4 as uuid } from "uuid"; } console.log("dasar hukum PPID success ..."); - for (const v of profileDesa) { - await prisma.profileDesa.upsert({ - where: { - id: v.id, - }, - update: { - sejarah: v.sejarah, - visi: v.visi, - misi: v.misi, - lambang: v.lambang, - maskot: v.maskot, - profilPerbekelId: v.profilPerbekelId, - }, - create: { - id: v.id, - sejarah: v.sejarah, - visi: v.visi, - misi: v.misi, - lambang: v.lambang, - maskot: v.maskot, - profilPerbekelId: v.profilPerbekelId, - }, - }); - } - console.log("profile desa success ..."); - for (const v of profilePerbekel) { - await prisma.profilPerbekel.upsert({ - where: { - id: v.id, - }, - update: { - biodata: v.biodata, - pengalaman: v.pengalaman, - pengalamanOrganisasi: v.pengalamanOrganisasi, - programUnggulan: v.programUnggulan, - }, - create: { - id: v.id, - biodata: v.biodata, - pengalaman: v.pengalaman, - pengalamanOrganisasi: v.pengalamanOrganisasi, - programUnggulan: v.programUnggulan, - }, - }); - } - console.log("profile perbekel success ..."); })() .then(() => prisma.$disconnect()) .catch((e) => { diff --git a/public/uploads/seeded-images/profile-ppid/0fa03608-2d76-4dd8-be1b-01a5f2588645_perbekel.png b/public/uploads/seeded-images/profile-ppid/0fa03608-2d76-4dd8-be1b-01a5f2588645_perbekel.png new file mode 100644 index 00000000..ed1cbd10 Binary files /dev/null and b/public/uploads/seeded-images/profile-ppid/0fa03608-2d76-4dd8-be1b-01a5f2588645_perbekel.png differ diff --git a/public/uploads/seeded-images/profile-ppid/152d35e6-f125-4c70-ba0b-21a8395658c4_perbekel.png b/public/uploads/seeded-images/profile-ppid/152d35e6-f125-4c70-ba0b-21a8395658c4_perbekel.png new file mode 100644 index 00000000..ed1cbd10 Binary files /dev/null and b/public/uploads/seeded-images/profile-ppid/152d35e6-f125-4c70-ba0b-21a8395658c4_perbekel.png differ diff --git a/public/uploads/seeded-images/profile-ppid/53b002b4-8a00-40ae-bde5-612b00fe2eb7_perbekel.png b/public/uploads/seeded-images/profile-ppid/53b002b4-8a00-40ae-bde5-612b00fe2eb7_perbekel.png new file mode 100644 index 00000000..ed1cbd10 Binary files /dev/null and b/public/uploads/seeded-images/profile-ppid/53b002b4-8a00-40ae-bde5-612b00fe2eb7_perbekel.png differ diff --git a/public/uploads/seeded-images/profile-ppid/728a144f-2167-41c5-822c-9e11322b4988_perbekel.png b/public/uploads/seeded-images/profile-ppid/728a144f-2167-41c5-822c-9e11322b4988_perbekel.png new file mode 100644 index 00000000..ed1cbd10 Binary files /dev/null and b/public/uploads/seeded-images/profile-ppid/728a144f-2167-41c5-822c-9e11322b4988_perbekel.png differ diff --git a/public/uploads/seeded-images/profile-ppid/bc2afe55-9121-4523-b1ae-1a75956bd0dc_perbekel.png b/public/uploads/seeded-images/profile-ppid/bc2afe55-9121-4523-b1ae-1a75956bd0dc_perbekel.png new file mode 100644 index 00000000..ed1cbd10 Binary files /dev/null and b/public/uploads/seeded-images/profile-ppid/bc2afe55-9121-4523-b1ae-1a75956bd0dc_perbekel.png differ diff --git a/src/app/admin/(dashboard)/_com/jusulListTab.tsx b/src/app/admin/(dashboard)/_com/jusulListTab.tsx new file mode 100644 index 00000000..bd5c9242 --- /dev/null +++ b/src/app/admin/(dashboard)/_com/jusulListTab.tsx @@ -0,0 +1,41 @@ +'use client' +import colors from '@/con/colors'; +import { Grid, GridCol, Button, Text, Paper, TextInput } from '@mantine/core'; +import { IconCircleDashedPlus, IconSearch } from '@tabler/icons-react'; +import { useRouter } from 'next/navigation'; +import React from 'react'; + +const JudulListTab = ({ title = "", href = "#", placeholder = "pencarian", searchIcon = }) => { + const router = useRouter(); + + const handleNavigate = () => { + router.push(href); + }; + + + + return ( + + + {title} + + + + + + + + + + + ); +}; + +export default JudulListTab; diff --git a/src/app/admin/(dashboard)/kesehatan/info-wabah-penyakit/create/page.tsx b/src/app/admin/(dashboard)/kesehatan/info-wabah-penyakit/create/page.tsx new file mode 100644 index 00000000..56b212be --- /dev/null +++ b/src/app/admin/(dashboard)/kesehatan/info-wabah-penyakit/create/page.tsx @@ -0,0 +1,77 @@ +'use client' +import colors from '@/con/colors'; +import { Box, Button, Paper, Stack, Text, TextInput, Title } from '@mantine/core'; +import { IconArrowBack } from '@tabler/icons-react'; +import { useRouter } from 'next/navigation'; +import { KesehatanEditor } from '../../_com/kesehatanEditor'; + +function CreateInfoWabahPenyakit() { + const router = useRouter(); + return ( + + + + + + + + Create Info Wabah Penyakit + + Judul} + placeholder="masukkan judul" + /> + + Deskripsi} + placeholder="masukkan deskripsi" + /> + + Kategori} + placeholder="masukkan kategori" + /> + + {/* Upload Gambar} + value={file} + onChange={async (e) => { + if (!e) return; + setFile(e); + const base64 = await e.arrayBuffer().then((buf) => + 'data:image/png;base64,' + Buffer.from(buf).toString('base64') + ); + setPreviewImage(base64); + }} + /> */} + + {/* {previewImage ? ( + + ) : ( +
+ +
+ )} */} + + + Konten + + + + +
+
+
+ ); +} + +export default CreateInfoWabahPenyakit; diff --git a/src/app/admin/(dashboard)/kesehatan/info-wabah-penyakit/ui/list_wabah_penyakit/page.tsx b/src/app/admin/(dashboard)/kesehatan/info-wabah-penyakit/detail/page.tsx similarity index 100% rename from src/app/admin/(dashboard)/kesehatan/info-wabah-penyakit/ui/list_wabah_penyakit/page.tsx rename to src/app/admin/(dashboard)/kesehatan/info-wabah-penyakit/detail/page.tsx diff --git a/src/app/admin/(dashboard)/kesehatan/info-wabah-penyakit/page.tsx b/src/app/admin/(dashboard)/kesehatan/info-wabah-penyakit/page.tsx index 0e7322c2..ce902a41 100644 --- a/src/app/admin/(dashboard)/kesehatan/info-wabah-penyakit/page.tsx +++ b/src/app/admin/(dashboard)/kesehatan/info-wabah-penyakit/page.tsx @@ -1,36 +1,64 @@ import colors from '@/con/colors'; -import { Box, Stack, Tabs, TabsList, TabsPanel, TabsTab, Title } from '@mantine/core'; -import React from 'react'; -import CreateInfoWabahPenyakit from './ui/tambah_wabah_penyakit/page'; -import ListInfoWabahPenyakit from './ui/list_wabah_penyakit/page'; +import { Box, Button, Image, Paper, Stack, Table, TableTbody, TableTd, TableTh, TableThead, TableTr, Text } from '@mantine/core'; +import { IconDeviceImacCog, IconSearch } from '@tabler/icons-react'; +import JudulList from '../../_com/judulList'; +import HeaderSearch from '../../_com/header'; - -function Page() { +function InfoWabahPenyakit() { return ( - - Info Wabah/Penyakit - - - - Tambah Info Wabah/Penyakit - - - List Info Wabah/Penyakit - - - - - - - - - - - - + } + /> + ); } -export default Page; +function ListInfoWabahPenyakit() { + return ( + + + + + + + + + Judul + Kategori + Image + Detail + + + + + + + Test + + Test + + + + + + + + +
+
+
+
+
+ ) +} + +export default InfoWabahPenyakit; diff --git a/src/app/admin/(dashboard)/kesehatan/info-wabah-penyakit/ui/tambah_wabah_penyakit/page.tsx b/src/app/admin/(dashboard)/kesehatan/info-wabah-penyakit/ui/tambah_wabah_penyakit/page.tsx deleted file mode 100644 index 212e8d61..00000000 --- a/src/app/admin/(dashboard)/kesehatan/info-wabah-penyakit/ui/tambah_wabah_penyakit/page.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import colors from '@/con/colors'; -import { Box, Button, Group, Paper, SimpleGrid, Stack, Text, TextInput, Title } from '@mantine/core'; -import { IconImageInPicture } from '@tabler/icons-react'; -import React from 'react'; -import { KesehatanEditor } from '../../../_com/kesehatanEditor'; - -function CreateInfoWabahPenyakit() { - return ( - - - - - - - Tambah Info Wabah/Penyakit - - Masukkan Image - - - Nama Info Wabah/Penyakit} - placeholder='Masukkan nama info wabah/penyakit' - /> - - Deskripsi Info Wabah/Penyakit - - - - - - - - - - - - - - - ); -} - -export default CreateInfoWabahPenyakit; diff --git a/src/app/admin/(dashboard)/kesehatan/kontak-darurat/create/page.tsx b/src/app/admin/(dashboard)/kesehatan/kontak-darurat/create/page.tsx new file mode 100644 index 00000000..c9a9f0f3 --- /dev/null +++ b/src/app/admin/(dashboard)/kesehatan/kontak-darurat/create/page.tsx @@ -0,0 +1,77 @@ +'use client' +import colors from '@/con/colors'; +import { Box, Button, Paper, Stack, Text, TextInput, Title } from '@mantine/core'; +import { IconArrowBack } from '@tabler/icons-react'; +import { useRouter } from 'next/navigation'; +import { KesehatanEditor } from '../../_com/kesehatanEditor'; + +function CreateKontakDarurat() { + const router = useRouter(); + return ( + + + + + + + + Create Kontak Darurat + + Judul} + placeholder="masukkan judul" + /> + + Deskripsi} + placeholder="masukkan deskripsi" + /> + + Kategori} + placeholder="masukkan kategori" + /> + + {/* Upload Gambar} + value={file} + onChange={async (e) => { + if (!e) return; + setFile(e); + const base64 = await e.arrayBuffer().then((buf) => + 'data:image/png;base64,' + Buffer.from(buf).toString('base64') + ); + setPreviewImage(base64); + }} + /> */} + + {/* {previewImage ? ( + + ) : ( +
+ +
+ )} */} + + + Konten + + + + +
+
+
+ ); +} + +export default CreateKontakDarurat; diff --git a/src/app/admin/(dashboard)/kesehatan/kontak-darurat/page.tsx b/src/app/admin/(dashboard)/kesehatan/kontak-darurat/page.tsx index 12c0b0c0..8fa70bf8 100644 --- a/src/app/admin/(dashboard)/kesehatan/kontak-darurat/page.tsx +++ b/src/app/admin/(dashboard)/kesehatan/kontak-darurat/page.tsx @@ -1,35 +1,64 @@ import colors from '@/con/colors'; -import { Box, Stack, Tabs, TabsList, TabsPanel, TabsTab, Title } from '@mantine/core'; -import React from 'react'; -import CreateKontakDarurat from './ui/tambah_kontak_darurat/page'; -import ListKontakDarurat from './ui/list_kontak_darurat/page'; +import { Box, Button, Image, Paper, Stack, Table, TableTbody, TableTd, TableTh, TableThead, TableTr, Text } from '@mantine/core'; +import { IconDeviceImacCog, IconSearch } from '@tabler/icons-react'; +import JudulList from '../../_com/judulList'; +import HeaderSearch from '../../_com/header'; -function Page() { +function KontakDarurat() { return ( - - Kontak Darurat - - - - Tambah Kontak Darurat - - - List Kontak Darurat - - - - - - - - - - - - + } + /> + ); } -export default Page; +function ListKontakDarurat() { + return ( + + + + + + + + + Judul + Kategori + Image + Detail + + + + + + + Test + + Test + + + + + + + + +
+
+
+
+
+ ) +} + +export default KontakDarurat; diff --git a/src/app/admin/(dashboard)/kesehatan/kontak-darurat/ui/list_kontak_darurat/page.tsx b/src/app/admin/(dashboard)/kesehatan/kontak-darurat/ui/list_kontak_darurat/page.tsx deleted file mode 100644 index 107bc33f..00000000 --- a/src/app/admin/(dashboard)/kesehatan/kontak-darurat/ui/list_kontak_darurat/page.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { Box, Paper, Stack, Table, TableTbody, TableTh, TableThead, TableTr, Title } from '@mantine/core'; -import colors from '@/con/colors'; -import React from 'react'; - -function ListKontakDarurat() { - return ( - - - - List Kontak Darurat - - - - - Image - Nama Kontak Darurat - Deskripsi Kontak Darurat - Aksi - Detail - - - - - -
-
-
-
-
- ); -} - -export default ListKontakDarurat; diff --git a/src/app/admin/(dashboard)/kesehatan/kontak-darurat/ui/tambah_kontak_darurat/page.tsx b/src/app/admin/(dashboard)/kesehatan/kontak-darurat/ui/tambah_kontak_darurat/page.tsx deleted file mode 100644 index 7de7b971..00000000 --- a/src/app/admin/(dashboard)/kesehatan/kontak-darurat/ui/tambah_kontak_darurat/page.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import colors from '@/con/colors'; -import { Box, Button, Group, Paper, SimpleGrid, Stack, Text, TextInput, Title } from '@mantine/core'; -import { IconImageInPicture } from '@tabler/icons-react'; -import React from 'react'; -import { KesehatanEditor } from '../../../_com/kesehatanEditor'; - -function CreateKontakDarurat() { - return ( - - - - - - - Tambah Kontak Darurat - - Masukkan Image - - - Nama Kontak Darurat} - placeholder='Masukkan nama kontak darurat' - /> - - Deskripsi Kontak Darurat - - - - - - - - - - - - - - - ); -} - -export default CreateKontakDarurat; diff --git a/src/app/admin/(dashboard)/kesehatan/penanganan-darurat/create/page.tsx b/src/app/admin/(dashboard)/kesehatan/penanganan-darurat/create/page.tsx new file mode 100644 index 00000000..8397049b --- /dev/null +++ b/src/app/admin/(dashboard)/kesehatan/penanganan-darurat/create/page.tsx @@ -0,0 +1,77 @@ +'use client' +import colors from '@/con/colors'; +import { Box, Button, Paper, Stack, Text, TextInput, Title } from '@mantine/core'; +import { IconArrowBack } from '@tabler/icons-react'; +import { useRouter } from 'next/navigation'; +import { KesehatanEditor } from '../../_com/kesehatanEditor'; + +function CreatePenangananDarurat() { + const router = useRouter(); + return ( + + + + + + + + Create Penanganan Darurat + + Judul} + placeholder="masukkan judul" + /> + + Deskripsi} + placeholder="masukkan deskripsi" + /> + + Kategori} + placeholder="masukkan kategori" + /> + + {/* Upload Gambar} + value={file} + onChange={async (e) => { + if (!e) return; + setFile(e); + const base64 = await e.arrayBuffer().then((buf) => + 'data:image/png;base64,' + Buffer.from(buf).toString('base64') + ); + setPreviewImage(base64); + }} + /> */} + + {/* {previewImage ? ( + + ) : ( +
+ +
+ )} */} + + + Konten + + + + +
+
+
+ ); +} + +export default CreatePenangananDarurat; diff --git a/src/app/admin/(dashboard)/kesehatan/penanganan-darurat/ui/list_penanganan_darurat/page.tsx b/src/app/admin/(dashboard)/kesehatan/penanganan-darurat/detail/page.tsx similarity index 100% rename from src/app/admin/(dashboard)/kesehatan/penanganan-darurat/ui/list_penanganan_darurat/page.tsx rename to src/app/admin/(dashboard)/kesehatan/penanganan-darurat/detail/page.tsx diff --git a/src/app/admin/(dashboard)/kesehatan/penanganan-darurat/page.tsx b/src/app/admin/(dashboard)/kesehatan/penanganan-darurat/page.tsx index 4d03ce9e..26e341d8 100644 --- a/src/app/admin/(dashboard)/kesehatan/penanganan-darurat/page.tsx +++ b/src/app/admin/(dashboard)/kesehatan/penanganan-darurat/page.tsx @@ -1,35 +1,64 @@ import colors from '@/con/colors'; -import { Box, Stack, Tabs, TabsList, TabsPanel, TabsTab, Title } from '@mantine/core'; -import React from 'react'; -import CreatePenangananDarurat from './ui/tambah_penanganan_darurat/page'; -import ListPenangananDarurat from './ui/list_penanganan_darurat/page'; +import { Box, Button, Image, Paper, Stack, Table, TableTbody, TableTd, TableTh, TableThead, TableTr, Text } from '@mantine/core'; +import { IconDeviceImacCog, IconSearch } from '@tabler/icons-react'; +import JudulList from '../../_com/judulList'; +import HeaderSearch from '../../_com/header'; -function Page() { +function PenangananDarurat() { return ( - - Penanganan Darurat - - - - Tambah Penanganan Darurat - - - List Penanganan Darurat - - - - - - - - - - - - + } + /> + ); } -export default Page; +function ListPenangananDarurat() { + return ( + + + + + + + + + Judul + Kategori + Image + Detail + + + + + + + Test + + Test + + + + + + + + +
+
+
+
+
+ ) +} + +export default PenangananDarurat; diff --git a/src/app/admin/(dashboard)/kesehatan/penanganan-darurat/ui/tambah_penanganan_darurat/page.tsx b/src/app/admin/(dashboard)/kesehatan/penanganan-darurat/ui/tambah_penanganan_darurat/page.tsx deleted file mode 100644 index 5adecaee..00000000 --- a/src/app/admin/(dashboard)/kesehatan/penanganan-darurat/ui/tambah_penanganan_darurat/page.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import colors from '@/con/colors'; -import { Box, Button, Group, Paper, SimpleGrid, Stack, Text, TextInput, Title } from '@mantine/core'; -import { IconImageInPicture } from '@tabler/icons-react'; -import React from 'react'; -import { KesehatanEditor } from '../../../_com/kesehatanEditor'; - -function CreatePenangananDarurat() { - return ( - - - - - - - Tambah Penanganan Darurat - - Masukkan Image - - - Nama Penanganan Darurat} - placeholder='Masukkan nama penanganan darurat' - /> - - Deskripsi Penanganan Darurat - - - - - - - - - - - - - - - ); -} - -export default CreatePenangananDarurat; diff --git a/src/app/admin/(dashboard)/kesehatan/posyandu/create/page.tsx b/src/app/admin/(dashboard)/kesehatan/posyandu/create/page.tsx new file mode 100644 index 00000000..02150313 --- /dev/null +++ b/src/app/admin/(dashboard)/kesehatan/posyandu/create/page.tsx @@ -0,0 +1,45 @@ +'use client' +import colors from '@/con/colors'; +import { Box, Button, Group, Paper, Stack, Text, TextInput, Title } from '@mantine/core'; +import { IconArrowBack, IconImageInPicture } from '@tabler/icons-react'; +import { useRouter } from 'next/navigation'; +import React from 'react'; +import { KesehatanEditor } from '../../_com/kesehatanEditor'; + +function CreatePosyandu() { + const router = useRouter(); + return ( + + + + + + + + Create Posyandu + + Masukkan Image + + + Nama Posyandu} + placeholder='Masukkan nama posyandu' + /> + + Deskripsi Posyandu + + + + + + + + + ); +} + +export default CreatePosyandu; diff --git a/src/app/admin/(dashboard)/kesehatan/posyandu/detail/page.tsx b/src/app/admin/(dashboard)/kesehatan/posyandu/detail/page.tsx new file mode 100644 index 00000000..42c5732d --- /dev/null +++ b/src/app/admin/(dashboard)/kesehatan/posyandu/detail/page.tsx @@ -0,0 +1,70 @@ +'use client' +import colors from '@/con/colors'; +import { Box, Button, Paper, Stack, Flex, Text, Image } from '@mantine/core'; +import { IconArrowBack, IconX, IconEdit } from '@tabler/icons-react'; +import { useRouter } from 'next/navigation'; +import React from 'react'; +// import { ModalKonfirmasiHapus } from '../../../_com/modalKonfirmasiHapus'; + +function DetailPosyandu() { + const router = useRouter(); + return ( + + + + + + + Detail Potensi + + + + + Judul + Test Judul + + + Kategori + Test Kategori + + + Deskripsi + Test Deskripsi + + + Gambar + gambar + + + Konten + Test Konten + + + + + + + + + + + + + {/* Modal Hapus + setModalHapus(false)} + onConfirm={handleHapus} + text="Apakah anda yakin ingin menghapus potensi ini?" + /> */} + + ); +} + +export default DetailPosyandu; diff --git a/src/app/admin/(dashboard)/kesehatan/posyandu/edit/page.tsx b/src/app/admin/(dashboard)/kesehatan/posyandu/edit/page.tsx new file mode 100644 index 00000000..c13a6c7c --- /dev/null +++ b/src/app/admin/(dashboard)/kesehatan/posyandu/edit/page.tsx @@ -0,0 +1,45 @@ +'use client' +import colors from '@/con/colors'; +import { Box, Button, Group, Paper, Stack, Text, TextInput, Title } from '@mantine/core'; +import { IconArrowBack, IconImageInPicture } from '@tabler/icons-react'; +import { useRouter } from 'next/navigation'; +import React from 'react'; +import { KesehatanEditor } from '../../_com/kesehatanEditor'; + +function EditPosyandu() { + const router = useRouter(); + return ( + + + + + + + + Edit Posyandu + + Masukkan Image + + + Nama Posyandu} + placeholder='Masukkan nama posyandu' + /> + + Deskripsi Posyandu + + + + + + + + + ); +} + +export default EditPosyandu; diff --git a/src/app/admin/(dashboard)/kesehatan/posyandu/page.tsx b/src/app/admin/(dashboard)/kesehatan/posyandu/page.tsx index b611b965..2c470611 100644 --- a/src/app/admin/(dashboard)/kesehatan/posyandu/page.tsx +++ b/src/app/admin/(dashboard)/kesehatan/posyandu/page.tsx @@ -1,52 +1,53 @@ import colors from '@/con/colors'; -import { Box, Button, Group, Paper, SimpleGrid, Stack, Text, TextInput, Title } from '@mantine/core'; -import React from 'react'; -import { KesehatanEditor } from '../_com/kesehatanEditor'; +import { Box, Button, Paper, Table, TableTbody, TableTd, TableTh, TableThead, TableTr } from '@mantine/core'; +import { IconDeviceImac, IconSearch } from '@tabler/icons-react'; +import HeaderSearch from '../../_com/header'; +import JudulList from '../../_com/judulList'; function Posyandu() { return ( - Kesehatan - - - - - Posyandu - Nama Posyandu} - placeholder='masukkan nama posyandu' - /> - Nomor Telepon Posyandu} - placeholder='masukkan nomor telepon posyandu' - /> - - Deskripsi Posyandu - - - - Pelayanan Posyandu - - - - - + } + /> + + + ); +} - - - - - - - Preview Data Posyandu - - - - +function ListPosyandu() { + return ( + + + + + + + Nama Posyandu + Nomor Posyandu + Deskripsi + Detail + + + + + Posyandu 1 + 0896232831883 + Posyandu 1 + + + + + +
+
); } diff --git a/src/app/admin/(dashboard)/kesehatan/program-kesehatan/create/page.tsx b/src/app/admin/(dashboard)/kesehatan/program-kesehatan/create/page.tsx new file mode 100644 index 00000000..fb9d57ba --- /dev/null +++ b/src/app/admin/(dashboard)/kesehatan/program-kesehatan/create/page.tsx @@ -0,0 +1,77 @@ +'use client' +import colors from '@/con/colors'; +import { Box, Button, Paper, Stack, Text, TextInput, Title } from '@mantine/core'; +import { IconArrowBack } from '@tabler/icons-react'; +import { useRouter } from 'next/navigation'; +import { KesehatanEditor } from '../../_com/kesehatanEditor'; + +function CreateProgramKesehatan() { + const router = useRouter(); + return ( + + + + + + + + Create Program Kesehatan + + Judul} + placeholder="masukkan judul" + /> + + Deskripsi} + placeholder="masukkan deskripsi" + /> + + Kategori} + placeholder="masukkan kategori" + /> + + {/* Upload Gambar} + value={file} + onChange={async (e) => { + if (!e) return; + setFile(e); + const base64 = await e.arrayBuffer().then((buf) => + 'data:image/png;base64,' + Buffer.from(buf).toString('base64') + ); + setPreviewImage(base64); + }} + /> */} + + {/* {previewImage ? ( + + ) : ( +
+ +
+ )} */} + + + Konten + + + + +
+
+
+ ); +} + +export default CreateProgramKesehatan; diff --git a/src/app/admin/(dashboard)/kesehatan/program-kesehatan/page.tsx b/src/app/admin/(dashboard)/kesehatan/program-kesehatan/page.tsx index 90cfcc23..1987939d 100644 --- a/src/app/admin/(dashboard)/kesehatan/program-kesehatan/page.tsx +++ b/src/app/admin/(dashboard)/kesehatan/program-kesehatan/page.tsx @@ -1,34 +1,64 @@ import colors from '@/con/colors'; -import { Box, Stack, Tabs, TabsList, TabsPanel, TabsTab, Title } from '@mantine/core'; -import CreateProgramKesehatan from './ui/tambah_program_kesehatan/page'; -import ListProgramKesehatan from './ui/list_program_kesehatan/page'; +import { Box, Button, Image, Paper, Stack, Table, TableTbody, TableTd, TableTh, TableThead, TableTr, Text } from '@mantine/core'; +import { IconDeviceImacCog, IconSearch } from '@tabler/icons-react'; +import JudulList from '../../_com/judulList'; +import HeaderSearch from '../../_com/header'; -function Page() { +function ProgramKesehatan() { return ( - - Program Kesehatan - - - - Tambah Program Kesehatan - - - List Program Kesehatan - - - - - - - - - - - - + } + /> + ); } -export default Page; +function ListProgramKesehatan() { + return ( + + + + + + + + + Judul + Kategori + Image + Detail + + + + + + + Test + + Test + + + + + + + + +
+
+
+
+
+ ) +} + +export default ProgramKesehatan; diff --git a/src/app/admin/(dashboard)/kesehatan/program-kesehatan/ui/detail_program_kesehatan/page.tsx b/src/app/admin/(dashboard)/kesehatan/program-kesehatan/ui/detail_program_kesehatan/page.tsx deleted file mode 100644 index 4794e2a6..00000000 --- a/src/app/admin/(dashboard)/kesehatan/program-kesehatan/ui/detail_program_kesehatan/page.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; - -function DetailProgramKesehatan() { - return ( -
- Page -
- ); -} - -export default DetailProgramKesehatan; diff --git a/src/app/admin/(dashboard)/kesehatan/program-kesehatan/ui/list_program_kesehatan/page.tsx b/src/app/admin/(dashboard)/kesehatan/program-kesehatan/ui/list_program_kesehatan/page.tsx deleted file mode 100644 index a43e513c..00000000 --- a/src/app/admin/(dashboard)/kesehatan/program-kesehatan/ui/list_program_kesehatan/page.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { Box, Paper, Stack, Table, TableTbody, TableTh, TableThead, TableTr, Title } from '@mantine/core'; -import colors from '@/con/colors'; -import React from 'react'; - -function ListProgramKesehatan() { - return ( - - - - List Program Kesehatan - - - - - Deskripsi Program Kesehatan - Nama Konten Program Kesehatan - Deskripsi Konten Program Kesehatan - Aksi - Detail - - - - - -
-
-
-
-
- ); -} - -export default ListProgramKesehatan; diff --git a/src/app/admin/(dashboard)/kesehatan/program-kesehatan/ui/tambah_program_kesehatan/page.tsx b/src/app/admin/(dashboard)/kesehatan/program-kesehatan/ui/tambah_program_kesehatan/page.tsx deleted file mode 100644 index 6096fd81..00000000 --- a/src/app/admin/(dashboard)/kesehatan/program-kesehatan/ui/tambah_program_kesehatan/page.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import colors from '@/con/colors'; -import { Box, Button, Group, Paper, SimpleGrid, Stack, Text, TextInput, Title } from '@mantine/core'; -import React from 'react'; -import { KesehatanEditor } from '../../../_com/kesehatanEditor'; -import { IconImageInPicture } from '@tabler/icons-react'; - -function CreateProgramKesehatan() { - return ( - - - - - - - Tambah Program Kesehatan - - Deskripsi Program Kesehatan - - - - Masukkan Image - - - Nama Konten Program Kesehatan} - placeholder='Masukkan nama konten program kesehatan' - /> - - Deskripsi Konten Program Kesehatan - - - - - - - - - - - - Preview Data Program Kesehatan - Deskripsi Program Kesehatan - - Image - - - Nama Konten Program Kesehatan - Deskripsi Konten Program Kesehatan - - - - - - - ); -} - -export default CreateProgramKesehatan; diff --git a/src/app/admin/(dashboard)/kesehatan/puskesmas/create/page.tsx b/src/app/admin/(dashboard)/kesehatan/puskesmas/create/page.tsx new file mode 100644 index 00000000..0df37b2a --- /dev/null +++ b/src/app/admin/(dashboard)/kesehatan/puskesmas/create/page.tsx @@ -0,0 +1,77 @@ +'use client' +import colors from '@/con/colors'; +import { Box, Button, Paper, Stack, Text, TextInput, Title } from '@mantine/core'; +import { IconArrowBack } from '@tabler/icons-react'; +import { useRouter } from 'next/navigation'; +import { KesehatanEditor } from '../../_com/kesehatanEditor'; + +function CreatePuskesmas() { + const router = useRouter(); + return ( + + + + + + + + Create Puskesmas + + Judul} + placeholder="masukkan judul" + /> + + Deskripsi} + placeholder="masukkan deskripsi" + /> + + Kategori} + placeholder="masukkan kategori" + /> + + {/* Upload Gambar} + value={file} + onChange={async (e) => { + if (!e) return; + setFile(e); + const base64 = await e.arrayBuffer().then((buf) => + 'data:image/png;base64,' + Buffer.from(buf).toString('base64') + ); + setPreviewImage(base64); + }} + /> */} + + {/* {previewImage ? ( + + ) : ( +
+ +
+ )} */} + + + Konten + + + + +
+
+
+ ); +} + +export default CreatePuskesmas; diff --git a/src/app/admin/(dashboard)/kesehatan/puskesmas/ui/Edit-Puskesmas/updatePuskesmas.tsx b/src/app/admin/(dashboard)/kesehatan/puskesmas/edit/updatePuskesmas.tsx similarity index 95% rename from src/app/admin/(dashboard)/kesehatan/puskesmas/ui/Edit-Puskesmas/updatePuskesmas.tsx rename to src/app/admin/(dashboard)/kesehatan/puskesmas/edit/updatePuskesmas.tsx index 0b0c0f8e..8435b6f4 100644 --- a/src/app/admin/(dashboard)/kesehatan/puskesmas/ui/Edit-Puskesmas/updatePuskesmas.tsx +++ b/src/app/admin/(dashboard)/kesehatan/puskesmas/edit/updatePuskesmas.tsx @@ -1,7 +1,7 @@ import colors from '@/con/colors'; import { Box, Stack, SimpleGrid, Paper, Title, TextInput, Text } from '@mantine/core'; -import React from 'react'; -import { KesehatanEditor } from '../../../_com/kesehatanEditor'; +import { KesehatanEditor } from '../../_com/kesehatanEditor'; + function UpdatePuskesmas() { return ( diff --git a/src/app/admin/(dashboard)/kesehatan/puskesmas/page.tsx b/src/app/admin/(dashboard)/kesehatan/puskesmas/page.tsx index 269c4c2a..554e7897 100644 --- a/src/app/admin/(dashboard)/kesehatan/puskesmas/page.tsx +++ b/src/app/admin/(dashboard)/kesehatan/puskesmas/page.tsx @@ -1,34 +1,64 @@ import colors from '@/con/colors'; -import { Box, Stack, Tabs, TabsList, TabsPanel, TabsTab, Title } from '@mantine/core'; -import UpdatePuskesmas from './ui/Edit-Puskesmas/updatePuskesmas'; -import CreatePuskesmas from './ui/Tambah-Puskesmas/createPuskesmas'; +import { Box, Button, Image, Paper, Stack, Table, TableTbody, TableTd, TableTh, TableThead, TableTr, Text } from '@mantine/core'; +import { IconDeviceImacCog, IconSearch } from '@tabler/icons-react'; +import JudulList from '../../_com/judulList'; +import HeaderSearch from '../../_com/header'; function Puskesmas() { return ( - - - Puskesmas - - - - Tambah Puskesmas - - - Edit Puskesmas - - - - - - - - - - - - - + + } + /> + + ); } +function ListPuskesmas() { + return ( + + + + + + + + + Judul + Kategori + Image + Detail + + + + + + + Test + + Test + + + + + + + + +
+
+
+
+
+ ) +} + export default Puskesmas; diff --git a/src/app/admin/(dashboard)/kesehatan/puskesmas/ui/Tambah-Puskesmas/createPuskesmas.tsx b/src/app/admin/(dashboard)/kesehatan/puskesmas/ui/Tambah-Puskesmas/createPuskesmas.tsx deleted file mode 100644 index dd54cee4..00000000 --- a/src/app/admin/(dashboard)/kesehatan/puskesmas/ui/Tambah-Puskesmas/createPuskesmas.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import colors from '@/con/colors'; -import { Box, Paper, SimpleGrid, Stack, Text, TextInput, Title } from '@mantine/core'; -import React from 'react'; -import { KesehatanEditor } from '../../../_com/kesehatanEditor'; - -function CreatePuskesmas() { - return ( - - - - - - - Tambah Puskesmas - Nama Puskesmas} - placeholder='Masukkan nama puskesmas' - /> - No Telp Puskesmas} - placeholder='Masukkan no telp puskesmas' - /> - - Deskripsi - - - - Pelayanan Posyandu - - - - - - - - - Preview Data Puskesmas - Nama Puskesmas - No Telp Puskesmas - Deskripsi - Pelayanan Posyandu - - - - - - - ); -} - -export default CreatePuskesmas;