Group Plan Modal (#15588)

* Add group plan selection modal for upgrades

Allow users to select an existing group to upgrade before creating a new one.

* crlf -> lf lint

* set selection of group plan

Also tiny UI fixes

* Update group plan selection to include expired plans

* Add includeExpiredPlans option to group fetching

* force flag when fetching group plans

* Update group plan eligibility check

* Fix eslint error in push notification import

* replace chaining (?.) w/null check

* Remove comment

* set initial selected group plan, and fix card rounding

* format member count

* Show warning for pending party invites when upgrading to paid group plan

Show warning for pending party invites when upgrading to paid group plan. If user upgrades from party to group, remove any pending invites

* suppress error toasts for group modal, and UI tweaks for group modal

suppress error toast for 404 on party fetch for users without a party (for group modal), Increase check SVG size in selectableCard, and show "Previously upgraded" label for parties that were canceled group plans

* Clear upgradingGroup state after group plan payment
This commit is contained in:
Fiz
2026-02-26 16:02:47 -06:00
committed by GitHub
parent 40122e5621
commit f21e800b0b
10 changed files with 726 additions and 9 deletions
+9 -1
View File
@@ -334,9 +334,13 @@ api.getGroups = {
throw new BadRequest(apiError('guildsOnlyPaginate'));
}
const groupFields = basicGroupFields.concat(' description memberCount balance leaderOnly');
let groupFields = basicGroupFields.concat(' description memberCount balance leaderOnly');
const sort = '-memberCount';
if (req.query.includeExpiredPlans === 'true') {
groupFields = groupFields.concat(' purchased');
}
const filters = {};
if (req.query.categories) {
const categorySlugs = req.query.categories.split(',');
@@ -371,6 +375,10 @@ api.getGroups = {
filters.$or.push({ description: searchQuery });
}
if (req.query.includeExpiredPlans === 'true') {
filters.includeExpiredPlans = true;
}
const results = await Group.getGroups({
user,
types,