fix(ppoo): changes to prevent blank screen
This commit is contained in:
@@ -5,9 +5,14 @@ import { ppooQuery } from "../../../../sqlServer/querys/warehouse/ppooQuery.js";
|
|||||||
export const getPPOO = async () => {
|
export const getPPOO = async () => {
|
||||||
const { data, error } = await tryCatch(query(ppooQuery, "Get PPOO"));
|
const { data, error } = await tryCatch(query(ppooQuery, "Get PPOO"));
|
||||||
|
|
||||||
|
const ppoo: any = data as any;
|
||||||
if (error) {
|
if (error) {
|
||||||
return { success: false, message: "Error getting ppoo", data: error };
|
return { success: false, message: "Error getting ppoo", data: error };
|
||||||
}
|
}
|
||||||
|
|
||||||
return { success: true, message: "Current pallets in PPOO.", data: data };
|
return {
|
||||||
|
success: true,
|
||||||
|
message: "Current pallets in PPOO.",
|
||||||
|
data: ppoo.data,
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user