feat(journey): the journal settings list who a linked trip lets in

Under the contributors, the journey settings on desktop and phone get a section of their own, Through trips, with everyone a trip's journal link lets in, their role and the trip they come through. It is read only there, since the trip's settings manage it, and it leaves out whoever is a contributor already. getJourneyFull answers it as trip_access.
This commit is contained in:
Maurice
2026-10-18 22:04:41 +02:00
parent 451167bde3
commit 532010aa79
35 changed files with 248 additions and 12 deletions
@@ -270,12 +270,10 @@ export class JourneyDomainService {
// linked trips (JG17)
const trips = await this.journeyTripsRepo.listForJourney(journeyId);
// contributors (JG18)
const contributorsRaw = await this.contributorsRepo.listForJourney(journeyId);
const contributors = contributorsRaw.map((c) => ({
...c,
avatar_url: avatarUrl(c),
}));
const withAvatar = <R extends { avatar: string | null }>(rows: R[]) => rows.map((r) => ({ ...r, avatar_url: avatarUrl(r) }));
const contributors = withAvatar(await this.contributorsRepo.listForJourney(journeyId)); // JG18
// Who a trip's journal link lets in besides them (#2683), shown apart in the settings.
const tripAccess = withAvatar(await this.contributorsRepo.listTripAccessForJourney(journeyId));
// stats
const entryCount = entries.filter((e) => e.type === 'entry').length;
@@ -306,6 +304,7 @@ export class JourneyDomainService {
gallery,
trips,
contributors,
trip_access: tripAccess,
stats: { entries: entryCount, photos: photoCount, places: places.length },
hide_skeletons: hideSkeletons,
// What the eye toggle cannot say: how much was waved away one at a time, and