change design and data list in doctor-item & handle component appointment in doctor-item & handle functionality date-picker & fix bug appointment page & add req get appointment list
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import ArrowLeftWhiteD from "@/components/icons/ArrowLeftWhiteD";
|
||||
import {
|
||||
convertJalaliTimestamp,
|
||||
changeDateType,
|
||||
handleTimeExpiresToken,
|
||||
removeAdditionalKeysDashboard,
|
||||
} from "@/helper";
|
||||
@@ -24,25 +24,9 @@ function ButtonSendData({
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
const changeDateType = (data) => {
|
||||
const newData = data;
|
||||
const splitedDate = newData.birthday.split("/");
|
||||
newData.birthday = convertJalaliTimestamp(
|
||||
{
|
||||
jy: Number(splitedDate[0]),
|
||||
jm: Number(splitedDate[1]),
|
||||
jd: Number(splitedDate[2]),
|
||||
},
|
||||
true
|
||||
);
|
||||
return newData;
|
||||
};
|
||||
|
||||
const postData = () => {
|
||||
console.log(changeDateType(information));
|
||||
|
||||
request
|
||||
.postUserProfile(information)
|
||||
.postUserProfile(changeDateType(information, false))
|
||||
.then((response) => {
|
||||
if (response.uuid) {
|
||||
const formData = new URLSearchParams();
|
||||
@@ -84,11 +68,10 @@ function ButtonSendData({
|
||||
|
||||
const patchData = () => {
|
||||
const usedKays = removeAdditionalKeysDashboard(information);
|
||||
console.log(changeDateType(information));
|
||||
|
||||
request
|
||||
.patchUserProfile(
|
||||
usedKays,
|
||||
changeDateType(usedKays, true),
|
||||
information?.uuid,
|
||||
Cookies.get("access_token")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user