Add bulk delete for spool and color catalog entries (#646)

Checkbox selection + "Delete Selected" button in Settings > Filament
  for both Spool Catalog and Color Catalog. Adds POST bulk-delete
  endpoints and translations for all 7 locales.
This commit is contained in:
maziggy
2026-03-07 10:13:40 +01:00
parent d55585a73f
commit a7ddc483b3
15 changed files with 389 additions and 74 deletions
+4
View File
@@ -3591,6 +3591,8 @@ export const api = {
request<SpoolCatalogEntry>(`/inventory/catalog/${id}`, { method: 'PUT', body: JSON.stringify(data) }),
deleteCatalogEntry: (id: number) =>
request<{ status: string }>(`/inventory/catalog/${id}`, { method: 'DELETE' }),
bulkDeleteCatalogEntries: (ids: number[]) =>
request<{ deleted: number }>('/inventory/catalog/bulk-delete', { method: 'POST', body: JSON.stringify({ ids }) }),
resetSpoolCatalog: () =>
request<{ status: string }>('/inventory/catalog/reset', { method: 'POST' }),
getColorCatalog: () =>
@@ -3601,6 +3603,8 @@ export const api = {
request<ColorCatalogEntry>(`/inventory/colors/${id}`, { method: 'PUT', body: JSON.stringify(data) }),
deleteColorEntry: (id: number) =>
request<{ status: string }>(`/inventory/colors/${id}`, { method: 'DELETE' }),
bulkDeleteColorEntries: (ids: number[]) =>
request<{ deleted: number }>('/inventory/colors/bulk-delete', { method: 'POST', body: JSON.stringify({ ids }) }),
resetColorCatalog: () =>
request<{ status: string }>('/inventory/colors/reset', { method: 'POST' }),
lookupColor: (manufacturer: string, colorName: string, material?: string) =>