mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-23 05:21:15 +00:00
fix(files): list a hotel booking's files and files pinned to a stop on the place card
A hotel booking reaches its place through the stay, not its own place_id, so the card listed the booking but not its confirmation. Links to a stop, which MCP's link_trip_file and plugins can make, were never returned by the file list at all; it now carries linked_assignment_ids. Without files the row no longer opens to nothing.
This commit is contained in:
@@ -349,6 +349,8 @@ export class FilesService {
|
||||
...formatFile(f),
|
||||
linked_reservation_ids: fileLinks.filter((l) => l.reservation_id).map((l) => l.reservation_id),
|
||||
linked_place_ids: fileLinks.filter((l) => l.place_id).map((l) => l.place_id),
|
||||
// MCP's link_trip_file and plugins can pin a file to one stop of the plan.
|
||||
linked_assignment_ids: fileLinks.filter((l) => l.assignment_id).map((l) => l.assignment_id),
|
||||
linked_budget_item_ids: fileLinks.filter((l) => l.budget_item_id).map((l) => l.budget_item_id),
|
||||
};
|
||||
});
|
||||
|
||||
@@ -225,6 +225,7 @@ export const PLUGIN_ENTITY_CONTRACT = {
|
||||
'url',
|
||||
'linked_reservation_ids',
|
||||
'linked_place_ids',
|
||||
'linked_assignment_ids',
|
||||
'linked_budget_item_ids',
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user