From 053b45c6d4c7a8fa0853de9acab5f98642ed72dc Mon Sep 17 00:00:00 2001 From: trisusilo48 Date: Fri, 25 Oct 2024 10:55:07 +0700 Subject: fedback add pwa --- app/page.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/page.tsx') diff --git a/app/page.tsx b/app/page.tsx index ccfb7f7..f12f746 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -50,7 +50,6 @@ export default function Home() { try { const newSjImage = imageSj.replace(/^.*?,/, ""); const newPackageImage = imagePackage.replace(/^.*?,/, ""); - // const method = 'PUT'; const data = { sj_document: newSjImage, // Kirim base64 lengkap dengan prefix @@ -62,13 +61,18 @@ export default function Home() { `/api/v1/stock-picking/${barcode}/documentation`, data ); - console.log(response); if (response.status.code == 200) { alert("Berhasil Submit Data"); setBarcode(""); setImageSj(""); setImagePackage(""); setIsLoading(false); + }else if(response.status.code == 404){ + alert("Gagal Submit Data, Picking Code Tidak Ditemukan " ); + setIsLoading(false); + }else{ + alert("Gagal Submit Data, Silahkan Coba Lagi" ); + setIsLoading(false); } return response.data; } catch (error: unknown) { -- cgit v1.2.3