feat(website-extras): add 'is_enabled' column to websites_extras table and update model and tests
This commit is contained in:
@@ -41,11 +41,13 @@ class TenantResource extends JsonResource
|
||||
),
|
||||
'extras' => $this->whenLoaded(
|
||||
'websiteExtras',
|
||||
fn () => $this->websiteExtras->mapWithKeys(fn ($extra) => [
|
||||
$extra->websiteTypeExtra->codigo => $this->formatExtraConfig(
|
||||
$extra->resolvedConfig()
|
||||
),
|
||||
])
|
||||
fn () => $this->websiteExtras
|
||||
->filter(fn ($extra) => $extra->is_enabled)
|
||||
->mapWithKeys(fn ($extra) => [
|
||||
$extra->websiteTypeExtra->codigo => $this->formatExtraConfig(
|
||||
$extra->resolvedConfig()
|
||||
),
|
||||
])
|
||||
),
|
||||
// 1 day
|
||||
'header_logo' => $this->headerLogo?->getTemporaryUrl(1440),
|
||||
|
||||
Reference in New Issue
Block a user