amalia/15-jan-26 #112
@@ -45,7 +45,6 @@ export default function ModalSurat({
|
||||
}),
|
||||
);
|
||||
|
||||
console.log('surat', surat)
|
||||
|
||||
useShallowEffect(() => {
|
||||
mutate();
|
||||
@@ -53,9 +52,7 @@ export default function ModalSurat({
|
||||
|
||||
const uploadPdf = async () => {
|
||||
try {
|
||||
console.log('upload function' + data)
|
||||
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 });
|
||||
const element = hiddenRef.current;
|
||||
const canvas = await html2canvas(element, {
|
||||
@@ -110,9 +107,11 @@ export default function ModalSurat({
|
||||
onClose({ success: false, data: "" });
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
|
||||
console.log('upload else')
|
||||
} else {
|
||||
setUploading({ text: "Gagal", value: 100 });
|
||||
setTimeout(() => {
|
||||
onClose({ success: false, data: "" });
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
@@ -121,13 +120,10 @@ export default function ModalSurat({
|
||||
}
|
||||
|
||||
useShallowEffect(() => {
|
||||
console.log('jalan')
|
||||
if (open) {
|
||||
console.log('open')
|
||||
setTimeout(() => {
|
||||
console.log('upload-timeout')
|
||||
uploadPdf();
|
||||
}, 5000);
|
||||
}, 3000);
|
||||
}
|
||||
}, [surat, open]);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ export default function SKKelahiran({ data }: { data: any }) {
|
||||
const getValue = (jenis: string) =>
|
||||
_.upperFirst(
|
||||
data.surat.dataText.find((item: any) => item.jenis === jenis)?.value ||
|
||||
"",
|
||||
"",
|
||||
);
|
||||
|
||||
const loadImage = async () => {
|
||||
@@ -161,7 +161,7 @@ export default function SKKelahiran({ data }: { data: any }) {
|
||||
<tr>
|
||||
<td>Tempat & Tanggal Lahir</td>
|
||||
<td>:</td>
|
||||
<td>{`${getValue("tempat_lahir_ayah")}, ${"tanggal_lahir_ayah"}`}</td>
|
||||
<td>{`${getValue("tempat_lahir_ayah")}, ${getValue("tanggal_lahir_ayah")}`}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pekerjaan</td>
|
||||
|
||||
@@ -96,7 +96,7 @@ export default function FormSurat() {
|
||||
setJenisSuratFix({ name: "", id: "" });
|
||||
} else {
|
||||
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;
|
||||
setJenisSuratFix(data);
|
||||
}
|
||||
|
||||
@@ -128,8 +128,6 @@ function DetailDataPengajuan({
|
||||
const [loadingUpdate, setLoadingUpdate] = useState(false)
|
||||
const [loadingFS, setLoadingFS] = useState({ value: false, text: "" })
|
||||
|
||||
console.log('data nya', data)
|
||||
|
||||
useEffect(() => {
|
||||
async function fetchHost() {
|
||||
const { data } = await apiFetch.api.user.find.get();
|
||||
@@ -165,6 +163,11 @@ function DetailDataPengajuan({
|
||||
message: "Success send message to warga",
|
||||
type: "success",
|
||||
});
|
||||
|
||||
if (status == "selesai") {
|
||||
onAction()
|
||||
}
|
||||
|
||||
} else {
|
||||
notification({
|
||||
title: "Failed",
|
||||
|
||||
@@ -269,8 +269,6 @@ const PelayananRoute = new Elysia({
|
||||
}
|
||||
})
|
||||
|
||||
console.log('data surat', dataSurat, data.id)
|
||||
|
||||
const dataSyarat = await prisma.syaratDokumenPelayanan.findMany({
|
||||
where: {
|
||||
idPengajuanLayanan: data?.id,
|
||||
@@ -402,8 +400,6 @@ const PelayananRoute = new Elysia({
|
||||
dataText: dataTextFix,
|
||||
}
|
||||
|
||||
console.log('data fix', datafix)
|
||||
|
||||
return datafix
|
||||
}, {
|
||||
query: t.Object({
|
||||
|
||||
Reference in New Issue
Block a user