change format all file
This commit is contained in:
@@ -3,7 +3,7 @@ import Layout from "@/components/layout/StLayout";
|
|||||||
|
|
||||||
function AboutUs() {
|
function AboutUs() {
|
||||||
return (
|
return (
|
||||||
<Layout name='/about-us'>
|
<Layout name="/about-us">
|
||||||
<AboutUsPage />
|
<AboutUsPage />
|
||||||
</Layout>
|
</Layout>
|
||||||
);
|
);
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ import Layout from "@/components/layout/StLayout";
|
|||||||
|
|
||||||
function Blogs() {
|
function Blogs() {
|
||||||
return (
|
return (
|
||||||
<Layout name='/blogs'>
|
<Layout name="/blogs">
|
||||||
<BlogsPage />
|
<BlogsPage />
|
||||||
</Layout>
|
</Layout>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -4,9 +4,7 @@ import { getStateInfo } from "@/lib/getStateInfo";
|
|||||||
function Booking({ params: { slug } }) {
|
function Booking({ params: { slug } }) {
|
||||||
const { matchedCity } = getStateInfo();
|
const { matchedCity } = getStateInfo();
|
||||||
|
|
||||||
return (
|
return <BookingPage slug={slug} matchedCity={matchedCity} />;
|
||||||
<BookingPage slug={slug} matchedCity={matchedCity} />
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Booking;
|
export default Booking;
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ function Clinics() {
|
|||||||
const { matchedCity, matchedState } = getStateInfo();
|
const { matchedCity, matchedState } = getStateInfo();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout name='/clinics'>
|
<Layout name="/clinics">
|
||||||
<ClinicsPage matchedCity={matchedCity} matchedState={matchedState} />
|
<ClinicsPage matchedCity={matchedCity} matchedState={matchedState} />
|
||||||
</Layout>
|
</Layout>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,9 +2,7 @@ function AnimationTextHead({ text, children }) {
|
|||||||
return (
|
return (
|
||||||
<div className="flex justify-center items-start relative w-fit">
|
<div className="flex justify-center items-start relative w-fit">
|
||||||
<div className="overflow-hidden mb-[4px] md:mb-[5px] lg:mb-[6px]">
|
<div className="overflow-hidden mb-[4px] md:mb-[5px] lg:mb-[6px]">
|
||||||
<p
|
<p className="text-[#3B3B3B] text-nowrap overflow-hidden text-[14px] sm:text-[16px] md:text-[18px] lg:text-[20px] font-bold">
|
||||||
className="text-[#3B3B3B] text-nowrap overflow-hidden text-[14px] sm:text-[16px] md:text-[18px] lg:text-[20px] font-bold"
|
|
||||||
>
|
|
||||||
{text}
|
{text}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ function Logo({ isAbsolute, matchedCity }) {
|
|||||||
alt="logo"
|
alt="logo"
|
||||||
/>
|
/>
|
||||||
<p className="text-[#526CAC] text-[14px] lg:text-[16px] font-bold font-kalame">
|
<p className="text-[#526CAC] text-[14px] lg:text-[16px] font-bold font-kalame">
|
||||||
{matchedCity?.site_name || 'نوبت ۷۲۴'}
|
{matchedCity?.site_name || "نوبت ۷۲۴"}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ function Pageguide({ list }) {
|
|||||||
<li key={idx} className="flex items-center justify-start gap-1">
|
<li key={idx} className="flex items-center justify-start gap-1">
|
||||||
<h2
|
<h2
|
||||||
className={`text-[16px] font-normal
|
className={`text-[16px] font-normal
|
||||||
${list.length > idx + 1
|
${
|
||||||
|
list.length > idx + 1
|
||||||
? "text-[#9B9B9B]"
|
? "text-[#9B9B9B]"
|
||||||
: "text-[#525252]"
|
: "text-[#525252]"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ import { Pagination as PaginationMUI } from "@mui/material";
|
|||||||
|
|
||||||
function Pagination({ page, setPage, list, itemsPerPage }) {
|
function Pagination({ page, setPage, list, itemsPerPage }) {
|
||||||
const handleChange = (_, value) => setPage(value);
|
const handleChange = (_, value) => setPage(value);
|
||||||
const count = list && itemsPerPage ? Math.ceil(list.length / itemsPerPage) : 20;
|
const count =
|
||||||
|
list && itemsPerPage ? Math.ceil(list.length / itemsPerPage) : 20;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PaginationMUI
|
<PaginationMUI
|
||||||
@@ -10,7 +11,7 @@ function Pagination({ page, setPage, list, itemsPerPage }) {
|
|||||||
page={page || 1}
|
page={page || 1}
|
||||||
onChange={setPage && handleChange}
|
onChange={setPage && handleChange}
|
||||||
color="primary"
|
color="primary"
|
||||||
className={count < 2 && '!hidden'}
|
className={count < 2 && "!hidden"}
|
||||||
sx={{
|
sx={{
|
||||||
"& .mui-8q7g72-MuiButtonBase-root-MuiPaginationItem-root": {
|
"& .mui-8q7g72-MuiButtonBase-root-MuiPaginationItem-root": {
|
||||||
color: "#616161",
|
color: "#616161",
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ function TimePickerField({ dataChange, isVacation, disable, timeStart, data }) {
|
|||||||
const hours = e.$H;
|
const hours = e.$H;
|
||||||
const minute = e.$m;
|
const minute = e.$m;
|
||||||
const newValue = `${handleTwoLength(hours)}:${handleTwoLength(
|
const newValue = `${handleTwoLength(hours)}:${handleTwoLength(
|
||||||
minute
|
minute,
|
||||||
)}`;
|
)}`;
|
||||||
|
|
||||||
const newData = data;
|
const newData = data;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ function TimePickerInput({ changeData, handleDisableHours, name, data }) {
|
|||||||
const hours = e.$H;
|
const hours = e.$H;
|
||||||
const minute = e.$m;
|
const minute = e.$m;
|
||||||
const newValue = `${handleTwoLength(hours)}:${handleTwoLength(
|
const newValue = `${handleTwoLength(hours)}:${handleTwoLength(
|
||||||
minute
|
minute,
|
||||||
)}`;
|
)}`;
|
||||||
// setValue(newValue);
|
// setValue(newValue);
|
||||||
changeData(newValue, name);
|
changeData(newValue, name);
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ function ItemUser({
|
|||||||
data.is_like ? data.like - 1 : data.like + 1,
|
data.is_like ? data.like - 1 : data.like + 1,
|
||||||
data,
|
data,
|
||||||
"like",
|
"like",
|
||||||
"is_like"
|
"is_like",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
@@ -105,7 +105,7 @@ function ItemUser({
|
|||||||
data.is_dislike ? data.dislike - 1 : data.dislike + 1,
|
data.is_dislike ? data.dislike - 1 : data.dislike + 1,
|
||||||
data,
|
data,
|
||||||
"dislike",
|
"dislike",
|
||||||
"is_dislike"
|
"is_dislike",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ function AutoCompleteSelect({
|
|||||||
label,
|
label,
|
||||||
disabled = false,
|
disabled = false,
|
||||||
listboxProps,
|
listboxProps,
|
||||||
sendAll
|
sendAll,
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<Autocomplete
|
<Autocomplete
|
||||||
@@ -22,7 +22,13 @@ function AutoCompleteSelect({
|
|||||||
value={value || null}
|
value={value || null}
|
||||||
className="!w-full !rounded-lg auto-complete-selector"
|
className="!w-full !rounded-lg auto-complete-selector"
|
||||||
onChange={(e, newValue) => {
|
onChange={(e, newValue) => {
|
||||||
updateData && updateData((newValue && sendAll) ? newValue : (newValue && !sendAll) && newValue.label || "", name);
|
updateData &&
|
||||||
|
updateData(
|
||||||
|
newValue && sendAll
|
||||||
|
? newValue
|
||||||
|
: (newValue && !sendAll && newValue.label) || "",
|
||||||
|
name,
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
sx={{
|
sx={{
|
||||||
...styleTextSelectRight,
|
...styleTextSelectRight,
|
||||||
|
|||||||
@@ -1,7 +1,16 @@
|
|||||||
import { TextField } from "@mui/material";
|
import { TextField } from "@mui/material";
|
||||||
import { styleTextSelectRight } from "@/mui";
|
import { styleTextSelectRight } from "@/mui";
|
||||||
|
|
||||||
function Field({ title, error, spaceNull, inputProps, type, dir, value, updateState }) {
|
function Field({
|
||||||
|
title,
|
||||||
|
error,
|
||||||
|
spaceNull,
|
||||||
|
inputProps,
|
||||||
|
type,
|
||||||
|
dir,
|
||||||
|
value,
|
||||||
|
updateState,
|
||||||
|
}) {
|
||||||
return (
|
return (
|
||||||
<TextField
|
<TextField
|
||||||
label={title}
|
label={title}
|
||||||
@@ -13,8 +22,9 @@ function Field({ title, error, spaceNull, inputProps, type, dir, value, updateSt
|
|||||||
className="!w-full !mx-auto !bg-[#FFF]"
|
className="!w-full !mx-auto !bg-[#FFF]"
|
||||||
InputProps={inputProps}
|
InputProps={inputProps}
|
||||||
sx={{
|
sx={{
|
||||||
'.MuiOutlinedInput-notchedOutline.muirtl-1d3z3hw-MuiOutlinedInput-notchedOutline': {
|
".MuiOutlinedInput-notchedOutline.muirtl-1d3z3hw-MuiOutlinedInput-notchedOutline":
|
||||||
border: error && '1px solid red !important'
|
{
|
||||||
|
border: error && "1px solid red !important",
|
||||||
},
|
},
|
||||||
...styleTextSelectRight,
|
...styleTextSelectRight,
|
||||||
// Hide Icon Number
|
// Hide Icon Number
|
||||||
@@ -25,7 +35,9 @@ function Field({ title, error, spaceNull, inputProps, type, dir, value, updateSt
|
|||||||
"& input[type=number]": {
|
"& input[type=number]": {
|
||||||
MozAppearance: "textfield",
|
MozAppearance: "textfield",
|
||||||
},
|
},
|
||||||
"& .MuiInputBase-input": { padding: spaceNull ? "12.5px 0" : "12.5px 14px" },
|
"& .MuiInputBase-input": {
|
||||||
|
padding: spaceNull ? "12.5px 0" : "12.5px 14px",
|
||||||
|
},
|
||||||
"& .MuiInputBase-root": { borderRadius: "6px !important" },
|
"& .MuiInputBase-root": { borderRadius: "6px !important" },
|
||||||
"& .MuiOutlinedInput-notchedOutline": {
|
"& .MuiOutlinedInput-notchedOutline": {
|
||||||
border: "1px solid #E9ECEF !important",
|
border: "1px solid #E9ECEF !important",
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ function ButtonFilter({ selected, setOpen }) {
|
|||||||
<Location />
|
<Location />
|
||||||
</div>
|
</div>
|
||||||
<p
|
<p
|
||||||
className='text-[#616161] text-[11px] md:text-[14px] leading-[17px] sm:leading-[19px]
|
className="text-[#616161] text-[11px] md:text-[14px] leading-[17px] sm:leading-[19px]
|
||||||
md:leading-[22px] lg:leading-[24px] font-medium ml-1 md:mx-1'
|
md:leading-[22px] lg:leading-[24px] font-medium ml-1 md:mx-1"
|
||||||
>
|
>
|
||||||
{selected.city || 'شهر'}
|
{selected.city || "شهر"}
|
||||||
</p>
|
</p>
|
||||||
<div className="w-[16px] h-[16px] md:w-[18px] md:h-[18px] lg:w-[20px] lg:h-[20px] grid place-items-center">
|
<div className="w-[16px] h-[16px] md:w-[18px] md:h-[18px] lg:w-[20px] lg:h-[20px] grid place-items-center">
|
||||||
<ArrowBottomH />
|
<ArrowBottomH />
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ function Content({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleFilter = () => {
|
const handleFilter = () => {
|
||||||
handleSearch && handleSearch('');
|
handleSearch && handleSearch("");
|
||||||
handleClose();
|
handleClose();
|
||||||
}
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -10,7 +10,15 @@ import statesData from "@/data/state.json";
|
|||||||
import citiesData from "@/data/city.json";
|
import citiesData from "@/data/city.json";
|
||||||
import Content from "./Content";
|
import Content from "./Content";
|
||||||
|
|
||||||
function ModalSearchCity({ children, selected, handleSearch, state, setSelected, open, setOpen }) {
|
function ModalSearchCity({
|
||||||
|
children,
|
||||||
|
selected,
|
||||||
|
handleSearch,
|
||||||
|
state,
|
||||||
|
setSelected,
|
||||||
|
open,
|
||||||
|
setOpen,
|
||||||
|
}) {
|
||||||
const provinceSelected = selected.province;
|
const provinceSelected = selected.province;
|
||||||
|
|
||||||
const states = addLabelToList(statesData);
|
const states = addLabelToList(statesData);
|
||||||
@@ -22,12 +30,12 @@ function ModalSearchCity({ children, selected, handleSearch, state, setSelected,
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (provinceSelected) {
|
if (provinceSelected) {
|
||||||
const selectedState = states.find(
|
const selectedState = states.find(
|
||||||
(state) => state.label === provinceSelected
|
(state) => state.label === provinceSelected,
|
||||||
);
|
);
|
||||||
if (selectedState) {
|
if (selectedState) {
|
||||||
const stateId = selectedState.id;
|
const stateId = selectedState.id;
|
||||||
const filteredCities = cities.filter(
|
const filteredCities = cities.filter(
|
||||||
(city) => city.province_id === stateId
|
(city) => city.province_id === stateId,
|
||||||
);
|
);
|
||||||
setFilteredCities(filteredCities);
|
setFilteredCities(filteredCities);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ async function getCroppedImg(imageSrc, pixelCrop) {
|
|||||||
ctx.drawImage(
|
ctx.drawImage(
|
||||||
image,
|
image,
|
||||||
safeArea / 2 - image.width * 0.5,
|
safeArea / 2 - image.width * 0.5,
|
||||||
safeArea / 2 - image.height * 0.5
|
safeArea / 2 - image.height * 0.5,
|
||||||
);
|
);
|
||||||
const data = ctx.getImageData(0, 0, safeArea, safeArea);
|
const data = ctx.getImageData(0, 0, safeArea, safeArea);
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ async function getCroppedImg(imageSrc, pixelCrop) {
|
|||||||
ctx.putImageData(
|
ctx.putImageData(
|
||||||
data,
|
data,
|
||||||
Math.round(0 - safeArea / 2 + image.width * 0.5 - pixelCrop.x),
|
Math.round(0 - safeArea / 2 + image.width * 0.5 - pixelCrop.x),
|
||||||
Math.round(0 - safeArea / 2 + image.height * 0.5 - pixelCrop.y)
|
Math.round(0 - safeArea / 2 + image.height * 0.5 - pixelCrop.y),
|
||||||
);
|
);
|
||||||
|
|
||||||
return canvas.toDataURL("image/jpeg");
|
return canvas.toDataURL("image/jpeg");
|
||||||
|
|||||||
@@ -4,9 +4,7 @@ import { getStateInfo } from "@/lib/getStateInfo";
|
|||||||
function UserAccount() {
|
function UserAccount() {
|
||||||
const { matchedCity } = getStateInfo();
|
const { matchedCity } = getStateInfo();
|
||||||
|
|
||||||
return (
|
return <Content matchedCity={matchedCity} />;
|
||||||
<Content matchedCity={matchedCity} />
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default UserAccount;
|
export default UserAccount;
|
||||||
|
|||||||
+9
-6
@@ -213,11 +213,13 @@ html {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cover-head-blogs {
|
.cover-head-blogs {
|
||||||
background: linear-gradient(180deg,
|
background: linear-gradient(
|
||||||
|
180deg,
|
||||||
rgba(0, 0, 0, 0) 0%,
|
rgba(0, 0, 0, 0) 0%,
|
||||||
rgba(0, 0, 0, 0.07) 31.47%,
|
rgba(0, 0, 0, 0.07) 31.47%,
|
||||||
rgba(0, 0, 0, 0.31) 59.72%,
|
rgba(0, 0, 0, 0.31) 59.72%,
|
||||||
rgba(0, 0, 0, 0.7) 89.39%);
|
rgba(0, 0, 0, 0.7) 89.39%
|
||||||
|
);
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -585,7 +587,6 @@ html {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1024px) {
|
@media (max-width: 1024px) {
|
||||||
|
|
||||||
.day-label-bar-inner-rtl,
|
.day-label-bar-inner-rtl,
|
||||||
.panel-jalaali,
|
.panel-jalaali,
|
||||||
.panel-header-rtl,
|
.panel-header-rtl,
|
||||||
@@ -619,13 +620,15 @@ html {
|
|||||||
border-color: #343645 !important;
|
border-color: #343645 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark .MuiList-root.MuiList-padding.MuiMultiSectionDigitalClockSection-root::-webkit-scrollbar-track {
|
.dark
|
||||||
|
.MuiList-root.MuiList-padding.MuiMultiSectionDigitalClockSection-root::-webkit-scrollbar-track {
|
||||||
background: #1f1d2b;
|
background: #1f1d2b;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark .MuiList-root.MuiList-padding.MuiMultiSectionDigitalClockSection-root::-webkit-scrollbar-thumb {
|
.dark
|
||||||
|
.MuiList-root.MuiList-padding.MuiMultiSectionDigitalClockSection-root::-webkit-scrollbar-thumb {
|
||||||
background: #222433;
|
background: #222433;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
@@ -845,5 +848,5 @@ html {
|
|||||||
/* End Of Toastify */
|
/* End Of Toastify */
|
||||||
|
|
||||||
.text-item-head-white:hover .item-head {
|
.text-item-head-white:hover .item-head {
|
||||||
color: #D7D8ED;
|
color: #d7d8ed;
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,7 @@
|
|||||||
import ContentVerify from "@/components/register/ContentVerify";
|
import ContentVerify from "@/components/register/ContentVerify";
|
||||||
|
|
||||||
function LoginVerify() {
|
function LoginVerify() {
|
||||||
return (
|
return <ContentVerify />;
|
||||||
<ContentVerify />
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default LoginVerify;
|
export default LoginVerify;
|
||||||
|
|||||||
+1
-3
@@ -1,9 +1,7 @@
|
|||||||
import ContentLogin from "@/components/register/ContentLogin";
|
import ContentLogin from "@/components/register/ContentLogin";
|
||||||
|
|
||||||
function LogIn() {
|
function LogIn() {
|
||||||
return (
|
return <ContentLogin />;
|
||||||
<ContentLogin />
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default LogIn;
|
export default LogIn;
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ import Layout from "@/components/layout/StLayout";
|
|||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
return (
|
return (
|
||||||
<Layout name='/'>
|
<Layout name="/">
|
||||||
<HomePage />
|
<HomePage />
|
||||||
</Layout>
|
</Layout>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
import Content from "@/components/panel/Content";
|
import Content from "@/components/panel/Content";
|
||||||
|
|
||||||
function LayoutPanel({ children }) {
|
function LayoutPanel({ children }) {
|
||||||
return (
|
return <Content children={children} />;
|
||||||
<Content children={children} />
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default LayoutPanel;
|
export default LayoutPanel;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Information from "@/data/information.json";
|
|||||||
import Bank from "@/data/bank.json";
|
import Bank from "@/data/bank.json";
|
||||||
|
|
||||||
function UserAccount() {
|
function UserAccount() {
|
||||||
return <UserAccountPage data={{information: Information, bank: Bank}} />;
|
return <UserAccountPage data={{ information: Information, bank: Bank }} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default UserAccount;
|
export default UserAccount;
|
||||||
|
|||||||
@@ -10,9 +10,7 @@ function SocialMedia({ loading }) {
|
|||||||
<ul className="flex mt-0 sm:mt-[3px] md:mt-[6px] lg:mt-[8px] pb-[16px] sm:pb-[21px] md:pb-[27px] lg:pb-[32px] relative items-center justify-end gap-4">
|
<ul className="flex mt-0 sm:mt-[3px] md:mt-[6px] lg:mt-[8px] pb-[16px] sm:pb-[21px] md:pb-[27px] lg:pb-[32px] relative items-center justify-end gap-4">
|
||||||
{socials.map((item, idx) => (
|
{socials.map((item, idx) => (
|
||||||
<CircularLoading width={36} key={idx} height={36} loading={loading}>
|
<CircularLoading width={36} key={idx} height={36} loading={loading}>
|
||||||
<li
|
<li className="bg-[#EFEFEF] rounded-full hover-rotate-icon p-[9px]">
|
||||||
className="bg-[#EFEFEF] rounded-full hover-rotate-icon p-[9px]"
|
|
||||||
>
|
|
||||||
{item}
|
{item}
|
||||||
</li>
|
</li>
|
||||||
</CircularLoading>
|
</CircularLoading>
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
import Information from "./information";
|
import Information from "./information";
|
||||||
import Location from "./location";
|
import Location from "./location";
|
||||||
|
|
||||||
function Content({
|
function Content({ doctor, step, setStep, children, isFirst, disableSide }) {
|
||||||
doctor,
|
|
||||||
step,
|
|
||||||
setStep,
|
|
||||||
children,
|
|
||||||
isFirst,
|
|
||||||
disableSide,
|
|
||||||
}) {
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="flex flex-col lg:flex-row justify-center gap-[12px] sm:gap-[16px] md:gap-[20px] lg:gap-[24px] padding-responsive
|
className="flex flex-col lg:flex-row justify-center gap-[12px] sm:gap-[16px] md:gap-[20px] lg:gap-[24px] padding-responsive
|
||||||
|
|||||||
@@ -19,7 +19,9 @@ function Information({ doctor, step, setStep, typePay, isPay, disableSide }) {
|
|||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
>
|
>
|
||||||
<p className="text-[#3B3B3B] text-[14px] sm:text-[16px] md:text-[18px] lg:text-[20px] font-bold">جزئیات نوبت</p>
|
<p className="text-[#3B3B3B] text-[14px] sm:text-[16px] md:text-[18px] lg:text-[20px] font-bold">
|
||||||
|
جزئیات نوبت
|
||||||
|
</p>
|
||||||
<Head doctor={doctor} />
|
<Head doctor={doctor} />
|
||||||
<Detail doctor={doctor} step={step} setStep={setStep} />
|
<Detail doctor={doctor} step={step} setStep={setStep} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ function Slider({ data, loading }) {
|
|||||||
className="min-w-[90px] min-h-[90px] object-cover rounded-[8px] overflow-hidden"
|
className="min-w-[90px] min-h-[90px] object-cover rounded-[8px] overflow-hidden"
|
||||||
/>
|
/>
|
||||||
</CustomLoading>
|
</CustomLoading>
|
||||||
) : undefined
|
) : undefined,
|
||||||
)}
|
)}
|
||||||
</ul>
|
</ul>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import { Button, ButtonGroup, TextField } from "@mui/material";
|
import { Button, ButtonGroup, TextField } from "@mui/material";
|
||||||
import SearchD from "@/components/icons/SearchD";
|
import SearchD from "@/components/icons/SearchD";
|
||||||
import ModalSearchCity from "@/app/component/modalSearchCity";
|
import ModalSearchCity from "@/app/component/modalSearchCity";
|
||||||
@@ -28,7 +27,7 @@ function SearchBar({ selected, setSelected, state, handleSearch }) {
|
|||||||
</ModalSearchCity>
|
</ModalSearchCity>
|
||||||
<TextField
|
<TextField
|
||||||
variant="standard"
|
variant="standard"
|
||||||
onChange={e => handleSearch(e.target.value)}
|
onChange={(e) => handleSearch(e.target.value)}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
disableUnderline: true,
|
disableUnderline: true,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import HeadPageList from "@/app/component/head";
|
|||||||
|
|
||||||
function ClinicsPage({ matchedCity, matchedState }) {
|
function ClinicsPage({ matchedCity, matchedState }) {
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
const [filteredClinics, setFilteredClinics] = useState(clinics)
|
const [filteredClinics, setFilteredClinics] = useState(clinics);
|
||||||
|
|
||||||
const [selected, setSelected] = useState({
|
const [selected, setSelected] = useState({
|
||||||
province: matchedState?.name || "",
|
province: matchedState?.name || "",
|
||||||
@@ -23,10 +23,9 @@ function ClinicsPage({ matchedCity, matchedState }) {
|
|||||||
}, 2000);
|
}, 2000);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
||||||
const handleSearch = (value) => {
|
const handleSearch = (value) => {
|
||||||
const searchOnName = searchOnList(clinics, value, 'title')
|
const searchOnName = searchOnList(clinics, value, "title");
|
||||||
const searchOnLocation = searchOnList(searchOnName, selected.city, 'city')
|
const searchOnLocation = searchOnList(searchOnName, selected.city, "city");
|
||||||
setFilteredClinics(searchOnLocation);
|
setFilteredClinics(searchOnLocation);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ function ItemClinic({ data, loading }) {
|
|||||||
</CircularLoading>
|
</CircularLoading>
|
||||||
<div className="flex flex-col items-start justify-center gap-2">
|
<div className="flex flex-col items-start justify-center gap-2">
|
||||||
<TextLoading loading={loading} width={100} height={18}>
|
<TextLoading loading={loading} width={100} height={18}>
|
||||||
<h3 className="text-[#3B3B3B] text-[14px] font-bold">{data.title}</h3>
|
<h3 className="text-[#3B3B3B] text-[14px] font-bold">
|
||||||
|
{data.title}
|
||||||
|
</h3>
|
||||||
</TextLoading>
|
</TextLoading>
|
||||||
<TextLoading loading={loading} width={60} height={18}>
|
<TextLoading loading={loading} width={60} height={18}>
|
||||||
<p className="text-[#7E7E7E] text-[14px] font-normal">
|
<p className="text-[#7E7E7E] text-[14px] font-normal">
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ function ContentContact({ text, children, url, label }) {
|
|||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
<p className="text-[#FFF] text-[14px] md:text-[18px] sm:text-[16px] lg:text-[20px] font-normal">
|
<p className="text-[#FFF] text-[14px] md:text-[18px] sm:text-[16px] lg:text-[20px] font-normal">
|
||||||
{label}<span dir="ltr">{text}</span>
|
{label}
|
||||||
|
<span dir="ltr">{text}</span>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -6,10 +6,12 @@ function Call({ matchedCity, isDefault }) {
|
|||||||
className={`lg:min-w-[calc(50%_+_70px)] bg-banner-about !bg-center !bg-no-repeat !bg-cover h-fit pt-[16px] sm:pt-[29px] md:pt-[42px] lg:pt-[55px]
|
className={`lg:min-w-[calc(50%_+_70px)] bg-banner-about !bg-center !bg-no-repeat !bg-cover h-fit pt-[16px] sm:pt-[29px] md:pt-[42px] lg:pt-[55px]
|
||||||
bg-contact rounded-[8px] pb-[30px] sm:pb-[42px] md:pb-[55px]
|
bg-contact rounded-[8px] pb-[30px] sm:pb-[42px] md:pb-[55px]
|
||||||
overflow-hidden lg:pb-[171px] px-[16px] sm:px-[27px] md:px-[39px] lg:px-[48px]
|
overflow-hidden lg:pb-[171px] px-[16px] sm:px-[27px] md:px-[39px] lg:px-[48px]
|
||||||
${isDefault ? 'lg:pl-[18%]' : 'w-full'}`}
|
${isDefault ? "lg:pl-[18%]" : "w-full"}`}
|
||||||
>
|
>
|
||||||
<h1 className="text-[#FAFAFA] text-[20px] font-bold">تماس با ما</h1>
|
<h1 className="text-[#FAFAFA] text-[20px] font-bold">تماس با ما</h1>
|
||||||
<h2 className="text-[#FAFAFA] leading-[26px] text-[14px] md:text-[16px] font-normal mt-6">{matchedCity.footerDescription}</h2>
|
<h2 className="text-[#FAFAFA] leading-[26px] text-[14px] md:text-[16px] font-normal mt-6">
|
||||||
|
{matchedCity.footerDescription}
|
||||||
|
</h2>
|
||||||
<Links matchedCity={matchedCity} />
|
<Links matchedCity={matchedCity} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -8,25 +8,29 @@ import ContentContact from "../ContentContact";
|
|||||||
function Links({ matchedCity }) {
|
function Links({ matchedCity }) {
|
||||||
return (
|
return (
|
||||||
<ul className="flex flex-col mt-[68px] justify-start items-start gap-[32px]">
|
<ul className="flex flex-col mt-[68px] justify-start items-start gap-[32px]">
|
||||||
<ContentContact url="tel:900300400" label='تلفن تماس: ' text={matchedCity.contactPhone}>
|
<ContentContact
|
||||||
|
url="tel:900300400"
|
||||||
|
label="تلفن تماس: "
|
||||||
|
text={matchedCity.contactPhone}
|
||||||
|
>
|
||||||
<CallC />
|
<CallC />
|
||||||
</ContentContact>
|
</ContentContact>
|
||||||
<ContentContact
|
<ContentContact
|
||||||
url="https://wa.me/09124568794"
|
url="https://wa.me/09124568794"
|
||||||
text={matchedCity.socialMedia.whatsapp}
|
text={matchedCity.socialMedia.whatsapp}
|
||||||
label='واتساپ: '
|
label="واتساپ: "
|
||||||
>
|
>
|
||||||
<WhatsappC />
|
<WhatsappC />
|
||||||
</ContentContact>
|
</ContentContact>
|
||||||
<ContentContact
|
<ContentContact
|
||||||
url="mailto:batome@gmail.com"
|
url="mailto:batome@gmail.com"
|
||||||
text={matchedCity.email}
|
text={matchedCity.email}
|
||||||
label='ایمیل: '
|
label="ایمیل: "
|
||||||
>
|
>
|
||||||
<EmailC />
|
<EmailC />
|
||||||
</ContentContact>
|
</ContentContact>
|
||||||
</ul>
|
</ul>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Links
|
export default Links;
|
||||||
|
|||||||
@@ -9,9 +9,7 @@ function ContactUsPage() {
|
|||||||
return (
|
return (
|
||||||
<div className="w-full pt-[24px] sm:pt-[56px] md:pt-[88px] lg:pt-[120px] mt-[56px] padding-responsive flex flex-col lg:flex-row items-center justify-between h-fit">
|
<div className="w-full pt-[24px] sm:pt-[56px] md:pt-[88px] lg:pt-[120px] mt-[56px] padding-responsive flex flex-col lg:flex-row items-center justify-between h-fit">
|
||||||
<Call matchedCity={matchedCity} isDefault={isDefault} />
|
<Call matchedCity={matchedCity} isDefault={isDefault} />
|
||||||
{matchedCity?.id === "63" && (
|
{matchedCity?.id === "63" && <Connect />}
|
||||||
<Connect />
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ function DashboardPage({
|
|||||||
setValue,
|
setValue,
|
||||||
isOpenSide,
|
isOpenSide,
|
||||||
setIsOpenSide,
|
setIsOpenSide,
|
||||||
matchedCity
|
matchedCity,
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<Layout
|
<Layout
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ function AboutDcotor({ doctor, loading }) {
|
|||||||
text-[#616161] text-[14px] font-normal overflow-hidden relative
|
text-[#616161] text-[14px] font-normal overflow-hidden relative
|
||||||
md:max-h-fit after:absolute after:right-0 after:bottom-0 leading-[28px] sm:leading-[30px] md:leading-[32px] lg:leading-[33px] after:h-[80px]
|
md:max-h-fit after:absolute after:right-0 after:bottom-0 leading-[28px] sm:leading-[30px] md:leading-[32px] lg:leading-[33px] after:h-[80px]
|
||||||
after:shadow-xl after:w-full transition-all duration-500 md:after:!bg-[linear-gradient(transparent,transparent)]
|
after:shadow-xl after:w-full transition-all duration-500 md:after:!bg-[linear-gradient(transparent,transparent)]
|
||||||
${isMore
|
${
|
||||||
|
isMore
|
||||||
? "after:bg-transparent max-h-screen"
|
? "after:bg-transparent max-h-screen"
|
||||||
: "after:bg-[linear-gradient(transparent,#FAFAFA)] max-h-[200px]"
|
: "after:bg-[linear-gradient(transparent,#FAFAFA)] max-h-[200px]"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ function ProgressAll({ doctor, loading }) {
|
|||||||
<br />
|
<br />
|
||||||
رضایت کاربران
|
رضایت کاربران
|
||||||
</p>
|
</p>
|
||||||
<p className="text-[#3B3B3B]">{numberToArStyle(doctor.total_user_satisfaction)}%</p>
|
<p className="text-[#3B3B3B]">
|
||||||
|
{numberToArStyle(doctor.total_user_satisfaction)}%
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</CircularLoading>
|
</CircularLoading>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -54,7 +54,8 @@ function Chart({ doctor, loading }) {
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex flex-wrap items-center justify-center gap-[50px]">
|
<div className="flex flex-wrap items-center justify-center gap-[50px]">
|
||||||
<ul
|
<ul
|
||||||
className={`flex w-full flex-col items-start justify-start gap-1.5 ${loading ? "lg:w-full" : "lg:w-fit"
|
className={`flex w-full flex-col items-start justify-start gap-1.5 ${
|
||||||
|
loading ? "lg:w-full" : "lg:w-fit"
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
{doctor.progress_detail.map((item, idx) => (
|
{doctor.progress_detail.map((item, idx) => (
|
||||||
|
|||||||
@@ -18,14 +18,17 @@ function DoctorsPage({ params, matchedCity, matchedState }) {
|
|||||||
province: matchedState?.name || params?.province,
|
province: matchedState?.name || params?.province,
|
||||||
city: matchedCity?.name || params?.city,
|
city: matchedCity?.name || params?.city,
|
||||||
});
|
});
|
||||||
const findItem = (name, value) => specialties.find(item => item[name] === value)
|
const findItem = (name, value) =>
|
||||||
const itemCategory = findItem('id', params.category);
|
specialties.find((item) => item[name] === value);
|
||||||
const itemSpecialties = findItem('id', params.specialties);
|
const itemCategory = findItem("id", params.category);
|
||||||
|
const itemSpecialties = findItem("id", params.specialties);
|
||||||
|
|
||||||
const [data, setData] = useState({
|
const [data, setData] = useState({
|
||||||
category: itemCategory || "",
|
category: itemCategory || "",
|
||||||
specialties: itemSpecialties ? { ...itemSpecialties, label: itemSpecialties.name } : "",
|
specialties: itemSpecialties
|
||||||
turn: params && params.hasOwnProperty('turn') ? JSON.parse(params.turn) : 1,
|
? { ...itemSpecialties, label: itemSpecialties.name }
|
||||||
|
: "",
|
||||||
|
turn: params && params.hasOwnProperty("turn") ? JSON.parse(params.turn) : 1,
|
||||||
gender: params.gender || "هر دو",
|
gender: params.gender || "هر دو",
|
||||||
degree: params.degree || "متخصص",
|
degree: params.degree || "متخصص",
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import { filterList } from "@/helper";
|
|||||||
const group1 = ["خانم", "آقا", "هر دو"];
|
const group1 = ["خانم", "آقا", "هر دو"];
|
||||||
const group2 = ["فوق تخصص", "دکترای تخصصی", "متخصص", "دکتری"];
|
const group2 = ["فوق تخصص", "دکترای تخصصی", "متخصص", "دکتری"];
|
||||||
|
|
||||||
|
|
||||||
function Content({ data, setData }) {
|
function Content({ data, setData }) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { parentList, childrenList } = filterList(data);
|
const { parentList, childrenList } = filterList(data);
|
||||||
@@ -15,21 +14,21 @@ function Content({ data, setData }) {
|
|||||||
const current = new URLSearchParams(window.location.search);
|
const current = new URLSearchParams(window.location.search);
|
||||||
current.set(name, value.id || value);
|
current.set(name, value.id || value);
|
||||||
if (removeSpecialties) {
|
if (removeSpecialties) {
|
||||||
current.delete('specialties')
|
current.delete("specialties");
|
||||||
};
|
|
||||||
const queryString = current.toString();
|
|
||||||
router.push(`/doctors?${queryString}`)
|
|
||||||
}
|
}
|
||||||
|
const queryString = current.toString();
|
||||||
|
router.push(`/doctors?${queryString}`);
|
||||||
|
};
|
||||||
|
|
||||||
const changeData = (value, name, removeSpecialties) => {
|
const changeData = (value, name, removeSpecialties) => {
|
||||||
changeUrl(value, name, removeSpecialties);
|
changeUrl(value, name, removeSpecialties);
|
||||||
const newData = data;
|
const newData = data;
|
||||||
newData[name] = value;
|
newData[name] = value;
|
||||||
if (removeSpecialties) {
|
if (removeSpecialties) {
|
||||||
newData.specialties = ''
|
newData.specialties = "";
|
||||||
};
|
|
||||||
setData(newData);
|
|
||||||
}
|
}
|
||||||
|
setData(newData);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mt-[50px] px-[0px] md:px-[19px] lg:px-[38px] mb-[32px]">
|
<div className="mt-[50px] px-[0px] md:px-[19px] lg:px-[38px] mb-[32px]">
|
||||||
@@ -59,7 +58,7 @@ function Content({ data, setData }) {
|
|||||||
value={data.gender}
|
value={data.gender}
|
||||||
text="جنسیت پزشک"
|
text="جنسیت پزشک"
|
||||||
group={group1}
|
group={group1}
|
||||||
name='gender'
|
name="gender"
|
||||||
/>
|
/>
|
||||||
<span className="block mt-[16px] mb-[24px] w-full h-px bg-[#EFEFEF]"></span>
|
<span className="block mt-[16px] mb-[24px] w-full h-px bg-[#EFEFEF]"></span>
|
||||||
<RadioContent
|
<RadioContent
|
||||||
@@ -67,7 +66,7 @@ function Content({ data, setData }) {
|
|||||||
value={data.degree}
|
value={data.degree}
|
||||||
text="درجه علمی"
|
text="درجه علمی"
|
||||||
group={group2}
|
group={group2}
|
||||||
name='degree'
|
name="degree"
|
||||||
/>
|
/>
|
||||||
<span className="block mt-[16px] mb-[24px] w-full h-px bg-[#EFEFEF]"></span>
|
<span className="block mt-[16px] mb-[24px] w-full h-px bg-[#EFEFEF]"></span>
|
||||||
<div className="flex items-center justify-start gap-[12px]">
|
<div className="flex items-center justify-start gap-[12px]">
|
||||||
@@ -76,7 +75,7 @@ function Content({ data, setData }) {
|
|||||||
<Switch
|
<Switch
|
||||||
checked={data.turn}
|
checked={data.turn}
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
changeData(event.target.checked ? 1 : 0, "turn")
|
changeData(event.target.checked ? 1 : 0, "turn");
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -86,7 +85,7 @@ function Content({ data, setData }) {
|
|||||||
fontSize: "16px",
|
fontSize: "16px",
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
},
|
},
|
||||||
marginLeft: '0 !important',
|
marginLeft: "0 !important",
|
||||||
}}
|
}}
|
||||||
label="فقط پزشکان دارای نوبت"
|
label="فقط پزشکان دارای نوبت"
|
||||||
labelPlacement="start"
|
labelPlacement="start"
|
||||||
|
|||||||
@@ -16,7 +16,13 @@ function FilterModal({ data, setData, children }) {
|
|||||||
const handleClose = () => setOpen(false);
|
const handleClose = () => setOpen(false);
|
||||||
|
|
||||||
const deleteData = () => {
|
const deleteData = () => {
|
||||||
clearFilterParams(router, ['turn', 'specialties', 'degree', 'category', 'gender'])
|
clearFilterParams(router, [
|
||||||
|
"turn",
|
||||||
|
"specialties",
|
||||||
|
"degree",
|
||||||
|
"category",
|
||||||
|
"gender",
|
||||||
|
]);
|
||||||
setData({
|
setData({
|
||||||
category: "",
|
category: "",
|
||||||
specialties: "",
|
specialties: "",
|
||||||
@@ -25,7 +31,7 @@ function FilterModal({ data, setData, children }) {
|
|||||||
degree: "متخصص",
|
degree: "متخصص",
|
||||||
});
|
});
|
||||||
handleClose();
|
handleClose();
|
||||||
}
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ function SearchBar({ data, setData, params }) {
|
|||||||
</FilterModal>
|
</FilterModal>
|
||||||
<TextField
|
<TextField
|
||||||
variant="standard"
|
variant="standard"
|
||||||
defaultValue={params.search || ''}
|
defaultValue={params.search || ""}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
disableUnderline: true,
|
disableUnderline: true,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -29,13 +29,17 @@ function SelectSort() {
|
|||||||
</SvgIcon>
|
</SvgIcon>
|
||||||
{value ? (
|
{value ? (
|
||||||
<ul className="flex items-center justify-start gap-1">
|
<ul className="flex items-center justify-start gap-1">
|
||||||
{Array(sort).fill({}).map((_, idx) => (
|
{Array(sort)
|
||||||
|
.fill({})
|
||||||
|
.map((_, idx) => (
|
||||||
<li key={idx}>
|
<li key={idx}>
|
||||||
<StarDI />
|
<StarDI />
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
) : "مرتب سازی"}
|
) : (
|
||||||
|
"مرتب سازی"
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
@@ -60,8 +64,13 @@ function SelectSort() {
|
|||||||
name={item.label}
|
name={item.label}
|
||||||
className="!flex !flex-col !items-start !w-full hover:!bg-transparent"
|
className="!flex !flex-col !items-start !w-full hover:!bg-transparent"
|
||||||
>
|
>
|
||||||
<div value={item.id} className="!p-2 !mr-2 !w-[calc(100%_-_16px)] flex items-center justify-start">
|
<div
|
||||||
{Array(item.label).fill({}).map((_, idx) => (
|
value={item.id}
|
||||||
|
className="!p-2 !mr-2 !w-[calc(100%_-_16px)] flex items-center justify-start"
|
||||||
|
>
|
||||||
|
{Array(item.label)
|
||||||
|
.fill({})
|
||||||
|
.map((_, idx) => (
|
||||||
<StarDI key={idx} />
|
<StarDI key={idx} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,10 +5,9 @@ import specialties from "@/data/specialties.json";
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|
||||||
function FrequentSearches() {
|
function FrequentSearches() {
|
||||||
const childrenList = specialties.filter(item => item.parent);
|
const childrenList = specialties.filter((item) => item.parent);
|
||||||
console.log(childrenList);
|
console.log(childrenList);
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center justify-center gap-[8px] sm:gap-[10px] md:gap-[13px] lg:gap-[16px] w-full">
|
<div className="flex items-center justify-center gap-[8px] sm:gap-[10px] md:gap-[13px] lg:gap-[16px] w-full">
|
||||||
<p className="text-[#3B3B3B] text-[14px] md:text-[16px] font-normal text-nowrap">
|
<p className="text-[#3B3B3B] text-[14px] md:text-[16px] font-normal text-nowrap">
|
||||||
@@ -17,13 +16,15 @@ function FrequentSearches() {
|
|||||||
<div className="overflow-auto hidden-scroll flex justify-start max-w-[620px]">
|
<div className="overflow-auto hidden-scroll flex justify-start max-w-[620px]">
|
||||||
<ul className="flex items-center justify-start gap-[14px] pl-[14px]">
|
<ul className="flex items-center justify-start gap-[14px] pl-[14px]">
|
||||||
{childrenList.map((item, idx) => (
|
{childrenList.map((item, idx) => (
|
||||||
<Link href={{
|
<Link
|
||||||
|
href={{
|
||||||
pathname: "/doctors",
|
pathname: "/doctors",
|
||||||
query: {
|
query: {
|
||||||
category: item.parent,
|
category: item.parent,
|
||||||
specialties: item.id,
|
specialties: item.id,
|
||||||
},
|
},
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
<li key={idx}>
|
<li key={idx}>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ function TextHeader() {
|
|||||||
</div>
|
</div>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default TextHeader
|
export default TextHeader;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
"use client"
|
"use client";
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
@@ -12,8 +12,8 @@ import SearchD from "@/components/icons/SearchD";
|
|||||||
function Fields({ city, state }) {
|
function Fields({ city, state }) {
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const [data, setData] = useState({
|
const [data, setData] = useState({
|
||||||
province: state?.name || '',
|
province: state?.name || "",
|
||||||
city: city?.name || '',
|
city: city?.name || "",
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -30,7 +30,7 @@ function Fields({ city, state }) {
|
|||||||
<span className="black w-px bg-[#EFEFEF]"></span>
|
<span className="black w-px bg-[#EFEFEF]"></span>
|
||||||
<TextField
|
<TextField
|
||||||
variant="standard"
|
variant="standard"
|
||||||
onChange={e => setData({ ...data, search: e.target.value })}
|
onChange={(e) => setData({ ...data, search: e.target.value })}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
disableUnderline: true,
|
disableUnderline: true,
|
||||||
}}
|
}}
|
||||||
@@ -53,7 +53,7 @@ function Fields({ city, state }) {
|
|||||||
md: "14px !important",
|
md: "14px !important",
|
||||||
lg: "16px !important",
|
lg: "16px !important",
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
}}
|
}}
|
||||||
placeholder="جستجوی نام پزشک، تخصص، بیماری ..."
|
placeholder="جستجوی نام پزشک، تخصص، بیماری ..."
|
||||||
dir="rtl"
|
dir="rtl"
|
||||||
@@ -65,7 +65,7 @@ function Fields({ city, state }) {
|
|||||||
query: {
|
query: {
|
||||||
province: data.province,
|
province: data.province,
|
||||||
city: data.city,
|
city: data.city,
|
||||||
search: data.search
|
search: data.search,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -89,7 +89,7 @@ function Fields({ city, state }) {
|
|||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
</>
|
</>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Fields
|
export default Fields;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Fields from "./Fields";
|
|||||||
import { getStateInfo } from "@/lib/getStateInfo";
|
import { getStateInfo } from "@/lib/getStateInfo";
|
||||||
|
|
||||||
function SearchBar() {
|
function SearchBar() {
|
||||||
const { matchedCity, matchedState } = getStateInfo()
|
const { matchedCity, matchedState } = getStateInfo();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ButtonGroup
|
<ButtonGroup
|
||||||
|
|||||||
@@ -32,16 +32,16 @@ function ModalSearchCity() {
|
|||||||
// Load states and cities from JSON files
|
// Load states and cities from JSON files
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Format states data to match the structure expected by AutoCompleteSelect
|
// Format states data to match the structure expected by AutoCompleteSelect
|
||||||
const formattedStates = statesData.map(state => ({
|
const formattedStates = statesData.map((state) => ({
|
||||||
label: state.name,
|
label: state.name,
|
||||||
id: state.id
|
id: state.id,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Format cities data
|
// Format cities data
|
||||||
const formattedCities = citiesData.map(city => ({
|
const formattedCities = citiesData.map((city) => ({
|
||||||
label: city.name,
|
label: city.name,
|
||||||
id: city.id,
|
id: city.id,
|
||||||
province_id: city.province_id
|
province_id: city.province_id,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
setStates(formattedStates);
|
setStates(formattedStates);
|
||||||
@@ -51,10 +51,14 @@ function ModalSearchCity() {
|
|||||||
// Filter cities when state is selected
|
// Filter cities when state is selected
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (selected.first) {
|
if (selected.first) {
|
||||||
const selectedState = states.find(state => state.label === selected.first);
|
const selectedState = states.find(
|
||||||
|
(state) => state.label === selected.first,
|
||||||
|
);
|
||||||
if (selectedState) {
|
if (selectedState) {
|
||||||
const stateId = selectedState.id;
|
const stateId = selectedState.id;
|
||||||
const filteredCities = cities.filter(city => city.province_id === stateId);
|
const filteredCities = cities.filter(
|
||||||
|
(city) => city.province_id === stateId,
|
||||||
|
);
|
||||||
setFilteredCities(filteredCities);
|
setFilteredCities(filteredCities);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -14,9 +14,7 @@ function UserEdit({ active }) {
|
|||||||
strokeWidth="1.5"
|
strokeWidth="1.5"
|
||||||
strokeLinecap="round"
|
strokeLinecap="round"
|
||||||
strokeLinejoin="round"
|
strokeLinejoin="round"
|
||||||
className={
|
className={active ? "stroke-[#FAFAFA] delay-500" : ""}
|
||||||
active ? "stroke-[#FAFAFA] delay-500" : ""
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<path
|
<path
|
||||||
d="M32.5166 26.2334L26.6165 32.1334C26.3832 32.3668 26.1666 32.8 26.1166 33.1167L25.7999 35.3667C25.6832 36.1833 26.2499 36.75 27.0666 36.6334L29.3165 36.3167C29.6332 36.2667 30.0832 36.05 30.2999 35.8167L36.1999 29.9167C37.2165 28.9001 37.6999 27.7167 36.1999 26.2167C34.7165 24.7333 33.5333 25.2167 32.5166 26.2334Z"
|
d="M32.5166 26.2334L26.6165 32.1334C26.3832 32.3668 26.1666 32.8 26.1166 33.1167L25.7999 35.3667C25.6832 36.1833 26.2499 36.75 27.0666 36.6334L29.3165 36.3167C29.6332 36.2667 30.0832 36.05 30.2999 35.8167L36.1999 29.9167C37.2165 28.9001 37.6999 27.7167 36.1999 26.2167C34.7165 24.7333 33.5333 25.2167 32.5166 26.2334Z"
|
||||||
|
|||||||
@@ -13,9 +13,7 @@ function StLayout({ children, name }) {
|
|||||||
<Header matchedCity={matchedCity} name={name} />
|
<Header matchedCity={matchedCity} name={name} />
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<section
|
<section className="opacity-page -mt-[calc(48px_+_12px)] sm:-mt-[calc(56px_+_21px)] md:-mt-[calc(64px_+_30px)] lg:-mt-[calc(80px_+_40px)]">
|
||||||
className="opacity-page -mt-[calc(48px_+_12px)] sm:-mt-[calc(56px_+_21px)] md:-mt-[calc(64px_+_30px)] lg:-mt-[calc(80px_+_40px)]"
|
|
||||||
>
|
|
||||||
{children}
|
{children}
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -24,16 +24,20 @@ const head = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
function Footer({ matchedCity }) {
|
function Footer({ matchedCity }) {
|
||||||
const socialMedias = [{
|
const socialMedias = [
|
||||||
|
{
|
||||||
icon: <Instagram />,
|
icon: <Instagram />,
|
||||||
name: 'instagram'
|
name: "instagram",
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
icon: <Telegram />,
|
icon: <Telegram />,
|
||||||
name: 'telegram'
|
name: "telegram",
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
icon: <Whatsapp />,
|
icon: <Whatsapp />,
|
||||||
name: 'whatsapp'
|
name: "whatsapp",
|
||||||
}];
|
},
|
||||||
|
];
|
||||||
const [openMenu, setOpenMenu] = useState({
|
const [openMenu, setOpenMenu] = useState({
|
||||||
right: false,
|
right: false,
|
||||||
left: false,
|
left: false,
|
||||||
@@ -106,7 +110,10 @@ function Footer({ matchedCity }) {
|
|||||||
key={idx}
|
key={idx}
|
||||||
className="p-2.5 bg-[#EAECFA] hover-rotate-icon cursor-pointer rounded-full w-fit"
|
className="p-2.5 bg-[#EAECFA] hover-rotate-icon cursor-pointer rounded-full w-fit"
|
||||||
>
|
>
|
||||||
<Link href={matchedCity?.socialMedia[item.name] || '/'} className="min-h-fit">
|
<Link
|
||||||
|
href={matchedCity?.socialMedia[item.name] || "/"}
|
||||||
|
className="min-h-fit"
|
||||||
|
>
|
||||||
{item.icon}
|
{item.icon}
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -34,11 +34,7 @@ function Content({ matchedCity, name }) {
|
|||||||
</div>
|
</div>
|
||||||
<Row name={name} />
|
<Row name={name} />
|
||||||
<Link href="/login">
|
<Link href="/login">
|
||||||
<Button
|
<Button className="!hidden lg:!flex" variant="outlined" color="primary">
|
||||||
className="!hidden lg:!flex"
|
|
||||||
variant="outlined"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
ورود | ثبت نام
|
ورود | ثبت نام
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
@@ -52,7 +48,7 @@ function Content({ matchedCity, name }) {
|
|||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Content
|
export default Content;
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
import Content from "./Content";
|
import Content from "./Content";
|
||||||
|
|
||||||
function Header({ matchedCity, name }) {
|
function Header({ matchedCity, name }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="bg-[#FFF] rounded-lg w-full mx-auto">
|
<div className="bg-[#FFF] rounded-lg w-full mx-auto">
|
||||||
<Content
|
<Content matchedCity={matchedCity} name={name} />
|
||||||
matchedCity={matchedCity}
|
|
||||||
name={name}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,10 +9,7 @@ function Row({ name }) {
|
|||||||
<Link
|
<Link
|
||||||
href={nav.link}
|
href={nav.link}
|
||||||
className={`
|
className={`
|
||||||
${nav.link === name
|
${nav.link === name ? "!text-[#526CAC]" : "text-[#525252]"}
|
||||||
? "!text-[#526CAC]"
|
|
||||||
: "text-[#525252]"
|
|
||||||
}
|
|
||||||
text-[16px] font-medium
|
text-[16px] font-medium
|
||||||
`}
|
`}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ function Col({ isActive, name }) {
|
|||||||
${
|
${
|
||||||
isActiveURL(
|
isActiveURL(
|
||||||
nav.link.replace("/", ""),
|
nav.link.replace("/", ""),
|
||||||
name
|
name,
|
||||||
)
|
)
|
||||||
? "!text-[#526CAC] !bg-[rgba(199,_206,_244,_0.30)]"
|
? "!text-[#526CAC] !bg-[rgba(199,_206,_244,_0.30)]"
|
||||||
: "!text-[#525252]"
|
: "!text-[#525252]"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ function Layout({
|
|||||||
user,
|
user,
|
||||||
value,
|
value,
|
||||||
setValue,
|
setValue,
|
||||||
matchedCity
|
matchedCity,
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@@ -30,7 +30,8 @@ function Layout({
|
|||||||
<section
|
<section
|
||||||
className={`
|
className={`
|
||||||
opacity-page -mt-[calc(48px_+_12px)] sm:-mt-[calc(56px_+_21px)] md:-mt-[calc(64px_+_30px)] lg:-mt-[calc(80px_+_40px)]
|
opacity-page -mt-[calc(48px_+_12px)] sm:-mt-[calc(56px_+_21px)] md:-mt-[calc(64px_+_30px)] lg:-mt-[calc(80px_+_40px)]
|
||||||
${isSidebar &&
|
${
|
||||||
|
isSidebar &&
|
||||||
"padding-responsive min-h-screen flex items-stretch justify-center gap-[12px] lg:gap-[24px] pt-[76px] sm:pt-[109px] mt:pt-[142px] lg:pt-[176px]"
|
"padding-responsive min-h-screen flex items-stretch justify-center gap-[12px] lg:gap-[24px] pt-[76px] sm:pt-[109px] mt:pt-[142px] lg:pt-[176px]"
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
"use client"
|
"use client";
|
||||||
|
|
||||||
import CardD from "@/components/icons/CardD";
|
import CardD from "@/components/icons/CardD";
|
||||||
import LogoutD from "@/components/icons/LogoutD";
|
import LogoutD from "@/components/icons/LogoutD";
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { removeToken } from "@/utils";
|
|||||||
function ModalLogout({ open, handleClose }) {
|
function ModalLogout({ open, handleClose }) {
|
||||||
const logout = () => {
|
const logout = () => {
|
||||||
removeToken();
|
removeToken();
|
||||||
window.location.pathname = '/login'
|
window.location.pathname = "/login";
|
||||||
handleClose();
|
handleClose();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ function Content({ children }) {
|
|||||||
<main
|
<main
|
||||||
className={`
|
className={`
|
||||||
w-full transition-all duration-500 dark:bg-[#1F1D2B]
|
w-full transition-all duration-500 dark:bg-[#1F1D2B]
|
||||||
${pathname.includes("dashboard")
|
${
|
||||||
|
pathname.includes("dashboard")
|
||||||
? open
|
? open
|
||||||
? "md:min-w-[calc(100%_-_243px)] md:w-[calc(100%_-_243px)] xl:min-w-[calc(100%_-_243px_-_332px)] xl:w-[calc(100%_-_243px_-_332px)]"
|
? "md:min-w-[calc(100%_-_243px)] md:w-[calc(100%_-_243px)] xl:min-w-[calc(100%_-_243px_-_332px)] xl:w-[calc(100%_-_243px_-_332px)]"
|
||||||
: "md:min-w-[calc(100%_-_96px)] md:w-[calc(100%_-_96px)] xl:min-w-[calc(100%_-_96px_-_332px)] xl:w-[calc(100%_-_96px_-_332px)]"
|
: "md:min-w-[calc(100%_-_96px)] md:w-[calc(100%_-_96px)] xl:min-w-[calc(100%_-_96px_-_332px)] xl:w-[calc(100%_-_96px_-_332px)]"
|
||||||
|
|||||||
@@ -16,7 +16,10 @@ function Table({ data, loading }) {
|
|||||||
centerTable={centerTable}
|
centerTable={centerTable}
|
||||||
>
|
>
|
||||||
{data.list_of_doctors_appointments.map((row, idx) => (
|
{data.list_of_doctors_appointments.map((row, idx) => (
|
||||||
<TableRow key={idx} className="!border-0 !border-b !border-[#DBDBDB] dark:!border-transparent">
|
<TableRow
|
||||||
|
key={idx}
|
||||||
|
className="!border-0 !border-b !border-[#DBDBDB] dark:!border-transparent"
|
||||||
|
>
|
||||||
<TableCell
|
<TableCell
|
||||||
className="!pr-[18px] dark:!border-transparent !text-[#616161] dark:!text-[#A1A1A1] !text-[16px] !font-medium !text-nowrap"
|
className="!pr-[18px] dark:!border-transparent !text-[#616161] dark:!text-[#A1A1A1] !text-[16px] !font-medium !text-nowrap"
|
||||||
align="center"
|
align="center"
|
||||||
|
|||||||
@@ -4,9 +4,7 @@ import { getStateInfo } from "@/lib/getStateInfo";
|
|||||||
function ContentLogin() {
|
function ContentLogin() {
|
||||||
const { matchedCity } = getStateInfo();
|
const { matchedCity } = getStateInfo();
|
||||||
|
|
||||||
return (
|
return <RegisterPage matchedCity={matchedCity} />;
|
||||||
<RegisterPage matchedCity={matchedCity} />
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ContentLogin;
|
export default ContentLogin;
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ function LayoutRegister({ children, matchedCity }) {
|
|||||||
height={40}
|
height={40}
|
||||||
alt="logo"
|
alt="logo"
|
||||||
/>
|
/>
|
||||||
<p className="text-[#5559CE] text-[20px] font-bold">{matchedCity?.site_name || "نوبت ۷۲۴"}</p>
|
<p className="text-[#5559CE] text-[20px] font-bold">
|
||||||
|
{matchedCity?.site_name || "نوبت ۷۲۴"}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
{children}
|
{children}
|
||||||
@@ -38,7 +40,7 @@ function LayoutRegister({ children, matchedCity }) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default LayoutRegister
|
export default LayoutRegister;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { useState } from "react";
|
|||||||
|
|
||||||
function LogInPage({ setIsSendMsg, setStep, matchedCity }) {
|
function LogInPage({ setIsSendMsg, setStep, matchedCity }) {
|
||||||
const [num, setNum] = useState("");
|
const [num, setNum] = useState("");
|
||||||
const [error, setError] = useState({ valid: true, text: '' });
|
const [error, setError] = useState({ valid: true, text: "" });
|
||||||
|
|
||||||
const handleChange = (val) => {
|
const handleChange = (val) => {
|
||||||
const formatted = formatPhoneNumber(val);
|
const formatted = formatPhoneNumber(val);
|
||||||
@@ -34,28 +34,35 @@ function LogInPage({ setIsSendMsg, setStep, matchedCity }) {
|
|||||||
error={!error.valid}
|
error={!error.valid}
|
||||||
spaceNull={true}
|
spaceNull={true}
|
||||||
inputProps={{
|
inputProps={{
|
||||||
startAdornment:
|
startAdornment: (
|
||||||
<InputAdornment
|
<InputAdornment
|
||||||
className="!ml-4"
|
className="!ml-4"
|
||||||
position="start"
|
position="start"
|
||||||
sx={{
|
sx={{
|
||||||
'.MuiTypography-root': {
|
".MuiTypography-root": {
|
||||||
lineHeight: '0 !important',
|
lineHeight: "0 !important",
|
||||||
|
},
|
||||||
|
".muirtl-1qj5e5k-MuiTypography-root": {
|
||||||
|
color: "#000000de !important",
|
||||||
},
|
},
|
||||||
'.muirtl-1qj5e5k-MuiTypography-root': {
|
|
||||||
color: '#000000de !important'
|
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
>09</InputAdornment>,
|
>
|
||||||
|
09
|
||||||
|
</InputAdornment>
|
||||||
|
),
|
||||||
}}
|
}}
|
||||||
title="شماره همراه"
|
title="شماره همراه"
|
||||||
updateState={handleChange}
|
updateState={handleChange}
|
||||||
/>
|
/>
|
||||||
<p className={`
|
<p
|
||||||
|
className={`
|
||||||
text-[#d32f2f] text-[14px] mt-2 min-h-[21px] transition-all duration-1000 ease-in-out
|
text-[#d32f2f] text-[14px] mt-2 min-h-[21px] transition-all duration-1000 ease-in-out
|
||||||
transform
|
transform
|
||||||
${error.valid ? 'opacity-0 -translate-y-1' : 'opacity-100 translate-y-0'}
|
${error.valid ? "opacity-0 -translate-y-1" : "opacity-100 translate-y-0"}
|
||||||
`}>{error.text}</p>
|
`}
|
||||||
|
>
|
||||||
|
{error.text}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
fullWidth
|
fullWidth
|
||||||
@@ -77,7 +84,7 @@ function LogInPage({ setIsSendMsg, setStep, matchedCity }) {
|
|||||||
<Link href="/">
|
<Link href="/">
|
||||||
<span className="text-[#F17732] underline">قوانین استفاده</span>
|
<span className="text-[#F17732] underline">قوانین استفاده</span>
|
||||||
</Link>{" "}
|
</Link>{" "}
|
||||||
از {matchedCity?.site_name || 'نوبت 724'} را می پذیرم.
|
از {matchedCity?.site_name || "نوبت 724"} را می پذیرم.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -13,7 +13,11 @@ function RegisterPage({ matchedCity }) {
|
|||||||
{isSendMsg ? (
|
{isSendMsg ? (
|
||||||
<SetCodePage setIsSendMsg={setIsSendMsg} setStep={false} link="/" />
|
<SetCodePage setIsSendMsg={setIsSendMsg} setStep={false} link="/" />
|
||||||
) : (
|
) : (
|
||||||
<LogInPage matchedCity={matchedCity} setStep={false} setIsSendMsg={setIsSendMsg} />
|
<LogInPage
|
||||||
|
matchedCity={matchedCity}
|
||||||
|
setStep={false}
|
||||||
|
setIsSendMsg={setIsSendMsg}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</LayoutRegister>
|
</LayoutRegister>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ function SmSearch({ placeholder, handleSearch }) {
|
|||||||
>
|
>
|
||||||
<TextField
|
<TextField
|
||||||
variant="standard"
|
variant="standard"
|
||||||
onChange={e => handleSearch(e.target.value)}
|
onChange={(e) => handleSearch(e.target.value)}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
disableUnderline: true,
|
disableUnderline: true,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -8,10 +8,11 @@ import specialtiesData from "@/data/specialties.json";
|
|||||||
import { searchOnList } from "@/helper";
|
import { searchOnList } from "@/helper";
|
||||||
|
|
||||||
function SpecialtiesPage() {
|
function SpecialtiesPage() {
|
||||||
const [filteredSpecialties, setFilteredSpecialties] = useState(specialtiesData);
|
const [filteredSpecialties, setFilteredSpecialties] =
|
||||||
|
useState(specialtiesData);
|
||||||
|
|
||||||
const handleSearch = (value) =>
|
const handleSearch = (value) =>
|
||||||
setFilteredSpecialties(searchOnList(specialtiesData, value, 'name'));
|
setFilteredSpecialties(searchOnList(specialtiesData, value, "name"));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="">
|
<div className="">
|
||||||
@@ -19,10 +20,7 @@ function SpecialtiesPage() {
|
|||||||
title="تخصص مورد نظر شما چیست؟"
|
title="تخصص مورد نظر شما چیست؟"
|
||||||
detail="تخصص مورد نظرتان را جستجو کرده و یا از لیست زیر انتخاب نمایید:"
|
detail="تخصص مورد نظرتان را جستجو کرده و یا از لیست زیر انتخاب نمایید:"
|
||||||
>
|
>
|
||||||
<SmSearch
|
<SmSearch placeholder="جستجوی تخصص" handleSearch={handleSearch} />
|
||||||
placeholder="جستجوی تخصص"
|
|
||||||
handleSearch={handleSearch}
|
|
||||||
/>
|
|
||||||
</HeadPageList>
|
</HeadPageList>
|
||||||
<List specialties={filteredSpecialties} />
|
<List specialties={filteredSpecialties} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ function ItemSpecialties({ data }) {
|
|||||||
rounded-lg bg-[#FFF] shadow-[0px_1px_24.8px_0px_rgba(204,_204,_204,_0.18)]
|
rounded-lg bg-[#FFF] shadow-[0px_1px_24.8px_0px_rgba(204,_204,_204,_0.18)]
|
||||||
hover:bg-[#5559CE] transition-all text-item-head-white duration-500 cursor-pointer hover-mode-item-speciality"
|
hover:bg-[#5559CE] transition-all text-item-head-white duration-500 cursor-pointer hover-mode-item-speciality"
|
||||||
>
|
>
|
||||||
<h2 className="text-[#3B3B3B] item-head text-[16px] font-bold text-center">{data.name}</h2>
|
<h2 className="text-[#3B3B3B] item-head text-[16px] font-bold text-center">
|
||||||
|
{data.name}
|
||||||
|
</h2>
|
||||||
<p className="text-[#7E7E7E] text-[14px] font-medium">
|
<p className="text-[#7E7E7E] text-[14px] font-medium">
|
||||||
{data.number_of_doctors} پزشک
|
{data.number_of_doctors} پزشک
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const ProvinceContext = createContext();
|
|||||||
export const ProvinceProvider = ({ children }) => {
|
export const ProvinceProvider = ({ children }) => {
|
||||||
const [hostName, setHostName] = useState("");
|
const [hostName, setHostName] = useState("");
|
||||||
const isProvinceInclude = citiesData.find((city) =>
|
const isProvinceInclude = citiesData.find((city) =>
|
||||||
hostName.includes(city.domain.split(".")[0])
|
hostName.includes(city.domain.split(".")[0]),
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
+28
-31
@@ -92,41 +92,40 @@ export const alert = (type, text, prop) => {
|
|||||||
</p>
|
</p>
|
||||||
<p className="text-[14px] font-normal">{text}</p>
|
<p className="text-[14px] font-normal">{text}</p>
|
||||||
</div>,
|
</div>,
|
||||||
{ prop }
|
{ prop },
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const addLabelToList = (list) =>
|
export const addLabelToList = (list) =>
|
||||||
list.map(item => {
|
list.map((item) => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
label: item.name
|
label: item.name,
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
|
|
||||||
export const formatPhoneNumber = (input) => {
|
export const formatPhoneNumber = (input) => {
|
||||||
const digits = input.replace(/\D/g, '');
|
const digits = input.replace(/\D/g, "");
|
||||||
const trimmed = digits.substring(0, 9);
|
const trimmed = digits.substring(0, 9);
|
||||||
const match = trimmed.match(/^(\d{0,2})(\d{0,3})(\d{0,4})$/);
|
const match = trimmed.match(/^(\d{0,2})(\d{0,3})(\d{0,4})$/);
|
||||||
if (!match) return trimmed;
|
if (!match) return trimmed;
|
||||||
return [match[1], match[2], match[3]].filter(Boolean).join(' ');
|
return [match[1], match[2], match[3]].filter(Boolean).join(" ");
|
||||||
};
|
};
|
||||||
|
|
||||||
export function validatePhoneNumber(input) {
|
export function validatePhoneNumber(input) {
|
||||||
const digits = input.replace(/\D/g, '');
|
const digits = input.replace(/\D/g, "");
|
||||||
|
|
||||||
if (!digits) {
|
if (!digits) {
|
||||||
return { valid: false, text: 'شماره موبایل نمیتواند خالی باشد.' };
|
return { valid: false, text: "شماره موبایل نمیتواند خالی باشد." };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (digits.length !== 9) {
|
if (digits.length !== 9) {
|
||||||
return { valid: false, text: 'شماره موبایل باید دقیقا 11 رقم باشد.' };
|
return { valid: false, text: "شماره موبایل باید دقیقا 11 رقم باشد." };
|
||||||
}
|
}
|
||||||
|
|
||||||
const isValid = /^[1-9]\d{8}$/.test(digits);
|
const isValid = /^[1-9]\d{8}$/.test(digits);
|
||||||
if (!isValid) {
|
if (!isValid) {
|
||||||
return { valid: false, text: 'شماره موبایل نامعتبر است.' };
|
return { valid: false, text: "شماره موبایل نامعتبر است." };
|
||||||
}
|
}
|
||||||
|
|
||||||
return { valid: true, text: null };
|
return { valid: true, text: null };
|
||||||
@@ -134,47 +133,45 @@ export function validatePhoneNumber(input) {
|
|||||||
|
|
||||||
export const searchOnList = (list, value, name) => {
|
export const searchOnList = (list, value, name) => {
|
||||||
let newList = list;
|
let newList = list;
|
||||||
newList = list.filter(item =>
|
newList = list.filter((item) => item[name].toLowerCase().includes(value));
|
||||||
item[name].toLowerCase().includes(value)
|
|
||||||
)
|
|
||||||
return newList;
|
return newList;
|
||||||
}
|
};
|
||||||
|
|
||||||
export const addKeyToList = (list, nameKey, nameValue) => {
|
export const addKeyToList = (list, nameKey, nameValue) => {
|
||||||
const newList = list.map(item => {
|
const newList = list.map((item) => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
[nameKey]: item[nameValue]
|
[nameKey]: item[nameValue],
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
return newList;
|
return newList;
|
||||||
}
|
};
|
||||||
|
|
||||||
export function clearFilterParams(router, listRemove) {
|
export function clearFilterParams(router, listRemove) {
|
||||||
const currentParams = new URLSearchParams(window.location.search);
|
const currentParams = new URLSearchParams(window.location.search);
|
||||||
const keysToRemove = listRemove;
|
const keysToRemove = listRemove;
|
||||||
keysToRemove.forEach((key) => currentParams.delete(key));
|
keysToRemove.forEach((key) => currentParams.delete(key));
|
||||||
const queryString = currentParams.toString();
|
const queryString = currentParams.toString();
|
||||||
const newUrl = queryString ? `/doctors?${queryString}` : '/doctors';
|
const newUrl = queryString ? `/doctors?${queryString}` : "/doctors";
|
||||||
|
|
||||||
router.push(newUrl);
|
router.push(newUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const filterList = (data) => {
|
export const filterList = (data) => {
|
||||||
const parentList = specialties.filter(item => !item.parent);
|
const parentList = specialties.filter((item) => !item.parent);
|
||||||
const childrenList = specialties.filter(item => item.parent);
|
const childrenList = specialties.filter((item) => item.parent);
|
||||||
|
|
||||||
const changedParentList = addKeyToList(parentList, 'label', 'name') || [];
|
const changedParentList = addKeyToList(parentList, "label", "name") || [];
|
||||||
const changedChildrenList = addKeyToList(childrenList, 'label', 'name') || [];
|
const changedChildrenList = addKeyToList(childrenList, "label", "name") || [];
|
||||||
|
|
||||||
const filteredChildrenList =
|
const filteredChildrenList =
|
||||||
data && data.category ?
|
data && data.category
|
||||||
changedChildrenList.filter(item => item.parent === data.category.id) :
|
? changedChildrenList.filter((item) => item.parent === data.category.id)
|
||||||
[];
|
: [];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
parentList: changedParentList,
|
parentList: changedParentList,
|
||||||
childrenList: filteredChildrenList
|
childrenList: filteredChildrenList,
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
|
|||||||
+6
-2
@@ -9,8 +9,12 @@ export function getStateInfo() {
|
|||||||
const host = headersList.get("host") || "";
|
const host = headersList.get("host") || "";
|
||||||
const subdomain = host.split(".")[0];
|
const subdomain = host.split(".")[0];
|
||||||
|
|
||||||
const matchedCity = citiesData.find((city) => city.domain.includes(subdomain));
|
const matchedCity = citiesData.find((city) =>
|
||||||
const matchedState = matchedCity && statesData.find(state => state.id === matchedCity.province_id)
|
city.domain.includes(subdomain),
|
||||||
|
);
|
||||||
|
const matchedState =
|
||||||
|
matchedCity &&
|
||||||
|
statesData.find((state) => state.id === matchedCity.province_id);
|
||||||
|
|
||||||
return { matchedCity, matchedState };
|
return { matchedCity, matchedState };
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+17
@@ -44,6 +44,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"postcss": "^8",
|
"postcss": "^8",
|
||||||
|
"prettier": "^3.5.3",
|
||||||
"tailwindcss": "^3.4.1"
|
"tailwindcss": "^3.4.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -19102,6 +19103,22 @@
|
|||||||
"node": ">= 0.8.0"
|
"node": ">= 0.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/prettier": {
|
||||||
|
"version": "3.5.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz",
|
||||||
|
"integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"prettier": "bin/prettier.cjs"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/pretty-bytes": {
|
"node_modules/pretty-bytes": {
|
||||||
"version": "5.6.0",
|
"version": "5.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz",
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"postcss": "^8",
|
"postcss": "^8",
|
||||||
|
"prettier": "^3.5.3",
|
||||||
"tailwindcss": "^3.4.1"
|
"tailwindcss": "^3.4.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -28,7 +28,7 @@ api.interceptors.request.use(
|
|||||||
}
|
}
|
||||||
return request;
|
return request;
|
||||||
},
|
},
|
||||||
(err) => Promise.reject(err)
|
(err) => Promise.reject(err),
|
||||||
);
|
);
|
||||||
|
|
||||||
api.interceptors.response.use(
|
api.interceptors.response.use(
|
||||||
@@ -41,7 +41,7 @@ api.interceptors.response.use(
|
|||||||
window.location.pathname = "/login";
|
window.location.pathname = "/login";
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
export default api;
|
export default api;
|
||||||
|
|||||||
Reference in New Issue
Block a user