fix: rename hasEngagedEcology → hasEngagedBoard in onboarding status, clean up stale ecology references
This commit is contained in:
parent
74b2287d48
commit
a0f60bcdc0
8 changed files with 24 additions and 24 deletions
|
|
@ -5,10 +5,10 @@ import { requireAuth } from '../../utils/auth.js'
|
|||
export default defineEventHandler(async (event) => {
|
||||
const member = await requireAuth(event)
|
||||
|
||||
// Combine craft tags and cooperative ecology tags
|
||||
// Combine craft tags and board topic tags
|
||||
const craftTags = member.craftTags || []
|
||||
const ecologyTags = (member.board?.topics || []).map(t => t.tagSlug)
|
||||
const memberTags = [...new Set([...craftTags, ...ecologyTags].filter(Boolean))]
|
||||
const boardTags = (member.board?.topics || []).map(t => t.tagSlug)
|
||||
const memberTags = [...new Set([...craftTags, ...boardTags].filter(Boolean))]
|
||||
|
||||
if (!memberTags.length) {
|
||||
return []
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export default defineEventHandler(async (event) => {
|
|||
const hasVisitedEvent = !!member.onboarding?.eventPageVisited
|
||||
|
||||
const topics = member.board?.topics || []
|
||||
const hasEngagedEcology =
|
||||
const hasEngagedBoard =
|
||||
!!member.onboarding?.boardPageVisited &&
|
||||
topics.some((t) => ['help', 'interested', 'seeking'].includes(t.state))
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ export default defineEventHandler(async (event) => {
|
|||
goals: {
|
||||
hasProfileTags,
|
||||
hasVisitedEvent,
|
||||
hasEngagedEcology,
|
||||
hasEngagedBoard,
|
||||
hasClickedWiki,
|
||||
},
|
||||
completedAt: member.onboarding?.completedAt || null,
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ import { requireAuth } from '../../utils/auth.js'
|
|||
export default defineEventHandler(async (event) => {
|
||||
const member = await requireAuth(event)
|
||||
|
||||
// Combine craft tags and cooperative ecology tags
|
||||
// Combine craft tags and board topic tags
|
||||
const craftTags = member.craftTags || []
|
||||
const ecologyTags = (member.board?.topics || []).map(t => t.tagSlug)
|
||||
const memberTags = [...new Set([...craftTags, ...ecologyTags].filter(Boolean))]
|
||||
const boardTags = (member.board?.topics || []).map(t => t.tagSlug)
|
||||
const memberTags = [...new Set([...craftTags, ...boardTags].filter(Boolean))]
|
||||
|
||||
if (!memberTags.length) {
|
||||
return []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue