mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-06 02:33:48 +00:00
- convert folders into teams folders in convert/delete events
- composer update
This commit is contained in:
@@ -10,44 +10,44 @@
|
||||
"require": {
|
||||
"php": "^8.0",
|
||||
"ext-json": "*",
|
||||
"brianium/paratest": "^6.3",
|
||||
"brianium/paratest": "^6.3.2",
|
||||
"cartalyst/stripe-laravel": "^13.1",
|
||||
"cocur/slugify": "^4.0",
|
||||
"doctrine/dbal": "^2.13.2",
|
||||
"doctrine/dbal": "^2.13.4",
|
||||
"fideloper/proxy": "^4.4.1",
|
||||
"fruitcake/laravel-cors": "^2.0.4",
|
||||
"gabrielelana/byte-units": "^0.5.0",
|
||||
"guzzlehttp/guzzle": "^7.3.0",
|
||||
"intervention/image": "^2.6.0",
|
||||
"guzzlehttp/guzzle": "^7.4.0",
|
||||
"intervention/image": "^2.7.0",
|
||||
"jaybizzle/laravel-crawler-detect": "^1.2",
|
||||
"kyslik/column-sortable": "^6.4.1",
|
||||
"laravel/cashier": "^12.15.0",
|
||||
"laravel/fortify": "^1.7.14",
|
||||
"laravel/framework": "^8.50.0",
|
||||
"laravel/sanctum": "^2.11.2",
|
||||
"laravel/tinker": "^2.6.1",
|
||||
"laravel/ui": "^3.2.0",
|
||||
"laravel/fortify": "^1.8.3",
|
||||
"laravel/framework": "^8.69.0",
|
||||
"laravel/sanctum": "^2.12.1",
|
||||
"laravel/tinker": "^2.6.2",
|
||||
"laravel/ui": "^3.3.1",
|
||||
"league/flysystem-aws-s3-v3": "^1.0.29",
|
||||
"league/flysystem-cached-adapter": "^1.1.0",
|
||||
"spatie/data-transfer-object": "^3.6",
|
||||
"spatie/laravel-backup": "^6.16.1",
|
||||
"spatie/laravel-query-builder": "^3.5",
|
||||
"spatie/data-transfer-object": "^3.7.2",
|
||||
"spatie/laravel-backup": "^6.16.5",
|
||||
"spatie/laravel-query-builder": "^3.6",
|
||||
"spatie/laravel-queueable-action": "^2.12",
|
||||
"spatie/laravel-tail": "^4.3.3",
|
||||
"stechstudio/laravel-zipstream": "^4.4",
|
||||
"stechstudio/laravel-zipstream": "^4.5",
|
||||
"teamtnt/laravel-scout-tntsearch-driver": "^11.5.0.0",
|
||||
"vimeo/psalm": "^4.8.1"
|
||||
"vimeo/psalm": "^4.11.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-json": "*",
|
||||
"barryvdh/laravel-ide-helper": "^2.10",
|
||||
"facade/ignition": "^2.11.0",
|
||||
"fakerphp/faker": "^1.15.0",
|
||||
"friendsofphp/php-cs-fixer": "^3.0.0",
|
||||
"mockery/mockery": "^1.4.3",
|
||||
"nunomaduro/collision": "^5.5.0",
|
||||
"nunomaduro/larastan": "^0.7.12",
|
||||
"phpunit/phpunit": "^9.5.6"
|
||||
"facade/ignition": "^2.16.0",
|
||||
"fakerphp/faker": "^1.16.0",
|
||||
"friendsofphp/php-cs-fixer": "^3.2.1",
|
||||
"mockery/mockery": "^1.4.4",
|
||||
"nunomaduro/collision": "^5.10.0",
|
||||
"nunomaduro/larastan": "^0.7.15",
|
||||
"phpunit/phpunit": "^9.5.10"
|
||||
},
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
|
||||
2
composer.lock
generated
2
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "cc6fc3139c683c235e4ceb5158a91874",
|
||||
"content-hash": "c617bc30d5d9ccd44d3ec626ca2670d9",
|
||||
"packages": [
|
||||
{
|
||||
"name": "amphp/amp",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"/chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/~3e4fdd8b.js": "/chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/~3e4fdd8b.js?id=1d731f1c4a9daecb2a99",
|
||||
"/chunks/admin~chunks/app-language~chunks/dashboard~chunks/files~chunks/invoices~chunks/my-shared-item~9b68162c.js": "/chunks/admin~chunks/app-language~chunks/dashboard~chunks/files~chunks/invoices~chunks/my-shared-item~9b68162c.js?id=5841d65172536a8a9bdc",
|
||||
"/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/settin~673d1ac3.js": "/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/settin~673d1ac3.js?id=d00148360f3d89f2791e",
|
||||
"/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/settin~97130d1f.js": "/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/settin~97130d1f.js?id=242a9e122b975c48009d",
|
||||
"/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/settin~97130d1f.js": "/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/settin~97130d1f.js?id=87c5115ea4a36da1ad72",
|
||||
"/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~1bec6fe4.js": "/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~1bec6fe4.js?id=510e6c1b1017a73a40a6",
|
||||
"/chunks/admin~chunks/platform.js": "/chunks/admin~chunks/platform.js?id=90270d0c5aeb5c50dacf",
|
||||
"/chunks/admin~chunks/platform~chunks/settings.js": "/chunks/admin~chunks/platform~chunks/settings.js?id=61e970ffb679245686c3",
|
||||
@@ -57,7 +57,7 @@
|
||||
"/chunks/plan-settings.js": "/chunks/plan-settings.js?id=19c260a6aa85d20c8042",
|
||||
"/chunks/plan-subscribers.js": "/chunks/plan-subscribers.js?id=99854b8b4518fbebc79f",
|
||||
"/chunks/plans.js": "/chunks/plans.js?id=6fca685daa45f22e4c8f",
|
||||
"/chunks/platform.js": "/chunks/platform.js?id=7e53bcf8da2d3f9ce731",
|
||||
"/chunks/platform.js": "/chunks/platform.js?id=1863e0b77ad5c26a05bc",
|
||||
"/chunks/platform~chunks/settings-subscription~chunks/shared~chunks/user-subscription.js": "/chunks/platform~chunks/settings-subscription~chunks/shared~chunks/user-subscription.js?id=8656b69a97cace919251",
|
||||
"/chunks/platform~chunks/shared.js": "/chunks/platform~chunks/shared.js?id=1bb410d04a3fb0bdd15c",
|
||||
"/chunks/profile.js": "/chunks/profile.js?id=022c1617a575d4aab4e1",
|
||||
@@ -84,7 +84,7 @@
|
||||
"/chunks/stripe-credentials.js": "/chunks/stripe-credentials.js?id=6b94c5fda72871b8d2bd",
|
||||
"/chunks/subscription-plans.js": "/chunks/subscription-plans.js?id=63e8e2a410ab48102b0c",
|
||||
"/chunks/subscription-service.js": "/chunks/subscription-service.js?id=8ac19b3fcfd57d79e5b1",
|
||||
"/chunks/team-folders.js": "/chunks/team-folders.js?id=0e8376e1e1873c78181b",
|
||||
"/chunks/team-folders.js": "/chunks/team-folders.js?id=4296ed55f1daeb78a0b9",
|
||||
"/chunks/trash.js": "/chunks/trash.js?id=5fe84aadd8729e68849e",
|
||||
"/chunks/upgrade-billing.js": "/chunks/upgrade-billing.js?id=2bffa85e82a5cda1dcd2",
|
||||
"/chunks/upgrade-billing~chunks/upgrade-plan.js": "/chunks/upgrade-billing~chunks/upgrade-plan.js?id=f59d97c1cbf6649b7057",
|
||||
@@ -577,7 +577,7 @@
|
||||
"/chunks/admin~chunks/files~chunks/invitation~chunks/my-shared-items~chunks/platform~chunks/recent-upl~dfa67595.js": "/chunks/admin~chunks/files~chunks/invitation~chunks/my-shared-items~chunks/platform~chunks/recent-upl~dfa67595.js?id=bcec1c96b2248aa0d451",
|
||||
"/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/settin~97130d1f.3e07bae3987249743b99.hot-update.js": "/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/settin~97130d1f.3e07bae3987249743b99.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared-with-me~chunks/shared/files~~34b5eb22.3e07bae3987249743b99.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared-with-me~chunks/shared/files~~34b5eb22.3e07bae3987249743b99.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared-with-me~chunks/shared/files~~bf3ddedc.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared-with-me~chunks/shared/files~~bf3ddedc.js?id=0380cf3f45f87d9ea5b8",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared-with-me~chunks/shared/files~~bf3ddedc.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared-with-me~chunks/shared/files~~bf3ddedc.js?id=44dd372c3414f407ed37",
|
||||
"/chunks/shared/single-file.3e07bae3987249743b99.hot-update.js": "/chunks/shared/single-file.3e07bae3987249743b99.hot-update.js",
|
||||
"/chunks/shared/single-file.f6729672ce5f9ec91bba.hot-update.js": "/chunks/shared/single-file.f6729672ce5f9ec91bba.hot-update.js",
|
||||
"/chunks/shared/single-file.269aae12674c0fa0ba78.hot-update.js": "/chunks/shared/single-file.269aae12674c0fa0ba78.hot-update.js",
|
||||
@@ -1299,5 +1299,13 @@
|
||||
"/chunks/shared-with-me.6254b2b076cc0856e739.hot-update.js": "/chunks/shared-with-me.6254b2b076cc0856e739.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.9145f557db6631ef7534.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.9145f557db6631ef7534.hot-update.js",
|
||||
"/chunks/shared-with-me.4e39e4f244eb1f730c36.hot-update.js": "/chunks/shared-with-me.4e39e4f244eb1f730c36.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.df58e82a175e60d205da.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.df58e82a175e60d205da.hot-update.js"
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.df58e82a175e60d205da.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.df58e82a175e60d205da.hot-update.js",
|
||||
"/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/settin~97130d1f.407befa17c0dcc62f73b.hot-update.js": "/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/settin~97130d1f.407befa17c0dcc62f73b.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared-with-me~chunks/shared/files~~bf3ddedc.a056d9307680f36d13a8.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared-with-me~chunks/shared/files~~bf3ddedc.a056d9307680f36d13a8.hot-update.js",
|
||||
"/chunks/team-folders.79f381ca990e9e328f62.hot-update.js": "/chunks/team-folders.79f381ca990e9e328f62.hot-update.js",
|
||||
"/js/main.91e94acefef83ccf5dfa.hot-update.js": "/js/main.91e94acefef83ccf5dfa.hot-update.js",
|
||||
"/chunks/platform.1404c3bbd03d3ac785d0.hot-update.js": "/chunks/platform.1404c3bbd03d3ac785d0.hot-update.js",
|
||||
"/chunks/platform.d3cd8571252f98c491a3.hot-update.js": "/chunks/platform.d3cd8571252f98c491a3.hot-update.js",
|
||||
"/chunks/platform.2120515bd993063e5031.hot-update.js": "/chunks/platform.2120515bd993063e5031.hot-update.js",
|
||||
"/chunks/platform.38e194e8e770d529cae1.hot-update.js": "/chunks/platform.38e194e8e770d529cae1.hot-update.js"
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<FolderIcon v-if="isFolder" :item="entry" location="file-item-list" class="inline-block transform scale-150 lg:mt-2 lg:mb-8 mt-3 mb-5" />
|
||||
|
||||
<!--File Icon-->
|
||||
<div v-if="isFile || isVideo || (isImage && !entry.data.attributes.thumbnail)" class="relative w-24 mx-auto">
|
||||
<div v-if="isFile || isVideo || isAudio || (isImage && !entry.data.attributes.thumbnail)" class="relative w-24 mx-auto">
|
||||
|
||||
<!--Member thumbnail for team folders-->
|
||||
<MemberAvatar
|
||||
@@ -129,6 +129,9 @@
|
||||
isClicked() {
|
||||
return this.clipboard.some(element => element.data.id === this.entry.data.id)
|
||||
},
|
||||
isAudio() {
|
||||
return this.entry.data.type === 'audio'
|
||||
},
|
||||
isVideo() {
|
||||
return this.entry.data.type === 'video'
|
||||
},
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<FolderIcon v-if="isFolder" :item="entry" location="file-item-list" />
|
||||
|
||||
<!--File Icon-->
|
||||
<FileIconThumbnail v-if="isFile || isVideo || (isImage && !entry.data.attributes.thumbnail)" :entry="entry" class="pr-2" />
|
||||
<FileIconThumbnail v-if="isFile || isVideo || isAudio || (isImage && !entry.data.attributes.thumbnail)" :entry="entry" class="pr-2" />
|
||||
|
||||
<!--Image thumbnail-->
|
||||
<img v-if="isImage && entry.data.attributes.thumbnail" class="w-12 h-12 rounded ml-0.5 object-cover" :src="entry.data.attributes.thumbnail.xs" :alt="entry.data.attributes.name" loading="lazy" />
|
||||
@@ -110,6 +110,9 @@
|
||||
isVideo() {
|
||||
return this.entry.data.type === 'video'
|
||||
},
|
||||
isAudio() {
|
||||
return this.entry.data.type === 'audio'
|
||||
},
|
||||
isFile() {
|
||||
return this.entry.data.type === 'file'
|
||||
},
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
created() {
|
||||
this.isActive = 1
|
||||
|
||||
setTimeout(() => (this.isActive = 0), 5000)
|
||||
setTimeout(() => (this.isActive = 0), 6000)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -74,7 +74,7 @@
|
||||
width: 0;
|
||||
height: 3px;
|
||||
display: block;
|
||||
animation: progressbar 5s linear;
|
||||
animation: progressbar 6s linear;
|
||||
}
|
||||
|
||||
&.success span {
|
||||
|
||||
@@ -166,6 +166,15 @@
|
||||
this.$router.push({name: 'TeamFolders'})
|
||||
}
|
||||
|
||||
let toasterMessage = this.isNewFolderTeamCreation
|
||||
? this.$t('Your Team was invited successfully.')
|
||||
: this.$t('Your Team was invited and folder was moved into Team Folders section.')
|
||||
|
||||
events.$emit('toaster', {
|
||||
type: 'success',
|
||||
message: toasterMessage,
|
||||
})
|
||||
|
||||
this.$store.dispatch('getAppData')
|
||||
})
|
||||
.catch(() => this.$isSomethingWrong())
|
||||
|
||||
@@ -247,6 +247,11 @@
|
||||
} else {
|
||||
this.$store.commit('REMOVE_ITEM', data.id)
|
||||
}
|
||||
|
||||
events.$emit('toaster', {
|
||||
type: 'success',
|
||||
message: this.$t('Your Team Folder was moved into your files.'),
|
||||
})
|
||||
})
|
||||
.catch(() => this.$isSomethingWrong())
|
||||
})
|
||||
|
||||
@@ -723,16 +723,18 @@ class SetupDevEnvironment extends Command
|
||||
|
||||
Folder::factory()
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'parent_id' => $companyProjectFolder->id,
|
||||
'name' => 'Presentation Materials',
|
||||
'user_id' => $user->id,
|
||||
'parent_id' => $companyProjectFolder->id,
|
||||
'name' => 'Presentation Materials',
|
||||
'team_folder' => true,
|
||||
]);
|
||||
|
||||
Folder::factory()
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'parent_id' => $companyProjectFolder->id,
|
||||
'name' => 'Team Gallery',
|
||||
'user_id' => $user->id,
|
||||
'parent_id' => $companyProjectFolder->id,
|
||||
'name' => 'Team Gallery',
|
||||
'team_folder' => true,
|
||||
]);
|
||||
|
||||
$financeDocumentsFolder = Folder::factory()
|
||||
@@ -798,18 +800,20 @@ class SetupDevEnvironment extends Command
|
||||
'name' => "Alice's Project Files",
|
||||
]);
|
||||
|
||||
$memes = Folder::factory()
|
||||
Folder::factory()
|
||||
->create([
|
||||
'user_id' => $owner->id,
|
||||
'parent_id' => $folder->id,
|
||||
'name' => '9 Gag',
|
||||
'user_id' => $owner->id,
|
||||
'parent_id' => $folder->id,
|
||||
'name' => '9 Gag',
|
||||
'team_folder' => true,
|
||||
]);
|
||||
|
||||
$hug = Folder::factory()
|
||||
->create([
|
||||
'user_id' => $owner->id,
|
||||
'parent_id' => $folder->id,
|
||||
'name' => 'Digital Hug',
|
||||
'user_id' => $owner->id,
|
||||
'parent_id' => $folder->id,
|
||||
'name' => 'Digital Hug',
|
||||
'team_folder' => true,
|
||||
]);
|
||||
|
||||
DB::table('team_folder_members')
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Domain\Teams\Actions;
|
||||
|
||||
use Domain\Folders\Models\Folder;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class SetTeamFolderPropertyForAllChildrenAction
|
||||
{
|
||||
public function __invoke(Folder $folder, bool $isTeamFolder)
|
||||
{
|
||||
// Get all children of team folder
|
||||
$childrenFolderIds = Folder::with('folders:id,parent_id')
|
||||
->where('id', $folder->id)
|
||||
->get('id');
|
||||
|
||||
// Set all children as team_folder = true
|
||||
DB::table('folders')
|
||||
->whereIn('id', Arr::flatten([filter_folders_ids($childrenFolderIds)]))
|
||||
->update(['team_folder' => $isTeamFolder]);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace Domain\Teams\Controllers;
|
||||
|
||||
use Domain\Teams\Actions\SetTeamFolderPropertyForAllChildrenAction;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Http\Response;
|
||||
use Domain\Folders\Models\Folder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -13,18 +15,22 @@ class ConvertFolderIntoTeamFolderController extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
public InviteMembersIntoTeamFolderAction $inviteMembers,
|
||||
public SetTeamFolderPropertyForAllChildrenAction $setTeamFolderPropertyForAllChildren,
|
||||
) {
|
||||
}
|
||||
|
||||
public function __invoke(
|
||||
ConvertIntoTeamFolderRequest $request,
|
||||
Folder $folder
|
||||
): ResponseFactory | Response {
|
||||
): ResponseFactory|Response {
|
||||
// Update root team folder
|
||||
$folder->update([
|
||||
'team_folder' => 1,
|
||||
'parent_id' => null,
|
||||
]);
|
||||
|
||||
($this->setTeamFolderPropertyForAllChildren)($folder, true);
|
||||
|
||||
// Attach owner into members
|
||||
DB::table('team_folder_members')
|
||||
->insert([
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace Domain\Teams\Controllers;
|
||||
|
||||
use Domain\Teams\Actions\SetTeamFolderPropertyForAllChildrenAction;
|
||||
use Illuminate\Support\Str;
|
||||
use Domain\Files\Models\File;
|
||||
use Illuminate\Http\Response;
|
||||
@@ -23,6 +24,7 @@ class TeamFoldersController extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
public InviteMembersIntoTeamFolderAction $inviteMembers,
|
||||
public SetTeamFolderPropertyForAllChildrenAction $setTeamFolderPropertyForAllChildren,
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -31,7 +33,7 @@ class TeamFoldersController extends Controller
|
||||
$id = Str::isUuid($id) ? $id : null;
|
||||
|
||||
$folders = Folder::where('parent_id', $id)
|
||||
->where('team_folder', ! Str::isUuid($id))
|
||||
->where('team_folder', true)
|
||||
->where('user_id', Auth::id())
|
||||
->sortable()
|
||||
->get();
|
||||
@@ -111,6 +113,8 @@ class TeamFoldersController extends Controller
|
||||
->where('parent_id', $folder->id)
|
||||
->delete();
|
||||
|
||||
($this->setTeamFolderPropertyForAllChildren)($folder, false);
|
||||
|
||||
$folder->update([
|
||||
'team_folder' => 0,
|
||||
]);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Domain\Teams;
|
||||
|
||||
use Str;
|
||||
@@ -514,6 +515,13 @@ class TeamManagementTest extends TestCase
|
||||
'team_folder' => 1,
|
||||
]);
|
||||
|
||||
$folderWithin = Folder::factory()
|
||||
->create([
|
||||
'parent_id' => $folder->id,
|
||||
'user_id' => $user->id,
|
||||
'team_folder' => 1,
|
||||
]);
|
||||
|
||||
TeamFolderInvitation::factory()
|
||||
->create([
|
||||
'parent_id' => $folder->id,
|
||||
@@ -542,7 +550,15 @@ class TeamManagementTest extends TestCase
|
||||
|
||||
$this
|
||||
->assertDatabaseCount('team_folder_members', 0)
|
||||
->assertDatabaseCount('team_folder_invitations', 0);
|
||||
->assertDatabaseCount('team_folder_invitations', 0)
|
||||
->assertDatabaseHas('folders', [
|
||||
'id' => $folder->id,
|
||||
'team_folder' => 0,
|
||||
])
|
||||
->assertDatabaseHas('folders', [
|
||||
'id' => $folderWithin->id,
|
||||
'team_folder' => 0,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -122,6 +122,12 @@ class TeamsTest extends TestCase
|
||||
'user_id' => $user->id,
|
||||
]);
|
||||
|
||||
$folderWithin = Folder::factory()
|
||||
->create([
|
||||
'parent_id' => $folder->id,
|
||||
'user_id' => $user->id,
|
||||
]);
|
||||
|
||||
$this
|
||||
->actingAs($user)
|
||||
->post("/api/teams/folders/{$folder->id}/convert", [
|
||||
@@ -142,7 +148,7 @@ class TeamsTest extends TestCase
|
||||
]);
|
||||
|
||||
$this->assertDatabaseHas('folders', [
|
||||
'id' => $folder->id,
|
||||
'id' => $folderWithin->id,
|
||||
'team_folder' => 1,
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user