wip
This commit is contained in:
@@ -20,16 +20,16 @@ class CardTransactionRepository
|
||||
/**
|
||||
* Download card transaction
|
||||
*
|
||||
* @param array{start_date: string, end_date: string} $data
|
||||
* @param array<inst, string>|array{start_date: string, end_date: string} $data
|
||||
*/
|
||||
public function downloadCardTransaction(array $data, Card $record, Component $livewire)
|
||||
public function downloadCardTransaction(array $data, Card $record, Component $livewire): null
|
||||
{
|
||||
$start_date = Carbon::create($data['start_date']);
|
||||
$end_date = Carbon::create($data['end_date']);
|
||||
$start_date = new Carbon($data['start_date']);
|
||||
$end_date = new Carbon($data['end_date']);
|
||||
|
||||
$apiResponse = $this->fetchApi(
|
||||
passport_serie: user()->getOption('passport_serie') ?? 'I',
|
||||
passport_id: user()->getOption('passport_id') ?? '909090',
|
||||
passport_serie: user()->passport_serie(),
|
||||
passport_id: user()->passport_id(),
|
||||
card_number_masked: Str::mask($record->number, '*', 6, 6),
|
||||
card_expire_date: $record->month.'/'.substr($record->year, 2),
|
||||
start_date: $start_date->format('d.m.Y'),
|
||||
@@ -47,7 +47,7 @@ class CardTransactionRepository
|
||||
->title($response->message)
|
||||
->send();
|
||||
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
$url = $this->generateFileUrl($record, $response);
|
||||
@@ -55,6 +55,7 @@ class CardTransactionRepository
|
||||
// Tell Livewire to open it in a new tab
|
||||
$livewire->js("window.open('{$url}', '_blank')");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user