This commit is contained in:
2024-05-29 14:14:15 +03:30
parent 0b656ce9cb
commit df4fb98969
2 changed files with 4 additions and 4 deletions

View File

@@ -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]

View File

@@ -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)) {