->actions([
Action::make('attachments')
->label(fn($record) => 'Attachments (' . $record->attachments->count() . ')')
->icon('heroicon-o-paper-clip')
->fillForm(fn(Product $record): array => [
'attachments' => $record->attachments
])
->modalHeading('Product Attachments toevoegen')
->modalDescription('Attachments zijn toevoegingen aan je product. Denk hierbij aan sloten, bekleden met stof of ander materiaal/opties die je aan de kist zou kunnen toevoegen. Heb je vragen over attachments? Bel ons dan op.')
->modalIcon('heroicon-o-link')
->modalSubmitActionLabel('Toevoegen')
->form(
AttachmentRelationResources::getAttachmentRepeaterForm()
)
->hidden(fn($livewire) => in_array($livewire->ownerRecord->status->name, ['ACCEPTED', 'PRODUCTION', 'TO_INVOICE', 'INVOICED', 'CANCELLED']))
->slideOver()
])
->actions([
Action::make('attachments')
->label(fn($record) => 'Attachments (' . $record->attachments->count() . ')')
->icon('heroicon-o-paper-clip')
->fillForm(fn(Product $record): array => [
'attachments' => $record->attachments
])
->modalHeading('Product Attachments toevoegen')
->modalDescription('Attachments zijn toevoegingen aan je product. Denk hierbij aan sloten, bekleden met stof of ander materiaal/opties die je aan de kist zou kunnen toevoegen. Heb je vragen over attachments? Bel ons dan op.')
->modalIcon('heroicon-o-link')
->modalSubmitActionLabel('Toevoegen')
->form(
AttachmentRelationResources::getAttachmentRepeaterForm()
)
->hidden(fn($livewire) => in_array($livewire->ownerRecord->status->name, ['ACCEPTED', 'PRODUCTION', 'TO_INVOICE', 'INVOICED', 'CANCELLED']))
->slideOver()
])