Merge branch 'memberpage' of WrenchBoard/Users-Wrench into master

This commit is contained in:
2024-01-08 23:30:22 +00:00
committed by Gogs
7 changed files with 163 additions and 9 deletions
+2
View File
@@ -53,6 +53,7 @@ import LndPage from "./views/LndPage";
import FamilySettingsPage from "./views/FamilySettingsPage";
import AppDownloadPage from "./views/AppDownloadPage";
import JobGroupsPage from "./views/JobGroupsPage";
import YourPages from "./views/YourPage_";
export default function Routers() {
return (
@@ -115,6 +116,7 @@ export default function Routers() {
<Route exact path="/acc-family" element={<FamilyAccPage />} />
<Route exact path="/manage-family" element={<FamilyManagePage />} />
<Route exact path="/start-job" element={<StartJob />} />
<Route exact path="/yourpage" element={<YourPages />} />
<Route exact path="/manage-active-job" element={<ManageActiveJobs />} />
<Route exact path="/blog-page" element={<BlogPage />} />
<Route exact path="/offer-interest" element={<OffersInterestPage />} />
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 50" id="Page"><path fill-rule="evenodd" d="M0 13V2a2 2 0 0 1 2-2h64a2 2 0 0 1 2 2v11H0Zm0 4v31a2 2 0 0 0 2 2h20V17H0Zm26 33h40a2 2 0 0 0 2-2V17H26v33Z" fill="#767fad" class="color000000 svgShape"></path></svg>

After

Width:  |  Height:  |  Size: 265 B

+45 -8
View File
@@ -462,6 +462,15 @@ export default function Icons({ name }) {
clipRule="evenodd"
/>
</svg>
) : name === "my-page" ? (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 50" id="Page">
<path
fillRule="evenodd"
d="M0 13V2a2 2 0 0 1 2-2h64a2 2 0 0 1 2 2v11H0Zm0 4v31a2 2 0 0 0 2 2h20V17H0Zm26 33h40a2 2 0 0 0 2-2V17H26v33Z"
fill="#ffffff"
className="color000000 svgShape"
></path>
</svg>
) : name === "accordion-minus" ? (
<svg
width="20"
@@ -510,20 +519,48 @@ export default function Icons({ name }) {
) : name === "master-card" ? (
<img className="w-[30px]" src={MasterCard} alt="card" />
) : name === "new-dashboard" ? (
<img className="w-[17px] h-[17px]" src={localImgLoad('images/icons/dashboard.svg')} alt="dashboard" />
<img
className="w-[17px] h-[17px]"
src={localImgLoad("images/icons/dashboard.svg")}
alt="dashboard"
/>
) : name === "new-family" ? (
<img className="w-[17px] h-[17px]" src={localImgLoad('images/icons/family.svg')} alt="family" />
<img
className="w-[17px] h-[17px]"
src={localImgLoad("images/icons/family.svg")}
alt="family"
/>
) : name === "new-logout" ? (
<img className="w-[45px] rounded-full bg-white p-1" src={localImgLoad('images/icons/logout.svg')} alt="logout" />
<img
className="w-[45px] rounded-full bg-white p-1"
src={localImgLoad("images/icons/logout.svg")}
alt="logout"
/>
) : name === "new-market" ? (
<img className="w-[17px] h-[17px]" src={localImgLoad('images/icons/market.svg')} alt="market" />
<img
className="w-[17px] h-[17px]"
src={localImgLoad("images/icons/market.svg")}
alt="market"
/>
) : name === "new-mytask" ? (
<img className="w-[17px] h-[17px]" src={localImgLoad('images/icons/my-task.svg')} alt="task" />
<img
className="w-[17px] h-[17px]"
src={localImgLoad("images/icons/my-task.svg")}
alt="task"
/>
) : name === "family-id" ? (
<img className="w-[20px] h-[20px]" src={localImgLoad('images/icons/family-id.svg')} alt="family-id" />
<img
className="w-[20px] h-[20px]"
src={localImgLoad("images/icons/family-id.svg")}
alt="family-id"
/>
) : name === "family-pin" ? (
<img className="w-[20px] h-[20px]" src={localImgLoad('images/icons/family-pin.svg')} alt="family-pin" />
): (
<img
className="w-[20px] h-[20px]"
src={localImgLoad("images/icons/family-pin.svg")}
alt="family-pin"
/>
) : (
""
)}
</>
+41 -1
View File
@@ -1,4 +1,4 @@
import React, { useContext, useEffect, useMemo, useState } from "react";
import React, { useContext, useMemo, useState } from "react";
import { Link, useLocation, useNavigate } from "react-router-dom";
import bank1 from "../../assets/images/bank-1.png";
import bank2 from "../../assets/images/bank-2.png";
@@ -238,6 +238,9 @@ export default function Header({ logoutModalHandler, sidebarHandler }) {
</div>
</button>
{/* balance */}
{/* My Page Button */}
<PageButton />
{/*<div className="lg:hidden block"></div>*/}
<WalletHeader
@@ -412,6 +415,17 @@ export default function Header({ logoutModalHandler, sidebarHandler }) {
</div>
</Link>
</li>
{userDetails && userDetails?.account_type !== "FAMILY" && (
<li className="content-item my-2 hover:bg-slate-100 transition duration-500 rounded-lg">
<Link to="/yourpage" className="notifications">
<div className="name">
<p className="text-sm py-2 px-4 text-dark-gray dark:text-white hover:text-sky-blue transition font-medium">
My Page
</p>
</div>
</Link>
</li>
)}
{userDetails && userDetails?.account_type !== "FAMILY" && (
<>
<li className="content-item my-2 hover:bg-slate-100 transition duration-500 rounded-lg">
@@ -656,3 +670,29 @@ export default function Header({ logoutModalHandler, sidebarHandler }) {
</>
);
}
const PageButton = () => {
return (
<Link to="/yourpage" className="lg:flex hidden user-balance cursor-pointer lg:w-[152px] w-[150px] h-[48px] items-center rounded-full relative bg-sky-blue pr-1.5 pl-4">
<div
className="flex items-center lg:justify-between justify-center w-full h-full"
>
<span className="lg:block hidden w-[25px]">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 50" id="Page">
<path
fillRule="evenodd"
d="M0 13V2a2 2 0 0 1 2-2h64a2 2 0 0 1 2 2v11H0Zm0 4v31a2 2 0 0 0 2 2h20V17H0Zm26 33h40a2 2 0 0 0 2-2V17H26v33Z"
fill="#ffffff"
className="color000000 svgShape"
></path>
</svg>
</span>
<p className="lg:text-xl text-lg font-bold text-white">My Page</p>
<span className="lg:block hidden">
{/* <Icons name="deep-plus" /> */}
</span>
</div>
</Link>
)
}
+59
View File
@@ -0,0 +1,59 @@
import React from "react";
import Layout from "../Partials/Layout";
import { InputCom } from "../AddJob/settings";
const YourPage = () => {
return (
<Layout>
<div className="notification-page w-full mb-10">
<div className="notification-wrapper w-full">
<div className="update-table w-full h-full p-4 bg-white dark:bg-dark-white overflow-y-auto rounded-2xl section-shadow min-h-[520px]">
<h1 className="text-26 font-bold text-dark-gray dark:text-white tracking-wide mb-2">
My page
</h1>
<hr />
<div className="ml-4">
<div className="field w-full">
<InputCom
fieldClass="px-4 transfer-field"
parentClass="flex items-center gap-1 justify-between"
labelClass="flex-[0.2] mb-0"
inputClass="flex-[0.8] transfer-field"
label="Introduction: "
type="text"
name="fee"
value=""
/>
</div>
<div className="field w-full mb-6 flex gap-1 justify-between">
<label className="text-[#181c32] dark:text-white text-base font-semibold flex flex-[0.2] mt-2.5">
Brief Details:
</label>
<textarea
style={{ resize: "none" }}
className="text-base px-4 py-2 rounded-md min-h-[100px] text-dark-gray dark:text-white w-full bg-slate-100 dark:bg-[#11131F] focus:ring-0 focus:outline-none flex-[0.8]"
name="comment"
cols="30"
rows="2"
/>
</div>
<div className="w-full flex justify-end mb-2">
<button
type="submit"
// disabled={props.isSubmitting}
className="text-lg text-white bg-sky-blue px-4 py-2 hover:opacity-90 rounded-full"
>
Continue
</button>
</div>
</div>
<hr />
</div>
</div>
</div>
</Layout>
);
};
export default YourPage;
+10
View File
@@ -5,6 +5,16 @@ class usersService {
console.log("WRB Service Entry");
}
MyPageIntro(reqData) {
var postData = {
uid: localStorage.getItem("uid"),
member_id: localStorage.getItem("member_id"),
sessionid: localStorage.getItem("session_token"),
...reqData
};
return this.postAuxEnd("/mypageintro", postData);
}
CreateUser(reqData) {
localStorage.setItem("session_token", ``);
return this.postAuxEnd("/createuser", reqData);
+5
View File
@@ -0,0 +1,5 @@
import YourPage from "../components/YourPage";
export default function YourPages() {
return <YourPage />;
}