Skip to content

Commit 95cc4cb

Browse files
committed
wip
1 parent 466432f commit 95cc4cb

File tree

2 files changed

+23
-14
lines changed

2 files changed

+23
-14
lines changed

app/Filament/Pages/Matrix.php

+12-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ class Matrix extends Page
2828

2929
public ?string $qrcode;
3030

31+
public function mount(): void
32+
{
33+
$this->form->fill();
34+
}
35+
3136
protected function getHeaderActions(): array
3237
{
3338
return [
@@ -45,7 +50,12 @@ public function form(Form $form): Form
4550
->schema([
4651
MatrixAlias::make('options')
4752
// ->disabled()
48-
->disableOptionWhen(fn (string $value): bool => $value === 'm' || $value === 'p' || $value === 'users')
53+
->formatStateUsing(fn() => [
54+
'companies' => ['c' => true],
55+
'clients' => ['m' => true, 'p' => true],
56+
])
57+
->disableOptionWhen(fn(string $value
58+
): bool => $value === 'm' || $value === 'p' || $value === 'users')
4959
->rowSelectRequired(false)
5060
->helperText('you can disable any options, like in the users row, the Manage and Approve are disabled')
5161
->label('Resources Operations')
@@ -65,9 +75,8 @@ public function form(Form $form): Form
6575
]),
6676

6777
MatrixAlias::make('question1')
68-
->disableOptionWhen(fn (string $value): bool => $value === 0)
78+
->disableOptionWhen(fn(string $value): bool => $value === 0)
6979
->rowSelectRequired(false)
70-
7180
->label('Tell us about your mod')
7281
->asCheckbox()
7382
->columnData([

composer.lock

+11-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)