From 4a0cfa03a5852f5e4efabc4c027e56d87ec182e4 Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Thu, 28 Mar 2024 08:22:00 +0100 Subject: [PATCH] Family pending task start popout style changed --- src/components/ImageCon/ImageElement.jsx | 9 +++ .../jobPopout/FamilyOfferJobPopout.jsx | 60 ++++++++++--------- 2 files changed, 40 insertions(+), 29 deletions(-) create mode 100644 src/components/ImageCon/ImageElement.jsx diff --git a/src/components/ImageCon/ImageElement.jsx b/src/components/ImageCon/ImageElement.jsx new file mode 100644 index 0000000..fdc6285 --- /dev/null +++ b/src/components/ImageCon/ImageElement.jsx @@ -0,0 +1,9 @@ +import React from 'react' + +export default function ImageElement({className, src, alt}) { + return ( +
+ {alt} +
+ ) +} diff --git a/src/components/jobPopout/FamilyOfferJobPopout.jsx b/src/components/jobPopout/FamilyOfferJobPopout.jsx index 8651be7..ff3b60f 100644 --- a/src/components/jobPopout/FamilyOfferJobPopout.jsx +++ b/src/components/jobPopout/FamilyOfferJobPopout.jsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import React, { Suspense, lazy, useState } from "react"; import Detail from "./popoutcomponent/Detail"; import ModalCom from "../Helpers/ModalCom"; import { useNavigate } from "react-router-dom"; @@ -12,6 +12,9 @@ import { useDispatch } from "react-redux"; import { SocketValues } from "../Contexts/SocketIOContext"; +const VideoElement = lazy(() => import("../VideoCom/VideoElement")); +const ImageElement = lazy(() => import("../ImageCon/ImageElement")); + function FamilyOfferJobPopout({ details, onClose, situation }) { const {parentAssignJobToKid} = SocketValues() @@ -118,8 +121,6 @@ function FamilyOfferJobPopout({ details, onClose, situation }) { }); }; - console.log(details) - return (
@@ -153,12 +154,9 @@ function FamilyOfferJobPopout({ details, onClose, situation }) {
-
-
+
+
-
- banner -

{details.title} @@ -208,7 +206,22 @@ function FamilyOfferJobPopout({ details, onClose, situation }) {

{/* ACTION SECTION */} -
+
+ { details.job_type == 'TASK' ? +
+ Loading...

}> + +
+
+ : +
+
+ Loading...

}> + +
+
+
+ }
{requestStatus.loading && requestStatus.trigger == "offer" ? ( @@ -238,30 +251,19 @@ function FamilyOfferJobPopout({ details, onClose, situation }) { )}
*/} - - {/* ERROR DISPLAY AND SUBMIT BUTTON */} - {requestStatus.message != "" && - (!requestStatus.status ? ( -
- {requestStatus.message} -
- ) : ( - requestStatus.status && ( -
- {requestStatus.message} -
- ) - ))} - {/* End of error or success display */}
{/* close button */} -
+
+ {/* ERROR DISPLAY AND SUBMIT BUTTON */} +
+ {requestStatus.message} +
+ {/* End of error or success display */} +