diff --git a/app/globals.css b/app/globals.css
index d8d1928..0a00a54 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -852,9 +852,18 @@ html {
}
.bg-poster {
- background-image: url(/public/assets/images/poster.png);
+ background-image: url(../public/assets/images/poster.png);
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-size: cover;
}
+
+.bg-stroke-circle {
+ background-image: url(../public/assets/images/stroke-circle.png);
+ background-size: cover;
+}
+
+.MuiButton-loading .MuiButton-loadingIndicator {
+ color: #ffffff !important;
+}
diff --git a/components/doctor/Poster.js b/components/doctor/Poster.js
deleted file mode 100644
index 0df8de7..0000000
--- a/components/doctor/Poster.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import Image from "next/image";
-import Logo from "@/public/assets/images/logo.png";
-
-function Poster() {
- return (
-
diff --git a/components/doctor/poster/Address.js b/components/doctor/poster/Address.js
new file mode 100644
index 0000000..9615085
--- /dev/null
+++ b/components/doctor/poster/Address.js
@@ -0,0 +1,17 @@
+import ClipBoard from "../../icons/ClipBoard";
+
+function Address({ data }) {
+ return (
+
+
+
+ {data.location}
+
+
+ );
+}
+
+export default Address;
diff --git a/components/doctor/poster/ImageProfile.js b/components/doctor/poster/ImageProfile.js
new file mode 100644
index 0000000..4a19750
--- /dev/null
+++ b/components/doctor/poster/ImageProfile.js
@@ -0,0 +1,11 @@
+import Image from "next/image";
+
+function ImageProfile({ data }) {
+ return (
+
+
+
+ );
+}
+
+export default ImageProfile;
diff --git a/components/doctor/poster/QrCode.js b/components/doctor/poster/QrCode.js
new file mode 100644
index 0000000..314651e
--- /dev/null
+++ b/components/doctor/poster/QrCode.js
@@ -0,0 +1,15 @@
+import Image from "next/image";
+import CodeSample from "@/public/assets/images/default-qr-code.png";
+
+function QrCode() {
+ return (
+
+
+
+ nobat724/ahwaz.com
+
+
+ );
+}
+
+export default QrCode;
diff --git a/components/doctor/poster/Services.js b/components/doctor/poster/Services.js
new file mode 100644
index 0000000..5eb02f6
--- /dev/null
+++ b/components/doctor/poster/Services.js
@@ -0,0 +1,23 @@
+import ClipBoard from "../../icons/ClipBoard";
+import CircleOrangeSm from "../../icons/CircleOrangeSm";
+
+function Services({ data }) {
+ return (
+
+
+
+ {data.specialties.map((item, idx) => (
+ -
+
+
{item}
+
+ ))}
+
+
+ );
+}
+
+export default Services;
diff --git a/components/doctor/poster/Telefon.js b/components/doctor/poster/Telefon.js
new file mode 100644
index 0000000..78828c9
--- /dev/null
+++ b/components/doctor/poster/Telefon.js
@@ -0,0 +1,20 @@
+import TelefonPoster from "@/components/icons/TelefonPoster";
+
+function Telefon({ data }) {
+ return (
+
+
+
+ {data.phone}
+
+
+ {data.phone} - {data.phone}
+
+
+ );
+}
+
+export default Telefon;
diff --git a/components/doctor/poster/index.js b/components/doctor/poster/index.js
new file mode 100644
index 0000000..0381138
--- /dev/null
+++ b/components/doctor/poster/index.js
@@ -0,0 +1,35 @@
+import Image from "next/image";
+import Logo from "@/public/assets/images/logo.png";
+import Services from "./Services";
+import Address from "./Address";
+import Telefon from "./Telefon";
+import ImageProfile from "./ImageProfile";
+import QrCode from "./QrCode";
+
+function Poster({ data }) {
+ return (
+
+
+
+
+ {data.name}
+
+
+ تخصص: {data.expertise}
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+export default Poster;
diff --git a/components/icons/AddressPoster.js b/components/icons/AddressPoster.js
new file mode 100644
index 0000000..cdbce82
--- /dev/null
+++ b/components/icons/AddressPoster.js
@@ -0,0 +1,24 @@
+function AddressPoster() {
+ return (
+
+ );
+}
+
+export default AddressPoster;
diff --git a/components/icons/CircleOrangeSm.js b/components/icons/CircleOrangeSm.js
new file mode 100644
index 0000000..177d462
--- /dev/null
+++ b/components/icons/CircleOrangeSm.js
@@ -0,0 +1,15 @@
+function CircleOrangeSm() {
+ return (
+
+ );
+}
+
+export default CircleOrangeSm;
diff --git a/components/icons/ClipBoard.js b/components/icons/ClipBoard.js
new file mode 100644
index 0000000..89f8023
--- /dev/null
+++ b/components/icons/ClipBoard.js
@@ -0,0 +1,37 @@
+function ClipBoard() {
+ return (
+
+ );
+}
+
+export default ClipBoard;
diff --git a/components/icons/TelefonPoster.js b/components/icons/TelefonPoster.js
new file mode 100644
index 0000000..aeac489
--- /dev/null
+++ b/components/icons/TelefonPoster.js
@@ -0,0 +1,34 @@
+function TelefonPoster() {
+ return (
+
+ );
+}
+
+export default TelefonPoster;
diff --git a/components/register/LogInPage.js b/components/register/LogInPage.js
index 466e315..4d378f3 100644
--- a/components/register/LogInPage.js
+++ b/components/register/LogInPage.js
@@ -1,13 +1,13 @@
import Field from "@/app/component/element/Field";
-import { formatPhoneNumber, validatePhoneNumber } from "@/helper";
+import { changeNumToDefault, formatPhoneNumber, validatePhoneNumber } from "@/helper";
import { request } from "@/services/response";
-import { Button, InputAdornment } from "@mui/material";
+import { InputAdornment, Button } from "@mui/material";
import Link from "next/link";
import { useState } from "react";
-function LogInPage({ setIsSendMsg, setStep, matchedCity }) {
- const [num, setNum] = useState("");
+function LogInPage({ setIsSendMsg, num, setNum, matchedCity }) {
const [error, setError] = useState({ valid: true, text: "" });
+ const [loading, setLoading] = useState(false);
const handleChange = (val) => {
const formatted = formatPhoneNumber(val);
@@ -15,13 +15,13 @@ function LogInPage({ setIsSendMsg, setStep, matchedCity }) {
setError(checkedNum);
setNum(formatted);
};
-
const handleReq = () => {
+ setLoading(true);
request
- .auth("/")
- .then(() => {
- setIsSendMsg && setIsSendMsg(true);
- setStep && setStep((prev) => prev + 1);
+ .sendCode(changeNumToDefault(num))
+ .then((response) => {
+ setLoading(false);
+ if (response) setIsSendMsg(true);
})
.catch(() => {
setLoading(false);
@@ -80,6 +80,7 @@ function LogInPage({ setIsSendMsg, setStep, matchedCity }) {