+
+
+
+
+
+ {error &&
}
+ {!error && drafts.length === 0 &&
}
+ {drafts.map((draft) => (
+
void load()} />
+ ))}
+
+ );
+}
diff --git a/frontend/src/admin/draftsApi.ts b/frontend/src/admin/draftsApi.ts
new file mode 100644
index 0000000..b8b6e49
--- /dev/null
+++ b/frontend/src/admin/draftsApi.ts
@@ -0,0 +1,73 @@
+export type PriceSource = 'default' | 'ai' | 'admin';
+
+export interface DraftImage {
+ id: number;
+ image_path: string;
+}
+
+export interface Draft {
+ item_id: number;
+ state: string;
+ attempts: number;
+ submitter_note: string | null;
+ ai_error: string | null;
+ ai_name: string | null;
+ ai_description: string | null;
+ ai_suggested_price_cents: number | null;
+ price_source: PriceSource;
+ model: string | null;
+ item_name: string;
+ item_description: string | null;
+ price_cents: number;
+ status: string;
+ upload_link_label: string | null;
+ images: DraftImage[];
+}
+
+async function send(path: string, init?: RequestInit): Promise