Action::make('customEdit')
->model(AutomatedSalesJournalEntryHeader::class)
->form([
TableRepeater::make('lines')
->relationship()
->streamlined()
->headers([
Header::make('Account')->width('200px'),
Header::make('Debits')->width('100px'),
Header::make('Credits')->width('100px'),
Header::make('Description')->width('150px'),
])
->schema([
Select::make('account_ref_id')
->required()
->options(fn() => $this->accounts)
TextInput::make('amount')
->required(),
...
])
]),
Action::make('customEdit')
->model(AutomatedSalesJournalEntryHeader::class)
->form([
TableRepeater::make('lines')
->relationship()
->streamlined()
->headers([
Header::make('Account')->width('200px'),
Header::make('Debits')->width('100px'),
Header::make('Credits')->width('100px'),
Header::make('Description')->width('150px'),
])
->schema([
Select::make('account_ref_id')
->required()
->options(fn() => $this->accounts)
TextInput::make('amount')
->required(),
...
])
]),