Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7089b8f14b | |||
| 781f5cc5a6 | |||
| 58097d8b57 | |||
| 630ccefa51 | |||
| ed9f2dec0e | |||
| d2ed29c6a6 | |||
| 4e81156d72 | |||
| e402c02c1f | |||
| 944fd134f6 |
Vendored
+10
-1
@@ -21,5 +21,14 @@
|
|||||||
"emmet.triggerExpansionOnTab": true,
|
"emmet.triggerExpansionOnTab": true,
|
||||||
"emmet.includeLanguages": {
|
"emmet.includeLanguages": {
|
||||||
"javascript": "javascriptreact"
|
"javascript": "javascriptreact"
|
||||||
}
|
},
|
||||||
|
"cSpell.words": [
|
||||||
|
"completesignuplink",
|
||||||
|
"MOBILEUSER",
|
||||||
|
"MYFILES",
|
||||||
|
"mynotifications",
|
||||||
|
"PASSWORDRESET",
|
||||||
|
"TRANSFERSTART",
|
||||||
|
"WRENCHBOARD"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { useEffect, useState } from "react";
|
import React, { Suspense, useEffect, useState } from "react";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { useLocation } from "react-router-dom";
|
import { useLocation } from "react-router-dom";
|
||||||
import usersService from "../../../services/UsersService";
|
import usersService from "../../../services/UsersService";
|
||||||
@@ -23,7 +23,9 @@ const AssignTaskPopout = ({
|
|||||||
|
|
||||||
}) => {
|
}) => {
|
||||||
const {parentAssignJobToKid} = SocketValues()
|
const {parentAssignJobToKid} = SocketValues()
|
||||||
|
|
||||||
const apiCall = new usersService();
|
const apiCall = new usersService();
|
||||||
|
|
||||||
let { pathname, state } = useLocation();
|
let { pathname, state } = useLocation();
|
||||||
|
|
||||||
const {userDetails} = useSelector((state) => state?.userDetails); // CHECKS IF USER Details are avaliable, to determine if user is active
|
const {userDetails} = useSelector((state) => state?.userDetails); // CHECKS IF USER Details are avaliable, to determine if user is active
|
||||||
@@ -219,7 +221,10 @@ const AssignTaskPopout = ({
|
|||||||
setRequestStatus({ loading: false, status: false, message: "" });
|
setRequestStatus({ loading: false, status: false, message: "" });
|
||||||
}, 5000);
|
}, 5000);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let imageSrc = (localStorage.getItem("session_token")
|
||||||
|
? `${userDetails?.session_image_server}${localStorage.getItem("session_token")}/job/${activeTask.data.job_uid}` : ""); // FOR GETTING JOB IMAGE
|
||||||
|
|
||||||
useEffect(()=>{ // effect to update family UID when components mounts
|
useEffect(()=>{ // effect to update family UID when components mounts
|
||||||
if(familyDetailsData?.uid){
|
if(familyDetailsData?.uid){
|
||||||
@@ -231,6 +236,7 @@ const AssignTaskPopout = ({
|
|||||||
}
|
}
|
||||||
},[])
|
},[])
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ModalCom action={action} situation={situation}>
|
<ModalCom action={action} situation={situation}>
|
||||||
@@ -382,25 +388,37 @@ const AssignTaskPopout = ({
|
|||||||
value={activeTask?.data?.description}
|
value={activeTask?.data?.description}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center">
|
<div className="grid grid-cols-2">
|
||||||
<div className="my-3 w-full flex items-center gap-1">
|
<div className="w-full">
|
||||||
<label className="job-label">
|
<div className="my-3 w-full flex items-center gap-1">
|
||||||
Price
|
<label className="job-label">
|
||||||
</label>
|
Price
|
||||||
<p className="p-1 text-sm text-slate-900 dark:text-white">
|
</label>
|
||||||
{PriceFormatter(
|
<p className="p-1 text-sm text-slate-900 dark:text-white">
|
||||||
activeTask?.data?.price * 0.01,
|
{PriceFormatter(
|
||||||
activeTask?.data?.currency,
|
activeTask?.data?.price * 0.01,
|
||||||
activeTask?.data?.curreny_code
|
activeTask?.data?.currency,
|
||||||
)}
|
activeTask?.data?.curreny_code
|
||||||
</p>
|
)}
|
||||||
</div>
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="my-3 w-full flex items-center gap-1">
|
<div className="my-3 w-full flex items-center gap-1">
|
||||||
<label className="job-label">
|
<label className="job-label">
|
||||||
Timeline
|
Timeline
|
||||||
</label>
|
</label>
|
||||||
<p className="p-1 text-sm text-slate-900 dark:text-white">{`${activeTask?.data?.timeline_days} day(s)`}</p>
|
<p className="p-1 text-sm text-slate-900 dark:text-white">{`${activeTask?.data?.timeline_days} day(s)`}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="w-full flex items-center justify-center">
|
||||||
|
<div className="w-28 h-28 rounded-2xl flex items-center justify-center">
|
||||||
|
<img
|
||||||
|
className="w-full h-auto"
|
||||||
|
loading="lazy"
|
||||||
|
src={imageSrc}
|
||||||
|
alt='job image'
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -89,13 +89,13 @@ export default function AddGroup({ action, situation, setUpdateList }) {
|
|||||||
return (
|
return (
|
||||||
<ModalCom action={action} situation={situation}>
|
<ModalCom action={action} situation={situation}>
|
||||||
<div className="logout-modal-wrapper lg:w-[500px] h-full lg:h-auto bg-white dark:bg-dark-white lg:rounded-2xl">
|
<div className="logout-modal-wrapper lg:w-[500px] h-full lg:h-auto bg-white dark:bg-dark-white lg:rounded-2xl">
|
||||||
<div className="logout-modal-header w-full flex items-center justify-between lg:px-10 lg:py-8 px-[30px] py-[23px] border-b border-light-purple dark:border-[#5356fb29] ">
|
<div className="modal-header-con">
|
||||||
<h1 className="text-26 font-bold text-dark-gray dark:text-white tracking-wide">
|
<h1 className="modal-title">
|
||||||
Add Group
|
Add Group
|
||||||
</h1>
|
</h1>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="text-[#374557] dark:text-red-500"
|
className="modal-close-btn"
|
||||||
onClick={action}
|
onClick={action}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
@@ -139,9 +139,9 @@ export default function AddGroup({ action, situation, setUpdateList }) {
|
|||||||
<button
|
<button
|
||||||
onClick={action}
|
onClick={action}
|
||||||
type="button"
|
type="button"
|
||||||
className="text-base text-light-red tracking-wide "
|
className="w-[152px] h-[46px] flex justify-center items-center rounded-full text-base text-light-red tracking-wide border border-light-red"
|
||||||
>
|
>
|
||||||
<span className="border-b dark:border-[#5356fb29] border-light-red">
|
<span className="">
|
||||||
Cancel
|
Cancel
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -21,13 +21,13 @@ export default function DeleteMember({action, situation, details}) {
|
|||||||
situation={situation}
|
situation={situation}
|
||||||
>
|
>
|
||||||
<div className="logout-modal-wrapper lg:w-[500px] h-full lg:h-auto bg-white dark:bg-dark-white lg:rounded-2xl">
|
<div className="logout-modal-wrapper lg:w-[500px] h-full lg:h-auto bg-white dark:bg-dark-white lg:rounded-2xl">
|
||||||
<div className="logout-modal-header w-full flex items-center justify-between lg:px-10 lg:py-8 px-[30px] py-[23px] border-b border-light-purple dark:border-[#5356fb29] ">
|
<div className="modal-header-con">
|
||||||
<h1 className="text-26 font-bold text-dark-gray dark:text-white tracking-wide">
|
<h1 className="modal-title">
|
||||||
Remove Member
|
Remove Member
|
||||||
</h1>
|
</h1>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="text-[#374557] dark:text-red-500"
|
className="modal-close-btn"
|
||||||
onClick={action}
|
onClick={action}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
|
|||||||
@@ -24,12 +24,6 @@ export default function MemberList({
|
|||||||
|
|
||||||
const handleFieldsChange = ({ target: { name, value } }) => {
|
const handleFieldsChange = ({ target: { name, value } }) => {
|
||||||
setFields((prev) => ({ ...prev, [name]: value }));
|
setFields((prev) => ({ ...prev, [name]: value }));
|
||||||
// let error = requestState?.errors?.indexOf(name) //// checks if the input field was in error array and removes it when the input changes
|
|
||||||
// if(error >= 0){
|
|
||||||
// let oldErrorArr = requestState.errors
|
|
||||||
// let newErrorArr = oldErrorArr.splice(error, 1)
|
|
||||||
// setRequestState(prev => ({...prev, errors:oldErrorArr}))
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (value == "") {
|
if (value == "") {
|
||||||
setRequestState({
|
setRequestState({
|
||||||
@@ -89,6 +83,63 @@ export default function MemberList({
|
|||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
if(fields.firstname.length > 25){ // checks if firstname length is more than 25
|
||||||
|
setRequestState({
|
||||||
|
loading: false,
|
||||||
|
status: false,
|
||||||
|
message: "Firstname must not be more than 25 characters",
|
||||||
|
data: [],
|
||||||
|
errors: [],
|
||||||
|
});
|
||||||
|
return setTimeout(() => {
|
||||||
|
setRequestState({
|
||||||
|
loading: false,
|
||||||
|
status: false,
|
||||||
|
message: "",
|
||||||
|
data: [],
|
||||||
|
errors: [],
|
||||||
|
});
|
||||||
|
}, 3000);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(fields.lastname.length > 25){ // checks if lastname length is more than 25
|
||||||
|
setRequestState({
|
||||||
|
loading: false,
|
||||||
|
status: false,
|
||||||
|
message: "Lastname must not be more than 25 characters",
|
||||||
|
data: [],
|
||||||
|
errors: [],
|
||||||
|
});
|
||||||
|
return setTimeout(() => {
|
||||||
|
setRequestState({
|
||||||
|
loading: false,
|
||||||
|
status: false,
|
||||||
|
message: "",
|
||||||
|
data: [],
|
||||||
|
errors: [],
|
||||||
|
});
|
||||||
|
}, 3000);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(fields.email.length > 45){ // checks if email length is more than 45
|
||||||
|
setRequestState({
|
||||||
|
loading: false,
|
||||||
|
status: false,
|
||||||
|
message: "Email must not be more than 45 characters",
|
||||||
|
data: [],
|
||||||
|
errors: [],
|
||||||
|
});
|
||||||
|
return setTimeout(() => {
|
||||||
|
setRequestState({
|
||||||
|
loading: false,
|
||||||
|
status: false,
|
||||||
|
message: "",
|
||||||
|
data: [],
|
||||||
|
errors: [],
|
||||||
|
});
|
||||||
|
}, 3000);
|
||||||
|
}
|
||||||
|
|
||||||
//checks if email is a valid email address
|
//checks if email is a valid email address
|
||||||
let regEx = /^[^0-9][a-zA-Z0-9._%+-]+@[a-zA-Z]+(\.[a-zA-Z]+)+$/;
|
let regEx = /^[^0-9][a-zA-Z0-9._%+-]+@[a-zA-Z]+(\.[a-zA-Z]+)+$/;
|
||||||
if (!EmailValidator(fields.email)) {
|
if (!EmailValidator(fields.email)) {
|
||||||
@@ -201,7 +252,7 @@ export default function MemberList({
|
|||||||
{selectedGroup?.name}
|
{selectedGroup?.name}
|
||||||
</h1>
|
</h1>
|
||||||
<div className="w-full flex flex-col-reverse lg:flex-col">
|
<div className="w-full flex flex-col-reverse lg:flex-col">
|
||||||
<div className="py-3 w-full">
|
<div className="relative py-3 w-full">
|
||||||
<div className="relative grid grid-cols-1 sm:grid-cols-2 gap-2 place-content-center">
|
<div className="relative grid grid-cols-1 sm:grid-cols-2 gap-2 place-content-center">
|
||||||
<div className="input-item">
|
<div className="input-item">
|
||||||
<InputCom
|
<InputCom
|
||||||
@@ -229,13 +280,15 @@ export default function MemberList({
|
|||||||
// iconName="message"
|
// iconName="message"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="input-item w-full">
|
</div>
|
||||||
|
<div className="sm:flex gap-2 items-center">
|
||||||
|
<div className="input-item my-2 w-full sm:w-9/12">
|
||||||
<InputCom
|
<InputCom
|
||||||
labelClass="tracking-wider"
|
labelClass="tracking-wider"
|
||||||
fieldClass="sm:px-6 px-2"
|
fieldClass="sm:px-6 px-2"
|
||||||
value={fields.email}
|
value={fields.email}
|
||||||
inputHandler={handleFieldsChange}
|
inputHandler={handleFieldsChange}
|
||||||
inputClass="xl:w-[16rem] 2xl:w-full"
|
inputClass=""
|
||||||
placeholder="Email"
|
placeholder="Email"
|
||||||
// label="Email"
|
// label="Email"
|
||||||
name="email"
|
name="email"
|
||||||
@@ -243,7 +296,7 @@ export default function MemberList({
|
|||||||
// iconName="message"
|
// iconName="message"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex justify-end items-end">
|
<div className="flex justify-end items-end w-full sm:w-3/12">
|
||||||
{requestState.loading ? (
|
{requestState.loading ? (
|
||||||
<LoadingSpinner size="8" color="sky-blue" />
|
<LoadingSpinner size="8" color="sky-blue" />
|
||||||
) : (
|
) : (
|
||||||
@@ -266,10 +319,11 @@ export default function MemberList({
|
|||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="absolute top-full w-full my-1 text-center">
|
||||||
{!requestState.loading && requestState.message && (
|
{!requestState.loading && requestState.message && (
|
||||||
<p
|
<p
|
||||||
className={`text-lg absolute -bottom-7 left-0 ${
|
className={`text-base ${
|
||||||
requestState.status ? "text-green-500" : "text-red-500"
|
requestState.status ? "text-green-500" : "text-red-500"
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -119,8 +119,8 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
|
|||||||
return (
|
return (
|
||||||
<ModalCom action={onClose} situation={situation}>
|
<ModalCom action={onClose} situation={situation}>
|
||||||
<div className="logout-modal-wrapper w-11/12 md:w-[650px] md:h-[580px] h-full bg-white dark:bg-dark-white lg:rounded-2xl overflow-y-auto">
|
<div className="logout-modal-wrapper w-11/12 md:w-[650px] md:h-[580px] h-full 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]">
|
<div className="modal-header-con">
|
||||||
<h1 className="text-26 font-bold text-dark-gray dark:text-white tracking-wide">
|
<h1 className="modal-title">
|
||||||
{details.offer_code}
|
{details.offer_code}
|
||||||
</h1>
|
</h1>
|
||||||
<CloseIcon onClose={onClose} />
|
<CloseIcon onClose={onClose} />
|
||||||
@@ -153,7 +153,7 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
|
|||||||
},
|
},
|
||||||
].map(({ name, content, danger }, idx) => (
|
].map(({ name, content, danger }, idx) => (
|
||||||
<div className={`my-3 md:flex items-center`} key={idx}>
|
<div className={`my-3 md:flex items-center`} key={idx}>
|
||||||
<label className="w-full md:w-[19%] tracking-wide font-semibold whitespace-pre-wrap">
|
<label className="job-label w-full md:w-[19%]">
|
||||||
{name}
|
{name}
|
||||||
</label>
|
</label>
|
||||||
<div
|
<div
|
||||||
@@ -198,7 +198,7 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
|
|||||||
<hr />
|
<hr />
|
||||||
<div className="w-full flex flex-col gap-3">
|
<div className="w-full flex flex-col gap-3">
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
<label className="w-full text-slate-900 dark:text-white tracking-wide font-semibold">
|
<label className="job-label w-full">
|
||||||
If you have any questions about this task:
|
If you have any questions about this task:
|
||||||
</label>
|
</label>
|
||||||
<textarea
|
<textarea
|
||||||
@@ -235,7 +235,7 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
|
|||||||
<div className="w-full md:w-[23%] h-full flex flex-col">
|
<div className="w-full md:w-[23%] h-full flex flex-col">
|
||||||
<div className="mx-auto bg-[#f1f8ff] dark:bg-[#C2C8D3] px-4 rounded-md md:min-h-[420px] flex flex-col justify-between">
|
<div className="mx-auto bg-[#f1f8ff] dark:bg-[#C2C8D3] px-4 rounded-md md:min-h-[420px] flex flex-col justify-between">
|
||||||
<div className="w-full flex flex-col justify-center pb-4 gap-2">
|
<div className="w-full flex flex-col justify-center pb-4 gap-2">
|
||||||
<p className="w-full text-slate-900 tracking-wide my-1 font-semibold">
|
<p className="job-label w-full">
|
||||||
Interested in the task?
|
Interested in the task?
|
||||||
</p>
|
</p>
|
||||||
<hr />
|
<hr />
|
||||||
@@ -270,10 +270,13 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
|
|||||||
|
|
||||||
<div className="text-slate-900">
|
<div className="text-slate-900">
|
||||||
<p className="flex items-center tracking-wide">
|
<p className="flex items-center tracking-wide">
|
||||||
Interest: <b className="ml-1">{details.interest_count}</b>
|
<span className="job-label">Interest: </span> <b className="ml-1">{details.interest_count}</b>
|
||||||
</p>
|
</p>
|
||||||
<hr />
|
<hr />
|
||||||
<p className="my-1">Expire: {details.expire}</p>
|
<p className="my-1 flex flex-col">
|
||||||
|
<span className="job-label">Expire: </span>
|
||||||
|
<span> {new Date(details.expire).toLocaleString()} </span>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
@@ -296,7 +299,7 @@ export default MarketPopUp;
|
|||||||
const CloseIcon = ({ onClose }) => (
|
const CloseIcon = ({ onClose }) => (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="text-[#374557] dark:text-red-500"
|
className="modal-close-btn"
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
|
|||||||
@@ -546,13 +546,13 @@ function ActiveJobs(props) {
|
|||||||
|
|
||||||
{/* MESSAGE SECTION */}
|
{/* MESSAGE SECTION */}
|
||||||
<div className="w-full lg:w-1/2">
|
<div className="w-full lg:w-1/2">
|
||||||
<div className="flex justify-between items-center gap-5">
|
<div className="flex justify-between items-center gap-5 justify-between">
|
||||||
<p className="w-full text-lg font-bold text-dark-gray dark:text-white tracking-wide flex items-center gap-2">
|
<p className="w-full text-lg font-bold text-dark-gray dark:text-white tracking-wide flex items-center gap-2 justify-between">
|
||||||
<span>Message</span>
|
<span>Message</span>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={popUpHandler}
|
onClick={popUpHandler}
|
||||||
className="text-[12px] tracking-wider text-emerald-600 dark:text-emerald-300"
|
className="text-[12px] tracking-wider text-gray-400 dark:text-slate-400"
|
||||||
>
|
>
|
||||||
View all
|
View all
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user