Fix Event & EventType resource issues and apply formatting
- Fix EventType deletion error handling (constraint violations) - Fix Event update error (package_id column missing) - Fix Event Type dropdown options (JSON display issue) - Fix EventPackagesRelationManager query error - Add missing translations for deletion errors - Apply Pint formatting
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
use SimpleSoftwareIO\QrCode\Facades\QrCode;
|
||||
|
||||
class QrController extends BaseController
|
||||
@@ -15,7 +15,7 @@ class QrController extends BaseController
|
||||
return response('missing data', 400);
|
||||
}
|
||||
$png = QrCode::format('png')->size(300)->generate($data);
|
||||
|
||||
return response($png, 200, ['Content-Type' => 'image/png']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,11 +26,11 @@ class LegalController extends BaseController
|
||||
'allow_unsafe_links' => false,
|
||||
]);
|
||||
|
||||
$environment->addExtension(new CommonMarkCoreExtension());
|
||||
$environment->addExtension(new TableExtension());
|
||||
$environment->addExtension(new AutolinkExtension());
|
||||
$environment->addExtension(new StrikethroughExtension());
|
||||
$environment->addExtension(new TaskListExtension());
|
||||
$environment->addExtension(new CommonMarkCoreExtension);
|
||||
$environment->addExtension(new TableExtension);
|
||||
$environment->addExtension(new AutolinkExtension);
|
||||
$environment->addExtension(new StrikethroughExtension);
|
||||
$environment->addExtension(new TaskListExtension);
|
||||
|
||||
$this->markdown = new MarkdownConverter($environment);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ use App\Models\Event;
|
||||
use App\Services\Analytics\EventAnalyticsService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
class EventAnalyticsController extends Controller
|
||||
{
|
||||
@@ -23,13 +22,13 @@ class EventAnalyticsController extends Controller
|
||||
if (is_string($packageFeatures)) {
|
||||
$packageFeatures = json_decode($packageFeatures, true) ?? [];
|
||||
}
|
||||
|
||||
|
||||
$hasAccess = in_array('advanced_analytics', $packageFeatures, true);
|
||||
|
||||
if (!$hasAccess) {
|
||||
return response()->json([
|
||||
if (! $hasAccess) {
|
||||
return response()->json([
|
||||
'message' => 'This feature is only available in the Premium package.',
|
||||
'code' => 'feature_locked'
|
||||
'code' => 'feature_locked',
|
||||
], 403);
|
||||
}
|
||||
|
||||
|
||||
@@ -112,4 +112,3 @@ class FontController extends Controller
|
||||
return $fonts;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,14 +91,14 @@ class PhotoboothController extends Controller
|
||||
$recipientName = $user->fullName ?? $user->name ?? $user->email;
|
||||
|
||||
$mail = (new PhotoboothUploaderDownload(
|
||||
recipientName: $recipientName,
|
||||
eventName: $eventName,
|
||||
links: [
|
||||
'windows' => url('/downloads/PhotoboothUploader-win-x64.exe'),
|
||||
'macos' => url('/downloads/PhotoboothUploader-macos-x64'),
|
||||
'linux' => url('/downloads/PhotoboothUploader-linux-x64'),
|
||||
],
|
||||
))->locale($locale);
|
||||
recipientName: $recipientName,
|
||||
eventName: $eventName,
|
||||
links: [
|
||||
'windows' => url('/downloads/PhotoboothUploader-win-x64.exe'),
|
||||
'macos' => url('/downloads/PhotoboothUploader-macos-x64'),
|
||||
'linux' => url('/downloads/PhotoboothUploader-linux-x64'),
|
||||
],
|
||||
))->locale($locale);
|
||||
|
||||
Mail::to($user->email)->queue($mail);
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ class LegalPageController extends Controller
|
||||
$effectiveFrom = optional($page->effective_from);
|
||||
|
||||
return Inertia::render('legal/Show', [
|
||||
'seoTitle' => $title . ' - ' . config('app.name', 'Fotospiel'),
|
||||
'seoTitle' => $title.' - '.config('app.name', 'Fotospiel'),
|
||||
'title' => $title,
|
||||
'content' => $this->convertMarkdownToHtml($bodyMarkdown),
|
||||
'effectiveFrom' => $effectiveFrom ? $effectiveFrom->toDateString() : null,
|
||||
@@ -112,11 +112,11 @@ class LegalPageController extends Controller
|
||||
'allow_unsafe_links' => false,
|
||||
]);
|
||||
|
||||
$environment->addExtension(new CommonMarkCoreExtension());
|
||||
$environment->addExtension(new TableExtension());
|
||||
$environment->addExtension(new AutolinkExtension());
|
||||
$environment->addExtension(new StrikethroughExtension());
|
||||
$environment->addExtension(new TaskListExtension());
|
||||
$environment->addExtension(new CommonMarkCoreExtension);
|
||||
$environment->addExtension(new TableExtension);
|
||||
$environment->addExtension(new AutolinkExtension);
|
||||
$environment->addExtension(new StrikethroughExtension);
|
||||
$environment->addExtension(new TaskListExtension);
|
||||
|
||||
$converter = new MarkdownConverter($environment);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class EventPhotoArchiveController extends Controller
|
||||
abort(404, 'No approved photos available for this event.');
|
||||
}
|
||||
|
||||
$zip = new ZipArchive();
|
||||
$zip = new ZipArchive;
|
||||
$tempPath = tempnam(sys_get_temp_dir(), 'fotospiel-photos-');
|
||||
|
||||
if ($tempPath === false || $zip->open($tempPath, ZipArchive::CREATE | ZipArchive::OVERWRITE) !== true) {
|
||||
@@ -129,4 +129,3 @@ class EventPhotoArchiveController extends Controller
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user