wip
This commit is contained in:
@@ -158,7 +158,7 @@ class CardResource extends Resource
|
||||
->icon('heroicon-o-document-text')
|
||||
->requiresConfirmation()
|
||||
->modalIcon('heroicon-o-document-text')
|
||||
->action(fn (Card $record, Component $livewire) => CardRequisiteRepository::make()->downloadCardRequisite($record, $livewire)),
|
||||
->action(fn (Card $record) => CardRequisiteRepository::make()->downloadCardRequisite($record)),
|
||||
|
||||
EditAction::make()
|
||||
->label(''),
|
||||
|
||||
@@ -9,14 +9,16 @@ use Filament\Notifications\Notification;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
use Livewire\Component;
|
||||
use PhpOffice\PhpWord\TemplateProcessor;
|
||||
|
||||
class CardRequisiteRepository
|
||||
{
|
||||
use Makeable;
|
||||
|
||||
public function downloadCardRequisite(Card $record, Component $livewire): ?\Symfony\Component\HttpFoundation\BinaryFileResponse
|
||||
/**
|
||||
* Download card requisite
|
||||
*/
|
||||
public function downloadCardRequisite(Card $record): ?\Symfony\Component\HttpFoundation\BinaryFileResponse
|
||||
{
|
||||
/** @var \App\Modules\CardTransaction\Types\CardTransactionResponse */
|
||||
$response = $this->fetchApi($record);
|
||||
|
||||
Reference in New Issue
Block a user