change date type for req & design and fields & add requests & fix bug appointment and dashboard

This commit is contained in:
Ehsan
2025-07-04 23:44:29 +03:30
parent 597fa1931d
commit f951128074
19 changed files with 273 additions and 58 deletions
@@ -1,5 +1,6 @@
import ArrowLeftWhiteD from "@/components/icons/ArrowLeftWhiteD";
import {
convertJalaliTimestamp,
handleTimeExpiresToken,
removeAdditionalKeysDashboard,
} from "@/helper";
@@ -23,7 +24,23 @@ 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)
.then((response) => {
@@ -67,6 +84,7 @@ function ButtonSendData({
const patchData = () => {
const usedKays = removeAdditionalKeysDashboard(information);
console.log(changeDateType(information));
request
.patchUserProfile(