From df4fb98969937d23f8d9e1f514bc9458ca32980f Mon Sep 17 00:00:00 2001 From: AminGhasempoor Date: Wed, 29 May 2024 14:14:15 +0330 Subject: [PATCH] get api --- .../Form/ConfirmForm/ConfirmContent.jsx | 4 ++-- .../Form/ConfirmForm/ConfirmContent.jsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/dashboard/navgan-province-manager/Form/ConfirmForm/ConfirmContent.jsx b/src/components/dashboard/navgan-province-manager/Form/ConfirmForm/ConfirmContent.jsx index ca872db..312bbf2 100644 --- a/src/components/dashboard/navgan-province-manager/Form/ConfirmForm/ConfirmContent.jsx +++ b/src/components/dashboard/navgan-province-manager/Form/ConfirmForm/ConfirmContent.jsx @@ -53,10 +53,10 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog, handleSizeChangeCl useEffect(() => { requestServer(`${CONFIRM_PROVINCE_MANAGER_DETAILS}/${rowId}`, 'get') .then((response) => { - if (response.data.data.histories.length !== 0) { + if (response.data.data.latest_histories.length !== 0) { let latest_attachments = [] let attachments = [] - response.data.data.histories.map((allAttachment) => { + response.data.data.latest_histories.map((allAttachment) => { if (allAttachment.previous_state_id === 4 || allAttachment.previous_state_id === 5) { if (!latest_attachments.includes(allAttachment.previous_state_id)) { attachments = [...attachments, ...allAttachment.attachments] diff --git a/src/components/dashboard/transportation-assistance/Form/ConfirmForm/ConfirmContent.jsx b/src/components/dashboard/transportation-assistance/Form/ConfirmForm/ConfirmContent.jsx index 1bae724..22f9f1f 100644 --- a/src/components/dashboard/transportation-assistance/Form/ConfirmForm/ConfirmContent.jsx +++ b/src/components/dashboard/transportation-assistance/Form/ConfirmForm/ConfirmContent.jsx @@ -44,10 +44,10 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog, handleSizeChangeCl useEffect(() => { requestServer(`${GET_TRANSPORTATION_ASSISTANCE_DETAILS}/${rowId}`, 'get') .then((response) => { - if (response.data.data.histories.length !== 0) { + if (response.data.data.latest_histories.length !== 0) { let latest_attachments = [] let attachments = [] - response.data.data.histories.map((allAttachment) => { + response.data.data.latest_histories.map((allAttachment) => { if (allAttachment.previous_state_id !== 4) return if (!latest_attachments.includes(allAttachment.previous_state_id)) {