wip
This commit is contained in:
@@ -36,13 +36,26 @@ class CardOrderForm
|
||||
Section::make(__('New card order'))
|
||||
->columnSpan(4)
|
||||
->columns(4)
|
||||
->disabled(function (string $context) {
|
||||
if (user()->isSystemUser()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
})
|
||||
->hidden(function (string $context): bool {
|
||||
if (user()->isSystemUser()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $context === 'create';
|
||||
})
|
||||
->components([
|
||||
Select::make('status')
|
||||
->label(__('Status'))
|
||||
->options(OrderStatusRepository::statusValues())
|
||||
->default(OrderStatusRepository::defaultStatus())
|
||||
->native(false)
|
||||
->required()
|
||||
->columnSpan(2),
|
||||
|
||||
Toggle::make('paid')
|
||||
|
||||
@@ -29,6 +29,20 @@ class CardPinOrderForm
|
||||
|
||||
Section::make(__('New card pin order'))
|
||||
->columnSpanFull()
|
||||
->disabled(function (string $context) {
|
||||
if (user()->isSystemUser()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
})
|
||||
->hidden(function (string $context): bool {
|
||||
if (user()->isSystemUser()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $context === 'create';
|
||||
})
|
||||
->components([
|
||||
Select::make('status')
|
||||
->label(__('Status'))
|
||||
|
||||
Reference in New Issue
Block a user