diff --git a/app/booking/[slug]/page.js b/app/booking/[slug]/page.js index 28c546c..fe22e62 100644 --- a/app/booking/[slug]/page.js +++ b/app/booking/[slug]/page.js @@ -21,9 +21,9 @@ function Booking({ params: { slug } }) { const [isForAnother, setIsForAnother] = useState(false); const [data, setData] = useState({ - phone: { value: "09121056987", isEdit: false }, - codemeli: { value: "1741025645", isEdit: false }, - name: { value: "ساغر صابری نژاد", isEdit: false }, + phone: { value: "09121056987", isEdit: true }, + codemeli: { value: "1741025645", isEdit: true }, + name: { value: "ساغر صابری نژاد", isEdit: true }, }); const elements = [ diff --git a/app/component/EditField.js b/app/component/EditField.js index a59e6c1..fd88766 100644 --- a/app/component/EditField.js +++ b/app/component/EditField.js @@ -56,7 +56,7 @@ function EditField({ className={`!absolute !left-[8px] !-translate-y-1/2 !min-w-fit !p-1 ${multiline ? "!top-[24px]" : "!top-1/2"}`} onClick={() => { - changeData(!data.isEdit, "isEdit", name); + // changeData(!data.isEdit, "isEdit", name); }} > {icon ? icon : iconGray ? : } diff --git a/app/component/element/AutoCompleteSelect.js b/app/component/element/AutoCompleteSelect.js index c8fb0b2..e2733ed 100644 --- a/app/component/element/AutoCompleteSelect.js +++ b/app/component/element/AutoCompleteSelect.js @@ -41,18 +41,17 @@ function AutoCompleteSelect({ list, isError, updateData, name, label }) { border: isError ? "1px solid red !important" : "", }, }} - renderOption={(props, option) => { - return ( - - ); - }} + renderOption={(props, option) => ( + + )} renderInput={(params) => ( { setIsForAnother(true); setData({ - phone: { value: "09121056987", isEdit: false }, - codemeli: { value: "1741025645", isEdit: false }, - name: { value: "ساغر صابری نژاد", isEdit: false }, + phone: { value: "09121056987", isEdit: true }, + codemeli: { value: "1741025645", isEdit: true }, + name: { value: "ساغر صابری نژاد", isEdit: true }, }); }} > diff --git a/components/dashboard/userAccount/tabs/detailUser/index.js b/components/dashboard/userAccount/tabs/detailUser/index.js index 430e519..f431845 100644 --- a/components/dashboard/userAccount/tabs/detailUser/index.js +++ b/components/dashboard/userAccount/tabs/detailUser/index.js @@ -5,14 +5,14 @@ import ArrowLeftWhiteD from "@/components/icons/ArrowLeftWhiteD"; function DetailUser({ user }) { const [data, setData] = useState({ - phone: { value: user.phone, isEdit: false }, - national_code: { value: user.national_code, isEdit: false }, - name: { value: user.name, isEdit: false }, - date_of_birth: { value: user.date_of_birth, isEdit: false }, - father_name: { value: user.father_name, isEdit: false }, - insurance_number: { value: user.insurance_number, isEdit: false }, - home_phone: { value: user.home_phone, isEdit: false }, - work_phone: { value: user.work_phone, isEdit: false }, + phone: { value: user.phone, isEdit: true }, + national_code: { value: user.national_code, isEdit: true }, + name: { value: user.name, isEdit: true }, + date_of_birth: { value: user.date_of_birth, isEdit: true }, + father_name: { value: user.father_name, isEdit: true }, + insurance_number: { value: user.insurance_number, isEdit: true }, + home_phone: { value: user.home_phone, isEdit: true }, + work_phone: { value: user.work_phone, isEdit: true }, }); const [selected, setSelected] = useState({ gender: "", @@ -37,11 +37,7 @@ function DetailUser({ user }) { return (
-
+