fix: prevent billingPortal creation if no active subscription (#9701)

Billing portal is created in settings/billing page even if subscription
is canceled, causing server internal error. -> Skip back end request

Bonus : display settings/billing page with disabled button even if
subscription is canceled

---------

Co-authored-by: etiennejouan <jouan.etienne@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Etienne
2025-01-21 15:01:18 +01:00
committed by GitHub
parent 47c2c774e3
commit d8815d7ebf
12 changed files with 123 additions and 270 deletions

View File

@ -50,6 +50,10 @@ export const USER_QUERY_FRAGMENT = gql`
status
interval
}
billingSubscriptions {
id
status
}
workspaceMembersCount
}
workspaces {