added new headers and added table in asignation table
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { usePathname, useRouter, useSearchParams } from "next/navigation";
|
||||
import { envConfig } from "@/app/lib/config";
|
||||
|
||||
import Selection from "../Selection/Selection";
|
||||
import Cookies from "js-cookie";
|
||||
import axios from "axios";
|
||||
|
||||
import Swal from "sweetalert2";
|
||||
|
||||
import "./Receipt.css";
|
||||
|
||||
interface ReceiptsProps {
|
||||
@@ -32,6 +32,8 @@ export default function Inscripcion({
|
||||
>(null);
|
||||
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
const searchParams = useSearchParams();
|
||||
|
||||
const [folio, setFolio] = useState("");
|
||||
const [amount, setAmount] = useState("");
|
||||
@@ -128,7 +130,10 @@ export default function Inscripcion({
|
||||
setAmount("");
|
||||
setDate(todayISO);
|
||||
|
||||
router.refresh();
|
||||
const params = new URLSearchParams(searchParams.toString());
|
||||
params.delete("numAcount");
|
||||
router.push(`${pathname}?${params.toString()}`);
|
||||
|
||||
} catch (error: any) {
|
||||
const msg =
|
||||
error.response?.data?.message ||
|
||||
|
||||
Reference in New Issue
Block a user