upd : update pengajuan surat

deskripsi:
- update type form pada tambah dan update pengajuan surat
- tampilan klo tidak ada data yg dicari pada update pengajuan surat
- update seeder category pengajuan surat

No Issues
This commit is contained in:
2025-12-24 17:29:25 +08:00
parent bab832b87f
commit c074e2bc0a
9 changed files with 536 additions and 233 deletions

View File

@@ -0,0 +1,11 @@
import dayjs from "dayjs";
import customParseFormat from "dayjs/plugin/customParseFormat";
import "dayjs/locale/id";
dayjs.extend(customParseFormat);
export function parseTanggalID( value: string ): Date | null {
if (!value) return null;
const parsed = dayjs(value, "DD MMMM YYYY", "id", true);
return parsed.isValid() ? parsed.toDate() : null;
}

View File

@@ -334,7 +334,6 @@ const PelayananRoute = new Elysia({
.map(({ order, ...rest }) => rest); // hapus order
console.log(dataTextFix)
const dataHistory = await prisma.historyPelayanan.findMany({
where: {
idPengajuanLayanan: data?.id,
@@ -689,6 +688,11 @@ const PelayananRoute = new Elysia({
})
const dataPelengkapList = (data?.CategoryPelayanan?.dataPelengkap ?? []) as {
type: string;
options?: {
label: string,
value: string
}[];
name: string;
desc: string;
key: string;
@@ -711,6 +715,8 @@ const PelayananRoute = new Elysia({
value: item.value,
desc: ref?.desc ?? "",
name: ref?.name ?? "",
type: ref?.type ?? "",
options: ref?.options ?? [],
order: ref?.order ?? Infinity,
};
})