added missing translations
This commit is contained in:
@@ -1230,6 +1230,7 @@ class EventPublicController extends BaseController
|
||||
|
||||
$branding = $this->buildGalleryBranding($event);
|
||||
$expiresAt = optional($event->eventPackage)->gallery_expires_at;
|
||||
$settings = is_array($event->settings) ? $event->settings : [];
|
||||
|
||||
return response()->json([
|
||||
'event' => [
|
||||
@@ -1238,6 +1239,8 @@ class EventPublicController extends BaseController
|
||||
'slug' => $event->slug,
|
||||
'description' => $this->translateLocalized($event->description, $locale, ''),
|
||||
'gallery_expires_at' => $expiresAt?->toIso8601String(),
|
||||
'guest_downloads_enabled' => (bool) ($settings['guest_downloads_enabled'] ?? true),
|
||||
'guest_sharing_enabled' => (bool) ($settings['guest_sharing_enabled'] ?? true),
|
||||
],
|
||||
'branding' => $branding,
|
||||
]);
|
||||
|
||||
@@ -5,9 +5,12 @@ namespace App\Http\Controllers\Api\Tenant;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Event;
|
||||
use App\Models\TenantFeedback;
|
||||
use App\Models\User;
|
||||
use App\Notifications\TenantFeedbackSubmitted;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
|
||||
class TenantFeedbackController extends Controller
|
||||
{
|
||||
@@ -52,6 +55,15 @@ class TenantFeedbackController extends Controller
|
||||
'metadata' => $validated['metadata'] ?? null,
|
||||
]);
|
||||
|
||||
$recipients = User::query()
|
||||
->where('role', 'super_admin')
|
||||
->whereNotNull('email')
|
||||
->get();
|
||||
|
||||
if ($recipients->isNotEmpty()) {
|
||||
Notification::send($recipients, new TenantFeedbackSubmitted($feedback));
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'message' => 'Feedback gespeichert',
|
||||
'data' => [
|
||||
|
||||
@@ -8,6 +8,8 @@ use Illuminate\Http\Resources\Json\JsonResource;
|
||||
use Illuminate\Http\Resources\MissingValue;
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
use function app;
|
||||
|
||||
class EventResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
@@ -54,6 +56,9 @@ class EventResource extends JsonResource
|
||||
'engagement_mode' => $settings['engagement_mode'] ?? 'tasks',
|
||||
'settings' => $settings,
|
||||
'event_type_id' => $this->event_type_id,
|
||||
'event_type' => $this->whenLoaded('eventType', function () {
|
||||
return new EventTypeResource($this->eventType);
|
||||
}),
|
||||
'created_at' => $this->created_at?->toISOString(),
|
||||
'updated_at' => $this->updated_at?->toISOString(),
|
||||
'photo_count' => (int) ($this->photos_count ?? 0),
|
||||
|
||||
Reference in New Issue
Block a user