From bf0640836801bcdbf5610712c90fc3cba992ef1f Mon Sep 17 00:00:00 2001 From: Donkie Date: Wed, 20 Nov 2024 21:57:01 +0100 Subject: [PATCH] Added reading and using of spool orders in locations --- .../pages/locations/components/location.tsx | 11 ++++- .../components/locationContainer.tsx | 17 ++++++- .../pages/locations/components/spoolList.tsx | 37 +++++++++++---- client/src/pages/locations/functions.ts | 45 ++++++++++++------- spoolman/settings.py | 1 + 5 files changed, 85 insertions(+), 26 deletions(-) diff --git a/client/src/pages/locations/components/location.tsx b/client/src/pages/locations/components/location.tsx index eaa8dea..926a713 100644 --- a/client/src/pages/locations/components/location.tsx +++ b/client/src/pages/locations/components/location.tsx @@ -21,6 +21,8 @@ export function Location({ onDelete, moveLocation, onEditTitle, + locationSpoolOrder, + setLocationSpoolOrder, }: { index: number; title: string; @@ -29,6 +31,8 @@ export function Location({ onDelete?: () => void; moveLocation: (dragIndex: number, hoverIndex: number) => void; onEditTitle: (newTitle: string) => void; + locationSpoolOrder: number[]; + setLocationSpoolOrder: (spoolOrder: number[]) => void; }) { const [editTitle, setEditTitle] = useState(false); const [newTitle, setNewTitle] = useState(title); @@ -123,7 +127,12 @@ export function Location({ )} {showDelete &&