feat: map shapes, image persistence, grab tool, layer rename/delete, i18n, page metadata
This commit is contained in:
@@ -48,6 +48,7 @@ export interface EventDepartment {
|
||||
name: string;
|
||||
color: string;
|
||||
description: string | null;
|
||||
planned_budget: number;
|
||||
sort_order: number;
|
||||
created_at: string | null;
|
||||
}
|
||||
@@ -492,6 +493,25 @@ export async function updateEventDepartment(
|
||||
return data as unknown as EventDepartment;
|
||||
}
|
||||
|
||||
export async function updateDepartmentPlannedBudget(
|
||||
supabase: SupabaseClient<Database>,
|
||||
deptId: string,
|
||||
plannedBudget: number
|
||||
): Promise<EventDepartment> {
|
||||
const { data, error } = await (supabase as any)
|
||||
.from('event_departments')
|
||||
.update({ planned_budget: plannedBudget })
|
||||
.eq('id', deptId)
|
||||
.select()
|
||||
.single();
|
||||
|
||||
if (error) {
|
||||
log.error('updateDepartmentPlannedBudget failed', { error, data: { deptId, plannedBudget } });
|
||||
throw error;
|
||||
}
|
||||
return data as unknown as EventDepartment;
|
||||
}
|
||||
|
||||
export async function deleteEventDepartment(
|
||||
supabase: SupabaseClient<Database>,
|
||||
deptId: string
|
||||
|
||||
Reference in New Issue
Block a user