tenant admin startseite schicker gestaltet und super-admin und tenant admin (filament) aufgesplittet.
Es gibt nun task collections und vordefinierte tasks für alle. Onboarding verfeinert und webseite-carousel gefixt (logging später entfernen!)
This commit is contained in:
42
app/Http/Resources/Tenant/TaskCollectionResource.php
Normal file
42
app/Http/Resources/Tenant/TaskCollectionResource.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources\Tenant;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class TaskCollectionResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'slug' => $this->slug,
|
||||
'name' => $this->name,
|
||||
'name_translations' => $this->name_translations,
|
||||
'description' => $this->description,
|
||||
'description_translations' => $this->description_translations,
|
||||
'tenant_id' => $this->tenant_id,
|
||||
'is_global' => $this->tenant_id === null,
|
||||
'event_type' => $this->whenLoaded('eventType', function () {
|
||||
return [
|
||||
'id' => $this->eventType->id,
|
||||
'slug' => $this->eventType->slug,
|
||||
'name' => $this->eventType->name,
|
||||
'icon' => $this->eventType->icon,
|
||||
];
|
||||
}),
|
||||
'tasks_count' => $this->whenCounted('tasks'),
|
||||
'is_default' => (bool) ($this->is_default ?? false),
|
||||
'position' => $this->position,
|
||||
'source_collection_id' => $this->source_collection_id,
|
||||
'created_at' => $this->created_at?->toISOString(),
|
||||
'updated_at' => $this->updated_at?->toISOString(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user