change design and responsive & pay & detail account & success pay & faield pay & doctor id
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import React from 'react'
|
||||
|
||||
function ButtonFixed({ children }) {
|
||||
return (
|
||||
<div
|
||||
className="!fixed md:!relative !bottom-0 !right-0 bg-[#FFF] border-0 border-t
|
||||
md:border-t-transparent border-[#D7D7D7]
|
||||
!w-full sm:!w-full !p-[16px] sm:!px-[52px] md:!ml-0 md:!p-0 md:!w-full"
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default ButtonFixed
|
||||
@@ -1,11 +1,11 @@
|
||||
function Content({ isConfirmed, children, title }) {
|
||||
return (
|
||||
<div className='flex w-full flex-col items-start justify-start gap-[16px]'>
|
||||
<div className='flex min-h-[32px] items-center justify-start gap-[4px]'>
|
||||
<div className='flex w-full flex-col items-start justify-start gap-[8px] sm:gap-[10px] md:gap-[13px] lg:gap-[16px]'>
|
||||
<div className='flex min-h-[32px] items-center justify-start gap-[8px] md:gap-[6px] lg:gap-[4px]'>
|
||||
<p className="text-[#525252] text-[14px] font-medium">{title}</p>
|
||||
{isConfirmed && (
|
||||
<p
|
||||
className='py-[2px] px-[5px] leading-[28px] bg-[#05BA58] rounded-[40px] text-[#FFF] text-[12px] font-normal'
|
||||
className='py-[4px] md:py-[2px] leading-[8px] sm:leading-[14px] md:leading-[21px] lg:leading-[28px] px-[5px] bg-[#05BA58] rounded-[40px] text-[#FFF] text-[10px] md:text-[12px] font-normal'
|
||||
>تایید شده</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,8 @@ const bime = [
|
||||
|
||||
function Form({ changeData, data, updateSelect, isForAnother }) {
|
||||
return (
|
||||
<div className="grid mt-[20px] items-start justify-center gap-x-[24px] gap-y-[16px] grid-cols-2">
|
||||
<div className="grid mt-[12px] sm:mt-[14px] md:mt-[17px] lg:mt-[20px] items-start
|
||||
justify-center gap-x-[24px] gap-y-[12px] md:gap-y-[14px] lg:gap-y-[16px] grid-cols-1 sm:grid-cols-2">
|
||||
<Content title='شماره موبایل' isConfirmed={isForAnother ? false : true}>
|
||||
<EditField changeData={changeData} data={data.phone} name='phone' />
|
||||
</Content>
|
||||
|
||||
@@ -3,6 +3,7 @@ import Form from "./Form";
|
||||
import { Button } from "@mui/material";
|
||||
import AddCircleBlueA from "@/components/icons/AddCircleBlueA";
|
||||
import ArrowLeftB from "@/components/icons/ArrowLeftB";
|
||||
import ButtonFixed from "../ButtonFixed";
|
||||
|
||||
function Detail({ isForAnother, setIsForAnother, fadeElement, setIsPay }) {
|
||||
|
||||
@@ -40,7 +41,7 @@ function Detail({ isForAnother, setIsForAnother, fadeElement, setIsPay }) {
|
||||
/>
|
||||
{!isForAnother && (
|
||||
<Button
|
||||
className="!flex !items-center !justify-start !gap-[8px] !mt-[24px] !p-1"
|
||||
className="!flex !items-center !justify-start !gap-[8px] !mt-[12px] sm:!mt-[16px] md:!mt-[20px] lg:!mt-[24px] !p-1"
|
||||
onClick={() => {
|
||||
fadeElement(() => setIsForAnother(true))
|
||||
setData({
|
||||
@@ -54,16 +55,19 @@ function Detail({ isForAnother, setIsForAnother, fadeElement, setIsPay }) {
|
||||
<p className="text-[#5559CE] text-[16px] font-medium">دریافت نوبت برای فرد دیگر </p>
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
className={`
|
||||
!gap-[4px] !mr-auto !flex !px-[12px] !py-[8px] !min-w-[150px]
|
||||
${isForAnother ? '!mt-[94px]' : '!mt-[32px]'}`}
|
||||
variant="contained"
|
||||
onClick={() => fadeElement(() => setIsPay(true))}
|
||||
>
|
||||
<p className="text-[#EFEFEF] text-[16px] font-medium">ثبت اطلاعات</p>
|
||||
<ArrowLeftB />
|
||||
</Button>
|
||||
<ButtonFixed>
|
||||
<Button
|
||||
className={`
|
||||
!flex !w-full md:!w-fit
|
||||
!gap-[4px] md:!mr-auto !px-[12px] !py-[8px] !min-w-[150px]
|
||||
${isForAnother ? '!mt-0 md:!mt-[94px]' : '!mt-0 md:!mt-[32px]'}`}
|
||||
variant="contained"
|
||||
onClick={() => fadeElement(() => setIsPay(true))}
|
||||
>
|
||||
<p className="text-[#EFEFEF] text-[16px] font-medium">ثبت اطلاعات</p>
|
||||
<ArrowLeftB />
|
||||
</Button>
|
||||
</ButtonFixed>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
'use client';
|
||||
|
||||
import { useState } from "react";
|
||||
import Detail from "./detail";
|
||||
import Payment from "./payment";
|
||||
import Detail from "./detail";
|
||||
|
||||
function Information() {
|
||||
function Information({ typePay, setTypePay, setIsPay, isPay }) {
|
||||
|
||||
const [isForAnother, setIsForAnother] = useState(false)
|
||||
const [typePay, setTypePay] = useState('success');
|
||||
const [isPay, setIsPay] = useState(true);
|
||||
const [isForAnother, setIsForAnother] = useState(false);
|
||||
const [fade, setFade] = useState(false);
|
||||
|
||||
const fadeElement = (func) => {
|
||||
@@ -24,8 +20,9 @@ function Information() {
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`w-[59%] opacity-page p-[24px] bg-[#FFF] border border-solid border-[#EFEFEF] rounded-[8px]
|
||||
`}
|
||||
className={`w-full lg:w-[59%] opacity-page bg-[#FFF] border border-solid border-[#EFEFEF]
|
||||
rounded-[8px] p-[12px] sm:p-[16px] md:p-[20px] lg:p-[24px]
|
||||
${typePay === 'success' || typePay === 'failed' ? 'bg-transparent border-transparent md:bg-[#FFF] md:border-[#EFEFEF]' : ''}`}
|
||||
>
|
||||
<div className={`transition-opacity !duration-300 ease-in ${fade ? '!opacity-0' : '!opacity-100'}`}>
|
||||
{isPay ?
|
||||
|
||||
@@ -8,9 +8,9 @@ function FailedPay({ setTypePay, setIsPay, fadeElement }) {
|
||||
<div className="mt-[7px]">
|
||||
<div className="flex flex-col justify-center items-center gap-[14px]">
|
||||
<InfoCircleRedA />
|
||||
<p className="text-[#D32F2F] text-[20px] font-bold">پرداخت شما انجام نشد.</p>
|
||||
<p className="text-[#D32F2F] text-[16px] md:text-[18px] lg:text-[20px] font-bold">پرداخت شما انجام نشد.</p>
|
||||
</div>
|
||||
<div className="flex mt-[24px] items-center justify-center gap-[24px]">
|
||||
<div className="flex mt-[32px] sm:mt-[29px] md:mt-[27px] lg:mt-[24px] items-center justify-center gap-[24px]">
|
||||
<Button
|
||||
variant="outlined"
|
||||
onClick={() => fadeElement(() => setIsPay(false))}
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
import ArrowLeftB from '@/components/icons/ArrowLeftB';
|
||||
import { Button } from '@mui/material';
|
||||
import ButtonFixed from '../ButtonFixed';
|
||||
|
||||
function Paying({ setTypePay, fadeElement }) {
|
||||
return (
|
||||
<>
|
||||
<p className="text-[#3B3B3B] text-[20px] font-bold">
|
||||
<p className="text-[#3B3B3B] text-[14px] sm:text-[16px] md:text-[18px] lg:text-[20px] font-bold">
|
||||
اطلاعات پرداخت
|
||||
</p>
|
||||
<div className='flex justify-between items-center mt-[30px]'>
|
||||
<p className='text-[#616161] tet-[16px] font-medium'>مبلغ پیش پرداخت (بیعانه) : </p>
|
||||
<p className='text-[#525252] text-[16px] font-bold'>20،000 تومان</p>
|
||||
</div>
|
||||
<span className='bg-[#D7D7D7] h-px w-full mt-[32px] mb-[25px] block'></span>
|
||||
<div className='flex items-center justify-between'>
|
||||
<p className='text-[#3B3B3B] text-[16px] font-bold'>مبلغ قابل پرداخت : 20،000 تومان</p>
|
||||
<Button
|
||||
className='!gap-[4px] !mr-auto !flex !px-[12px] !py-[9px] !min-w-[157px]'
|
||||
onClick={() => fadeElement(() => setTypePay('success'))}
|
||||
variant="contained"
|
||||
>
|
||||
<p className="text-[#EFEFEF] text-[16px] font-medium">پرداخت نهایی</p>
|
||||
<ArrowLeftB />
|
||||
</Button>
|
||||
<div className='flex justify-between items-center mt-[12px] sm:mt-[18px] md:mt-[24px] lg:mt-[30px]'>
|
||||
<p className='text-[#616161] text-[14px] md:text-[16px] font-medium'>مبلغ پیش پرداخت (بیعانه) : </p>
|
||||
<p className='text-[#525252] text-[14px] md:text-[16px] font-bold'>20،000 تومان</p>
|
||||
</div>
|
||||
<span className='bg-[#D7D7D7] hidden md:block h-px w-full mt-[32px] mb-[25px]'></span>
|
||||
<ButtonFixed>
|
||||
<div className='flex items-center justify-between gap-2'>
|
||||
<p className='text-[#616161] md:text-[#3B3B3B] text-[14px] md:text-[16px] font-bold'>مبلغ قابل پرداخت : 20،000 تومان</p>
|
||||
<Button
|
||||
className='!gap-[4px] !mr-auto !flex !px-[12px] !p-[7px] md:!py-[9px] !min-w-[157px]'
|
||||
onClick={() => fadeElement(() => setTypePay('success'))}
|
||||
variant="contained"
|
||||
>
|
||||
<p className="text-[#EFEFEF] text-[16px] font-medium">پرداخت نهایی</p>
|
||||
<ArrowLeftB />
|
||||
</Button>
|
||||
</div>
|
||||
</ButtonFixed>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -9,7 +9,19 @@ function SuccessPay() {
|
||||
<TickCircleGreenA />
|
||||
<p className="text-[#3B3B3B] text-[20px] font-bold">پرداخت شما با موفقیت انجام شد.</p>
|
||||
</div>
|
||||
<p className="text-[#3B3B3B] text-[16px] font-normal mt-[32px] mb-[16px]">برای نمایش نوبت ها به قسمت نوبت های من بروید. </p>
|
||||
<p
|
||||
className="text-[#3B3B3B] text-[16px] font-normal
|
||||
mt-[24px] sm:mt-[26px] md:mt-[29px] lg:mt-[32px]
|
||||
mb-[24px] md:mb-[16px]"
|
||||
>برای نمایش نوبت ها به قسمت نوبت های من بروید. </p>
|
||||
<div className="flex w-full md:hidden flex-col justify-center items-center mb-[32px]">
|
||||
<span className="w-full block h-px bg-[#EFEFEF]"></span>
|
||||
<div className="flex items-center justify-between my-[20px]">
|
||||
<p className="text-[#616161] text-[14px] font-medium">مقدار پرداخت شده: </p>
|
||||
<p className="text-[#05BA58] text-[14px] font-bold">20،000 تومان</p>
|
||||
</div>
|
||||
<span className="w-full block h-px bg-[#EFEFEF]"></span>
|
||||
</div>
|
||||
<Button
|
||||
variant="text"
|
||||
className="!flex !items-center !justify-center !gap-[4px]"
|
||||
|
||||
Reference in New Issue
Block a user