Message
diff --git a/src/components/attachmentCom/AttachFile.jsx b/src/components/attachmentCom/AttachFile.jsx
index 9e5a532..1e0a662 100644
--- a/src/components/attachmentCom/AttachFile.jsx
+++ b/src/components/attachmentCom/AttachFile.jsx
@@ -4,7 +4,7 @@ import axios from 'axios'
import usersService from '../../services/UsersService'
-export default function AttachFile({data}) {
+export default function AttachFile({data='', showOnData=false}) {
const apiCall = new usersService()
@@ -62,7 +62,7 @@ export default function AttachFile({data}) {
}
useEffect(()=>{
- apiCall.jobManagerFiles({job_uid:data?.job_uid}).then(res => {
+ apiCall.jobManagerFiles({job_uid:data?.job_uid || data?.origin_job_uid}).then(res => {
setUploadedList({loading: false, data:res.data})
}).catch(err => {
console.log(err)
@@ -71,55 +71,99 @@ export default function AttachFile({data}) {
},[data, reloadList])
return (
-
-
-
-
- Files {
- requestStatus.loading ?
-
+ <>
+ {!showOnData ?
+
+
+
+
+ Files {
+ requestStatus.loading ?
+
+ :
+ {requestStatus.message}
+ }
+
+
+
+
+ {uploadedList.loading ?
+
+
+
+ :
+ Object.keys(uploadedList.data).length > 0 ?
+ uploadedList.data.result_list.length > 0 ?
+ uploadedList.data.result_list.map((item, index) => {
+ let fileNameExt = item.originalname.split('.')[item.originalname.split('.').length - 1]
+ return(
+
+ )
+ })
:
-
{requestStatus.message}
- }
+
No Uploaded files yet
+ :
+ <>>
+ }
-
+
-
- {uploadedList.loading ?
-
-
-
- :
- Object.keys(uploadedList.data).length > 0 ?
- uploadedList.data.result_list.length > 0 ?
- uploadedList.data.result_list.map((item, index) => (
-
- ))
- :
-
No Uploaded files yet
- :
- <>>
- }
-
-
-
+ :showOnData && uploadedList?.data?.result_list?.length > 0 ?
+
+
+
+
+ {uploadedList.data.result_list.map((item, index) => {
+ let fileNameExt = item.originalname.split('.')[item.originalname.split('.').length - 1]
+ return(
+
+ )
+ })
+ }
+
+
+
+
+ :
+ <>>
+ }
+ >
)
}
diff --git a/src/components/jobPopout/FamilyOfferJobPopout.jsx b/src/components/jobPopout/FamilyOfferJobPopout.jsx
index 4947971..9245485 100644
--- a/src/components/jobPopout/FamilyOfferJobPopout.jsx
+++ b/src/components/jobPopout/FamilyOfferJobPopout.jsx
@@ -11,6 +11,7 @@ import { tableReload } from "../../store/TableReloads";
import { useDispatch } from "react-redux";
import { SocketValues } from "../Contexts/SocketIOContext";
+import AttachFile from "../attachmentCom/AttachFile";
const VideoElement = lazy(() => import("../VideoCom/VideoElement"));
const ImageElement = lazy(() => import("../ImageCon/ImageElement"));
@@ -206,11 +207,11 @@ function FamilyOfferJobPopout({ details, onClose, situation }) {
{/* ACTION SECTION */}
-
+
{ details.job_type == 'TASK' ?
Loading...}>
-
+
:
@@ -222,6 +223,9 @@ function FamilyOfferJobPopout({ details, onClose, situation }) {
}
+
{requestStatus.loading && requestStatus.trigger == "offer" ? (
diff --git a/src/components/jobPopout/popoutcomponent/Detail.jsx b/src/components/jobPopout/popoutcomponent/Detail.jsx
index 21a1b92..ee95a11 100644
--- a/src/components/jobPopout/popoutcomponent/Detail.jsx
+++ b/src/components/jobPopout/popoutcomponent/Detail.jsx
@@ -3,7 +3,7 @@ import React from 'react'
function Detail({label, value, bg,}) {
return (
<>
-
+
{value}
>
)