This commit is contained in:
IO420
2025-10-03 17:29:53 -06:00
parent f07954eef2
commit 02e06f10bf
6 changed files with 26 additions and 17 deletions
@@ -61,6 +61,7 @@ function Impressions({ costs, numAcount }: ImpressionsProps) {
setPages("");
setCost("");
toast.success("Impresion cobrada correctamente");
router.refresh();
};
return (
+4 -2
View File
@@ -3,7 +3,7 @@
import toast from "react-hot-toast";
import { useState } from "react";
import { PostReceipt } from "@/app/lib/postReceipt";
import { useRouter } from "next/navigation";
import { useParams, usePathname, useRouter } from "next/navigation";
import "./Receipt.css";
@@ -13,6 +13,8 @@ interface ReceiptsProps {
function Receipt({ numAcount }: ReceiptsProps) {
const router = useRouter();
const path = usePathname();
console.log(path);
const [folio, setFolio] = useState("");
const [amount, setAmount] = useState("");
@@ -29,7 +31,6 @@ function Receipt({ numAcount }: ReceiptsProps) {
//restrict this month//
const handleSaveReceipt = async () => {
if (!numAcount) {
toast.error("busca de nuevo al estudiante");
return;
@@ -63,6 +64,7 @@ function Receipt({ numAcount }: ReceiptsProps) {
setDate("");
toast.success("Recibo guardado");
router.refresh();
} catch (err: any) {
toast.error(String(err));
}