Commit Graph

6 Commits

Author SHA1 Message Date
Kevin Ansfield
733f76d571 Added automatic CSV export when bulk deleting members
refs https://github.com/TryGhost/Team/issues/585

- updated bulk destroy task to first use the current query params to fetch from the appropriate CSV export endpoint and trigger a download
  - fetches via JS and triggers download from a blob URL link instead of an iframe so that we can be sure the download is successful before we hit the bulk delete endpoint
  - works differently to user deletion download because the server is not generating an export file and saving it meaning the client has to be sure we don't delete data before it's exported
- updated copy in the confirmation modal to reflect the download behaviour
2021-04-08 16:06:00 +01:00
Sanne de Vries
ee5da7a5d2 Updated members deleted info-box style 2021-04-08 16:14:06 +02:00
Kevin Ansfield
72590083f3 Added ability to bulk delete members by label or status (#1883)
refs https://github.com/TryGhost/Team/issues/585
requires https://github.com/TryGhost/Ghost/pull/12082

When a label or status filter is selected on the members screen show a "Delete selected" option in the actions dropdown. Bulk deleted members will _not_ have any subscription data modified in Stripe, if a member should be deleted and have their subscription cancelled it's necessary to do that on a per-member basis.

- updated bulk delete handling to match API
- added link to bulk delete confirmation modal in members actions dropdown (only shown when label, status, or search is used)
- updated testing framework for members
  - added label factory for easier test setup
  - updated `GET /members` and `DEL /members` endpoints to work with label filters
  - updated test selectors for easier reference in tests
2021-04-08 12:06:27 +01:00
Kevin Ansfield
fd91b593a5 Added number formatting to all pluralized counts
closes https://github.com/TryGhost/Ghost/issues/12110

- adds `{{gh-pluralize}}` helper that wraps the `{{pluralize}}` helper from `ember-inflector` but formats the number using our `{{format-number}}` helper
- updates all uses of `{{pluralize}}` to `{{gh-pluralize}}`
2020-08-10 11:16:03 +01:00
Kevin Ansfield
eee84ab5f7 Added first pass bulk members delete confirmation and results display
no issue

- display a confirmation modal when bulk deleting members
- hit the `DELETE /members/?all=true` endpoint when confirming
- show counts of members deleted/skipped
- fix selection reset when leaving edit mode
2020-06-19 18:14:41 +01:00
Kevin Ansfield
d8270a110c Moved members bulk delete confirmation into a modal 2020-06-19 14:14:39 +01:00