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