MOD EV3-424 Verzióváltott teszt - Beszállítói felülbírálások
This commit is contained in:
parent
0b8d4e303e
commit
dbaa7648bd
@ -18,9 +18,10 @@ public static function configure(Schema $schema): Schema
|
||||
->components([
|
||||
Select::make('supplier_id')
|
||||
->label('Beszállító')
|
||||
->relationship('supplier', 'name')
|
||||
->relationship('supplier', 'name', fn($query) => $query->where('hasDeliveryConstraint', true))
|
||||
->searchable()
|
||||
->required(),
|
||||
->required()
|
||||
->live(),
|
||||
Select::make('override_scope')
|
||||
->label('Felülbírálás szintje')
|
||||
->options(collect(OverrideScope::cases())->mapWithKeys(
|
||||
@ -37,7 +38,10 @@ public static function configure(Schema $schema): Schema
|
||||
->required(fn(Get $get) => $get('override_scope') === OverrideScope::Region->value),
|
||||
Select::make('profit_center_id')
|
||||
->label('Profitcenter')
|
||||
->relationship('profitCenter', 'name')
|
||||
->relationship('profitCenter', 'name', fn($query, Get $get) => $query->when(
|
||||
$get('supplier_id'),
|
||||
fn($q, $supplierId) => $q->whereHas('suppliers', fn($s) => $s->where('suppliers.id', $supplierId))
|
||||
))
|
||||
->searchable()
|
||||
->visible(fn(Get $get) => $get('override_scope') === OverrideScope::ProfitCenter->value)
|
||||
->required(fn(Get $get) => $get('override_scope') === OverrideScope::ProfitCenter->value),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user