mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 12:33:56 +00:00
58 lines
1.7 KiB
PHP
58 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Accounting\ControllersLogic;
|
|
|
|
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
|
use App\Classes\Modules\Accounting\Services\FetchesStatementTransaction;
|
|
use App\Http\Resources\BankStatementTransactionResource;
|
|
use Carbon\Carbon;
|
|
use Illuminate\Http\JsonResponse;
|
|
use Illuminate\Http\Request;
|
|
|
|
|
|
class UpdateStatementTransactionStatusLogic extends AbstractControllerLogic
|
|
{
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function notification(): array
|
|
{
|
|
return [
|
|
'title' => 'Update Statement Transaction Status',
|
|
'message' => 'You have successfully updated the Statement Transation Status'
|
|
];
|
|
}
|
|
|
|
/** @var FetchesStatementTransaction */
|
|
private $fetchesStatementTransaction;
|
|
|
|
/**
|
|
* UpdateAnnouncementLogic constructor.
|
|
* @param FetchesStatementTransaction $fetchesStatementTransaction
|
|
*/
|
|
public function __construct(
|
|
FetchesStatementTransaction $fetchesStatementTransaction
|
|
) {
|
|
$this->fetchesStatementTransaction = $fetchesStatementTransaction;
|
|
}
|
|
|
|
/**
|
|
* @param Request $request
|
|
* @return JsonResponse
|
|
* @throws \App\Classes\Exceptions\AccessForbiddenException
|
|
* @throws \App\Classes\Exceptions\MalformedRequestException
|
|
* @throws \App\Classes\Exceptions\RequestValidationException
|
|
*/
|
|
public function logic(Request $request): JsonResponse
|
|
{
|
|
$statementTrasaction = $this->fetchesStatementTransaction->execute(['id' => $request->route('id')]);
|
|
|
|
$statementTrasactionOwner = $statementTrasaction->owner->first();
|
|
|
|
dd($statementTrasactionOwner);
|
|
|
|
return $this->resourceResponse(new BankStatementTransactionResource($statementTrasaction));
|
|
}
|
|
}
|