ر
This commit is contained in:
@@ -21,9 +21,9 @@ function Booking({ params: { slug } }) {
|
|||||||
const [isForAnother, setIsForAnother] = useState(false);
|
const [isForAnother, setIsForAnother] = useState(false);
|
||||||
|
|
||||||
const [data, setData] = useState({
|
const [data, setData] = useState({
|
||||||
phone: { value: "09121056987", isEdit: false },
|
phone: { value: "09121056987", isEdit: true },
|
||||||
codemeli: { value: "1741025645", isEdit: false },
|
codemeli: { value: "1741025645", isEdit: true },
|
||||||
name: { value: "ساغر صابری نژاد", isEdit: false },
|
name: { value: "ساغر صابری نژاد", isEdit: true },
|
||||||
});
|
});
|
||||||
|
|
||||||
const elements = [
|
const elements = [
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ function EditField({
|
|||||||
className={`!absolute !left-[8px] !-translate-y-1/2 !min-w-fit !p-1
|
className={`!absolute !left-[8px] !-translate-y-1/2 !min-w-fit !p-1
|
||||||
${multiline ? "!top-[24px]" : "!top-1/2"}`}
|
${multiline ? "!top-[24px]" : "!top-1/2"}`}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
changeData(!data.isEdit, "isEdit", name);
|
// changeData(!data.isEdit, "isEdit", name);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{icon ? icon : iconGray ? <EditGrayA /> : <EditOrangeA />}
|
{icon ? icon : iconGray ? <EditGrayA /> : <EditOrangeA />}
|
||||||
|
|||||||
@@ -41,18 +41,17 @@ function AutoCompleteSelect({ list, isError, updateData, name, label }) {
|
|||||||
border: isError ? "1px solid red !important" : "",
|
border: isError ? "1px solid red !important" : "",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
renderOption={(props, option) => {
|
renderOption={(props, option) => (
|
||||||
return (
|
<Button
|
||||||
<Button
|
fullWidth
|
||||||
{...props}
|
{...props}
|
||||||
fullWidth
|
style={{}}
|
||||||
className="!flex !justify-start !p-[8px] !text-start !text-[#A1A1A1] hover:dark:!bg-[#35343D] !bg-[#FFF] dark:!bg-[#1F1D2B]"
|
key={props.id}
|
||||||
style={{}}
|
className="!flex !justify-start !p-[8px] !text-start !text-[#A1A1A1] hover:dark:!bg-[#35343D] !bg-[#FFF] dark:!bg-[#1F1D2B]"
|
||||||
>
|
>
|
||||||
{option.label}
|
{option.label}
|
||||||
</Button>
|
</Button>
|
||||||
);
|
)}
|
||||||
}}
|
|
||||||
renderInput={(params) => (
|
renderInput={(params) => (
|
||||||
<TextField
|
<TextField
|
||||||
fullWidth
|
fullWidth
|
||||||
|
|||||||
@@ -54,9 +54,9 @@ function Detail({
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
setIsForAnother(true);
|
setIsForAnother(true);
|
||||||
setData({
|
setData({
|
||||||
phone: { value: "09121056987", isEdit: false },
|
phone: { value: "09121056987", isEdit: true },
|
||||||
codemeli: { value: "1741025645", isEdit: false },
|
codemeli: { value: "1741025645", isEdit: true },
|
||||||
name: { value: "ساغر صابری نژاد", isEdit: false },
|
name: { value: "ساغر صابری نژاد", isEdit: true },
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ import ArrowLeftWhiteD from "@/components/icons/ArrowLeftWhiteD";
|
|||||||
|
|
||||||
function DetailUser({ user }) {
|
function DetailUser({ user }) {
|
||||||
const [data, setData] = useState({
|
const [data, setData] = useState({
|
||||||
phone: { value: user.phone, isEdit: false },
|
phone: { value: user.phone, isEdit: true },
|
||||||
national_code: { value: user.national_code, isEdit: false },
|
national_code: { value: user.national_code, isEdit: true },
|
||||||
name: { value: user.name, isEdit: false },
|
name: { value: user.name, isEdit: true },
|
||||||
date_of_birth: { value: user.date_of_birth, isEdit: false },
|
date_of_birth: { value: user.date_of_birth, isEdit: true },
|
||||||
father_name: { value: user.father_name, isEdit: false },
|
father_name: { value: user.father_name, isEdit: true },
|
||||||
insurance_number: { value: user.insurance_number, isEdit: false },
|
insurance_number: { value: user.insurance_number, isEdit: true },
|
||||||
home_phone: { value: user.home_phone, isEdit: false },
|
home_phone: { value: user.home_phone, isEdit: true },
|
||||||
work_phone: { value: user.work_phone, isEdit: false },
|
work_phone: { value: user.work_phone, isEdit: true },
|
||||||
});
|
});
|
||||||
const [selected, setSelected] = useState({
|
const [selected, setSelected] = useState({
|
||||||
gender: "",
|
gender: "",
|
||||||
@@ -37,11 +37,7 @@ function DetailUser({ user }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="opacity-page">
|
<div className="opacity-page">
|
||||||
<Form
|
<Form data={data} changeData={changeData} updateSelect={updateSelect} />
|
||||||
data={data}
|
|
||||||
changeData={changeData}
|
|
||||||
updateSelect={updateSelect}
|
|
||||||
/>
|
|
||||||
<Button
|
<Button
|
||||||
className="!gap-[4px] !mr-auto !text-nowrap !flex !flex-nowrap !py-[8px]
|
className="!gap-[4px] !mr-auto !text-nowrap !flex !flex-nowrap !py-[8px]
|
||||||
!bg-[#5559CE] !rounded-[4px] !text-[#EFEFEF] !text-[14px] md:!text-[16px] !font-medium
|
!bg-[#5559CE] !rounded-[4px] !text-[#EFEFEF] !text-[14px] md:!text-[16px] !font-medium
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ import ArrowLeftButtonP from "@/components/icons/ArrowLeftButtonP";
|
|||||||
|
|
||||||
function Form() {
|
function Form() {
|
||||||
const [data, setData] = useState({
|
const [data, setData] = useState({
|
||||||
name: { value: "احسان احمدی", isEdit: false },
|
name: { value: "احسان احمدی", isEdit: true },
|
||||||
national_code: { value: "123456789", isEdit: false },
|
national_code: { value: "123456789", isEdit: true },
|
||||||
address: { value: "", isEdit: false },
|
address: { value: "", isEdit: true },
|
||||||
phone: { value: "", isEdit: false },
|
phone: { value: "", isEdit: true },
|
||||||
account_number: { value: "", isEdit: false },
|
account_number: { value: "", isEdit: true },
|
||||||
});
|
});
|
||||||
const [selected, setSelected] = useState({
|
const [selected, setSelected] = useState({
|
||||||
state: "",
|
state: "",
|
||||||
|
|||||||
Reference in New Issue
Block a user