mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-09 15:35:39 +02:00
fix(projects): carry tags, due date and priority in the list payload (#2536)
The edit dialog is shared between the projects list and the project detail page and seeds itself from whichever project object it is handed. The list payload never carried tags, due_date or priority, so editing from the list showed a blank tags field -- and, unreported, submitted the dialog's default priority over a stored high/urgent one. The component read those fields through a cast, so the compiler never flagged that they were always absent. Put them on ProjectListResponse and ProjectListItem, drop the casts, and let an explicit null clear tags and due date the way it already clears budget and url -- an emptied field was previously sent as undefined and silently reverted. The template list was missing target_parts_count, which the same dialog edits.
This commit is contained in:
@@ -923,6 +923,9 @@ export interface ProjectListItem {
|
||||
target_count: number | null; // Target number of plates/print jobs
|
||||
target_parts_count: number | null; // Target number of parts/objects
|
||||
budget: number | null;
|
||||
tags: string | null; // #2536 — the shared edit dialog seeds itself from this
|
||||
due_date: string | null; // #2536
|
||||
priority: string; // #2536
|
||||
created_at: string;
|
||||
archive_count: number; // Number of print jobs (plates)
|
||||
total_items: number; // Sum of quantities (total items printed, including failed)
|
||||
@@ -958,8 +961,8 @@ export interface ProjectUpdate {
|
||||
target_count?: number;
|
||||
target_parts_count?: number;
|
||||
notes?: string;
|
||||
tags?: string;
|
||||
due_date?: string;
|
||||
tags?: string | null; // #2536 — explicit null clears the tags
|
||||
due_date?: string | null; // #2536 — explicit null clears the due date
|
||||
priority?: string;
|
||||
budget?: number | null;
|
||||
parent_id?: number;
|
||||
|
||||
Reference in New Issue
Block a user