Skip to content

Commit cd05b95

Browse files
committed
Fix remaining field slugs
1 parent 19610a8 commit cd05b95

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/Enums/Field.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ enum Field: string
1212
case Checkbox = 'checkbox';
1313
case CheckboxList = 'checkbox-list';
1414
case Color = 'color';
15-
case DateTime = 'datetime';
15+
case DateTime = 'date-time';
1616
case File = 'file-upload';
1717
case Hidden = 'hidden';
1818
case KeyValue = 'key-value';

src/Fields/Repeater.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Repeater extends Base implements FieldContract
4040
'radio' => Radio::class,
4141
'toggle' => Toggle::class,
4242
'color' => Color::class,
43-
'datetime' => DateTime::class,
43+
'date-time' => DateTime::class,
4444
];
4545

4646
public static function getDefaultConfig(): array
@@ -111,15 +111,15 @@ public function getForm(): array
111111
Forms\Components\Toggle::make('config.reorderableWithButtons')
112112
->label(__('Reorderable with buttons'))
113113
->dehydrated()
114-
->disabled(fn (Forms\Get $get): bool => $get('config.reorderable') === false)
114+
->disabled(fn(Forms\Get $get): bool => $get('config.reorderable') === false)
115115
->inline(false),
116116
]),
117117
Forms\Components\Toggle::make('config.collapsible')
118118
->label(__('Collapsible'))
119119
->inline(false),
120120
Forms\Components\Toggle::make('config.collapsed')
121121
->label(__('Collapsed'))
122-
->visible(fn (Forms\Get $get): bool => $get('config.collapsible') === true)
122+
->visible(fn(Forms\Get $get): bool => $get('config.collapsible') === true)
123123
->inline(false),
124124
Forms\Components\Toggle::make('config.cloneable')
125125
->label(__('Cloneable'))
@@ -138,9 +138,9 @@ public function getForm(): array
138138
->live(debounce: 250)
139139
->labelKey('name')
140140
->maxDepth(0)
141-
->addable(fn (string $operation) => $operation !== 'create')
142-
->disabled(fn (string $operation) => $operation === 'create')
143-
->hint(fn (string $operation) => $operation === 'create' ? __('Fields can be added once the field is created.') : '')
141+
->addable(fn(string $operation) => $operation !== 'create')
142+
->disabled(fn(string $operation) => $operation === 'create')
143+
->hint(fn(string $operation) => $operation === 'create' ? __('Fields can be added once the field is created.') : '')
144144
->hintColor('primary')
145145
->form([
146146
Section::make('Field')
@@ -155,7 +155,7 @@ public function getForm(): array
155155
->required()
156156
->placeholder(__('Name'))
157157
->live(debounce: 250)
158-
->afterStateUpdated(fn (Set $set, ?string $state) => $set('slug', Str::slug($state))),
158+
->afterStateUpdated(fn(Set $set, ?string $state) => $set('slug', Str::slug($state))),
159159
TextInput::make('slug')
160160
->readonly(),
161161
Select::make('field_type')
@@ -185,10 +185,10 @@ function () {
185185
])->columnSpanFull(),
186186
Section::make('Configuration')
187187
->columns(3)
188-
->schema(fn (Get $get) => $this->getFieldTypeFormSchema(
188+
->schema(fn(Get $get) => $this->getFieldTypeFormSchema(
189189
$get('field_type')
190190
))
191-
->visible(fn (Get $get) => filled($get('field_type'))),
191+
->visible(fn(Get $get) => filled($get('field_type'))),
192192
]),
193193
])->columns(2),
194194
])->columnSpanFull(),

0 commit comments

Comments
 (0)