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