From 425284d3aa2cff3b67316d1e83c9e2e8bc80ce58 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Wed, 28 Aug 2024 16:52:37 +0700
Subject: <iman> update code if no auth

---
 src/lib/treckingAwb/component/Manifest.jsx | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

(limited to 'src/lib/treckingAwb/component/Manifest.jsx')

diff --git a/src/lib/treckingAwb/component/Manifest.jsx b/src/lib/treckingAwb/component/Manifest.jsx
index cf2fa4ed..fbc95702 100644
--- a/src/lib/treckingAwb/component/Manifest.jsx
+++ b/src/lib/treckingAwb/component/Manifest.jsx
@@ -40,10 +40,18 @@ const Manifest = ({ idAWB, closePopup }) => {
   const getManifest = async () => {
     setIsLoading(true)
     const auth = getAuth()
-    const list = await odooApi(
-      'GET',
-      `/api/v1/partner/${auth.partnerId}/stock-picking/${idAWB}/tracking`
-    )
+    let list
+    if(auth){
+      list = await odooApi(
+        'GET',
+        `/api/v1/partner/${auth.partnerId}/stock-picking/${idAWB}/tracking`
+      )
+    }else{
+      list = await odooApi(
+        'GET',
+        `/api/v1/stock-picking/${idAWB}/tracking`
+      )
+    }
     setManifests(list)
     setIsLoading(false)
   }
-- 
cgit v1.2.3

