feat(tenant): enhance storefront website types with header_type and multi-event support

This commit is contained in:
2026-09-17 16:02:21 -03:00
parent 131eb1a7ee
commit eb1e4df63f
8 changed files with 50 additions and 7 deletions

View File

@@ -58,7 +58,7 @@ class OnTicketFeaturedGroupController extends Controller
{
$tenant = $request->user()->tenant()->firstOrFail();
abort_unless($tenant->storefront_website_type_code === 'onticket', 404);
abort_unless(in_array($tenant->storefront_website_type_code, ['onticket', 'onticket_multi_event'], true), 404);
return $tenant;
}

View File

@@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
#[Fillable(['codigo', 'nombre'])]
#[Fillable(['codigo', 'nombre', 'header_type'])]
class StorefrontWebsiteType extends Model
{
use HasFactory;

View File

@@ -48,6 +48,7 @@ class TenantResource extends JsonResource
'footer_bg_color' => $this->footer_bg_color,
'admin_website_type_code' => $this->admin_website_type_code,
'storefront_website_type_code' => $this->storefront_website_type_code,
'header_type' => $this->storefrontWebsiteType?->header_type ?? 'standard',
'event_date_text' => $this->event_date_text,
'event' => $this->whenLoaded('eventDates', fn () => $this->event_title === null
? null