mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-17 15:52:15 +00:00
Merge remote-tracking branch 'origin/master' into oasis
# Conflicts: # app/Console/Commands/SetupDevEnvironment.php # app/Console/Kernel.php # app/Http/Resources/InvoiceResource.php # app/Http/Resources/UserResource.php # app/Models/User.php # composer.lock # config/app.php # config/custom-language-translations.php # config/language-translations.php # public/chunks/admin.js # public/chunks/app-language.js # public/chunks/dashboard.js # public/chunks/files.js # public/chunks/files~chunks/shared-files~chunks/shared/file-browser.js # public/chunks/files~chunks/shared-files~chunks/shared/file-browser~chunks/shared/single-file.js # public/chunks/invoices.js # public/chunks/pages.js # public/chunks/plan-subscribers.js # public/chunks/plans.js # public/chunks/platform.js # public/chunks/settings-invoices.js # public/chunks/settings-payment-methods.js # public/chunks/settings-subscription.js # public/chunks/shared-files.js # public/chunks/shared.js # public/chunks/shared/file-browser.js # public/chunks/user-invoices.js # public/chunks/user-subscription.js # public/chunks/users.js # public/js/main.js # public/mix-manifest.json # resources/js/components/FilesView/FileItemGrid.vue # resources/js/components/FilesView/FileItemList.vue
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Services\StripeService;
|
||||
use App\Models\User;
|
||||
use Cartalyst\Stripe\Api\PaymentMethods;
|
||||
use Faker\Factory;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class UserResource extends JsonResource
|
||||
@@ -21,52 +16,52 @@ class UserResource extends JsonResource
|
||||
// TODO: zrefaktorovat
|
||||
return [
|
||||
'data' => [
|
||||
'id' => $this->id,
|
||||
'type' => 'user',
|
||||
'attributes' => [
|
||||
'storage_capacity' => $this->settings->storage_capacity,
|
||||
'subscription' => $this->subscribed('main'),
|
||||
'incomplete_payment' => $this->hasIncompletePayment('main') ? route('cashier.payment', $this->subscription('main')->latestPayment()->id) : null,
|
||||
'stripe_customer' => is_null($this->stripe_id) ? false : true,
|
||||
'email' => is_demo() ? obfuscate_email($this->email) : $this->email,
|
||||
'role' => $this->role,
|
||||
'folders' => $this->folder_tree,
|
||||
'storage' => $this->storage,
|
||||
'id' => $this->id,
|
||||
'type' => 'user',
|
||||
'attributes' => [
|
||||
'storage_capacity' => $this->settings->storage_capacity,
|
||||
'subscription' => $this->subscribed('main'),
|
||||
'incomplete_payment' => $this->hasIncompletePayment('main') ? route('cashier.payment', $this->subscription('main')->latestPayment()->id) : null,
|
||||
'stripe_customer' => is_null($this->stripe_id) ? false : true,
|
||||
'email' => is_demo() ? obfuscate_email($this->email) : $this->email,
|
||||
'role' => $this->role,
|
||||
'folders' => $this->folder_tree,
|
||||
'storage' => $this->storage,
|
||||
'created_at_formatted' => format_date($this->created_at, '%d. %B. %Y'),
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
],
|
||||
'relationships' => [
|
||||
'settings' => [
|
||||
'settings' => [
|
||||
'data' => [
|
||||
'id' => $this->id,
|
||||
'type' => 'settings',
|
||||
'id' => $this->id,
|
||||
'type' => 'settings',
|
||||
'attributes' => [
|
||||
'avatar' => $this->settings->avatar,
|
||||
'name' => $this->settings->name,
|
||||
'address' => $this->settings->address,
|
||||
'state' => $this->settings->state,
|
||||
'city' => $this->settings->city,
|
||||
'postal_code' => $this->settings->postal_code,
|
||||
'country' => $this->settings->country,
|
||||
'phone_number' => $this->settings->phone_number,
|
||||
'timezone' => $this->settings->timezone,
|
||||
'avatar' => $this->settings->avatar,
|
||||
'name' => $this->settings->name,
|
||||
'address' => $this->settings->address,
|
||||
'state' => $this->settings->state,
|
||||
'city' => $this->settings->city,
|
||||
'postal_code' => $this->settings->postal_code,
|
||||
'country' => $this->settings->country,
|
||||
'phone_number' => $this->settings->phone_number,
|
||||
'timezone' => $this->settings->timezone,
|
||||
|
||||
// OasisDrive
|
||||
'payment_activation' => (integer) $this->settings->payment_activation
|
||||
]
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
'favourites' => [
|
||||
'data' => [
|
||||
'id' => $this->id,
|
||||
'type' => 'favourite_folders',
|
||||
'id' => $this->id,
|
||||
'type' => 'favourite_folders',
|
||||
'attributes' => [
|
||||
'folders' => $this->favouriteFolders->makeHidden(['pivot'])
|
||||
'folders' => $this->favouriteFolders->makeHidden(['pivot']),
|
||||
],
|
||||
],
|
||||
]
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user