summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2024-10-25 10:55:07 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2024-10-25 10:55:07 +0700
commit053b45c6d4c7a8fa0853de9acab5f98642ed72dc (patch)
tree046a2f3afc07b2254f574e1b2e7e486645bfb0d5 /app
parent83d1a1c558293e1b14c9a5847628e7661f749c66 (diff)
fedback add pwa
Diffstat (limited to 'app')
-rw-r--r--app/lib/camera/component/scannerBarcode.tsx2
-rw-r--r--app/login/page.tsx3
-rw-r--r--app/page.tsx8
3 files changed, 8 insertions, 5 deletions
diff --git a/app/lib/camera/component/scannerBarcode.tsx b/app/lib/camera/component/scannerBarcode.tsx
index 3079e33..6319a84 100644
--- a/app/lib/camera/component/scannerBarcode.tsx
+++ b/app/lib/camera/component/scannerBarcode.tsx
@@ -21,7 +21,7 @@ const BarcodeScanner: React.FC = () => {
color="error"
className="mb-2"
>
- {isCameraActive ? "Cancel" : "Scane Code"}
+ {isCameraActive ? "Cancel" : "Scan Code"}
</Button>
{isCameraActive && (
diff --git a/app/login/page.tsx b/app/login/page.tsx
index 8df5b2c..5ad699c 100644
--- a/app/login/page.tsx
+++ b/app/login/page.tsx
@@ -37,7 +37,6 @@ const Login = () => {
const email = data.get("email");
const password = data.get("password");
- console.log('ini user', email, password)
try {
odooApi("POST", "/api/v1/user/login", {
email ,
@@ -57,9 +56,9 @@ const Login = () => {
alert("Akun anda belum aktif");
break;
}
- console.log('ini akhir',res);
});
} catch (error) {
+ alert("Gagal login, silahkan coba lagi");
console.log(error);
}
};
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) {