feat: add sort_order to categories for controlling display order in the order wizard
This commit is contained in:
@@ -20,7 +20,7 @@ export async function getCategories() {
|
||||
const { data, error } = await supabase
|
||||
.from('categories')
|
||||
.select('*')
|
||||
.order('name', { ascending: true })
|
||||
.order('sort_order', { ascending: true })
|
||||
|
||||
if (error) throw error
|
||||
return data as Category[]
|
||||
|
||||
@@ -16,6 +16,7 @@ export type Category = {
|
||||
name: string;
|
||||
description?: string | null;
|
||||
icon?: string | null;
|
||||
sort_order: number;
|
||||
created_at: string;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user