orbiting / republik-admin-frontend

[DEPRECATED] moved to https://github.com/republik/plattform A front end to manage users and payments of Republik.
6 stars 3 forks source link

Changing newsletter subscriptions doesn't work #40

Open patrickvenetz opened 5 years ago

patrickvenetz commented 5 years ago

Bug Report

Changing Newsletter subscriptions doesn't work.

Steps to Reproduce

  1. Open a random user in Admin-Tool
  2. Toggle checkboxes next to a newsletter subscription
  3. Reload page

Actual Results

Changes are not reflected in UI, and neither visible in MailChimp.

Expected Results

Changes are stored and reload will show previously checked checkboxes. Updates can be verified in MailChimp.

Possible Solutions

This is a regression.

Code appears to only mimic desired behaviour but is not sending a mutation to GraphQL query.

Additional note: As this issues is opened, there is consensus to not mutate each newsletter subscription but to toggle checkboxes and then submit a mutation.

tpreusse commented 5 years ago

Additional note: As this issues is opened, there is consensus to not mutate each newsletter subscription but to toggle checkboxes and then submit a mutation.

I think the approach should be:

Because currently updateNewsletterSubscription is unpredictable because most times it only changes an interest without triggering a verification flow. But when not subscripted it triggers the status change which triggers the mc verification flow if necessary (user did unsubscribe).