change design footer & home & fields
This commit is contained in:
@@ -24,7 +24,6 @@ const theme = createTheme({
|
|||||||
styleOverrides: {
|
styleOverrides: {
|
||||||
root: {
|
root: {
|
||||||
"& .MuiBox-root": {
|
"& .MuiBox-root": {
|
||||||
// maxHeight: { lg: "calc(100vh - 48px)" },
|
|
||||||
overflow: "auto",
|
overflow: "auto",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ function Footer() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Left */}
|
{/* Left */}
|
||||||
<div className="w-full lg:w-fit flex flex-row lg:flex-col items-center lg:items-start justify-center gap-[50px]">
|
<div className="w-full lg:w-fit flex flex-row lg:flex-col items-center lg:items-start justify-center gap-[32px]">
|
||||||
<p className="text-[#3B3B3B] after:!duration-500 w-fit text-[16px] after:hover:w-full after:transition-all after:hover:bg-[#F17732] font-bold pb-1.5 relative after:absolute after:right-0 after:h-0.5 after:bottom-0 after:w-0">
|
<p className="text-[#3B3B3B] after:!duration-500 w-fit text-[16px] after:hover:w-full after:transition-all after:hover:bg-[#F17732] font-bold pb-1.5 relative after:absolute after:right-0 after:h-0.5 after:bottom-0 after:w-0">
|
||||||
همراه با ما باشید:
|
همراه با ما باشید:
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ function HeadMenu({ title, name, isOpen, changeMenu }) {
|
|||||||
className="!flex lg:!hidden !items-center !justify-between !w-full !py-[8px] !px-[4px] !border !border-solid !border-transparent !rounded-bl-none !rounded-br-none !border-b-[#E5E5E5]"
|
className="!flex lg:!hidden !items-center !justify-between !w-full !py-[8px] !px-[4px] !border !border-solid !border-transparent !rounded-bl-none !rounded-br-none !border-b-[#E5E5E5]"
|
||||||
onClick={() => changeMenu(name)}
|
onClick={() => changeMenu(name)}
|
||||||
>
|
>
|
||||||
<p className="text-[#262866] text-[14px] font-medium">{title}</p>
|
<p className="text-[#262866] text-[14px] font-medium">{title.name}</p>
|
||||||
<div
|
<div
|
||||||
className={`
|
className={`
|
||||||
transition-all duration-500
|
transition-all duration-500
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
import Link from "next/link";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
function ListMenu({ list, isOpen }) {
|
function ListMenu({ list, isOpen }) {
|
||||||
|
console.log(list);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ul
|
<ul
|
||||||
className={`
|
className={`
|
||||||
@@ -21,7 +24,7 @@ function ListMenu({ list, isOpen }) {
|
|||||||
text-[16px] w-fit
|
text-[16px] w-fit
|
||||||
`}
|
`}
|
||||||
>
|
>
|
||||||
{item}
|
{item.link ? <Link href={item.link}>{item.name}</Link> : item.name}
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import ContentText from "@/app/component/ContentText";
|
|
||||||
import EditField from "@/app/component/EditField";
|
import EditField from "@/app/component/EditField";
|
||||||
|
import ContentText from "@/app/component/ContentText";
|
||||||
import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect";
|
import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect";
|
||||||
|
import { validate_phone_number } from "./validate";
|
||||||
|
|
||||||
const list = [
|
const list = [
|
||||||
{ label: "بانک 1", id: 10 },
|
{ label: "بانک 1", id: 10 },
|
||||||
@@ -9,29 +10,37 @@ const list = [
|
|||||||
{ label: "بانک 4", id: 40 },
|
{ label: "بانک 4", id: 40 },
|
||||||
];
|
];
|
||||||
|
|
||||||
function Form({ data, changeData }) {
|
function Form({ data, changeData, updateNum }) {
|
||||||
return (
|
return (
|
||||||
<div className="mt-[32px] md:mt-[36px] lg:mt-[40px] flex flex-col gap-[24px] md:gap-[28px] lg:gap-[32px] px-0 sm:px-[52px]">
|
<div className="mt-[32px] md:mt-[36px] lg:mt-[40px] flex flex-col gap-[24px] md:gap-[28px] lg:gap-[32px] px-0 sm:px-[52px]">
|
||||||
<ContentText text="شماره کارت">
|
<ContentText text="شماره کارت">
|
||||||
<EditField
|
<EditField
|
||||||
isTransparent={true}
|
isTransparent={true}
|
||||||
placeholder="شماره کارت خود را بنویسید..."
|
|
||||||
iconGray={true}
|
iconGray={true}
|
||||||
changeData={changeData}
|
changeData={updateNum}
|
||||||
data={data.card}
|
data={data.card}
|
||||||
noDisable={true}
|
noDisable={true}
|
||||||
|
type="number"
|
||||||
|
placeholder="شماره کارت خود را بنویسید..."
|
||||||
name="card"
|
name="card"
|
||||||
|
props={{
|
||||||
|
inputProps: validate_phone_number,
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</ContentText>
|
</ContentText>
|
||||||
<ContentText text="شماره شبا">
|
<ContentText text="شماره شبا">
|
||||||
<EditField
|
<EditField
|
||||||
isTransparent={true}
|
isTransparent={true}
|
||||||
placeholder="شماره شبا خود را بنویسید..."
|
|
||||||
iconGray={true}
|
iconGray={true}
|
||||||
changeData={changeData}
|
changeData={updateNum}
|
||||||
data={data.shaba}
|
data={data.shaba}
|
||||||
noDisable={true}
|
noDisable={true}
|
||||||
name="card"
|
type="number"
|
||||||
|
placeholder="شماره شبا خود را بنویسید..."
|
||||||
|
name="shaba"
|
||||||
|
props={{
|
||||||
|
inputProps: validate_phone_number,
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</ContentText>
|
</ContentText>
|
||||||
<ContentText text="بانک">
|
<ContentText text="بانک">
|
||||||
|
|||||||
@@ -1,22 +1,35 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { Box, Button, Modal } from "@mui/material";
|
|
||||||
import { styleDefault } from "@/mui";
|
|
||||||
import CloseModalD from "@/components/icons/CloseModalD";
|
|
||||||
import Form from "./Form";
|
import Form from "./Form";
|
||||||
|
import { styleDefault } from "@/mui";
|
||||||
|
import { Box, Button, Modal } from "@mui/material";
|
||||||
|
import { validate_phone_number } from "./validate";
|
||||||
|
|
||||||
|
// Icons
|
||||||
import PlusB from "@/components/icons/PlusB";
|
import PlusB from "@/components/icons/PlusB";
|
||||||
|
import CloseModalD from "@/components/icons/CloseModalD";
|
||||||
|
|
||||||
function ModalAddCard() {
|
function ModalAddCard() {
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const [data, setData] = useState({
|
const [data, setData] = useState({
|
||||||
card: "",
|
card: { value: "", is_edit: true },
|
||||||
shaba: "",
|
shaba: { value: "", is_edit: true },
|
||||||
bank: "",
|
bank: { value: "", is_edit: true },
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleOpen = () => setOpen(true);
|
const handleOpen = () => setOpen(true);
|
||||||
const handleClose = () => setOpen(false);
|
const handleClose = () => setOpen(false);
|
||||||
|
|
||||||
const changeData = (value, name) => setData({ ...data, [name]: value });
|
const changeData = (value, name) =>
|
||||||
|
setData({ ...data, [name]: { ...data[name], value } });
|
||||||
|
|
||||||
|
const updateNum = (value, type, name) => {
|
||||||
|
const parseValue = +value;
|
||||||
|
const { max } = validate_phone_number;
|
||||||
|
|
||||||
|
const validateValue = parseValue > max ? data[name].value : value;
|
||||||
|
|
||||||
|
changeData(validateValue, name);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -43,7 +56,7 @@ function ModalAddCard() {
|
|||||||
<CloseModalD />
|
<CloseModalD />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<Form data={data} changeData={changeData} />
|
<Form data={data} changeData={changeData} updateNum={updateNum} />
|
||||||
<div className="flex items-center justify-center gap-[12px] md:gap-[14px] lg:gap-[16px] mt-[32px] md:mt-[36px] lg:mt-[40px]">
|
<div className="flex items-center justify-center gap-[12px] md:gap-[14px] lg:gap-[16px] mt-[32px] md:mt-[36px] lg:mt-[40px]">
|
||||||
<Button
|
<Button
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
const validate_phone_number = {
|
||||||
|
min: 1,
|
||||||
|
max: 9999999999,
|
||||||
|
};
|
||||||
|
|
||||||
|
export { validate_phone_number };
|
||||||
+10
-5
@@ -15,11 +15,16 @@ export const frequentSearches = [
|
|||||||
"مغز و اعصاب",
|
"مغز و اعصاب",
|
||||||
];
|
];
|
||||||
|
|
||||||
export const footerR = ["خدمات", "ثبت نام", "تخصص ها", "بلاگ"];
|
export const footerR = [
|
||||||
|
{ name: "خدمات", link: "" },
|
||||||
|
{ name: "ثبت نام", link: "/login" },
|
||||||
|
{ name: "تخصص ها", link: "/specialties" },
|
||||||
|
{ name: "بلاگ", link: "/blogs" },
|
||||||
|
];
|
||||||
|
|
||||||
export const footerL = [
|
export const footerL = [
|
||||||
"دسترسی سریع",
|
{ name: "دسترسی سریع", link: "" },
|
||||||
"درباره ما",
|
{ name: "درباره ما", link: "/about-us" },
|
||||||
"تماس با ما",
|
{ name: "تماس با ما", link: "/contact-us" },
|
||||||
"سوالات متداول",
|
{ name: "سوالات متداول", link: "/contact-us" },
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user