#104 Customer Report form side panel
This commit is contained in:
parent
4fbb62353a
commit
16e17de6fb
@ -4,7 +4,9 @@
|
||||
|
||||
use App\Enums\IconEnum;
|
||||
use App\Filament\Admin\Resources\InvoiceReportResource\RelationManagers\InvoicesRelationManager;
|
||||
use App\Models\InvoiceReport;
|
||||
use Filament\Forms\Components\DatePicker;
|
||||
use Filament\Forms\Components\Placeholder;
|
||||
use Filament\Forms\Components\Section;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\ToggleButtons;
|
||||
@ -51,7 +53,20 @@ public static function form(Form $form): Form
|
||||
->default(today()),
|
||||
])
|
||||
->columns(2)
|
||||
->columnSpan(3),
|
||||
->columnSpan(2),
|
||||
|
||||
Section::make([
|
||||
Placeholder::make('created_at')
|
||||
->label('Created')
|
||||
->content(fn (InvoiceReport $record): ?string => $record->created_at?->diffForHumans()),
|
||||
|
||||
Placeholder::make('updated_at')
|
||||
->label('Last modified')
|
||||
->content(fn (InvoiceReport $record): ?string => $record->updated_at?->diffForHumans()),
|
||||
])
|
||||
->columnSpan(1)
|
||||
->hidden(fn (?InvoiceReport $record) => $record === null)
|
||||
->extraAttributes(['class' => 'h-full']),
|
||||
])->columns(3);
|
||||
}
|
||||
|
||||
@ -80,7 +95,6 @@ public static function table(Table $table): Table
|
||||
TextColumn::make('balance')
|
||||
->weight(FontWeight::Bold)
|
||||
->money(),
|
||||
// ->getStateUsing(fn (Invoice))
|
||||
])
|
||||
->defaultSort('id', 'desc');
|
||||
}
|
||||
|
@ -7,11 +7,17 @@
|
||||
use Filament\Actions;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
use Illuminate\Contracts\Support\Htmlable;
|
||||
|
||||
class EditInvoice extends EditRecord
|
||||
{
|
||||
protected static string $resource = InvoiceResource::class;
|
||||
|
||||
public function getTitle(): string|Htmlable
|
||||
{
|
||||
return parent::getTitle().' '.$this->record->internal_id;
|
||||
}
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
|
Loading…
x
Reference in New Issue
Block a user