refactor(community): rename Community Connections → Community Ecology
Simplify the feature to pure discovery (filter by topic, see matching members, copy Slack handle). Drop the connection request/confirm flow entirely — Connection model, 7 API endpoints, useConnections composable, and TagInput component deleted. - Rename communityConnections → communityEcology in schema, API, pages - Delete legacy fields: offering, lookingFor, peerSupport - New /ecology page, /api/ecology/suggestions, community-ecology.patch - Nav: "Connections" → "Ecology", remove pending-count badge - Fix auth/member.get.js missing craftTags + communityEcology - Add community_ecology_updated activity log type - Expose slackHandle conditionally when offerPeerSupport is true - Add migration script at scripts/migrate-to-ecology.js (run before deploy)
This commit is contained in:
parent
9577929e0d
commit
0b3896d984
33 changed files with 1002 additions and 2635 deletions
|
|
@ -30,7 +30,7 @@ export default defineEventHandler(async (event) => {
|
|||
status: "active",
|
||||
})
|
||||
.select(
|
||||
"name pronouns timeZone avatar studio bio location socialLinks offering lookingFor privacy circle peerSupport craftTags communityConnections createdAt memberNumber",
|
||||
"name pronouns timeZone avatar studio bio location socialLinks privacy circle craftTags communityEcology createdAt memberNumber",
|
||||
)
|
||||
.lean();
|
||||
|
||||
|
|
@ -68,32 +68,21 @@ export default defineEventHandler(async (event) => {
|
|||
if (isVisible("bio")) filtered.bio = member.bio;
|
||||
if (isVisible("location")) filtered.location = member.location;
|
||||
if (isVisible("socialLinks")) filtered.socialLinks = member.socialLinks;
|
||||
if (isVisible("offering")) filtered.offering = member.offering;
|
||||
if (isVisible("lookingFor")) filtered.lookingFor = member.lookingFor;
|
||||
if (isVisible("craftTags")) filtered.craftTags = member.craftTags;
|
||||
|
||||
// Craft tags
|
||||
if (isVisible("craftTags")) {
|
||||
filtered.craftTags = member.craftTags;
|
||||
}
|
||||
|
||||
// Community connections (expose only public-safe fields)
|
||||
if (isVisible("communityConnections")) {
|
||||
filtered.communityConnections = {
|
||||
topics: member.communityConnections?.topics,
|
||||
offerPeerSupport: member.communityConnections?.offerPeerSupport,
|
||||
availability: member.communityConnections?.availability,
|
||||
details: member.communityConnections?.details,
|
||||
};
|
||||
}
|
||||
|
||||
// Peer support: expose only fields needed for matching/contact UX
|
||||
// slackUserId, slackDMChannelId, slackUsername, personalMessage are internal
|
||||
if (member.peerSupport?.enabled) {
|
||||
filtered.peerSupport = {
|
||||
enabled: true,
|
||||
skillTopics: member.peerSupport.skillTopics,
|
||||
supportTopics: member.peerSupport.supportTopics,
|
||||
availability: member.peerSupport.availability,
|
||||
if (isVisible("communityEcology")) {
|
||||
const ecology = member.communityEcology || {};
|
||||
filtered.communityEcology = {
|
||||
topics: ecology.topics,
|
||||
offerPeerSupport: ecology.offerPeerSupport,
|
||||
availability: ecology.availability,
|
||||
details: ecology.details,
|
||||
// Contact-in-place: surface the handle + personal message only when
|
||||
// the member has explicitly opted into peer support.
|
||||
...(ecology.offerPeerSupport && {
|
||||
slackHandle: ecology.slackHandle,
|
||||
personalMessage: ecology.personalMessage,
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue