Add drag & drop reordering of trips on the dashboard

- trip_members.sort_order (per-user, migrated) drives GET /api/trips order
- PATCH /api/trips/:id/order updates only the caller's membership row
- Trip cards get a drag handle reusing the generalized row-reorder helper;
  clicking the card still navigates
This commit is contained in:
2026-07-20 09:41:43 +07:00
parent d393e16ae1
commit b452430415
8 changed files with 163 additions and 27 deletions
+1
View File
@@ -64,6 +64,7 @@ export const api = {
create: (payload) => post('/api/trips', payload),
get: (id) => get(`/api/trips/${id}`),
update: (id, patchBody) => patch(`/api/trips/${id}`, patchBody),
reorder: (id, sort_order) => patch(`/api/trips/${id}/order`, { sort_order }),
remove: (id) => del(`/api/trips/${id}`),
join: (code) => post('/api/trips/join', { code }),
regenerateJoinCode: (id) => post(`/api/trips/${id}/join-code`, {}),