impact-graph icon indicating copy to clipboard operation
impact-graph copied to clipboard

Admin Dashboard - Project Verification Buttons

Open WhyldWanderer opened this issue 3 years ago • 3 comments

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 avatar Feb 22 '22 01:02 WhyldWanderer

@WhyldWanderer tried adding a new segment event but I get this error, do you know if we have a limit of events? image

CarlosQ96 avatar Feb 23 '22 03:02 CarlosQ96

Im not sure but I think @divine-comedian might know...

WhyldWanderer avatar Feb 23 '22 04:02 WhyldWanderer

@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,
      );

divine-comedian avatar Feb 25 '22 15:02 divine-comedian