Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 123ed2056a |
@@ -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>
|
||||||
)
|
);
|
||||||
})}
|
})}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export default function Accordion({ datas }) {
|
|||||||
<>
|
<>
|
||||||
<div className="accordion-item overflow-hidden relative z-[1]">
|
<div className="accordion-item overflow-hidden relative z-[1]">
|
||||||
<div
|
<div
|
||||||
className="accordion-title-bar flex items-center space-x-3 py-5 border-b border-light-purple dark:border-[#5356fb29] cursor-pointer"
|
className="accordion-title-bar flex items-center space-x-3 py-5 border-b border-light-purple dark:border-[#5356fb29] "
|
||||||
onClick={accordionHandler}
|
onClick={accordionHandler}
|
||||||
>
|
>
|
||||||
<div className="accordion-title-icon relative">
|
<div className="accordion-title-icon relative">
|
||||||
@@ -36,7 +36,7 @@ export default function Accordion({ datas }) {
|
|||||||
<div className="w-[3px] h-auto bg-purple rounded-[28px]"></div>
|
<div className="w-[3px] h-auto bg-purple rounded-[28px]"></div>
|
||||||
<div className="flex-1">
|
<div className="flex-1">
|
||||||
<p className="text-base text-thin-light-gray tracking-wide">
|
<p className="text-base text-thin-light-gray tracking-wide">
|
||||||
{datas.msg}
|
{datas.content}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,18 +1,14 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import Accordion from "../../Helpers/Accordion";
|
import Accordion from "../../Helpers/Accordion";
|
||||||
import LoadingSpinner from "../../Spinners/LoadingSpinner";
|
|
||||||
|
|
||||||
export default function FaqTab({ datas }) {
|
export default function FaqTab({ datas = [] }) {
|
||||||
return (
|
return (
|
||||||
<div className="faq-tab w-full">
|
<div className="faq-tab w-full">
|
||||||
<div className="accordion-items w-full">
|
<div className="accordion-items w-full">
|
||||||
{datas.loading ?
|
{datas &&
|
||||||
<LoadingSpinner color='sky-blue' size={16} />
|
datas.length > 0 &&
|
||||||
:
|
datas.map((value) => (
|
||||||
datas &&
|
<Accordion key={value.id + Math.random()} datas={value} />
|
||||||
datas?.data?.length > 0 &&
|
|
||||||
datas.data.map((value, index) => (
|
|
||||||
<Accordion key={index + Math.random()} datas={value} />
|
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useRef, useState } from "react";
|
import React, { useRef, useState } from "react";
|
||||||
import cover from "../../assets/images/profile-info-cover.png";
|
import cover from "../../assets/images/profile-info-cover.png";
|
||||||
import profile from "../../assets/images/profile-info-profile.png";
|
import profile from "../../assets/images/profile-info-profile.png";
|
||||||
|
import faq from "../../data/faq.json";
|
||||||
import Icons from "../Helpers/Icons";
|
import Icons from "../Helpers/Icons";
|
||||||
import Layout from "../Partials/Layout";
|
import Layout from "../Partials/Layout";
|
||||||
import ChangePasswordTab from "./Tabs/ChangePasswordTab";
|
import ChangePasswordTab from "./Tabs/ChangePasswordTab";
|
||||||
@@ -12,7 +12,7 @@ import PaymentMathodsTab from "./Tabs/PaymentMathodsTab";
|
|||||||
import PersonalInfoTab from "./Tabs/PersonalInfoTab";
|
import PersonalInfoTab from "./Tabs/PersonalInfoTab";
|
||||||
import TermsConditionTab from "./Tabs/TermsConditionTab";
|
import TermsConditionTab from "./Tabs/TermsConditionTab";
|
||||||
|
|
||||||
export default function Settings({faq}) {
|
export default function Settings() {
|
||||||
const tabs = [
|
const tabs = [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
@@ -83,6 +83,8 @@ export default function Settings({faq}) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// fab tab
|
||||||
|
const faqData = faq.datas;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Layout>
|
<Layout>
|
||||||
@@ -257,7 +259,7 @@ export default function Settings({faq}) {
|
|||||||
)}
|
)}
|
||||||
{tab === "login_activity" && <LoginActivityTab />}
|
{tab === "login_activity" && <LoginActivityTab />}
|
||||||
{tab === "password" && <ChangePasswordTab />}
|
{tab === "password" && <ChangePasswordTab />}
|
||||||
{tab === "faq" && <FaqTab datas={faq} />}
|
{tab === "faq" && <FaqTab datas={faqData} />}
|
||||||
{tab === "terms" && <TermsConditionTab />}
|
{tab === "terms" && <TermsConditionTab />}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -687,19 +687,9 @@ class usersService {
|
|||||||
action: 14015,
|
action: 14015,
|
||||||
...reqData,
|
...reqData,
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/activejobstatus", postData);
|
return this.postAuxEnd("/activejobstatus ", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
// END POINT FOR OWNER JOB ACTION
|
|
||||||
getFaq() {
|
|
||||||
var postData = {
|
|
||||||
uid: localStorage.getItem("uid"),
|
|
||||||
// member_id: localStorage.getItem("member_id"),
|
|
||||||
sessionid: localStorage.getItem("session_token"),
|
|
||||||
};
|
|
||||||
return this.postAuxEnd("/faq", postData);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(username)
|
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(username)
|
||||||
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(password)
|
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(password)
|
||||||
|
|||||||
@@ -1,29 +1,10 @@
|
|||||||
import React,{useState, useEffect} from "react";
|
import React from "react";
|
||||||
import Settings from "../components/Settings";
|
import Settings from "../components/Settings";
|
||||||
import usersService from "../services/UsersService";
|
|
||||||
|
|
||||||
export default function SettingsPage() {
|
export default function SettingsPage() {
|
||||||
|
|
||||||
const apiCall = new usersService()
|
|
||||||
|
|
||||||
let [faq, setFaq] = useState({loading:true, data:[]}) // STATE TO HOLD FAQ DATA
|
|
||||||
|
|
||||||
//FUNCTION TO GET FAQ
|
|
||||||
const getFaq = () => {
|
|
||||||
apiCall.getFaq().then(res => {
|
|
||||||
setFaq({loading:false, data:res.data.result_list})
|
|
||||||
}).catch(err => {
|
|
||||||
setFaq({loading:false, data:[]})
|
|
||||||
console.log('Error', err)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
useEffect(()=>{
|
|
||||||
getFaq()
|
|
||||||
},[])
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Settings faq={faq} />
|
<Settings />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user