Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

some fixes when to display photo tab

Marek Maslowski58b7c2e7ac13
diff --git a/client/src/pages/TripPlannerPage.tsx b/client/src/pages/TripPlannerPage.tsx
index d8d4840e2..2124367dd 100644
--- a/client/src/pages/TripPlannerPage.tsx
+++ b/client/src/pages/TripPlannerPage.tsx
@@ -114,8 +114,8 @@ export default function TripPlannerPage(): React.ReactElement | null {
const map = {}
data.addons.forEach(a => { map[a.id] = true })
// Check if any photo provider is enabled (for memories tab to show)
- const hasPhotoProviders = data.addons.some(a => a.type === 'photo_provider' && a.enabled)
- setEnabledAddons({ packing: !!map.packing, budget: !!map.budget, documents: !!map.documents, collab: !!map.collab, memories: !!map.memories || hasPhotoProviders })
+ const hasPhotoProviders = data.addons.some(a => a.type === 'photo_provider')
+ setEnabledAddons({ packing: !!map.packing, budget: !!map.budget, documents: !!map.documents, collab: !!map.collab, memories: hasPhotoProviders })
}).catch(() => {})
authApi.getAppConfig().then(config => {
if (config.allowed_file_types) setAllowedFileTypes(config.allowed_file_types)
diff --git a/server/src/db/migrations.ts b/server/src/db/migrations.ts
index 209ca0acc..76fb0a13a 100644
--- a/server/src/db/migrations.ts
+++ b/server/src/db/migrations.ts
@@ -733,6 +733,9 @@ function runMigrations(db: Database.Database): void {
);
`);
},
+ () => {
+ try {db.exec('UPDATE addons SET enabled = 0 WHERE id = memories');} catch (err) {}
+ }
];
if (currentVersion < migrations.length) {