Merge pull request 'amalia/15-jan-26' (#112) from amalia/15-jan-26 into main

Reviewed-on: http://wibugit.wibudev.com/wibu/jenna-mcp/pulls/112
This commit is contained in:
2026-01-15 14:33:16 +08:00
5 changed files with 14 additions and 19 deletions

View File

@@ -45,7 +45,6 @@ export default function ModalSurat({
}), }),
); );
console.log('surat', surat)
useShallowEffect(() => { useShallowEffect(() => {
mutate(); mutate();
@@ -53,9 +52,7 @@ export default function ModalSurat({
const uploadPdf = async () => { const uploadPdf = async () => {
try { try {
console.log('upload function' + data)
if (data && data.data && data.data.surat && (data.data.surat.file == "" || data.data.surat.file == null)) { if (data && data.data && data.data.surat && (data.data.surat.file == "" || data.data.surat.file == null)) {
console.log('upload if')
setUploading({ text: "Mengupload", value: 75 }); setUploading({ text: "Mengupload", value: 75 });
const element = hiddenRef.current; const element = hiddenRef.current;
const canvas = await html2canvas(element, { const canvas = await html2canvas(element, {
@@ -110,9 +107,11 @@ export default function ModalSurat({
onClose({ success: false, data: "" }); onClose({ success: false, data: "" });
}, 1000) }, 1000)
} }
} else {
setUploading({ text: "Gagal", value: 100 });
console.log('upload else') setTimeout(() => {
onClose({ success: false, data: "" });
}, 1000)
} }
} catch (error) { } catch (error) {
@@ -121,13 +120,10 @@ export default function ModalSurat({
} }
useShallowEffect(() => { useShallowEffect(() => {
console.log('jalan')
if (open) { if (open) {
console.log('open')
setTimeout(() => { setTimeout(() => {
console.log('upload-timeout')
uploadPdf(); uploadPdf();
}, 5000); }, 3000);
} }
}, [surat, open]); }, [surat, open]);

View File

@@ -7,7 +7,7 @@ export default function SKKelahiran({ data }: { data: any }) {
const getValue = (jenis: string) => const getValue = (jenis: string) =>
_.upperFirst( _.upperFirst(
data.surat.dataText.find((item: any) => item.jenis === jenis)?.value || data.surat.dataText.find((item: any) => item.jenis === jenis)?.value ||
"", "",
); );
const loadImage = async () => { const loadImage = async () => {
@@ -161,7 +161,7 @@ export default function SKKelahiran({ data }: { data: any }) {
<tr> <tr>
<td>Tempat & Tanggal Lahir</td> <td>Tempat & Tanggal Lahir</td>
<td>:</td> <td>:</td>
<td>{`${getValue("tempat_lahir_ayah")}, ${"tanggal_lahir_ayah"}`}</td> <td>{`${getValue("tempat_lahir_ayah")}, ${getValue("tanggal_lahir_ayah")}`}</td>
</tr> </tr>
<tr> <tr>
<td>Pekerjaan</td> <td>Pekerjaan</td>

View File

@@ -96,7 +96,7 @@ export default function FormSurat() {
setJenisSuratFix({ name: "", id: "" }); setJenisSuratFix({ name: "", id: "" });
} else { } else {
const namaJenis = fromSlug(jenisSurat); const namaJenis = fromSlug(jenisSurat);
const data = listCategory.find((item: any) => item.name == namaJenis); const data = listCategory.find((item: any) => item.name.toUpperCase() == namaJenis.toUpperCase());
if (!data) return; if (!data) return;
setJenisSuratFix(data); setJenisSuratFix(data);
} }

View File

@@ -128,8 +128,6 @@ function DetailDataPengajuan({
const [loadingUpdate, setLoadingUpdate] = useState(false) const [loadingUpdate, setLoadingUpdate] = useState(false)
const [loadingFS, setLoadingFS] = useState({ value: false, text: "" }) const [loadingFS, setLoadingFS] = useState({ value: false, text: "" })
console.log('data nya', data)
useEffect(() => { useEffect(() => {
async function fetchHost() { async function fetchHost() {
const { data } = await apiFetch.api.user.find.get(); const { data } = await apiFetch.api.user.find.get();
@@ -165,6 +163,11 @@ function DetailDataPengajuan({
message: "Success send message to warga", message: "Success send message to warga",
type: "success", type: "success",
}); });
if (status == "selesai") {
onAction()
}
} else { } else {
notification({ notification({
title: "Failed", title: "Failed",

View File

@@ -269,8 +269,6 @@ const PelayananRoute = new Elysia({
} }
}) })
console.log('data surat', dataSurat, data.id)
const dataSyarat = await prisma.syaratDokumenPelayanan.findMany({ const dataSyarat = await prisma.syaratDokumenPelayanan.findMany({
where: { where: {
idPengajuanLayanan: data?.id, idPengajuanLayanan: data?.id,
@@ -402,8 +400,6 @@ const PelayananRoute = new Elysia({
dataText: dataTextFix, dataText: dataTextFix,
} }
console.log('data fix', datafix)
return datafix return datafix
}, { }, {
query: t.Object({ query: t.Object({