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:
11
src/server/lib/stringToDate.ts
Normal file
11
src/server/lib/stringToDate.ts
Normal 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;
|
||||
}
|
||||
@@ -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,
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user