extended teams demo
@@ -1 +1 @@
|
||||
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8355],{3187:(t,e,a)=>{a.d(e,{Z:()=>i});const n={name:"CardNavigation",props:["pages"],computed:{routeName:function(){return this.$route.name}},data:function(){return{fixedNav:!1}},created:function(){var t=this;window.addEventListener("scroll",(function(){var e=document.getElementById("card-navigation");t.fixedNav=e.getBoundingClientRect().top<0}))}};const i=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"mb-7",staticStyle:{height:"62px"},attrs:{id:"card-navigation"}},[a("div",{class:{"fixed top-0 left-0 right-0 z-10 rounded-none bg-white bg-opacity-50 px-6 backdrop-blur-lg backdrop-filter dark:bg-dark-foreground":t.fixedNav}},[a("div",{staticClass:"overflow-x-auto whitespace-nowrap"},t._l(t.pages,(function(e,n){return a("router-link",{key:n,staticClass:"border-bottom-theme inline-block border-b-2 border-transparent px-4 py-5 text-sm font-bold",class:{"text-theme":t.routeName===e.route,"text-gray-600 dark:text-gray-100":t.routeName!==e.route},attrs:{to:{name:e.route},replace:""}},[t._v("\n "+t._s(e.title)+"\n ")])})),1)])])}),[],!1,null,null,null).exports},472:(t,e,a)=>{a.r(e),a.d(e,{default:()=>l});var n=a(3187),i=a(7318),s=a(9669),r=a.n(s);const o={name:"FixedPlan",components:{CardNavigation:n.Z,Spinner:i.Z},data:function(){return{isLoading:!0,plan:void 0,pages:[{title:this.$t("admin_page_plans.tabs.settings"),route:"PlanFixedSettings"},{title:this.$t("admin_page_plans.tabs.subscribers"),route:"PlanFixedSubscribers"},{title:this.$t("admin_page_plans.tabs.delete"),route:"PlanFixedDelete"}]}},created:function(){var t=this;r().get("/api/subscriptions/admin/plans/"+this.$route.params.id).then((function(e){t.plan=e.data.data})).finally((function(){t.isLoading=!1}))}};const l=(0,a(1900).Z)(o,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.plan?a("div",{staticClass:"card sticky top-0 z-10 shadow-card",staticStyle:{"padding-bottom":"0"}},[a("div",{staticClass:"mb-2"},[a("h1",{staticClass:"text-lg font-bold sm:text-xl"},[t._v("\n "+t._s(t.plan.attributes.name)+"\n ")]),t._v(" "),a("small",{staticClass:"text-xs font-bold text-gray-500 sm:text-sm"},[t._v("\n "+t._s(t.plan.attributes.price)+" /\n "+t._s(t.$t("interval."+t.plan.attributes.interval))+"\n ")])]),t._v(" "),a("CardNavigation",{staticClass:"-mx-1.5",attrs:{pages:t.pages}})],1):t._e(),t._v(" "),t.isLoading?t._e():a("router-view",{attrs:{plan:t.plan}}),t._v(" "),t.isLoading?a("div",{attrs:{id:"loader"}},[a("Spinner")],1):t._e()],1)}),[],!1,null,null,null).exports},7975:(t,e,a)=>{a.r(e),a.d(e,{default:()=>p});var n=a(3187),i=a(7318),s=a(9669),r=a.n(s),o=a(629);function l(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function d(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?l(Object(a),!0).forEach((function(e){c(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function c(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}const u={name:"MeteredPlan",components:{CardNavigation:n.Z,Spinner:i.Z},computed:d(d({},(0,o.Se)(["config"])),{},{pages:function(){var t=[{title:this.$t("admin_page_plans.tabs.settings"),route:"PlanMeteredSettings"},{title:this.$t("admin_page_plans.tabs.subscribers"),route:"PlanMeteredSubscribers"}];return this.plan&&"active"===this.plan.attributes.status&&t.push({title:this.$t("admin_page_plans.tabs.delete"),route:"PlanMeteredDelete"}),t}}),data:function(){return{isLoading:!0,plan:void 0}},created:function(){var t=this;r().get("/api/subscriptions/admin/plans/"+this.$route.params.id).then((function(e){t.plan=e.data.data})).finally((function(){t.isLoading=!1}))}};const p=(0,a(1900).Z)(u,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.plan?a("div",{staticClass:"card sticky top-0 z-10 shadow-card",staticStyle:{"padding-bottom":"0"}},[a("div",{staticClass:"mb-2"},[a("h1",{staticClass:"text-lg font-bold sm:text-xl"},[t._v("\n "+t._s(t.plan.attributes.name)+"\n ")]),t._v(" "),a("small",{staticClass:"text-xs font-bold text-gray-500 sm:text-sm"},[t._v("\n "+t._s(t.$t("30 Days intervals"))+"\n ")])]),t._v(" "),a("CardNavigation",{staticClass:"-mx-1",attrs:{pages:t.pages}})],1):t._e(),t._v(" "),t.isLoading?t._e():a("router-view",{attrs:{plan:t.plan}}),t._v(" "),t.isLoading?a("div",{attrs:{id:"loader"}},[a("Spinner")],1):t._e()],1)}),[],!1,null,null,null).exports}}]);
|
||||
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8355],{3187:(t,e,a)=>{a.d(e,{Z:()=>i});const n={name:"CardNavigation",props:["pages"],computed:{routeName:function(){return this.$route.name}},data:function(){return{fixedNav:!1}},created:function(){var t=this;window.addEventListener("scroll",(function(){var e=document.getElementById("card-navigation");t.fixedNav=e.getBoundingClientRect().top<0}))}};const i=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"mb-7",staticStyle:{height:"62px"},attrs:{id:"card-navigation"}},[a("div",{class:{"fixed top-0 left-0 right-0 z-10 rounded-none bg-white bg-opacity-50 px-6 backdrop-blur-lg backdrop-filter dark:bg-dark-foreground":t.fixedNav}},[a("div",{staticClass:"overflow-x-auto whitespace-nowrap"},t._l(t.pages,(function(e,n){return a("router-link",{key:n,staticClass:"border-bottom-theme inline-block border-b-2 border-transparent px-4 py-5 text-sm font-bold",class:{"text-theme":t.routeName===e.route,"text-gray-600 dark:text-gray-100":t.routeName!==e.route},attrs:{to:{name:e.route},replace:""}},[t._v("\n "+t._s(e.title)+"\n ")])})),1)])])}),[],!1,null,null,null).exports},8874:(t,e,a)=>{a.r(e),a.d(e,{default:()=>l});var n=a(3187),i=a(7318),s=a(9669),r=a.n(s);const o={name:"FixedPlan",components:{CardNavigation:n.Z,Spinner:i.Z},data:function(){return{isLoading:!0,plan:void 0,pages:[{title:this.$t("admin_page_plans.tabs.settings"),route:"PlanFixedSettings"},{title:this.$t("admin_page_plans.tabs.subscribers"),route:"PlanFixedSubscribers"},{title:this.$t("admin_page_plans.tabs.delete"),route:"PlanFixedDelete"}]}},created:function(){var t=this;r().get("/api/subscriptions/admin/plans/"+this.$route.params.id).then((function(e){t.plan=e.data.data})).finally((function(){t.isLoading=!1}))}};const l=(0,a(1900).Z)(o,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.plan?a("div",{staticClass:"card sticky top-0 z-10 shadow-card",staticStyle:{"padding-bottom":"0"}},[a("div",{staticClass:"mb-2"},[a("h1",{staticClass:"text-lg font-bold sm:text-xl"},[t._v("\n "+t._s(t.plan.attributes.name)+"\n ")]),t._v(" "),a("small",{staticClass:"text-xs font-bold dark:text-gray-500 text-gray-500 sm:text-sm"},[t._v("\n "+t._s(t.plan.attributes.price)+" /\n "+t._s(t.$t("interval."+t.plan.attributes.interval))+"\n ")])]),t._v(" "),a("CardNavigation",{staticClass:"-mx-1.5",attrs:{pages:t.pages}})],1):t._e(),t._v(" "),t.isLoading?t._e():a("router-view",{attrs:{plan:t.plan}}),t._v(" "),t.isLoading?a("div",{attrs:{id:"loader"}},[a("Spinner")],1):t._e()],1)}),[],!1,null,null,null).exports},8790:(t,e,a)=>{a.r(e),a.d(e,{default:()=>p});var n=a(3187),i=a(7318),s=a(9669),r=a.n(s),o=a(629);function l(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function d(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?l(Object(a),!0).forEach((function(e){c(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function c(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}const u={name:"MeteredPlan",components:{CardNavigation:n.Z,Spinner:i.Z},computed:d(d({},(0,o.Se)(["config"])),{},{pages:function(){var t=[{title:this.$t("admin_page_plans.tabs.settings"),route:"PlanMeteredSettings"},{title:this.$t("admin_page_plans.tabs.subscribers"),route:"PlanMeteredSubscribers"}];return this.plan&&"active"===this.plan.attributes.status&&t.push({title:this.$t("admin_page_plans.tabs.delete"),route:"PlanMeteredDelete"}),t}}),data:function(){return{isLoading:!0,plan:void 0}},created:function(){var t=this;r().get("/api/subscriptions/admin/plans/"+this.$route.params.id).then((function(e){t.plan=e.data.data})).finally((function(){t.isLoading=!1}))}};const p=(0,a(1900).Z)(u,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.plan?a("div",{staticClass:"card sticky top-0 z-10 shadow-card",staticStyle:{"padding-bottom":"0"}},[a("div",{staticClass:"mb-2"},[a("h1",{staticClass:"text-lg font-bold sm:text-xl"},[t._v("\n "+t._s(t.plan.attributes.name)+"\n ")]),t._v(" "),a("small",{staticClass:"text-xs font-bold dark:text-gray-500 text-gray-500 sm:text-sm"},[t._v("\n "+t._s(t.$t("30 Days intervals"))+"\n ")])]),t._v(" "),a("CardNavigation",{staticClass:"-mx-1",attrs:{pages:t.pages}})],1):t._e(),t._v(" "),t.isLoading?t._e():a("router-view",{attrs:{plan:t.plan}}),t._v(" "),t.isLoading?a("div",{attrs:{id:"loader"}},[a("Spinner")],1):t._e()],1)}),[],!1,null,null,null).exports}}]);
|
||||
@@ -458,7 +458,6 @@ class SetupDevEnvironment extends Command
|
||||
]);
|
||||
});
|
||||
|
||||
// Get documents to shared folder
|
||||
collect([
|
||||
[
|
||||
'name' => 'Home plan',
|
||||
@@ -719,6 +718,15 @@ class SetupDevEnvironment extends Command
|
||||
$user = User::whereEmail('howdy@hi5ve.digital')
|
||||
->first();
|
||||
|
||||
$alice = User::whereEmail('alice@hi5ve.digital')
|
||||
->first();
|
||||
|
||||
$johan = User::whereEmail('johan@hi5ve.digital')
|
||||
->first();
|
||||
|
||||
$users = [$user, $alice, $johan];
|
||||
|
||||
// 1. Company project
|
||||
$companyProjectFolder = Folder::factory()
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
@@ -726,7 +734,7 @@ class SetupDevEnvironment extends Command
|
||||
'name' => 'Company Project',
|
||||
]);
|
||||
|
||||
Folder::factory()
|
||||
$presentationMaterial = Folder::factory()
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'parent_id' => $companyProjectFolder->id,
|
||||
@@ -734,7 +742,7 @@ class SetupDevEnvironment extends Command
|
||||
'team_folder' => true,
|
||||
]);
|
||||
|
||||
Folder::factory()
|
||||
$teamGallery = Folder::factory()
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'parent_id' => $companyProjectFolder->id,
|
||||
@@ -742,6 +750,54 @@ class SetupDevEnvironment extends Command
|
||||
'team_folder' => true,
|
||||
]);
|
||||
|
||||
collect([
|
||||
'demo/images/team-gallery/photo-1.jpeg',
|
||||
'demo/images/team-gallery/photo-2.jpeg',
|
||||
'demo/images/team-gallery/photo-3.jpeg',
|
||||
])
|
||||
->each(function ($file) use ($users, $teamGallery) {
|
||||
$user = $users[rand(0, 2)];
|
||||
|
||||
$thumbnail = $this->generate_thumbnails($file, $user);
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'parent_id' => $teamGallery->id,
|
||||
'user_id' => $user->id,
|
||||
'name' => $thumbnail['name'],
|
||||
'basename' => $thumbnail['basename'],
|
||||
'type' => 'image',
|
||||
'author' => 'user',
|
||||
'mimetype' => 'jpg',
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
|
||||
collect([
|
||||
'demo/images/presentation/photo-1.jpeg',
|
||||
'demo/images/presentation/photo-2.jpeg',
|
||||
])
|
||||
->each(function ($file) use ($users, $presentationMaterial) {
|
||||
$user = $users[rand(0, 2)];
|
||||
|
||||
$thumbnail = $this->generate_thumbnails($file, $user);
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'parent_id' => $presentationMaterial->id,
|
||||
'user_id' => $user->id,
|
||||
'name' => $thumbnail['name'],
|
||||
'basename' => $thumbnail['basename'],
|
||||
'type' => 'image',
|
||||
'author' => 'user',
|
||||
'mimetype' => 'jpg',
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
|
||||
// 2. Finance Documents
|
||||
$financeDocumentsFolder = Folder::factory()
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
@@ -749,7 +805,203 @@ class SetupDevEnvironment extends Command
|
||||
'name' => 'Finance Documents',
|
||||
]);
|
||||
|
||||
collect([$companyProjectFolder, $financeDocumentsFolder])
|
||||
$reserves = Folder::factory()
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'parent_id' => $financeDocumentsFolder->id,
|
||||
'name' => 'Reserves',
|
||||
'team_folder' => true,
|
||||
]);
|
||||
|
||||
$otherDocuments = Folder::factory()
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'parent_id' => $financeDocumentsFolder->id,
|
||||
'name' => 'Other Documents',
|
||||
'team_folder' => true,
|
||||
]);
|
||||
|
||||
collect([
|
||||
'demo/images/finance-documents/photo-1.jpeg',
|
||||
'demo/images/finance-documents/photo-2.jpeg',
|
||||
'demo/images/finance-documents/photo-3.jpeg',
|
||||
])
|
||||
->each(function ($file) use ($users, $financeDocumentsFolder) {
|
||||
$user = $users[rand(0, 2)];
|
||||
|
||||
$thumbnail = $this->generate_thumbnails($file, $user);
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'parent_id' => $financeDocumentsFolder->id,
|
||||
'user_id' => $user->id,
|
||||
'name' => $thumbnail['name'],
|
||||
'basename' => $thumbnail['basename'],
|
||||
'type' => 'image',
|
||||
'author' => 'user',
|
||||
'mimetype' => 'jpg',
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
|
||||
collect([
|
||||
'demo/images/finance-documents/photo-4.jpeg',
|
||||
'demo/images/finance-documents/photo-5.jpeg',
|
||||
])
|
||||
->each(function ($file) use ($users, $reserves) {
|
||||
$user = $users[rand(0, 2)];
|
||||
|
||||
$thumbnail = $this->generate_thumbnails($file, $user);
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'parent_id' => $reserves->id,
|
||||
'user_id' => $user->id,
|
||||
'name' => $thumbnail['name'],
|
||||
'basename' => $thumbnail['basename'],
|
||||
'type' => 'image',
|
||||
'author' => 'user',
|
||||
'mimetype' => 'jpg',
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
|
||||
// Get documents to root directory
|
||||
collect([
|
||||
[
|
||||
'name' => 'Next Year Projection',
|
||||
'basename' => 'Licence.pdf',
|
||||
'mimetype' => 'pdf',
|
||||
],
|
||||
[
|
||||
'name' => 'Budget.pdf',
|
||||
'basename' => 'Project Notes.pdf',
|
||||
'mimetype' => 'pdf',
|
||||
],
|
||||
[
|
||||
'name' => '2022 Yearly Report.pages',
|
||||
'basename' => 'School Report.pages',
|
||||
'mimetype' => 'pages',
|
||||
],
|
||||
[
|
||||
'name' => 'Company Project Notes.pages',
|
||||
'basename' => 'Stories of the Night Skies.pages',
|
||||
'mimetype' => 'pages',
|
||||
],
|
||||
[
|
||||
'name' => 'Finance Stories.pages',
|
||||
'basename' => 'Stories of the Night Skies.pages',
|
||||
'mimetype' => 'pages',
|
||||
],
|
||||
])
|
||||
->each(function ($file) use ($users, $financeDocumentsFolder, $otherDocuments) {
|
||||
$user = $users[rand(0, 2)];
|
||||
$folder = [$financeDocumentsFolder, $otherDocuments][rand(0,1)];
|
||||
|
||||
$basename = Str::random(12) . '-' . $file['basename'];
|
||||
|
||||
// Copy file into app storage
|
||||
Storage::putFileAs("files/$user->id", storage_path("demo/documents/{$file['basename']}"), $basename, 'private');
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'parent_id' => $folder->id,
|
||||
'user_id' => $user->id,
|
||||
'name' => $file['name'],
|
||||
'basename' => $basename,
|
||||
'type' => 'file',
|
||||
'author' => 'user',
|
||||
'mimetype' => $file['mimetype'],
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
|
||||
// 3. Holiday 2022
|
||||
$holiday2022Folder = Folder::factory()
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'team_folder' => true,
|
||||
'name' => 'Holiday 2022',
|
||||
]);
|
||||
|
||||
$destinationGallery = Folder::factory()
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
'parent_id' => $holiday2022Folder->id,
|
||||
'name' => 'Destination Gallery',
|
||||
'team_folder' => true,
|
||||
]);
|
||||
|
||||
collect([
|
||||
'demo/images/destination-gallery/photo-1.jpeg',
|
||||
'demo/images/destination-gallery/photo-2.jpeg',
|
||||
'demo/images/destination-gallery/photo-3.jpeg',
|
||||
'demo/images/destination-gallery/photo-4.jpeg',
|
||||
'demo/images/destination-gallery/photo-5.jpeg',
|
||||
])
|
||||
->each(function ($file) use ($users, $destinationGallery) {
|
||||
$user = $users[rand(0, 2)];
|
||||
|
||||
$thumbnail = $this->generate_thumbnails($file, $user);
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'parent_id' => $destinationGallery->id,
|
||||
'user_id' => $user->id,
|
||||
'name' => $thumbnail['name'],
|
||||
'basename' => $thumbnail['basename'],
|
||||
'type' => 'image',
|
||||
'author' => 'user',
|
||||
'mimetype' => 'jpg',
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
|
||||
// Get documents to root directory
|
||||
collect([
|
||||
[
|
||||
'name' => 'Finance.pages',
|
||||
'basename' => 'Licence.pdf',
|
||||
'mimetype' => 'pdf',
|
||||
],
|
||||
[
|
||||
'name' => 'Fly tickets.pdf',
|
||||
'basename' => 'Project Notes.pdf',
|
||||
'mimetype' => 'pdf',
|
||||
],
|
||||
[
|
||||
'name' => 'Documentation.pdf',
|
||||
'basename' => 'School Report.pages',
|
||||
'mimetype' => 'pages',
|
||||
],
|
||||
])
|
||||
->each(function ($file) use ($users, $holiday2022Folder) {
|
||||
$user = $users[rand(0, 2)];
|
||||
|
||||
$basename = Str::random(12) . '-' . $file['basename'];
|
||||
|
||||
// Copy file into app storage
|
||||
Storage::putFileAs("files/$user->id", storage_path("demo/documents/{$file['basename']}"), $basename, 'private');
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'parent_id' => $holiday2022Folder->id,
|
||||
'user_id' => $user->id,
|
||||
'name' => $file['name'],
|
||||
'basename' => $basename,
|
||||
'type' => 'file',
|
||||
'author' => 'user',
|
||||
'mimetype' => $file['mimetype'],
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
|
||||
collect([$companyProjectFolder, $financeDocumentsFolder, $holiday2022Folder])
|
||||
->each(function ($folder) use ($user) {
|
||||
DB::table('team_folder_members')
|
||||
->insert([
|
||||
@@ -763,7 +1015,7 @@ class SetupDevEnvironment extends Command
|
||||
$members = User::whereNotIn('email', ['howdy@hi5ve.digital'])
|
||||
->get();
|
||||
|
||||
collect([$members[0]->id, $members[1]->id])
|
||||
collect([$members[0]->id, $members[1]->id, $members[5]->id])
|
||||
->each(
|
||||
fn ($id) => DB::table('team_folder_members')
|
||||
->insert([
|
||||
@@ -773,7 +1025,7 @@ class SetupDevEnvironment extends Command
|
||||
])
|
||||
);
|
||||
|
||||
collect([$members[2]->id, $members[3]->id])
|
||||
collect([$members[3]->id, $members[2]->id])
|
||||
->each(
|
||||
fn ($id) => DB::table('team_folder_members')
|
||||
->insert([
|
||||
@@ -783,6 +1035,16 @@ class SetupDevEnvironment extends Command
|
||||
])
|
||||
);
|
||||
|
||||
collect([$members[2]->id, $members[3]->id, $members[5]->id, $members[0]->id])
|
||||
->each(
|
||||
fn ($id) => DB::table('team_folder_members')
|
||||
->insert([
|
||||
'parent_id' => $holiday2022Folder->id,
|
||||
'user_id' => $id,
|
||||
'permission' => 'can-edit',
|
||||
])
|
||||
);
|
||||
|
||||
// Create invitations
|
||||
collect([$members[4], $members[5]])
|
||||
->each(
|
||||
@@ -808,6 +1070,8 @@ class SetupDevEnvironment extends Command
|
||||
$johan = User::whereEmail('johan@hi5ve.digital')
|
||||
->first();
|
||||
|
||||
$users = [$member, $johan];
|
||||
|
||||
$folder = Folder::factory()
|
||||
->create([
|
||||
'user_id' => $owner->id,
|
||||
@@ -815,11 +1079,11 @@ class SetupDevEnvironment extends Command
|
||||
'name' => "Alice's Project Files",
|
||||
]);
|
||||
|
||||
Folder::factory()
|
||||
$videos = Folder::factory()
|
||||
->create([
|
||||
'user_id' => $owner->id,
|
||||
'parent_id' => $folder->id,
|
||||
'name' => '9 Gag',
|
||||
'name' => 'Videos',
|
||||
'team_folder' => true,
|
||||
]);
|
||||
|
||||
@@ -850,6 +1114,62 @@ class SetupDevEnvironment extends Command
|
||||
],
|
||||
]);
|
||||
|
||||
// Get videos
|
||||
collect([
|
||||
'Apple Watch App Video Promotion.mp4',
|
||||
'Smart Watch 3D Device Pack for Element 3D.mp4',
|
||||
])
|
||||
->each(function ($file) use ($users, $videos) {
|
||||
$user = $users[rand(0,1)];
|
||||
|
||||
$basename = Str::random(12) . '-' . $file;
|
||||
|
||||
// Copy file into app storage
|
||||
Storage::putFileAs("files/$user->id", storage_path("demo/video/$file"), $basename, 'private');
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'parent_id' => $videos->id,
|
||||
'user_id' => $user->id,
|
||||
'name' => $file,
|
||||
'basename' => $basename,
|
||||
'type' => 'video',
|
||||
'author' => 'user',
|
||||
'mimetype' => 'mp4',
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
|
||||
collect([
|
||||
[
|
||||
'name' => 'Notes',
|
||||
'basename' => 'Licence.pdf',
|
||||
'mimetype' => 'pdf',
|
||||
],
|
||||
])
|
||||
->each(function ($file) use ($users, $folder) {
|
||||
$basename = Str::random(12) . '-' . $file['basename'];
|
||||
|
||||
$user = $users[rand(0,1)];
|
||||
|
||||
// Copy file into app storage
|
||||
Storage::putFileAs("files/$user->id", storage_path("demo/documents/{$file['basename']}"), $basename, 'private');
|
||||
|
||||
// Create file record
|
||||
File::create([
|
||||
'parent_id' => $folder->id,
|
||||
'user_id' => $user->id,
|
||||
'name' => $file['name'],
|
||||
'basename' => $basename,
|
||||
'type' => 'file',
|
||||
'author' => 'user',
|
||||
'mimetype' => $file['mimetype'],
|
||||
'filesize' => rand(1000000, 4000000),
|
||||
'created_at' => now()->subMinutes(rand(1, 5)),
|
||||
]);
|
||||
});
|
||||
|
||||
// Get meme gallery
|
||||
collect([
|
||||
'demo/images/memes/Sofishticated.jpg',
|
||||
|
||||
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 370 KiB |
|
After Width: | Height: | Size: 462 KiB |
|
After Width: | Height: | Size: 564 KiB |
|
After Width: | Height: | Size: 427 KiB |
|
After Width: | Height: | Size: 479 KiB |
|
After Width: | Height: | Size: 434 KiB |
|
After Width: | Height: | Size: 146 KiB |
|
After Width: | Height: | Size: 729 KiB |
|
After Width: | Height: | Size: 516 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 388 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 622 KiB |
|
After Width: | Height: | Size: 804 KiB |