mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
df4fd497a6
- SECURITY PATCH
59 lines
2.0 KiB
PHP
59 lines
2.0 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Accounting\ControllersLogic;
|
|
|
|
use App\Classes\Modules\Accounting\Standards\Rules\CanViewHistoryImportedTransactionMapped;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\JsonResponse;
|
|
use App\Http\Resources\TransactionMappingLogResource;
|
|
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
|
use App\Classes\Modules\Accounting\Services\ListTransactionMappingLogs;
|
|
|
|
|
|
class HistoryImportedTransactionMappedControllerLogic extends AbstractControllerLogic
|
|
{
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function notification(): array
|
|
{
|
|
return [
|
|
'title' => 'Retrieved History Imported Invoices',
|
|
'message' => 'You have successfully retrieved history imported invoices'
|
|
];
|
|
}
|
|
|
|
/** @var ListTransactionMappingLogs */
|
|
private $listTransactionMappingLogs;
|
|
|
|
/** @var CanViewHistoryImportedTransactionMapped */
|
|
private $canViewHistoryImportedTransactionMapped;
|
|
|
|
/**
|
|
* UpdateAnnouncementLogic constructor.
|
|
* @param ListTransactionMappingLogs $listTransactionMappingLogs
|
|
* @param CanViewHistoryImportedTransactionMapped $canViewHistoryImportedTransactionMapped
|
|
*/
|
|
public function __construct(
|
|
ListTransactionMappingLogs $listTransactionMappingLogs,
|
|
CanViewHistoryImportedTransactionMapped $canViewHistoryImportedTransactionMapped
|
|
) {
|
|
$this->listTransactionMappingLogs = $listTransactionMappingLogs;
|
|
$this->canViewHistoryImportedTransactionMapped = $canViewHistoryImportedTransactionMapped;
|
|
}
|
|
|
|
/**
|
|
* @param Request $request
|
|
* @return JsonResponse
|
|
*/
|
|
public function logic(Request $request): JsonResponse
|
|
{
|
|
$this->canViewHistoryImportedTransactionMapped->passes();
|
|
|
|
$query = $this->listTransactionMappingLogs->execute($this->listTransactionMappingLogs->deserializeFilters($request->input('filters')));
|
|
|
|
return $this->collectionResponse(TransactionMappingLogResource::collection($query));
|
|
}
|
|
}
|