events werden nun erfolgreich gespeichert, branding wird nun erfolgreich gespeichert, emotionen können nun angelegt werden. Task Ansicht im Event admin verbessert, Buttons in FAB umgewandelt und vereinheitlicht. Teilen-Link Guest PWA schicker gemacht, SynGoogleFonts ausgebaut (mit Einzel-Family-Download).

This commit is contained in:
Codex Agent
2025-11-27 16:08:08 +01:00
parent bfa15cc48e
commit 96f8c5d63c
39 changed files with 1970 additions and 640 deletions

View File

@@ -54,6 +54,7 @@ class EventResource extends JsonResource
'is_active' => (bool) ($this->is_active ?? false),
'features' => $settings['features'] ?? [],
'engagement_mode' => $settings['engagement_mode'] ?? 'tasks',
'branding' => $settings['branding'] ?? null,
'settings' => $settings,
'event_type_id' => $this->event_type_id,
'event_type' => $this->whenLoaded('eventType', function () {

View File

@@ -32,7 +32,10 @@ class TaskCollectionResource extends JsonResource
];
}),
'tasks_count' => $this->whenCounted('tasks'),
'events_count' => $this->whenCounted('events'),
'imports_count' => $this->whenCounted('events'),
'is_default' => (bool) ($this->is_default ?? false),
'is_mine' => $this->tenant_id !== null,
'position' => $this->position,
'source_collection_id' => $this->source_collection_id,
'created_at' => $this->created_at?->toISOString(),

View File

@@ -41,9 +41,21 @@ class TaskResource extends JsonResource
'eventType',
fn () => new EventTypeResource($this->eventType)
),
'emotion_id' => $this->emotion_id,
'emotion' => $this->whenLoaded(
'emotion',
fn () => [
'id' => $this->emotion->id,
'name' => $this->translatedText($this->normalizeTranslations($this->emotion->name), ''),
'name_translations' => $this->emotion->name,
'icon' => $this->emotion->icon,
'color' => $this->emotion->color,
]
),
'collection_id' => $this->collection_id,
'source_task_id' => $this->source_task_id,
'source_collection_id' => $this->source_collection_id,
'sort_order' => $this->pivot?->sort_order,
'assigned_events_count' => $assignedEventsCount,
'assigned_events' => $this->whenLoaded(
'assignedEvents',
@@ -86,7 +98,7 @@ class TaskResource extends JsonResource
}
/**
* @param array<string, string> $translations
* @param array<string, string> $translations
*/
protected function translatedText(array $translations, string $fallback): string
{
@@ -109,4 +121,3 @@ class TaskResource extends JsonResource
return $first !== false ? $first : $fallback;
}
}