A collection named its own main picture. A gallery is already ORDERED — somebody drags it into the sequence they want — so "which one leads" was being answered twice, in two screens, by two mechanisms that could disagree. Reordering a gallery and then wondering why the card had not changed was a bug waiting to be filed. So the grid here decides nothing at all. It is what the collection SHOWS, in the gallery's order, and the pictures are no longer buttons: making them look pressable would promise a control that lives in another screen. Adding, reordering and framing all belong to Galleries, and now so does this. The `cover` column is gone from both databases. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
19 lines
587 B
TypeScript
19 lines
587 B
TypeScript
/** A collection, as the site's admin API serialises one. Snake case: it is the wire, not our shape. */
|
|
export type Collection = {
|
|
id: number;
|
|
/** The gallery holding its photographs, or null while nobody has chosen one. */
|
|
gallery_id: number | null;
|
|
title: string;
|
|
slug: string | null;
|
|
description: string | null;
|
|
descriptive_text: string | null;
|
|
measurement: string | null;
|
|
material: string | null;
|
|
colors: string | null;
|
|
delivery_time: string | null;
|
|
sort_order: number;
|
|
photo_count: number;
|
|
};
|
|
|
|
export type CollectionPhoto = { path: string; name: string };
|