feat(tenant): add display options for categories and search bar; update requests, migrations, seeder, and tests
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?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('tenants', function (Blueprint $table): void {
|
||||
$table->boolean('display_categories')->default(true)->after('search_items_per_page');
|
||||
$table->boolean('display_seach_bar')->default(true)->after('display_categories');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('tenants', function (Blueprint $table): void {
|
||||
$table->dropColumn(['display_categories', 'display_seach_bar']);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
DB::table('tenants')
|
||||
->where('codigo', 'fiesta_futbol_infantil')
|
||||
->update([
|
||||
'display_categories' => false,
|
||||
'display_seach_bar' => false,
|
||||
]);
|
||||
|
||||
DB::table('tenants')
|
||||
->where('codigo', 'sonder')
|
||||
->update([
|
||||
'display_categories' => true,
|
||||
'display_seach_bar' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
public function down(): void {}
|
||||
};
|
||||
@@ -56,6 +56,8 @@ class TenantSeeder extends Seeder
|
||||
'success_color' => '#198754',
|
||||
'header_bg_color' => '#ffffff',
|
||||
'footer_bg_color' => '#313131',
|
||||
'display_categories' => true,
|
||||
'display_seach_bar' => true,
|
||||
'header_logo' => $this->uploadedImage('images/tennants/sonder/sonder_header.png', 'sonder_header.png'),
|
||||
'footer_logo' => $this->uploadedImage('images/tennants/sonder/sonder_footer.png', 'sonder_footer.png'),
|
||||
'social_media' => self::SOCIAL_MEDIA,
|
||||
@@ -107,6 +109,8 @@ class TenantSeeder extends Seeder
|
||||
'success_color' => '#198754',
|
||||
'header_bg_color' => '#ffffff',
|
||||
'footer_bg_color' => '#015327',
|
||||
'display_categories' => false,
|
||||
'display_seach_bar' => false,
|
||||
'header_logo' => $this->uploadedImage(
|
||||
'images/tennants/fiesta_futbol_infantil/futbol_infantil_header.png',
|
||||
'futbol_infantil_header.png',
|
||||
|
||||
Reference in New Issue
Block a user