impact-graph
impact-graph copied to clipboard
Admin Dashboard - Project Verification Buttons
As of now, in the Admin Panel, we have two options for project verification - 'verify project' and 'unverify project' So far we have not had to revoke any badges but when we do we will need another option.
Can we create 3 buttons? 'verify project' - changes the db value to true 'reject project' - changes the db value to false 'revoke badge' - changes the db value to false
We can then create a new segment event based off of the button action to trigger the correct emails for the corresponding events. Project owners will need to receive a different email upon rejection than upon revocation.
@WhyldWanderer tried adding a new segment event but I get this error, do you know if we have a limit of events?
Im not sure but I think @divine-comedian might know...
@CarlosQ96 You don't actually add the event in segment. Norrmally we'll just add the analytics.track
code with the relevant information for each relevant mutation/function in the impact graph
e.g.
@Mutation(returns => Boolean)
async activateProject(
. . .
const segmentProject = {
email: user.email,
title: project.title,
LastName: user.lastName,
FirstName: user.firstName,
OwnerId: project.admin,
slug: project.slug,
};
analytics.track(
SegmentEvents.PROJECT_ACTIVATED,
`givethId-${ctx.req.user.userId}`,
segmentProject,
null,
);