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
@@ -89,6 +89,17 @@ describe('MJourneySettingsSheet', () => {
expect(screen.getByText('8 places')).toBeInTheDocument();
});
it('FE-MOB-JSET-2683: lists the people a linked trip lets in, and nothing without', async () => {
const { unmount } = setup();
expect(screen.queryByText('Through trips')).not.toBeInTheDocument();
unmount();
setup({ trip_access: [{ user_id: 7, role: 'editor', username: 'lena', avatar: null, trip_id: 3, trip_title: 'Tokyo trip' }] });
expect(await screen.findByText('Through trips')).toBeInTheDocument();
expect(screen.getByText('lena')).toBeInTheDocument();
expect(screen.getByText('via Tokyo trip')).toBeInTheDocument();
});
it('FE-MOB-JSET-002: shows the empty hint when no trip is linked', async () => {
setup({ trips: [] });
expect(await screen.findByText('No trips linked')).toBeInTheDocument();