Add extra pro users via env

This commit is contained in:
JhumanJ 2023-10-12 12:06:03 +02:00
parent 32fd9f84a2
commit c02af7800e
7 changed files with 213 additions and 87 deletions

View File

@ -12,11 +12,8 @@ class SubscriptionController extends Controller
const SUBSCRIPTION_PLANS = ['monthly', 'yearly']; const SUBSCRIPTION_PLANS = ['monthly', 'yearly'];
const PRO_SUBSCRIPTION_NAME = 'default'; const PRO_SUBSCRIPTION_NAME = 'default';
const ENTERPRISE_SUBSCRIPTION_NAME = 'enterprise';
const SUBSCRIPTION_NAMES = [ const SUBSCRIPTION_NAMES = [
self::PRO_SUBSCRIPTION_NAME, self::PRO_SUBSCRIPTION_NAME,
self::ENTERPRISE_SUBSCRIPTION_NAME
]; ];
/** /**

View File

@ -9,12 +9,10 @@ use App\Notifications\VerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Foundation\Auth\User as Authenticatable;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Notifications\Notifiable; use Illuminate\Notifications\Notifiable;
use Laravel\Cashier\Billable; use Laravel\Cashier\Billable;
use Tymon\JWTAuth\Contracts\JWTSubject; use Tymon\JWTAuth\Contracts\JWTSubject;
class User extends Authenticatable implements JWTSubject
class User extends Authenticatable implements JWTSubject //, MustVerifyEmail
{ {
use Notifiable, HasFactory, Billable; use Notifiable, HasFactory, Billable;
@ -81,12 +79,7 @@ class User extends Authenticatable implements JWTSubject //, MustVerifyEmail
public function getIsSubscribedAttribute() public function getIsSubscribedAttribute()
{ {
return $this->subscribed() || $this->subscribed(SubscriptionController::ENTERPRISE_SUBSCRIPTION_NAME); return $this->subscribed() || in_array($this->email, config('opnform.extra_pro_users_emails'));
}
public function getHasEnterpriseSubscriptionAttribute()
{
return $this->subscribed(SubscriptionController::ENTERPRISE_SUBSCRIPTION_NAME);
} }
public function getHasCustomerIdAttribute() public function getHasCustomerIdAttribute()
@ -96,12 +89,12 @@ class User extends Authenticatable implements JWTSubject //, MustVerifyEmail
public function getAdminAttribute() public function getAdminAttribute()
{ {
return in_array($this->email, config('services.admin_emails')); return in_array($this->email, config('opnform.admin_emails'));
} }
public function getTemplateEditorAttribute() public function getTemplateEditorAttribute()
{ {
return $this->admin || in_array($this->email, config('services.template_editor_emails')); return $this->admin || in_array($this->email, config('opnform.template_editor_emails'));
} }
/** /**

134
composer.lock generated
View File

@ -118,16 +118,16 @@
}, },
{ {
"name": "aws/aws-sdk-php", "name": "aws/aws-sdk-php",
"version": "3.282.2", "version": "3.283.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/aws/aws-sdk-php.git", "url": "https://github.com/aws/aws-sdk-php.git",
"reference": "b9b4013f68f1bd5f219f9784c1b2a47da02c1261" "reference": "6616677d76e39af28138512740199d38a461859f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/b9b4013f68f1bd5f219f9784c1b2a47da02c1261", "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/6616677d76e39af28138512740199d38a461859f",
"reference": "b9b4013f68f1bd5f219f9784c1b2a47da02c1261", "reference": "6616677d76e39af28138512740199d38a461859f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -207,9 +207,9 @@
"support": { "support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues", "issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.282.2" "source": "https://github.com/aws/aws-sdk-php/tree/3.283.2"
}, },
"time": "2023-10-03T18:07:23+00:00" "time": "2023-10-06T18:09:54+00:00"
}, },
{ {
"name": "brick/math", "name": "brick/math",
@ -583,16 +583,16 @@
}, },
{ {
"name": "doctrine/dbal", "name": "doctrine/dbal",
"version": "3.7.0", "version": "3.7.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/dbal.git", "url": "https://github.com/doctrine/dbal.git",
"reference": "00d03067f07482f025d41ab55e4ba0db5eca2cdf" "reference": "5b7bd66c9ff58c04c5474ab85edce442f8081cb2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/00d03067f07482f025d41ab55e4ba0db5eca2cdf", "url": "https://api.github.com/repos/doctrine/dbal/zipball/5b7bd66c9ff58c04c5474ab85edce442f8081cb2",
"reference": "00d03067f07482f025d41ab55e4ba0db5eca2cdf", "reference": "5b7bd66c9ff58c04c5474ab85edce442f8081cb2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -676,7 +676,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/doctrine/dbal/issues", "issues": "https://github.com/doctrine/dbal/issues",
"source": "https://github.com/doctrine/dbal/tree/3.7.0" "source": "https://github.com/doctrine/dbal/tree/3.7.1"
}, },
"funding": [ "funding": [
{ {
@ -692,7 +692,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-09-26T20:56:55+00:00" "time": "2023-10-06T05:06:20+00:00"
}, },
{ {
"name": "doctrine/deprecations", "name": "doctrine/deprecations",
@ -1125,16 +1125,16 @@
}, },
{ {
"name": "egulias/email-validator", "name": "egulias/email-validator",
"version": "4.0.1", "version": "4.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/egulias/EmailValidator.git", "url": "https://github.com/egulias/EmailValidator.git",
"reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff" "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/3a85486b709bc384dae8eb78fb2eec649bdb64ff", "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ebaaf5be6c0286928352e054f2d5125608e5405e",
"reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff", "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1143,8 +1143,8 @@
"symfony/polyfill-intl-idn": "^1.26" "symfony/polyfill-intl-idn": "^1.26"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^9.5.27", "phpunit/phpunit": "^10.2",
"vimeo/psalm": "^4.30" "vimeo/psalm": "^5.12"
}, },
"suggest": { "suggest": {
"ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"
@ -1180,7 +1180,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/egulias/EmailValidator/issues", "issues": "https://github.com/egulias/EmailValidator/issues",
"source": "https://github.com/egulias/EmailValidator/tree/4.0.1" "source": "https://github.com/egulias/EmailValidator/tree/4.0.2"
}, },
"funding": [ "funding": [
{ {
@ -1188,7 +1188,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-01-14T14:17:03+00:00" "time": "2023-10-06T06:47:41+00:00"
}, },
{ {
"name": "ezyang/htmlpurifier", "name": "ezyang/htmlpurifier",
@ -1333,21 +1333,21 @@
}, },
{ {
"name": "fruitcake/php-cors", "name": "fruitcake/php-cors",
"version": "v1.2.0", "version": "v1.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/fruitcake/php-cors.git", "url": "https://github.com/fruitcake/php-cors.git",
"reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e" "reference": "3d158f36e7875e2f040f37bc0573956240a5a38b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/fruitcake/php-cors/zipball/58571acbaa5f9f462c9c77e911700ac66f446d4e", "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/3d158f36e7875e2f040f37bc0573956240a5a38b",
"reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e", "reference": "3d158f36e7875e2f040f37bc0573956240a5a38b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.4|^8.0", "php": "^7.4|^8.0",
"symfony/http-foundation": "^4.4|^5.4|^6" "symfony/http-foundation": "^4.4|^5.4|^6|^7"
}, },
"require-dev": { "require-dev": {
"phpstan/phpstan": "^1.4", "phpstan/phpstan": "^1.4",
@ -1357,7 +1357,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.1-dev" "dev-master": "1.2-dev"
} }
}, },
"autoload": { "autoload": {
@ -1388,7 +1388,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/fruitcake/php-cors/issues", "issues": "https://github.com/fruitcake/php-cors/issues",
"source": "https://github.com/fruitcake/php-cors/tree/v1.2.0" "source": "https://github.com/fruitcake/php-cors/tree/v1.3.0"
}, },
"funding": [ "funding": [
{ {
@ -1400,20 +1400,20 @@
"type": "github" "type": "github"
} }
], ],
"time": "2022-02-20T15:07:15+00:00" "time": "2023-10-12T05:21:21+00:00"
}, },
{ {
"name": "giggsey/libphonenumber-for-php", "name": "giggsey/libphonenumber-for-php",
"version": "8.13.22", "version": "8.13.23",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/giggsey/libphonenumber-for-php.git", "url": "https://github.com/giggsey/libphonenumber-for-php.git",
"reference": "fc69cbcaff14c1af1f935b79033bdc5c0fa4a846" "reference": "b2dff83693cb46eb4478b193e9d94e2ff6258480"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/fc69cbcaff14c1af1f935b79033bdc5c0fa4a846", "url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/b2dff83693cb46eb4478b193e9d94e2ff6258480",
"reference": "fc69cbcaff14c1af1f935b79033bdc5c0fa4a846", "reference": "b2dff83693cb46eb4478b193e9d94e2ff6258480",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1472,7 +1472,7 @@
"issues": "https://github.com/giggsey/libphonenumber-for-php/issues", "issues": "https://github.com/giggsey/libphonenumber-for-php/issues",
"source": "https://github.com/giggsey/libphonenumber-for-php" "source": "https://github.com/giggsey/libphonenumber-for-php"
}, },
"time": "2023-09-29T14:53:55+00:00" "time": "2023-10-11T07:12:56+00:00"
}, },
{ {
"name": "giggsey/locale", "name": "giggsey/locale",
@ -3617,16 +3617,16 @@
}, },
{ {
"name": "league/flysystem", "name": "league/flysystem",
"version": "3.16.0", "version": "3.17.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/thephpleague/flysystem.git", "url": "https://github.com/thephpleague/flysystem.git",
"reference": "4fdf372ca6b63c6e281b1c01a624349ccb757729" "reference": "bd4c9b26849d82364119c68429541f1631fba94b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/4fdf372ca6b63c6e281b1c01a624349ccb757729", "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/bd4c9b26849d82364119c68429541f1631fba94b",
"reference": "4fdf372ca6b63c6e281b1c01a624349ccb757729", "reference": "bd4c9b26849d82364119c68429541f1631fba94b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3644,8 +3644,8 @@
"symfony/http-client": "<5.2" "symfony/http-client": "<5.2"
}, },
"require-dev": { "require-dev": {
"async-aws/s3": "^1.5", "async-aws/s3": "^1.5 || ^2.0",
"async-aws/simple-s3": "^1.1", "async-aws/simple-s3": "^1.1 || ^2.0",
"aws/aws-sdk-php": "^3.220.0", "aws/aws-sdk-php": "^3.220.0",
"composer/semver": "^3.0", "composer/semver": "^3.0",
"ext-fileinfo": "*", "ext-fileinfo": "*",
@ -3691,7 +3691,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/thephpleague/flysystem/issues", "issues": "https://github.com/thephpleague/flysystem/issues",
"source": "https://github.com/thephpleague/flysystem/tree/3.16.0" "source": "https://github.com/thephpleague/flysystem/tree/3.17.0"
}, },
"funding": [ "funding": [
{ {
@ -3703,7 +3703,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-09-07T19:22:17+00:00" "time": "2023-10-05T20:15:05+00:00"
}, },
{ {
"name": "league/flysystem-aws-s3-v3", "name": "league/flysystem-aws-s3-v3",
@ -4795,16 +4795,16 @@
}, },
{ {
"name": "nette/schema", "name": "nette/schema",
"version": "v1.2.4", "version": "v1.2.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nette/schema.git", "url": "https://github.com/nette/schema.git",
"reference": "c9ff517a53903b3d4e29ec547fb20feecb05b8ab" "reference": "0462f0166e823aad657c9224d0f849ecac1ba10a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nette/schema/zipball/c9ff517a53903b3d4e29ec547fb20feecb05b8ab", "url": "https://api.github.com/repos/nette/schema/zipball/0462f0166e823aad657c9224d0f849ecac1ba10a",
"reference": "c9ff517a53903b3d4e29ec547fb20feecb05b8ab", "reference": "0462f0166e823aad657c9224d0f849ecac1ba10a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4851,9 +4851,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/nette/schema/issues", "issues": "https://github.com/nette/schema/issues",
"source": "https://github.com/nette/schema/tree/v1.2.4" "source": "https://github.com/nette/schema/tree/v1.2.5"
}, },
"time": "2023-08-05T18:56:25+00:00" "time": "2023-10-05T20:37:59+00:00"
}, },
{ {
"name": "nette/utils", "name": "nette/utils",
@ -7207,21 +7207,21 @@
}, },
{ {
"name": "spatie/browsershot", "name": "spatie/browsershot",
"version": "3.58.2", "version": "3.59.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/spatie/browsershot.git", "url": "https://github.com/spatie/browsershot.git",
"reference": "6503b2b429e10ff28a4cdb9fffaecc25ba6d032c" "reference": "1b74e71fdd1c30fa1de45465bacc1cf5dc852881"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/spatie/browsershot/zipball/6503b2b429e10ff28a4cdb9fffaecc25ba6d032c", "url": "https://api.github.com/repos/spatie/browsershot/zipball/1b74e71fdd1c30fa1de45465bacc1cf5dc852881",
"reference": "6503b2b429e10ff28a4cdb9fffaecc25ba6d032c", "reference": "1b74e71fdd1c30fa1de45465bacc1cf5dc852881",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
"php": "^7.4|^8.0", "php": "^8.0",
"spatie/image": "^1.5.3|^2.0", "spatie/image": "^1.5.3|^2.0",
"spatie/temporary-directory": "^1.1|^2.0", "spatie/temporary-directory": "^1.1|^2.0",
"symfony/process": "^4.2|^5.0|^6.0" "symfony/process": "^4.2|^5.0|^6.0"
@ -7261,7 +7261,7 @@
"webpage" "webpage"
], ],
"support": { "support": {
"source": "https://github.com/spatie/browsershot/tree/3.58.2" "source": "https://github.com/spatie/browsershot/tree/3.59.0"
}, },
"funding": [ "funding": [
{ {
@ -7269,7 +7269,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-07-27T07:51:54+00:00" "time": "2023-10-09T12:59:37+00:00"
}, },
{ {
"name": "spatie/crawler", "name": "spatie/crawler",
@ -11422,16 +11422,16 @@
}, },
{ {
"name": "brianium/paratest", "name": "brianium/paratest",
"version": "v6.10.0", "version": "v6.10.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/paratestphp/paratest.git", "url": "https://github.com/paratestphp/paratest.git",
"reference": "c2243b20bcd99c3f651018d1447144372f39b4fa" "reference": "d6f32a91302b74458e8ef5d132bb2215a5edb34b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/paratestphp/paratest/zipball/c2243b20bcd99c3f651018d1447144372f39b4fa", "url": "https://api.github.com/repos/paratestphp/paratest/zipball/d6f32a91302b74458e8ef5d132bb2215a5edb34b",
"reference": "c2243b20bcd99c3f651018d1447144372f39b4fa", "reference": "d6f32a91302b74458e8ef5d132bb2215a5edb34b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -11498,7 +11498,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/paratestphp/paratest/issues", "issues": "https://github.com/paratestphp/paratest/issues",
"source": "https://github.com/paratestphp/paratest/tree/v6.10.0" "source": "https://github.com/paratestphp/paratest/tree/v6.10.1"
}, },
"funding": [ "funding": [
{ {
@ -11510,7 +11510,7 @@
"type": "paypal" "type": "paypal"
} }
], ],
"time": "2023-05-25T13:47:58+00:00" "time": "2023-10-04T13:33:07+00:00"
}, },
{ {
"name": "composer/class-map-generator", "name": "composer/class-map-generator",
@ -11587,16 +11587,16 @@
}, },
{ {
"name": "composer/pcre", "name": "composer/pcre",
"version": "3.1.0", "version": "3.1.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/composer/pcre.git", "url": "https://github.com/composer/pcre.git",
"reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", "url": "https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9",
"reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -11638,7 +11638,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/composer/pcre/issues", "issues": "https://github.com/composer/pcre/issues",
"source": "https://github.com/composer/pcre/tree/3.1.0" "source": "https://github.com/composer/pcre/tree/3.1.1"
}, },
"funding": [ "funding": [
{ {
@ -11654,7 +11654,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-11-17T09:50:14+00:00" "time": "2023-10-11T07:11:09+00:00"
}, },
{ {
"name": "doctrine/instantiator", "name": "doctrine/instantiator",
@ -15454,5 +15454,5 @@
"ext-pcntl": "8.0", "ext-pcntl": "8.0",
"ext-posix": "8.0" "ext-posix": "8.0"
}, },
"plugin-api-version": "2.3.0" "plugin-api-version": "2.1.0"
} }

7
config/opnform.php Normal file
View File

@ -0,0 +1,7 @@
<?php
return [
'admin_emails' => explode(",", env('ADMIN_EMAILS') ?? ''),
'template_editor_emails' => explode(",", env('TEMPLATE_EDITOR_EMAILS') ?? ''),
'extra_pro_users_emails' => explode(",", env('EXTRA_PRO_USERS_EMAILS') ?? ''),
];

View File

@ -61,7 +61,4 @@ return [
'amplitude_code' => env('AMPLITUDE_CODE'), 'amplitude_code' => env('AMPLITUDE_CODE'),
'crisp_website_id' => env('CRISP_WEBSITE_ID'), 'crisp_website_id' => env('CRISP_WEBSITE_ID'),
'sentry_vue_dsn' => env('SENTRY_VUE_DSN'), 'sentry_vue_dsn' => env('SENTRY_VUE_DSN'),
'admin_emails' => explode(",", env('ADMIN_EMAILS') ?? ''),
'template_editor_emails' => explode(",", env('TEMPLATE_EDITOR_EMAILS') ?? '')
]; ];

129
package-lock.json generated
View File

@ -6,6 +6,7 @@
"": { "": {
"dependencies": { "dependencies": {
"@hcaptcha/vue-hcaptcha": "^0.3.2", "@hcaptcha/vue-hcaptcha": "^0.3.2",
"@sentry/integrations": "^7.53.1",
"@sentry/tracing": "^6.11.0", "@sentry/tracing": "^6.11.0",
"@sentry/vue": "^6.11.0", "@sentry/vue": "^6.11.0",
"axios": "^0.21.1", "axios": "^0.21.1",
@ -2301,6 +2302,54 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/@sentry/integrations": {
"version": "7.73.0",
"resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-7.73.0.tgz",
"integrity": "sha512-IjVpn4d+aSL9L1Ntu/oAdRwujz4BzzavDsZf96Xgc/AjBnjAEUT+wT1dAwluThfuKDXmWOJHhZ2cHHMfqI+7vw==",
"dependencies": {
"@sentry/core": "7.73.0",
"@sentry/types": "7.73.0",
"@sentry/utils": "7.73.0",
"localforage": "^1.8.1",
"tslib": "^2.4.1 || ^1.9.3"
},
"engines": {
"node": ">=8"
}
},
"node_modules/@sentry/integrations/node_modules/@sentry/core": {
"version": "7.73.0",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.73.0.tgz",
"integrity": "sha512-9FEz4Gq848LOgVN2OxJGYuQqxv7cIVw69VlAzWHEm3njt8mjvlTq+7UiFsGRo84+59V2FQuHxzA7vVjl90WfSg==",
"dependencies": {
"@sentry/types": "7.73.0",
"@sentry/utils": "7.73.0",
"tslib": "^2.4.1 || ^1.9.3"
},
"engines": {
"node": ">=8"
}
},
"node_modules/@sentry/integrations/node_modules/@sentry/types": {
"version": "7.73.0",
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.73.0.tgz",
"integrity": "sha512-/v8++bly8jW7r4cP2wswYiiVpn7eLLcqwnfPUMeCQze4zj3F3nTRIKc9BGHzU0V+fhHa3RwRC2ksqTGq1oJMDg==",
"engines": {
"node": ">=8"
}
},
"node_modules/@sentry/integrations/node_modules/@sentry/utils": {
"version": "7.73.0",
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.73.0.tgz",
"integrity": "sha512-h3ZK/qpf4k76FhJV9uiSbvMz3V/0Ovy94C+5/9UgPMVCJXFmVsdw8n/dwANJ7LupVPfYP23xFGgebDMFlK1/2w==",
"dependencies": {
"@sentry/types": "7.73.0",
"tslib": "^2.4.1 || ^1.9.3"
},
"engines": {
"node": ">=8"
}
},
"node_modules/@sentry/minimal": { "node_modules/@sentry/minimal": {
"version": "6.19.7", "version": "6.19.7",
"resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-6.19.7.tgz", "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-6.19.7.tgz",
@ -7389,6 +7438,11 @@
"node": ">=4.0.0" "node": ">=4.0.0"
} }
}, },
"node_modules/immediate": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
"integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ=="
},
"node_modules/immutable": { "node_modules/immutable": {
"version": "4.1.0", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz",
@ -8148,6 +8202,14 @@
"resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.44.tgz", "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.44.tgz",
"integrity": "sha512-svlRdNBI5WgBjRC20GrCfbFiclbF0Cx+sCcQob/C1r57nsoq0xg8r65QbTyVyweQIlB33P+Uahyho6EMYgcOyQ==" "integrity": "sha512-svlRdNBI5WgBjRC20GrCfbFiclbF0Cx+sCcQob/C1r57nsoq0xg8r65QbTyVyweQIlB33P+Uahyho6EMYgcOyQ=="
}, },
"node_modules/lie": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz",
"integrity": "sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==",
"dependencies": {
"immediate": "~3.0.5"
}
},
"node_modules/lilconfig": { "node_modules/lilconfig": {
"version": "2.0.6", "version": "2.0.6",
"resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz",
@ -8218,6 +8280,14 @@
"node": ">=8.9.0" "node": ">=8.9.0"
} }
}, },
"node_modules/localforage": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz",
"integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==",
"dependencies": {
"lie": "3.1.1"
}
},
"node_modules/locate-path": { "node_modules/locate-path": {
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
@ -14589,6 +14659,44 @@
"tslib": "^1.9.3" "tslib": "^1.9.3"
} }
}, },
"@sentry/integrations": {
"version": "7.73.0",
"resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-7.73.0.tgz",
"integrity": "sha512-IjVpn4d+aSL9L1Ntu/oAdRwujz4BzzavDsZf96Xgc/AjBnjAEUT+wT1dAwluThfuKDXmWOJHhZ2cHHMfqI+7vw==",
"requires": {
"@sentry/core": "7.73.0",
"@sentry/types": "7.73.0",
"@sentry/utils": "7.73.0",
"localforage": "^1.8.1",
"tslib": "^2.4.1 || ^1.9.3"
},
"dependencies": {
"@sentry/core": {
"version": "7.73.0",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.73.0.tgz",
"integrity": "sha512-9FEz4Gq848LOgVN2OxJGYuQqxv7cIVw69VlAzWHEm3njt8mjvlTq+7UiFsGRo84+59V2FQuHxzA7vVjl90WfSg==",
"requires": {
"@sentry/types": "7.73.0",
"@sentry/utils": "7.73.0",
"tslib": "^2.4.1 || ^1.9.3"
}
},
"@sentry/types": {
"version": "7.73.0",
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.73.0.tgz",
"integrity": "sha512-/v8++bly8jW7r4cP2wswYiiVpn7eLLcqwnfPUMeCQze4zj3F3nTRIKc9BGHzU0V+fhHa3RwRC2ksqTGq1oJMDg=="
},
"@sentry/utils": {
"version": "7.73.0",
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.73.0.tgz",
"integrity": "sha512-h3ZK/qpf4k76FhJV9uiSbvMz3V/0Ovy94C+5/9UgPMVCJXFmVsdw8n/dwANJ7LupVPfYP23xFGgebDMFlK1/2w==",
"requires": {
"@sentry/types": "7.73.0",
"tslib": "^2.4.1 || ^1.9.3"
}
}
}
},
"@sentry/minimal": { "@sentry/minimal": {
"version": "6.19.7", "version": "6.19.7",
"resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-6.19.7.tgz", "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-6.19.7.tgz",
@ -18570,6 +18678,11 @@
"webpack-sources": "^1.1.0" "webpack-sources": "^1.1.0"
} }
}, },
"immediate": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
"integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ=="
},
"immutable": { "immutable": {
"version": "4.1.0", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz",
@ -19122,6 +19235,14 @@
"resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.44.tgz", "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.44.tgz",
"integrity": "sha512-svlRdNBI5WgBjRC20GrCfbFiclbF0Cx+sCcQob/C1r57nsoq0xg8r65QbTyVyweQIlB33P+Uahyho6EMYgcOyQ==" "integrity": "sha512-svlRdNBI5WgBjRC20GrCfbFiclbF0Cx+sCcQob/C1r57nsoq0xg8r65QbTyVyweQIlB33P+Uahyho6EMYgcOyQ=="
}, },
"lie": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz",
"integrity": "sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==",
"requires": {
"immediate": "~3.0.5"
}
},
"lilconfig": { "lilconfig": {
"version": "2.0.6", "version": "2.0.6",
"resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz",
@ -19176,6 +19297,14 @@
"json5": "^2.1.2" "json5": "^2.1.2"
} }
}, },
"localforage": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz",
"integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==",
"requires": {
"lie": "3.1.1"
}
},
"locate-path": { "locate-path": {
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",

View File

@ -1,7 +1,8 @@
<template> <template>
<div> <div>
<h3 class="font-semibold text-2xl text-gray-900">Billing details</h3> <h3 class="font-semibold text-2xl text-gray-900">Billing details</h3>
<small class="text-gray-600">Manage your billing. Download invoices, update your plan, or cancel it at any time.</small> <small class="text-gray-600">Manage your billing. Download invoices, update your plan, or cancel it at any
time.</small>
<div class="mt-4"> <div class="mt-4">
<v-button color="gray" shade="light" :loading="billingLoading" @click.prevent="openBillingDashboard"> <v-button color="gray" shade="light" :loading="billingLoading" @click.prevent="openBillingDashboard">
@ -32,6 +33,8 @@ export default {
axios.get('/api/subscription/billing-portal').then((response) => { axios.get('/api/subscription/billing-portal').then((response) => {
const url = response.data.portal_url const url = response.data.portal_url
window.location = url window.location = url
}).catch((error) => {
this.alertError(error.response.data.message)
}).finally(() => { }).finally(() => {
this.billingLoading = false this.billingLoading = false
}) })