diff --git a/src/assets/images/qr-sample.png b/src/assets/images/qr-sample.png new file mode 100644 index 0000000..e39f3ca Binary files /dev/null and b/src/assets/images/qr-sample.png differ diff --git a/src/components/AddJob/AddJob.jsx b/src/components/AddJob/AddJob.jsx index bac4931..7bda2ad 100644 --- a/src/components/AddJob/AddJob.jsx +++ b/src/components/AddJob/AddJob.jsx @@ -36,16 +36,6 @@ const validationSchema = Yup.object().shape({ .required("Timeline is required"), }); -// let initialValues = { -// // initial values for formik -// country: "NG", -// price: 0, -// title: "", -// description: "", -// job_detail: "", -// timeline_days: "", -// }; - function AddJob() { const ApiCall = new usersService(); const navigate = useNavigate(); diff --git a/src/components/FamilyAcc/FamilyManageTabs.jsx b/src/components/FamilyAcc/FamilyManageTabs.jsx index c17f860..fc32640 100644 --- a/src/components/FamilyAcc/FamilyManageTabs.jsx +++ b/src/components/FamilyAcc/FamilyManageTabs.jsx @@ -7,6 +7,7 @@ import React, { } from "react"; import LoadingSpinner from "../Spinners/LoadingSpinner"; import profile from "../../assets/images/profile-info-profile.png"; +import qrSample from "../../assets/images/qr-sample.png"; import usersService from "../../services/UsersService"; import FamilyTasks from "./FamilyTasks"; @@ -99,7 +100,7 @@ export default function FamilyManageTabs({ accountDetails={accountDetails} /> -
Username: ${familyDetails?.username}
+Password: ${familyDetails?.pin}
++ Scan the code from mobile app +
+
@@ -316,3 +330,16 @@ const EditJobPopOut = ({ details, onClose, situation, country }) => {
};
export default EditJobPopOut;
+
+const publicArray = [
+ { duration: 1, name: "1 day" },
+ { duration: 2, name: "2 days" },
+ { duration: 3, name: "3 days" },
+ { duration: 4, name: "4 days" },
+ { duration: 5, name: "5 days" },
+ { duration: 6, name: "6 days" },
+ { duration: 7, name: "1 week" },
+ { duration: 14, name: "2 weeks" },
+ { duration: 21, name: "3 weeks" },
+ { duration: 28, name: "4 weeks" },
+];
diff --git a/src/components/jobPopout/JobListPopout.jsx b/src/components/jobPopout/JobListPopout.jsx
index cdb37da..caedf82 100644
--- a/src/components/jobPopout/JobListPopout.jsx
+++ b/src/components/jobPopout/JobListPopout.jsx
@@ -69,28 +69,49 @@ function JobListPopout({ details, onClose, situation }) {
};
let [textArea, setTextArea] = useState(details?.job_detail);
- const [errMsg, setErrMsg] = useState("")
+ const [errMsg, setErrMsg] = useState({
+ deliveryDetail: "",
+ jobFields: {
+ family: "",
+ public: "",
+ individual: "",
+ group: "",
+ },
+ });
const handleInputChange = ({ target: { value } }) => {
setTextArea(value);
};
- const errorHandler = ({target: {name}}) => {
-
- }
+ const errorHandler = ({ target: { name } }) => {
+ try {
+ if (name === "family")
+ setErrMsg({ jobFields: { family: "please select a family member" } });
+ else if (name === "public")
+ setErrMsg({ jobFields: { public: "please select duration" } });
+ else if (name === "individual")
+ setErrMsg({ jobFields: { individual: "please enter email" } });
+ else if (name === "group")
+ setErrMsg({ jobFields: { group: "please select a family member" } });
+ } finally {
+ setTimeout(() => {
+ setErrMsg({ jobFields: "" });
+ }, 3000);
+ }
+ };
const jobFieldHandler = async (values, helpers) => {
let { job_id, job_uid } = details;
- if(!textArea) {
- setErrMsg("delivery detail is required!")
- return
+ if (!textArea) {
+ setErrMsg({ deliveryDetail: "delivery detail is required!" });
+ return;
}
let jobReq = {
job_id,
job_uid,
- job_description: textArea
+ job_description: textArea,
};
let reqData;
@@ -131,8 +152,7 @@ function JobListPopout({ details, onClose, situation }) {
};
setLoader({ jobFields: { group: true } });
} else {
- setErrMsg("err herre")
- return
+ return;
}
try {
@@ -148,7 +168,7 @@ function JobListPopout({ details, onClose, situation }) {
};
return (
- {errMsg} {errMsg.deliveryDetail}
@@ -218,7 +238,7 @@ function JobListPopout({ details, onClose, situation }) {
value={textArea}
onChange={handleInputChange}
/>
- {/*