From 755e06c98904877f2b6cf850d32826277bf85bfc Mon Sep 17 00:00:00 2001 From: Donkie Date: Sun, 24 Nov 2024 12:31:38 +0100 Subject: [PATCH] Now goes back to loc page on edit submit --- client/src/components/dataProvider.ts | 2 - client/src/pages/filaments/edit.tsx | 15 ++++---- .../components/locationContainer.tsx | 1 - .../pages/locations/components/spoolCard.tsx | 2 +- client/src/pages/printing/printing.tsx | 10 ++--- client/src/pages/spools/edit.tsx | 15 +++++++- client/src/pages/spools/show.tsx | 37 ++++++++----------- 7 files changed, 40 insertions(+), 42 deletions(-) diff --git a/client/src/components/dataProvider.ts b/client/src/components/dataProvider.ts index 46e062d..c140be1 100644 --- a/client/src/components/dataProvider.ts +++ b/client/src/components/dataProvider.ts @@ -61,8 +61,6 @@ const dataProvider = ( params: queryParams, }); - // console.log(url, requestMethod, queryParams, data, headers) - return { data, total: parseInt(headers["x-total-count"]) ?? 100, diff --git a/client/src/pages/filaments/edit.tsx b/client/src/pages/filaments/edit.tsx index 7d57ff9..53e7810 100644 --- a/client/src/pages/filaments/edit.tsx +++ b/client/src/pages/filaments/edit.tsx @@ -52,7 +52,6 @@ export const FilamentEdit: React.FC = () => { // Update colorType state useEffect(() => { - console.log(formProps.initialValues?.multi_color_hexes); if (formProps.initialValues?.multi_color_hexes) { setColorType("multi"); } else { @@ -325,13 +324,13 @@ export const FilamentEdit: React.FC = () => { diff --git a/client/src/pages/locations/components/locationContainer.tsx b/client/src/pages/locations/components/locationContainer.tsx index cecb607..dd334aa 100644 --- a/client/src/pages/locations/components/locationContainer.tsx +++ b/client/src/pages/locations/components/locationContainer.tsx @@ -141,7 +141,6 @@ export function LocationContainer() { useEffect(() => { // Check if they're not the same if (JSON.stringify(locationsList) !== JSON.stringify(settingsLocations)) { - console.log("Updating locations settings", locationsList, settingsLocations); setLocationsSetting.mutate(locationsList); } }, [spoolLocations]); diff --git a/client/src/pages/locations/components/spoolCard.tsx b/client/src/pages/locations/components/spoolCard.tsx index 0f2c7f1..055e66e 100644 --- a/client/src/pages/locations/components/spoolCard.tsx +++ b/client/src/pages/locations/components/spoolCard.tsx @@ -164,7 +164,7 @@ export function SpoolCard({ #{spool.id} {filament_name}
- + {record?.archived ? ( - + ) : ( - + )} {defaultButtons}