Add workspace favorites behind feature flag (#6904)

- make member nullable on favorites
- add potential relation with view entity
- add a new type of favorite list in front : workspace favorite
- build a new component for retrieving workspace favorite to display +
refacto the existing one

Bonus:
- removing activities seed since this is deprecated
This commit is contained in:
Thomas Trompette
2024-09-05 16:41:06 +02:00
committed by GitHub
parent bc8c961e30
commit 78d8df6a68
21 changed files with 339 additions and 160 deletions

View File

@ -18,6 +18,7 @@ import { seedCalendarEventParticipants } from 'src/database/typeorm-seeds/worksp
import { seedCalendarEvents } from 'src/database/typeorm-seeds/workspace/calendar-events';
import { seedCompanies } from 'src/database/typeorm-seeds/workspace/companies';
import { seedConnectedAccount } from 'src/database/typeorm-seeds/workspace/connected-account';
import { seedWorkspaceFavorites } from 'src/database/typeorm-seeds/workspace/favorites';
import { seedMessageChannelMessageAssociation } from 'src/database/typeorm-seeds/workspace/message-channel-message-associations';
import { seedMessageChannel } from 'src/database/typeorm-seeds/workspace/message-channels';
import { seedMessageParticipant } from 'src/database/typeorm-seeds/workspace/message-participants';
@ -206,12 +207,18 @@ export class DataSeedWorkspaceCommand extends CommandRunner {
);
}
await viewPrefillData(
const viewDefinitionsWithId = await viewPrefillData(
entityManager,
dataSourceMetadata.schema,
objectMetadataMap,
featureFlags,
);
await seedWorkspaceFavorites(
viewDefinitionsWithId.map((view) => view.id),
entityManager,
dataSourceMetadata.schema,
);
},
);
} catch (error) {