Marketing packages now use localized name/description data plus seeded placeholder-

driven breakdown tables, with frontend/cards/dialog updated accordingly (database/
  migrations/2025_10_17_000001_add_description_table_to_packages.php, database/
  migrations/2025_10_17_000002_add_translation_columns_to_packages.php, database/seeders/PackageSeeder.php, app/
  Http/Controllers/MarketingController.php, resources/js/pages/marketing/Packages.tsx).
  Filament Package resource gains locale tabs, markdown editor, numeric/toggle inputs, and simplified feature
  management (app/Filament/Resources/PackageResource.php, app/Filament/Resources/PackageResource/Pages/
  CreatePackage.php, .../EditPackage.php).
  Legal pages now render markdown-backed content inside the main layout via a new controller/view route setup and
  updated footer links (app/Http/Controllers/LegalPageController.php, routes/web.php, resources/views/partials/
  footer.blade.php, resources/js/pages/legal/Show.tsx, remove old static pages).
  Translation files and shared assets updated to cover new marketing/legal strings and styling tweaks (public/
  lang/*/marketing.json, resources/lang/*/marketing.php, resources/css/app.css, resources/js/admin/components/
  LanguageSwitcher.tsx).
This commit is contained in:
Codex Agent
2025-10-17 21:20:54 +02:00
parent 25e8f0511b
commit 48a2974152
30 changed files with 1702 additions and 711 deletions

View File

@@ -0,0 +1,26 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('packages', function (Blueprint $table) {
if (!Schema::hasColumn('packages', 'description_table')) {
$table->json('description_table')->nullable()->after('description');
}
});
}
public function down(): void
{
Schema::table('packages', function (Blueprint $table) {
if (Schema::hasColumn('packages', 'description_table')) {
$table->dropColumn('description_table');
}
});
}
};

View File

@@ -0,0 +1,57 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
return new class extends Migration
{
public function up(): void
{
Schema::table('packages', function (Blueprint $table) {
if (! Schema::hasColumn('packages', 'name_translations')) {
$table->json('name_translations')->nullable()->after('name');
}
if (! Schema::hasColumn('packages', 'description_translations')) {
$table->json('description_translations')->nullable()->after('description');
}
});
// Bootstrap existing values into the new translation columns
if (Schema::hasColumn('packages', 'name')) {
DB::table('packages')->select('id', 'name', 'description')->get()->each(function ($package) {
$nameTranslations = [
'de' => $package->name,
'en' => $package->name,
];
$descriptionTranslations = [
'de' => $package->description ?? '',
'en' => $package->description ?? '',
];
DB::table('packages')
->where('id', $package->id)
->update([
'name_translations' => json_encode($nameTranslations, JSON_UNESCAPED_UNICODE),
'description_translations' => json_encode($descriptionTranslations, JSON_UNESCAPED_UNICODE),
]);
});
}
}
public function down(): void
{
Schema::table('packages', function (Blueprint $table) {
if (Schema::hasColumn('packages', 'name_translations')) {
$table->dropColumn('name_translations');
}
if (Schema::hasColumn('packages', 'description_translations')) {
$table->dropColumn('description_translations');
}
});
}
};