Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 123ed2056a | |||
| 153bc7ab7d | |||
| 054688af8b | |||
| 9994ccc26a | |||
| f5c24ffb0c |
@@ -117,7 +117,7 @@ export default function FamilyManageTabs({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`update-table w-full bg-white dark:bg-dark-white overflow-y-auto rounded-2xl section-shadow min-h-[520px] max-h-[600px] ${
|
className={`w-full bg-white dark:bg-dark-white overflow-y-auto rounded-2xl section-shadow min-h-[520px] max-h-[600px] ${
|
||||||
className || ""
|
className || ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -5,16 +5,12 @@ import { handlePagingFunc } from "../../Pagination/HandlePagination";
|
|||||||
import PaginatedList from "../../Pagination/PaginatedList";
|
import PaginatedList from "../../Pagination/PaginatedList";
|
||||||
import LoadingSpinner from "../../Spinners/LoadingSpinner";
|
import LoadingSpinner from "../../Spinners/LoadingSpinner";
|
||||||
import Icons from "../../Helpers/Icons";
|
import Icons from "../../Helpers/Icons";
|
||||||
|
import { PriceFormatter } from "../../Helpers/PriceFormatter";
|
||||||
|
|
||||||
export default function FamilyTasks({ familyData, className, loader }) {
|
export default function FamilyTasks({ familyData, className, loader }) {
|
||||||
const filterCategories = ["All Categories", "Explore", "Featured"];
|
|
||||||
const [selectedCategory, setCategory] = useState(filterCategories[0]);
|
|
||||||
|
|
||||||
let navigate = useNavigate();
|
let navigate = useNavigate();
|
||||||
let { pathname } = useLocation();
|
let { pathname } = useLocation();
|
||||||
|
|
||||||
let data = ["1", "2", "3", "4", "5", "6"]; // to be replaced later by result from API CALL
|
|
||||||
|
|
||||||
const [currentPage, setCurrentPage] = useState(0);
|
const [currentPage, setCurrentPage] = useState(0);
|
||||||
const indexOfFirstItem = Number(currentPage);
|
const indexOfFirstItem = Number(currentPage);
|
||||||
const indexOfLastItem =
|
const indexOfLastItem =
|
||||||
@@ -24,10 +20,7 @@ export default function FamilyTasks({ familyData, className, loader }) {
|
|||||||
indexOfLastItem
|
indexOfLastItem
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const handlePagination = (e) => handlePagingFunc(e, setCurrentPage);
|
||||||
const handlePagination = (e) => {
|
|
||||||
handlePagingFunc(e, setCurrentPage);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@@ -52,8 +45,14 @@ export default function FamilyTasks({ familyData, className, loader }) {
|
|||||||
familyData?.result_list &&
|
familyData?.result_list &&
|
||||||
familyData.result_list.length > 0 &&
|
familyData.result_list.length > 0 &&
|
||||||
currentTask.map((value, index) => {
|
currentTask.map((value, index) => {
|
||||||
// find due date
|
// find due date
|
||||||
const dueDate = value?.delivery_date.split(" ")[0]
|
const dueDate = value?.delivery_date.split(" ")[0];
|
||||||
|
// the price
|
||||||
|
let thePrice = PriceFormatter(
|
||||||
|
value?.price * 0.01,
|
||||||
|
value?.currency_code,
|
||||||
|
value?.currency
|
||||||
|
);
|
||||||
return (
|
return (
|
||||||
<tr
|
<tr
|
||||||
key={index}
|
key={index}
|
||||||
@@ -73,37 +72,42 @@ export default function FamilyTasks({ familyData, className, loader }) {
|
|||||||
{value.title}
|
{value.title}
|
||||||
</h1>
|
</h1>
|
||||||
<div className="flex gap-4 items-center">
|
<div className="flex gap-4 items-center">
|
||||||
<span className="text-sm text-thin-light-gray">
|
<span className="text-sm text-thin-light-gray">
|
||||||
Price:{" "}
|
Price:{" "}
|
||||||
<span className="text-purple">
|
<span className="text-purple">
|
||||||
{value.price * 0.01}
|
{thePrice}
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
<span className="text-sm text-thin-light-gray">
|
||||||
<span className="text-sm text-thin-light-gray">
|
Duration:{" "}
|
||||||
Duration:{" "}
|
<span className="text-purple">
|
||||||
<span className="text-purple">
|
{" "}
|
||||||
{" "}
|
{value.timeline_days} day(s)
|
||||||
{value.timeline_days} day(s)
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
<span className="text-sm text-thin-light-gray">
|
||||||
<span className="text-sm text-thin-light-gray">
|
Due Date:{" "}
|
||||||
Due Date:{" "}
|
<span className="text-purple">
|
||||||
<span className="text-purple">
|
{" "}
|
||||||
{" "}
|
{dueDate}
|
||||||
{dueDate}
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td className="text-right py-4 px-2">
|
<td className="text-right py-4 px-2">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigate("/manage-active-job", {
|
navigate("/manage-active-job", {
|
||||||
state: { ...value, pathname },
|
state: {
|
||||||
|
...value,
|
||||||
|
pathname,
|
||||||
|
dueDate,
|
||||||
|
thePrice,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
|
className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
|
||||||
@@ -112,7 +116,7 @@ export default function FamilyTasks({ familyData, className, loader }) {
|
|||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
)
|
);
|
||||||
})}
|
})}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,13 +68,13 @@ export default function InputCom({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className={`input-wrapper border border-[#f5f8fa] dark:border-[#5e6278] w-full rounded-[0.475rem] h-[42px] overflow-hidden relative font-medium leading-6 bg-clip-padding text-[#5e6278] dark:text-gray-100 bg-[#f5f8fa] dark:bg-[#5e6278] text-base ${inputClass}`}
|
className={`input-wrapper border border-[#f5f8fa] dark:border-[#5e6278] w-full rounded-full h-[42px] overflow-hidden relative font-medium leading-6 bg-clip-padding text-[#5e6278] dark:text-gray-100 bg-[#f5f8fa] dark:bg-[#5e6278] text-base ${inputClass}`}
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
value={value}
|
value={value}
|
||||||
onChange={inputHandler}
|
onChange={inputHandler}
|
||||||
className={`input-field placeholder:text-base text-dark-gray w-full h-full ${
|
className={`input-field placeholder:text-base text-dark-gray w-full h-full tracking-wide ${
|
||||||
inputBg ? inputBg : "bg-[#FAFAFA]"
|
inputBg ? inputBg : "bg-[#FAFAFA]"
|
||||||
} dark:bg-[#11131F] focus:ring-0 focus:outline-none ${fieldClass}`}
|
} dark:bg-[#11131F] focus:ring-0 focus:outline-none ${fieldClass}`}
|
||||||
type={type}
|
type={type}
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ export default function History() {
|
|||||||
</div>
|
</div>
|
||||||
{/* END OF RECENT ACTIVITY SECTION */}
|
{/* END OF RECENT ACTIVITY SECTION */}
|
||||||
</div>
|
</div>
|
||||||
<HistoryTable />
|
{/*<HistoryTable />*/}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ function ReferralTable({history}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex flex-col justify-between h-full'>
|
<div className='flex flex-col justify-between min-h-[420px] overflow-x-auto'>
|
||||||
<table className="referral-list w-full table-auto border-collapse text-left">
|
<table className="referral-list w-full table-auto border-collapse text-left">
|
||||||
<thead className='border-b-2'>
|
<thead className='border-b-2'>
|
||||||
<tr className='text-slate-600'>
|
<tr className='text-slate-600'>
|
||||||
|
|||||||
@@ -116,10 +116,21 @@ function ReferralDisplay() {
|
|||||||
}, [refHistoryReload]);
|
}, [refHistoryReload]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="content-wrapper w-full lg:flex xl:space-x-8 lg:space-x-4 bottomMargin">
|
<div className="content-wrapper w-full lg:flex xl:space-x-8 bottomMargin">
|
||||||
<div className="lg:w-1/2 w-full mb-10 lg:mb-0">
|
<div className="lg:w-2/2 w-full mb-10 lg:mb-0">
|
||||||
<div className="referral w-full md:p-8 p-4 h-full bg-white dark:bg-dark-white rounded-2xl shadow">
|
<div className="sm:flex justify-between items-center mb-6">
|
||||||
<h2 className="text-slate-900 dark:text-white text-xl lg:text-2xl font-medium">
|
<div className="mb-5 sm:mb-0">
|
||||||
|
<h1 className="text-26 font-bold inline-flex gap-3 text-dark-gray dark:text-white items-center">
|
||||||
|
<span>
|
||||||
|
Refer a Friend
|
||||||
|
</span>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="referral w-full md:p-8 p-4 bg-white dark:bg-dark-white rounded-2xl shadow">
|
||||||
|
<h2 className="mb-4 text-slate-900 dark:text-white text-xl lg:text-2xl font-medium">
|
||||||
Send Referral
|
Send Referral
|
||||||
</h2>
|
</h2>
|
||||||
<Formik
|
<Formik
|
||||||
@@ -129,42 +140,44 @@ function ReferralDisplay() {
|
|||||||
>
|
>
|
||||||
{(props) => (
|
{(props) => (
|
||||||
<Form className="referral-info">
|
<Form className="referral-info">
|
||||||
{/* Firstname */}
|
<div className="block md:mb-6 md:flex gap-10">
|
||||||
<div className="field w-full mb-6">
|
{/* Firstname */}
|
||||||
<InputCom
|
<div className="field w-full mb-6 md:mb-0">
|
||||||
fieldClass="px-6"
|
<InputCom
|
||||||
label="Firstname"
|
fieldClass="px-6"
|
||||||
type="text"
|
label="Firstname"
|
||||||
name="firstname"
|
type="text"
|
||||||
placeholder="Firstname"
|
name="firstname"
|
||||||
value={props.values.firstname}
|
placeholder="Firstname"
|
||||||
inputHandler={props.handleChange}
|
value={props.values.firstname}
|
||||||
blurHandler={props.handleBlur}
|
inputHandler={props.handleChange}
|
||||||
/>
|
blurHandler={props.handleBlur}
|
||||||
{props.errors.firstname && props.touched.firstname && (
|
/>
|
||||||
<p className="text-sm text-red-500">
|
{props.errors.firstname && props.touched.firstname && (
|
||||||
{props.errors.firstname}
|
<p className="text-sm text-red-500">
|
||||||
</p>
|
{props.errors.firstname}
|
||||||
)}
|
</p>
|
||||||
</div>
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Lastname */}
|
{/* Lastname */}
|
||||||
<div className="field w-full mb-6">
|
<div className="field w-full mb-6 md:mb-0">
|
||||||
<InputCom
|
<InputCom
|
||||||
fieldClass="px-6"
|
fieldClass="px-6"
|
||||||
label="Lastname"
|
label="Lastname"
|
||||||
type="text"
|
type="text"
|
||||||
name="lastname"
|
name="lastname"
|
||||||
placeholder="Lastname"
|
placeholder="Lastname"
|
||||||
value={props.values.lastname}
|
value={props.values.lastname}
|
||||||
inputHandler={props.handleChange}
|
inputHandler={props.handleChange}
|
||||||
blurHandler={props.handleBlur}
|
blurHandler={props.handleBlur}
|
||||||
/>
|
/>
|
||||||
{props.errors.lastname && props.touched.lastname && (
|
{props.errors.lastname && props.touched.lastname && (
|
||||||
<p className="text-sm text-red-500">
|
<p className="text-sm text-red-500">
|
||||||
{props.errors.lastname}
|
{props.errors.lastname}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="field w-full mb-6">
|
<div className="field w-full mb-6">
|
||||||
@@ -193,8 +206,7 @@ function ReferralDisplay() {
|
|||||||
) : (
|
) : (
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
className="text-lg text-white bg-sky-blue p-2 hover:opacity-90 rounded-md"
|
className="px-2 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white" >
|
||||||
>
|
|
||||||
Send Message
|
Send Message
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
@@ -203,20 +215,20 @@ function ReferralDisplay() {
|
|||||||
)}
|
)}
|
||||||
</Formik>
|
</Formik>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="lg:w-1/2 w-full mb-10 lg:mb-0">
|
<div className="w-full md:p-8 p-4 bg-white dark:bg-dark-white rounded-2xl shadow">
|
||||||
<div className="referral w-full md:p-8 p-4 h-full max-h-[700px] bg-white dark:bg-dark-white overflow-y-auto rounded-2xl shadow">
|
|
||||||
<h2 className="mb-2 text-slate-900 dark:text-white text-xl lg:text-2xl font-medium">
|
<h2 className="mb-2 text-slate-900 dark:text-white text-xl lg:text-2xl font-medium">
|
||||||
Referral List
|
Referral List
|
||||||
</h2>
|
</h2>
|
||||||
{referralList.loading ? (
|
{referralList.loading ? (
|
||||||
<LoadingSpinner size="32" color="sky-blue" />
|
<LoadingSpinner size="32" color="sky-blue" />
|
||||||
) : (
|
) : (
|
||||||
<ReferralTable history={referralList} />
|
<ReferralTable history={referralList} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
src: url("./assets/fonts/Product Sans Bold.ttf");
|
src: url("./assets/fonts/Product Sans Bold.ttf");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.referral{
|
||||||
|
margin-bottom: 20px
|
||||||
|
}
|
||||||
.heroSilderTitle{
|
.heroSilderTitle{
|
||||||
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
|
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
|
||||||
font-family: sans; color: white;
|
font-family: sans; color: white;
|
||||||
|
|||||||
Reference in New Issue
Block a user