get api
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user