mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-28 07:30:04 +00:00
feat(tours): add non-motorized day tour planning
This commit is contained in:
@@ -19,6 +19,7 @@ const FIXTURES: Record<TrekWsEventName, Record<string, unknown>> = {
|
||||
'place:created': { place: { id: 3, name: 'Louvre' } },
|
||||
'place:updated': { place: { id: 3, name: 'Louvre' } },
|
||||
'place:deleted': { placeId: 3 },
|
||||
'tours:changed': { placeIds: [3] },
|
||||
'assignment:created': { assignment: { id: 9, day_id: 2 } },
|
||||
'assignment:updated': { assignment: { id: 9, day_id: 2 } },
|
||||
'assignment:deleted': { assignmentId: 9, dayId: 2 },
|
||||
@@ -153,9 +154,9 @@ describe('@trek/shared realtime event registry', () => {
|
||||
// panel without every member polling for it.
|
||||
// 33rd user event: journey:photos:updated, so the gallery re-sorts once the
|
||||
// capture times of an import have landed (#1587).
|
||||
expect(TREK_WS_TRIP_EVENT_NAMES).toHaveLength(74);
|
||||
expect(TREK_WS_TRIP_EVENT_NAMES).toHaveLength(75);
|
||||
expect(TREK_WS_USER_EVENT_NAMES).toHaveLength(33);
|
||||
expect(TREK_WS_EVENT_NAMES).toHaveLength(107);
|
||||
expect(TREK_WS_EVENT_NAMES).toHaveLength(108);
|
||||
});
|
||||
|
||||
it('WSEVT-REG-002: every name is domain:action shaped and outside the reserved plugin: namespace', () => {
|
||||
|
||||
@@ -63,6 +63,8 @@ export const TREK_WS_EVENTS = {
|
||||
'place:created': { scope: 'trip', payload: z.object({ place: entity }) },
|
||||
'place:updated': { scope: 'trip', payload: z.object({ place: entity }) },
|
||||
'place:deleted': { scope: 'trip', payload: z.object({ placeId: id }) },
|
||||
// Invalidate the trip's Tours list; affected ids let peers exclude new Tours immediately.
|
||||
'tours:changed': { scope: 'trip', payload: z.object({ placeIds: idList.optional() }) },
|
||||
|
||||
// ── Assignments ──────────────────────────────────────────────────────────
|
||||
'assignment:created': { scope: 'trip', payload: z.object({ assignment: entity }) },
|
||||
|
||||
Reference in New Issue
Block a user