return $form
->schema([
Forms\Components\TextInput::make('location')
->required()
->maxLength(255),
Forms\Components\Fieldset::make('User Information')
->relationship('user', 'name')
->schema([
Forms\Components\TextInput::make('name')
->disabled(fn ($livewire) => $livewire instanceof EditRecord)
])->hidden(fn ($livewire) => $livewire instanceof CreateRecord),
Forms\Components\DatePicker::make('date')
->required(),
Forms\Components\TimePicker::make('time')
->required(),
Forms\Components\FileUpload::make('attachments')
->image()
->maxFiles(10)
->multiple()->downloadable(),
Forms\Components\Textarea::make('description')
->required()
->columnSpanFull(),
Forms\Components\Textarea::make('corrective_action')
->columnSpanFull(),
]);
}
return $form
->schema([
Forms\Components\TextInput::make('location')
->required()
->maxLength(255),
Forms\Components\Fieldset::make('User Information')
->relationship('user', 'name')
->schema([
Forms\Components\TextInput::make('name')
->disabled(fn ($livewire) => $livewire instanceof EditRecord)
])->hidden(fn ($livewire) => $livewire instanceof CreateRecord),
Forms\Components\DatePicker::make('date')
->required(),
Forms\Components\TimePicker::make('time')
->required(),
Forms\Components\FileUpload::make('attachments')
->image()
->maxFiles(10)
->multiple()->downloadable(),
Forms\Components\Textarea::make('description')
->required()
->columnSpanFull(),
Forms\Components\Textarea::make('corrective_action')
->columnSpanFull(),
]);
}