Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 985afa3c7b | |||
| 70d82d89b3 | |||
| 7f5eccb3b7 | |||
| 6729b780bd | |||
| 06224f121a | |||
| dc91649114 | |||
| 22f6eb436d | |||
| f2ab0cd6c9 | |||
| a2819786ae | |||
| 6cd92f6372 | |||
| 7173901c9b | |||
| 380d014964 |
+3
-2
@@ -21,9 +21,10 @@ services:
|
||||
- backend.wrenchboard.api.live:10.10.33.15
|
||||
- backend.wrenchboard.api.test:10.10.33.15
|
||||
- apigate.lotus.g1.wrenchboard.com:10.10.33.15
|
||||
- apigate.nebula.g1.wrenchboard.com:10.10.33.15
|
||||
- apigate.orion.g1.wrenchboard.com:10.10.33.15
|
||||
# #- backend.wrenchboard.api.live:172.31.4.27
|
||||
# #- backend.wrenchboard.api.test:10.20.30.27
|
||||
- socket-dev.wrenchboard.com:10.10.33.15
|
||||
- socket.wrenchboard.com:10.10.33.15
|
||||
- apigateway.wrenchboard.app.dev.fluxtra.net:10.20.30.19
|
||||
- apigateway.wrenchboard.app.lotus.fluxtra.net:172.31.4.19
|
||||
environment:
|
||||
|
||||
@@ -30,11 +30,21 @@ export default function SocketIOContextProvider({children}) {
|
||||
}
|
||||
};
|
||||
|
||||
const marketUpdate = (message, room) => {
|
||||
if(message && room){
|
||||
socket.emit("marketjob_addded", { message, room });
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
socket.on("receive_message", (data) => {
|
||||
// setSocketMsgReceived(data.message);
|
||||
dispatch(tableReload({type:'CHATMESSAGELIST'}))
|
||||
});
|
||||
socket.on("received_refreshmarket_jobs", (data) => {
|
||||
// setSocketMsgReceived(data.message);
|
||||
dispatch(tableReload({type:'MARKETTABLELIST'}))
|
||||
});
|
||||
}, [socket]);
|
||||
|
||||
let values = {
|
||||
@@ -43,6 +53,7 @@ export default function SocketIOContextProvider({children}) {
|
||||
joinRoom,
|
||||
setSocketMsgReceived,
|
||||
socketMsgReceived,
|
||||
marketUpdate,
|
||||
// room,
|
||||
// setRoom,
|
||||
// message,
|
||||
|
||||
@@ -186,9 +186,7 @@ const AssignTaskPopout = React.memo(
|
||||
setRequestStatus({ loading: false, status: false, message: "" });
|
||||
}, 5000);
|
||||
});
|
||||
};
|
||||
|
||||
console.log(details);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -196,9 +194,13 @@ const AssignTaskPopout = React.memo(
|
||||
<div className="w-11/12 lg:w-[700px] bg-white dark:bg-dark-white lg:rounded-2xl overflow-y-auto">
|
||||
<div className="w-full flex items-center justify-between lg:px-10 lg:py-8 px-[30px] py-[23px] border-b dark:border-[#5356fb29] border-light-purple">
|
||||
<h1 className="text-26 font-bold text-dark-gray dark:text-white tracking-wide flex items-center">
|
||||
<>
|
||||
Assign task to{" "}
|
||||
{pathname === "/acc-family/activities" ? (
|
||||
{details ? (
|
||||
` Assign ${details?.firstname}'s Task`
|
||||
) : familyDetailsData ? (
|
||||
` Assign ${familyDetailsData.firstname}'s Task`
|
||||
) : (
|
||||
<div className="flex items-center">
|
||||
Assign task to{" "}
|
||||
<div className="w-[270px] h-[40px] ml-2">
|
||||
<select
|
||||
name=""
|
||||
@@ -213,10 +215,8 @@ const AssignTaskPopout = React.memo(
|
||||
{familyList}
|
||||
</select>
|
||||
</div>
|
||||
) : (
|
||||
<>{familyDetailsData?.firstname || details?.firstName}</>
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
)}
|
||||
</h1>
|
||||
<button
|
||||
type="button"
|
||||
@@ -443,9 +443,11 @@ const AssignTaskPopout = React.memo(
|
||||
onClick={assignFamilyTask}
|
||||
className="px-1 w-40 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white cursor-pointer"
|
||||
>
|
||||
{`Assign to ${
|
||||
familyDetailsData?.firstname || details?.firstName
|
||||
}`}
|
||||
{details
|
||||
? `Assign task to ${details?.firstname}`
|
||||
: familyDetailsData
|
||||
? `Assign task to ${familyDetailsData.firstname}`
|
||||
: "Assign"}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -86,7 +86,7 @@ const SuggestTask = ({ details, onClose, situation, continuePopupData }) => {
|
||||
<ModalCom action={onClose} situation={situation}>
|
||||
<div className="logout-modal-wrapper lw-[90%] md:w-[768px] h-full lg:h-auto bg-white dark:bg-dark-white lg:rounded-2xl overflow-y-auto">
|
||||
<div className="logout-modal-header w-full flex items-center justify-between lg:p-6 px-[30px] py-[23px] border-b dark:border-[#5356fb29] border-light-purple">
|
||||
<h1 className="text-base md:text-lg font-bold text-dark-gray dark:text-white tracking-wide">
|
||||
<h1 className="text-26 font-bold text-dark-gray dark:text-white tracking-wide">
|
||||
{isManageFamilyPage
|
||||
? `${state?.firstname}'s Suggested Task`
|
||||
: isActivitiesPage
|
||||
|
||||
@@ -8,6 +8,7 @@ import InputCom from "../Helpers/Inputs/InputCom/index";
|
||||
import ModalCom from "../Helpers/ModalCom";
|
||||
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
||||
import Detail from "./popoutcomponent/Detail";
|
||||
import { SocketValues } from "../Contexts/SocketIOContext";
|
||||
|
||||
const validationSchema = Yup.object().shape({
|
||||
family: Yup.string().required("This is required "),
|
||||
@@ -29,6 +30,9 @@ function JobListPopout({
|
||||
openWallet,
|
||||
setWalletItem,
|
||||
}) {
|
||||
|
||||
let {marketUpdate} = SocketValues() // destructures 'SEND MESSAGE' and 'JOIN ROOM' FUNCTIONS FROM SOCKET
|
||||
|
||||
const [selectedTab, setSelectedTab] = useState("public");
|
||||
const tabs = ["public", "individual", "group"];
|
||||
|
||||
@@ -201,7 +205,9 @@ function JobListPopout({
|
||||
setRequestStatus({ message: "", status: false });
|
||||
}, 3000);
|
||||
}
|
||||
dispatch(tableReload({ type: "JOBTABLE" }));
|
||||
marketUpdate('market', 'full-markets-jobs') // sends an event to the socket to update market lists
|
||||
dispatch(tableReload({ type: "JOBTABLE" })); // reloads my job page
|
||||
dispatch(tableReload({ type: "MARKETTABLELIST" })); // reloads market page
|
||||
setRequestStatus({ message: data?.status_msg ? data?.status_msg : "Offer Assigned Successful", status: true });
|
||||
setTimeout(() => {
|
||||
setLoader({ jobFields: false });
|
||||
@@ -224,6 +230,12 @@ function JobListPopout({
|
||||
members: [],
|
||||
});
|
||||
|
||||
const DetailsSection = ({ label, value }) => (
|
||||
<div className="my-3 md:flex">
|
||||
<Detail label={label} value={value} />
|
||||
</div>
|
||||
);
|
||||
|
||||
// FUNCTION TO POPULATE USER GROUP LIST
|
||||
useEffect(() => {
|
||||
// setGroupList({loading: true, groups: [], members: []})
|
||||
@@ -250,12 +262,6 @@ function JobListPopout({
|
||||
});
|
||||
}, []);
|
||||
|
||||
const DetailsSection = ({ label, value }) => (
|
||||
<div className="my-3 md:flex">
|
||||
<Detail label={label} value={value} />
|
||||
</div>
|
||||
);
|
||||
|
||||
const DetailsComponent = () => {
|
||||
const detailsArray = [
|
||||
{ label: "Description", value: details.description },
|
||||
|
||||
@@ -14,8 +14,12 @@ import { updateWalletDetails } from "../store/walletDetails";
|
||||
import { familyBannersList } from "../store/FamilyBannerList";
|
||||
import { familyResources } from "../store/FamilyResources";
|
||||
import {familyWalletRedeemOptList} from '../store/FamilyWalletRedeemOpt'
|
||||
import { SocketValues } from "../components/Contexts/SocketIOContext";
|
||||
|
||||
const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
|
||||
let {joinRoom} = SocketValues() // destructures 'SEND MESSAGE' and 'JOIN ROOM' FUNCTIONS FROM SOCKET
|
||||
|
||||
const apiCall = useMemo(() => new usersService(), []);
|
||||
const dispatch = useDispatch();
|
||||
const [lastActivityTime, setLastActivityTime] = useState(Date.now());
|
||||
@@ -23,7 +27,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
const [loadProfileDetails, setLoadProfileDetails] = useState([]);
|
||||
const navigate = useNavigate();
|
||||
|
||||
const { jobListTable, walletTable, familyBannersListTable } = useSelector(
|
||||
const { jobListTable, marketTableList, walletTable, familyBannersListTable } = useSelector(
|
||||
(state) => state.tableReload
|
||||
);
|
||||
|
||||
@@ -219,7 +223,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
}
|
||||
};
|
||||
getMarketActiveJobList();
|
||||
}, [apiCall, dispatch, jobListTable, isLogin.status]);
|
||||
}, [apiCall, dispatch, marketTableList, isLogin.status]);
|
||||
|
||||
//FUNCTION TO GET COMMON HEAD DATA
|
||||
useEffect(() => {
|
||||
@@ -309,6 +313,10 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
familyWalletRedeemOptions()
|
||||
}, [isLogin.status]);
|
||||
|
||||
useEffect(()=>{ // sends an event to the socket to enable user join a room to be able to receive update when jobs enters the market
|
||||
joinRoom('full-markets-jobs')
|
||||
},[isLogin.status])
|
||||
|
||||
|
||||
// RENDER PAGE
|
||||
return isLogin.loading && !loggedIn ? (
|
||||
|
||||
@@ -10,6 +10,7 @@ const initialState = {
|
||||
uploadsTable: false,
|
||||
familyBannersListTable: false,
|
||||
chatMessageList: false,
|
||||
marketTableList: false,
|
||||
};
|
||||
|
||||
export const tableReloadSlice = createSlice({
|
||||
@@ -45,6 +46,9 @@ export const tableReloadSlice = createSlice({
|
||||
case "CHATMESSAGELIST":
|
||||
state.chatMessageList = !state.chatMessageList;
|
||||
return;
|
||||
case "MARKETTABLELIST":
|
||||
state.marketTableList = !state.marketTableList;
|
||||
return;
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user