wip
This commit is contained in:
@@ -32,7 +32,7 @@ class DownloadCardTransaction extends Action
|
||||
* Perform the action on the given models.
|
||||
*
|
||||
* @param \Laravel\Nova\Fields\ActionFields $fields
|
||||
* @param \Illuminate\Support\Collection $models
|
||||
* @param \Illuminate\Support\Collection<array-key, \Illuminate\Database\Eloquent\Model> $models
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle(ActionFields $fields, Collection $models)
|
||||
@@ -77,17 +77,19 @@ class DownloadCardTransaction extends Action
|
||||
* Get the fields available on the action.
|
||||
*
|
||||
* @param \Laravel\Nova\Http\Requests\NovaRequest $request
|
||||
* @return array
|
||||
* @return array<int, \Laravel\Nova\Fields\Field>
|
||||
*/
|
||||
public function fields(NovaRequest $request): array
|
||||
{
|
||||
return [
|
||||
Date::make(__('Start date'), 'start_date')
|
||||
->default(date('Y-m-d', strtotime('-6 months')))
|
||||
->fullWidth()
|
||||
->rules('required'),
|
||||
|
||||
Date::make(__('End date'), 'end_date')
|
||||
->default(date('Y-m-d'))
|
||||
->fullWidth()
|
||||
->rules('required'),
|
||||
];
|
||||
}
|
||||
@@ -101,6 +103,8 @@ class DownloadCardTransaction extends Action
|
||||
* @param string $card_expire_date
|
||||
* @param string $start_date
|
||||
* @param string $end_date
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function fetchApi(
|
||||
string $passport_serie,
|
||||
@@ -140,7 +144,7 @@ class DownloadCardTransaction extends Action
|
||||
* @param ResponseTypes\AzatApiClientInfoAllResponse $data
|
||||
* @param string $fileDest
|
||||
*/
|
||||
public function generateFile($data, $fileDest)
|
||||
public function generateFile($data, $fileDest): void
|
||||
{
|
||||
$mpdf = new Mpdf;
|
||||
|
||||
@@ -159,7 +163,7 @@ class DownloadCardTransaction extends Action
|
||||
/**
|
||||
* @param ResponseTypes\AzatApiClientInfoAllResponse $data
|
||||
*/
|
||||
public function getExtraVariables($data)
|
||||
public function getExtraVariables($data): object
|
||||
{
|
||||
if (count($data->transactions) < 1) {
|
||||
return emptyClass(basdakyGalyndy: 0, ahyrkyGalyndy: 0, girdeji: 0, cykdajy: 0);
|
||||
|
||||
Reference in New Issue
Block a user