diff --git a/src/stores/OrderStore.js b/src/stores/OrderStore.js
index f5ee79a..a8963a0 100644
--- a/src/stores/OrderStore.js
+++ b/src/stores/OrderStore.js
@@ -15,10 +15,11 @@ const useOrderStore = create((set, get) => ({
fetchOrderDetail: async (colisn) => {
const json = await fetchJSON(`${API_HOST}/getorderinfo`, { colisn })
if (json.errcode === 0 && json.result.length > 0) {
+ const orderResult = json.result[0]
set(() => ({
- orderDetail: json.result[0],
- customerDetail: json.result[0].contact[0],
- lastQuotation: json.result[0].quotes.length > 0 ? json.result[0].quotes[0] : {},
+ orderDetail: orderResult,
+ customerDetail: orderResult.contact.length > 0 ? orderResult.contact[0] : {},
+ lastQuotation: orderResult.quotes.length > 0 ? orderResult.quotes[0] : {},
}))
}
},
diff --git a/src/views/AuthApp.jsx b/src/views/AuthApp.jsx
index 6c91331..1bffdea 100644
--- a/src/views/AuthApp.jsx
+++ b/src/views/AuthApp.jsx
@@ -103,7 +103,11 @@ function AuthApp() {
trigger={['click']}
>
e.preventDefault()} style={{ color: colorPrimary }}>
-