|
@@ -24,6 +24,7 @@ import ProjectTotalFee from "./ProjectTotalFee"; |
|
|
import { timestampToDateString } from "@/app/utils/formatUtil"; |
|
|
import { timestampToDateString } from "@/app/utils/formatUtil"; |
|
|
import dayjs from "dayjs"; |
|
|
import dayjs from "dayjs"; |
|
|
import { getSession } from "next-auth/react" |
|
|
import { getSession } from "next-auth/react" |
|
|
|
|
|
import { BASE_API_URL } from "@/config/api"; |
|
|
|
|
|
|
|
|
const CreateInvoice: React.FC = ({ |
|
|
const CreateInvoice: React.FC = ({ |
|
|
}) => { |
|
|
}) => { |
|
@@ -117,7 +118,7 @@ const CreateInvoice: React.FC = ({ |
|
|
try { |
|
|
try { |
|
|
// Make an API request to generate the JasperReport |
|
|
// Make an API request to generate the JasperReport |
|
|
|
|
|
|
|
|
const response = await fetch(`http://localhost:8090/api/invoices/pdf`, { |
|
|
|
|
|
|
|
|
const response = await fetch(`${BASE_API_URL}/invoices/pdf`, { |
|
|
method: 'POST', |
|
|
method: 'POST', |
|
|
headers: { |
|
|
headers: { |
|
|
'Content-Type': 'application/json', |
|
|
'Content-Type': 'application/json', |
|
|