|
|
@ -4,20 +4,19 @@ import React, { useState } from "react"; |
|
|
|
import { useForm } from "react-hook-form"; |
|
|
|
import { useForm } from "react-hook-form"; |
|
|
|
|
|
|
|
|
|
|
|
import Input from "../AnimatedInput/Input"; |
|
|
|
import Input from "../AnimatedInput/Input"; |
|
|
|
|
|
|
|
|
|
|
|
import CancleIcon from "../CancleIcon"; |
|
|
|
import CancleIcon from "../CancleIcon"; |
|
|
|
|
|
|
|
import Button from "../Button"; |
|
|
|
|
|
|
|
import ProfilePicNextToEachOther from "../ProfilePicNextToEachOther"; |
|
|
|
|
|
|
|
import TitleSubtitle from "../TitleSubtitle"; |
|
|
|
|
|
|
|
|
|
|
|
import cancleIcon from "./cancle-icon.svg"; |
|
|
|
|
|
|
|
import calender from "./calender.svg"; |
|
|
|
import calender from "./calender.svg"; |
|
|
|
|
|
|
|
import cancleIcon from "./cancle-icon.svg"; |
|
|
|
|
|
|
|
|
|
|
|
import documentCloud from "./document-cloud.svg"; |
|
|
|
import documentCloud from "./document-cloud.svg"; |
|
|
|
import plus from "./plus.svg"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import OutlineInput from "../OutlineInput"; |
|
|
|
import plus from "./plus.svg"; |
|
|
|
import OutlineTextarea from "../OutlineTextarea"; |
|
|
|
|
|
|
|
import ButtonNewDesign from "../ButtonNewDesign"; |
|
|
|
|
|
|
|
import ProfilePicNextToEachOther from "../ProfilePicNextToEachOther"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const PopupCard = ({ selectedChecklist }) => { |
|
|
|
const PopupCard = ({ selectedChecklist, buttons }) => { |
|
|
|
// const [activeInput, setActiveInput] = useState(false);
|
|
|
|
// const [activeInput, setActiveInput] = useState(false);
|
|
|
|
|
|
|
|
|
|
|
|
const [checklist, setChecklist] = useState(0); |
|
|
|
const [checklist, setChecklist] = useState(0); |
|
|
@ -50,35 +49,42 @@ const PopupCard = ({ selectedChecklist }) => { |
|
|
|
{/* top */} |
|
|
|
{/* top */} |
|
|
|
<div className="flex flex-row items-center justify-between divide-x-2 divide-[#DBDBDB77] divide-x-reverse"> |
|
|
|
<div className="flex flex-row items-center justify-between divide-x-2 divide-[#DBDBDB77] divide-x-reverse"> |
|
|
|
{/* right */} |
|
|
|
{/* right */} |
|
|
|
<div className="flex-grow flex-1 flex flex-col gap-y-4 px-4"> |
|
|
|
<div className="flex-grow flex-1 flex flex-col gap-y-4 px-2"> |
|
|
|
<Input |
|
|
|
<Input |
|
|
|
register={register("firstName")} |
|
|
|
register={register("firstName")} |
|
|
|
label="نام " |
|
|
|
label="نام " |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
borderClassname={`border-2 border-[#06BACE] `} |
|
|
|
borderClassname={`border-2 border-[#06BACE] `} |
|
|
|
inputClassname={`px-4 py-2 text-[#0F0543] focus:bg-white`} |
|
|
|
inputClassname={`px-4 py-2 text-[#0F0543] focus:bg-white`} |
|
|
|
|
|
|
|
activePlaceholderClass={"text-[#06BACE] bg-white"} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/* left */} |
|
|
|
{/* left */} |
|
|
|
<div className="flex-grow flex-1 flex flex-col gap-y-4 px-4"> |
|
|
|
<div className="flex-grow flex-1 flex flex-col gap-y-4 px-2"> |
|
|
|
<Input |
|
|
|
<Input |
|
|
|
register={register("firstName")} |
|
|
|
register={register("firstName")} |
|
|
|
label="نام " |
|
|
|
label="تقویم" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
|
|
|
|
icon={calender} |
|
|
|
borderClassname={`border-2 border-[#06BACE] `} |
|
|
|
borderClassname={`border-2 border-[#06BACE] `} |
|
|
|
inputClassname={`px-4 py-2 text-[#0F0543] focus:bg-white`} |
|
|
|
inputClassname={`px-4 py-2 text-[#0F0543] focus:bg-white`} |
|
|
|
|
|
|
|
activePlaceholderClass={"text-[#06BACE] bg-white"} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/* divider */} |
|
|
|
{/* divider */} |
|
|
|
<div className="border border-[#DBDBDB77] rounded my-5"></div> |
|
|
|
<div className="border border-[#DBDBDB77] rounded my-5 px-2"></div> |
|
|
|
{/* middle */} |
|
|
|
{/* middle */} |
|
|
|
<div className="flex flex-row pb-4"> |
|
|
|
<div className="flex flex-row items-start justify-between divide-x-2 divide-[#DBDBDB77] divide-x-reverse pb-5"> |
|
|
|
{/* right */} |
|
|
|
{/* right */} |
|
|
|
<div className="flex flex-col w-1/2"> |
|
|
|
<div className="flex flex-col flex-grow flex-1 gap-y-4 px-2"> |
|
|
|
<OutlineTextarea |
|
|
|
<Input |
|
|
|
outlineTitle={"نام کارت"} |
|
|
|
register={register("firstName")} |
|
|
|
outlineTitleClr={"#06BACE"} |
|
|
|
label="نام " |
|
|
|
|
|
|
|
type="textarea" |
|
|
|
|
|
|
|
borderClassname={`border-2 border-[#06BACE] `} |
|
|
|
|
|
|
|
inputClassname={`px-4 py-2 text-[#0F0543] focus:bg-white`} |
|
|
|
|
|
|
|
activePlaceholderClass={"text-[#06BACE] bg-white"} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<div className="flex flex-col"> |
|
|
|
<div className="flex flex-col"> |
|
|
|
{/* checkLIst input field */} |
|
|
|
{/* checkLIst input field */} |
|
|
@ -103,7 +109,14 @@ const PopupCard = ({ selectedChecklist }) => { |
|
|
|
<span>%</span> |
|
|
|
<span>%</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<OutlineTextarea outline={false} text={""} /> |
|
|
|
<Input |
|
|
|
|
|
|
|
register={register("firstName")} |
|
|
|
|
|
|
|
label="نام " |
|
|
|
|
|
|
|
type="textarea" |
|
|
|
|
|
|
|
borderClassname={`border-2 border-[#06BACE] `} |
|
|
|
|
|
|
|
inputClassname={`px-4 py-2 text-[#0F0543] focus:bg-white`} |
|
|
|
|
|
|
|
activePlaceholderClass={"text-[#06BACE] bg-white"} |
|
|
|
|
|
|
|
/>{" "} |
|
|
|
{selectedChecklist.slice(0, 3).map((item, index) => ( |
|
|
|
{selectedChecklist.slice(0, 3).map((item, index) => ( |
|
|
|
<div key={index} className=""> |
|
|
|
<div key={index} className=""> |
|
|
|
<input |
|
|
|
<input |
|
|
@ -121,78 +134,38 @@ const PopupCard = ({ selectedChecklist }) => { |
|
|
|
))} |
|
|
|
))} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/* divider */} |
|
|
|
|
|
|
|
<div className="border border-[#DBDBDB77] rounded mx-5"></div> |
|
|
|
|
|
|
|
{/* left */} |
|
|
|
{/* left */} |
|
|
|
<div className="w-1/2 flex flex-col items-start"> |
|
|
|
<div className="flex flex-col flex-grow flex-1 px-2"> |
|
|
|
<span className="text-xs text-[#B3B3B3] mb-3 text-light "> |
|
|
|
<TitleSubtitle |
|
|
|
افراد عضو این کارت |
|
|
|
title={false} |
|
|
|
</span> |
|
|
|
subTitle={"افراد عضو این کارت"} |
|
|
|
<div className="flex flex-row items-center justify-between w-full"> |
|
|
|
subtitleBorderClassName={""} |
|
|
|
|
|
|
|
subtitleClassName={"text-[#B3B3B3]"} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<div className="flex flex-row items-center justify-between mt-3"> |
|
|
|
<ProfilePicNextToEachOther /> |
|
|
|
<ProfilePicNextToEachOther /> |
|
|
|
<ButtonNewDesign |
|
|
|
<Button |
|
|
|
bgColor={"bg-[#06BACE]"} |
|
|
|
|
|
|
|
bgHoverColor={"hover:bg-[#06BACE99]"} |
|
|
|
|
|
|
|
textColor={"text-white"} |
|
|
|
|
|
|
|
border={"border-none"} |
|
|
|
|
|
|
|
borderRadius={"rounded"} |
|
|
|
|
|
|
|
fontSize={"text-xs"} |
|
|
|
|
|
|
|
paddingX={"p-3"} |
|
|
|
|
|
|
|
paddingY={"p-3"} |
|
|
|
|
|
|
|
icon={false} |
|
|
|
|
|
|
|
text={"دعوت فرد جدید"} |
|
|
|
text={"دعوت فرد جدید"} |
|
|
|
|
|
|
|
className="bg-[#06BACE] text-white text-xs rounded-sm p-2" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/* divider */} |
|
|
|
{/* divider */} |
|
|
|
<div className="border border-[#DBDBDB77] rounded my-5 w-full"></div> |
|
|
|
<div className="border border-[#DBDBDB77] rounded my-3 w-full"></div> |
|
|
|
<span className="text-xs text-[#B3B3B3] mb-3 text-light "> |
|
|
|
<TitleSubtitle |
|
|
|
لیبل های کارت |
|
|
|
title={false} |
|
|
|
</span> |
|
|
|
subTitle={"لیبل های کارت"} |
|
|
|
<div className="flex flex-row flex-wrap items-center gap-2"> |
|
|
|
subtitleBorderClassName={""} |
|
|
|
<ButtonNewDesign |
|
|
|
subtitleClassName={"text-[#B3B3B3]"} |
|
|
|
bgColor={"bg-[#08E678]"} |
|
|
|
|
|
|
|
bgHoverColor={"hover:bg-[#08E67899]"} |
|
|
|
|
|
|
|
textColor={"text-white"} |
|
|
|
|
|
|
|
border={"border-none"} |
|
|
|
|
|
|
|
borderRadius={"rounded"} |
|
|
|
|
|
|
|
fontSize={"text-xs"} |
|
|
|
|
|
|
|
paddingX={"p-3"} |
|
|
|
|
|
|
|
paddingY={"p-3"} |
|
|
|
|
|
|
|
icon={false} |
|
|
|
|
|
|
|
text={"برنامه نویس اندروید"} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<ButtonNewDesign |
|
|
|
|
|
|
|
bgColor={"bg-[#1100FF]"} |
|
|
|
|
|
|
|
bgHoverColor={"hover:bg-[#1100FF99]"} |
|
|
|
|
|
|
|
textColor={"text-white"} |
|
|
|
|
|
|
|
border={"border-none"} |
|
|
|
|
|
|
|
borderRadius={"rounded"} |
|
|
|
|
|
|
|
fontSize={"text-xs"} |
|
|
|
|
|
|
|
paddingX={"p-3"} |
|
|
|
|
|
|
|
paddingY={"p-3"} |
|
|
|
|
|
|
|
icon={false} |
|
|
|
|
|
|
|
text={"رابط کاربری"} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<ButtonNewDesign |
|
|
|
|
|
|
|
bgColor={"bg-[#FFE600]"} |
|
|
|
|
|
|
|
bgHoverColor={"hover:bg-[#FFE60099]"} |
|
|
|
|
|
|
|
textColor={"text-white"} |
|
|
|
|
|
|
|
border={"border-none"} |
|
|
|
|
|
|
|
borderRadius={"rounded"} |
|
|
|
|
|
|
|
fontSize={"text-xs"} |
|
|
|
|
|
|
|
paddingX={"p-3"} |
|
|
|
|
|
|
|
paddingY={"p-3"} |
|
|
|
|
|
|
|
icon={false} |
|
|
|
|
|
|
|
text={"فرایند قانونگذاری"} |
|
|
|
|
|
|
|
/> |
|
|
|
/> |
|
|
|
<div className="bg-[#dddddd] py-1 px-2 rounded cursor-pointer"> |
|
|
|
<div className="flex flex-row flex-wrap items-center gap-2 mt-3"> |
|
|
|
<img |
|
|
|
{buttons.map((btn) => ( |
|
|
|
src={plus} |
|
|
|
<Button |
|
|
|
className="w-full" |
|
|
|
className={`${btn.className} text-xs text-white rounded p-2`} |
|
|
|
style={{ marginTop: "-2px" }} |
|
|
|
iconHolderClassName={""} |
|
|
|
alt="" |
|
|
|
text={btn.name} |
|
|
|
|
|
|
|
icon={btn.icon} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
))} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/* divider */} |
|
|
|
{/* divider */} |
|
|
|
<div className="border border-[#DBDBDB77] rounded my-5 w-full"></div> |
|
|
|
<div className="border border-[#DBDBDB77] rounded my-5 w-full"></div> |
|
|
@ -239,6 +212,26 @@ PopupCard.defaultProps = { |
|
|
|
title: "خرید شماره 3", |
|
|
|
title: "خرید شماره 3", |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
buttons: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: "برنامه نویس اندروید", |
|
|
|
|
|
|
|
className: "bg-[#08E678]", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: "رابط کاربری", |
|
|
|
|
|
|
|
className: "bg-[#1100FF]", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: "فرایند قانونگذاری", |
|
|
|
|
|
|
|
className: "bg-[#FFE600]", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: null, |
|
|
|
|
|
|
|
className: "bg-[#dddddd]", |
|
|
|
|
|
|
|
icon: calender, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|