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:
@@ -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 () {
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user