Subscription UI refactoring

This commit is contained in:
Čarodej
2022-01-03 16:18:36 +01:00
parent 9d189b3d12
commit 09d8b84870
25 changed files with 1489 additions and 1575 deletions
+1 -3
View File
@@ -43,6 +43,7 @@ class UserResource extends JsonResource
'relationships' => [
'settings' => new SettingsResource($this->settings),
'favourites' => new FolderCollection($this->favouriteFolders),
'creditCards' => new CreditCardCollection($this->creditCards),
$this->mergeWhen($this->hasSubscription(), fn () => [
'subscription' => new SubscriptionResource($this->subscription),
]),
@@ -52,9 +53,6 @@ class UserResource extends JsonResource
$this->mergeWhen($isMeteredSubscription, fn () => [
'alert' => new BillingAlertResource($this->billingAlert),
]),
$this->mergeWhen($isMeteredSubscription, fn () => [
'creditCards' => new CreditCardCollection($this->creditCards),
]),
$this->mergeWhen($isMeteredSubscription, fn () => [
'failedPayments' => new FailedPaymentsCollection($this->failedPayments),
]),