fix(tours): list a kept tour with its type's marks, pace and stages

The collection copy keeps the winter, run, ski, bike and stage columns,
but its list item only carried the older fields, so a kept ski track lost
its discipline mark, a snowshoe hike its winter mark, a run its pace and
a multi-day tour its stage count. The item now carries them, and a kept
tour's card shows the pace and the stages beside its measures.
This commit is contained in:
Maurice
2026-10-20 16:48:00 +02:00
parent 6b1488994f
commit f5be556c27
5 changed files with 130 additions and 4 deletions
+13 -1
View File
@@ -41,7 +41,12 @@ export const collectionTourTakeOverRequestSchema = z
.strict();
export type CollectionTourTakeOverRequest = z.infer<typeof collectionTourTakeOverRequestSchema>;
/** A tour kept in a collection as the collection lists it: its measures as they were saved, null staying null. */
/**
* A tour kept in a collection as the collection lists it: its measures as
* they were saved, null staying null, and what the trip's list shows of its
* type (winter label, ski discipline and technique, run profile and pace,
* bike profile, stage count).
*/
export const collectionTourItemSchema = tourListItemSchema
.pick({
name: true,
@@ -58,6 +63,13 @@ export const collectionTourItemSchema = tourListItemSchema
station_count: true,
station_stay_minutes: true,
station_stays_unknown: true,
bike_profile: true,
winter_activity: true,
run_profile: true,
run_pace_seconds_per_km: true,
ski_discipline: true,
ski_technique: true,
stage_count: true,
})
.extend({
id: idSchema,