feat(desfile): associate tickets menu with desfile tenant and add migration test
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
|
||||
namespace App\Domains\Ticketing\Ticket\Services;
|
||||
|
||||
use App\Domains\Core\Auth\Models\User;
|
||||
use App\Domains\Commerce\Catalog\Enums\InventoryPolicy;
|
||||
use App\Domains\Commerce\Catalog\Models\Inventory;
|
||||
use App\Domains\Commerce\Catalog\Models\Variant;
|
||||
use App\Domains\Commerce\Purchase\Models\PurchaseItem;
|
||||
use App\Domains\Commerce\Purchase\Services\PurchaseRefundSummaryService;
|
||||
use App\Domains\Core\Auth\Models\User;
|
||||
use App\Domains\Core\Tenant\Models\Tenant;
|
||||
use App\Domains\Ticketing\Ticket\Models\Ticket;
|
||||
use App\Domains\Ticketing\Ticket\Models\TicketRefund;
|
||||
@@ -32,6 +32,7 @@ class AdminAppTicketService
|
||||
|
||||
public function __construct(
|
||||
private readonly AdminAppTicketColumnService $columnService,
|
||||
private readonly AdminAppTicketAttributeService $attributeService,
|
||||
private readonly AdminAppTicketRowService $rowService,
|
||||
private readonly PurchaseRefundSummaryService $refundSummaryService,
|
||||
) {}
|
||||
@@ -347,6 +348,13 @@ class AdminAppTicketService
|
||||
|
||||
$this->applyStatusFilter($query, $filters['status'] ?? null);
|
||||
|
||||
foreach ($this->attributeService->attributes($tenant) as $attribute) {
|
||||
$value = $filters[$attribute['code']] ?? null;
|
||||
if ($value !== null && $value !== '') {
|
||||
$this->whereVariantDefinition($query, $attribute['code'], (string) $value);
|
||||
}
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user