feat(tenant): enhance storefront website types with header_type and multi-event support
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user