feat: enhance payment flow with automatic redirection to appointment history after successful payment

This commit is contained in:
hamed
2026-07-03 10:45:35 +03:30
parent 5bec4848a2
commit 90d4a871f5
4 changed files with 25 additions and 15 deletions
@@ -1,22 +1,22 @@
import Tabs from "@/app/component/Tabs";
const listTab = [
"همه",
"در انتظار پرداخت",
"تأیید شده",
"در انتظار پرداخت",
"انجام شده",
"لغو شده",
"منقضی شده",
"همه",
];
function Head({ status, setStatus }) {
const statusMap = {
0: undefined, // all
0: "confirmed",
1: "pending",
2: "confirmed",
3: "completed",
4: "cancelled_by_user",
5: "expired",
2: "completed",
3: "cancelled_by_user",
4: "expired",
5: undefined, // all
};
const handleChange = (e, value) => {
@@ -8,7 +8,7 @@ import Cookies from "js-cookie";
import IsTurnsDetails from "./isTurnsDetails";
function Turns({ user, setIsTurnsDetails, loading }) {
const [status, setStatus] = useState(undefined);
const [status, setStatus] = useState("confirmed");
const [appointments, setAppointments] = useState([]);
const [isLoading, setIsLoading] = useState(true);
const [page, setPage] = useState(1);