fix
This commit is contained in:
parent
e488062aed
commit
89e2bd3785
@ -84,6 +84,67 @@ export const getQuarterPeriods = async (currentYear, currentQuarter) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// export const getPreviousForecastData = async (
|
||||||
|
// establishmentId,
|
||||||
|
// quarter,
|
||||||
|
// year,
|
||||||
|
// productId
|
||||||
|
// ) => {
|
||||||
|
// try {
|
||||||
|
// const response = await getRequest(
|
||||||
|
// "/submissions/getPreviousForecastData",
|
||||||
|
// {
|
||||||
|
// params: {
|
||||||
|
// establishment_id: establishmentId,
|
||||||
|
// quarter,
|
||||||
|
// year,
|
||||||
|
// product_id: productId,
|
||||||
|
// },
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
|
||||||
|
// // Always return only backend data
|
||||||
|
// return response?.data || null;
|
||||||
|
|
||||||
|
// } catch (error) {
|
||||||
|
// console.error("Error fetching previous forecast data:", error);
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
|
||||||
|
|
||||||
|
// export const getBeforePreviousData = async (
|
||||||
|
// establishmentId,
|
||||||
|
// quarter,
|
||||||
|
// year,
|
||||||
|
// productId
|
||||||
|
// ) => {
|
||||||
|
// try {
|
||||||
|
// if (!establishmentId || !quarter || !year || !productId) {
|
||||||
|
// throw new Error("Missing required parameters");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// const response = await getRequest(
|
||||||
|
// "/submissions/getBeforePreviousData",
|
||||||
|
// {
|
||||||
|
// params: {
|
||||||
|
// establishment_id: establishmentId,
|
||||||
|
// current_quarter: quarter,
|
||||||
|
// current_year: year,
|
||||||
|
// product_id: productId,
|
||||||
|
// },
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
|
||||||
|
// return response?.data ?? null;
|
||||||
|
|
||||||
|
// } catch (error) {
|
||||||
|
// console.error("Error fetching data:", error);
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
|
||||||
|
|
||||||
export const getPreviousForecastData = async (
|
export const getPreviousForecastData = async (
|
||||||
establishmentId,
|
establishmentId,
|
||||||
quarter,
|
quarter,
|
||||||
@ -145,9 +206,6 @@ export const getBeforePreviousData = async (
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export const getSubmissionHistoryByEstablishment = async (establishmentId, config = {}) => {
|
export const getSubmissionHistoryByEstablishment = async (establishmentId, config = {}) => {
|
||||||
try {
|
try {
|
||||||
if (!establishmentId) {
|
if (!establishmentId) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user