change date type for req & design and fields & add requests & fix bug appointment and dashboard
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user