improve ui

This commit is contained in:
2024-11-04 17:40:43 +05:00
parent 54043d42aa
commit 65e06200e2
2 changed files with 22 additions and 5 deletions

View File

@@ -6,21 +6,40 @@ use App\Filament\Resources\PaymentOrder\PaymentOrderResource;
use App\Filament\Resources\PaymentOrder\PaymentOrderResource\Actions\ExportToWord; use App\Filament\Resources\PaymentOrder\PaymentOrderResource\Actions\ExportToWord;
use Filament\Actions; use Filament\Actions;
use Filament\Actions\Action; use Filament\Actions\Action;
use Filament\Pages\Actions\DeleteAction;
use Filament\Resources\Pages\EditRecord; use Filament\Resources\Pages\EditRecord;
class EditPaymentOrder extends EditRecord class EditPaymentOrder extends EditRecord
{ {
protected static string $resource = PaymentOrderResource::class; protected static string $resource = PaymentOrderResource::class;
protected function getHeaderActions(): array protected function getActions(): array
{ {
return [ return [
Actions\DeleteAction::make() Action::make('Go back')
->icon('heroicon-m-trash'), ->url($this->getResource()::getUrl('index'))
->icon('heroicon-m-arrow-uturn-left')
->button()
->outlined()
->color('primary'),
Action::make('Save')
->action('save')
->keyBindings(['mod+s'])
->icon('heroicon-m-cloud-arrow-up'),
Action::make('ExportToWord') Action::make('ExportToWord')
->icon('heroicon-m-document-arrow-down') ->icon('heroicon-m-document-arrow-down')
->color('gray')
->action(fn () => ExportToWord::make($this->getRecord())->handle()->download()), ->action(fn () => ExportToWord::make($this->getRecord())->handle()->download()),
DeleteAction::make()
->icon('heroicon-m-trash'),
]; ];
} }
protected function getFormActions(): array
{
return []; // necessary to remove the bottom actions
}
} }

View File

@@ -136,8 +136,6 @@ function getLatestNumber(string $tableName = 'incoming_letters', string $column
/** /**
* Written format of money in turkmen * Written format of money in turkmen
*
* @param string $money
*/ */
function moneyFormatInTurkmenLetter(string $money): string function moneyFormatInTurkmenLetter(string $money): string
{ {