Added server side job calculation. BOD-267

This commit is contained in:
Patrick Fic
2020-08-21 15:48:48 -07:00
parent 488e316550
commit 4a92ef03cc
6 changed files with 362 additions and 7 deletions

View File

@@ -26,6 +26,20 @@ export function JobsTotalsTableComponent({ bodyshop, job }) {
setTotals(CalculateJob(job, bodyshop.shoprates));
}, [bodyshop, job]);
// useEffect(() => {
// const Calculate = async () => {
// const newTotals = (
// await Axios.post("/job/totals", {
// job: job,
// shoprates: bodyshop.shoprates,
// })
// ).data;
// setTotals(newTotals);
// };
// Calculate();
// }, [bodyshop, job]);
if (!!!totals) {
return <LoadingSkeleton />;
}