Auto commit for release 'develop' on 2024-02-12

This commit is contained in:
github-actions
2024-02-12 01:29:15 +01:00
parent fded058ea6
commit 5c352a0d3e
501 changed files with 3011 additions and 17090 deletions

View File

@@ -37,23 +37,22 @@ class TransactionController extends Controller
{
public function listByCount(ListByCountRequest $request): JsonResponse
{
// collect transactions:
$pageSize = $this->parameters->get('limit');
$page = $request->getPage();
$page = max($page, 1);
$pageSize = $this->parameters->get('limit');
$page = $request->getPage();
$page = max($page, 1);
/** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class);
$collector->setUserGroup(auth()->user()->userGroup)
->withAPIInformation()
->setStartRow($request->getStartRow())
->setEndRow($request->getEndRow())
->setTypes($request->getTransactionTypes());
->withAPIInformation()
->setStartRow($request->getStartRow())
->setEndRow($request->getEndRow())
->setTypes($request->getTransactionTypes())
;
$start = $this->parameters->get('start');
$end = $this->parameters->get('end');
$start = $this->parameters->get('start');
$end = $this->parameters->get('end');
if (null !== $start) {
$collector->setStart($start);
}
@@ -76,27 +75,28 @@ class TransactionController extends Controller
return response()
->json($this->jsonApiList('transactions', $paginator, new TransactionGroupTransformer()))
->header('Content-Type', self::CONTENT_TYPE);
->header('Content-Type', self::CONTENT_TYPE)
;
}
public function list(ListRequest $request): JsonResponse
{
// collect transactions:
$pageSize = $this->parameters->get('limit');
$page = $request->getPage();
$page = max($page, 1);
$pageSize = $this->parameters->get('limit');
$page = $request->getPage();
$page = max($page, 1);
/** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class);
$collector->setUserGroup(auth()->user()->userGroup)
->withAPIInformation()
->setLimit($pageSize)
->setPage($page)
->setTypes($request->getTransactionTypes());
->withAPIInformation()
->setLimit($pageSize)
->setPage($page)
->setTypes($request->getTransactionTypes())
;
$start = $this->parameters->get('start');
$end = $this->parameters->get('end');
$start = $this->parameters->get('start');
$end = $this->parameters->get('end');
if (null !== $start) {
$collector->setStart($start);
}

View File

@@ -61,15 +61,14 @@ class GroupCollector implements GroupCollectorInterface
*/
public function __construct()
{
$this->postFilters = [];
$this->tags = [];
$this->user = null;
$this->userGroup = null;
$this->limit = null;
$this->page = null;
$this->startRow = null;
$this->endRow = null;
$this->postFilters = [];
$this->tags = [];
$this->user = null;
$this->userGroup = null;
$this->limit = null;
$this->page = null;
$this->startRow = null;
$this->endRow = null;
$this->hasAccountInfo = false;
$this->hasCatInformation = false;
@@ -495,6 +494,7 @@ class GroupCollector implements GroupCollectorInterface
}
if(null !== $this->startRow && null !== $this->endRow) {
$total = (int)($this->endRow - $this->startRow);
return new LengthAwarePaginator($set, $this->total, $total, 1);
}
@@ -689,6 +689,20 @@ class GroupCollector implements GroupCollectorInterface
return $this;
}
public function setEndRow(int $endRow): self
{
$this->endRow = $endRow;
return $this;
}
public function setStartRow(int $startRow): self
{
$this->startRow = $startRow;
return $this;
}
private function getCollectedGroupIds(): array
{
return $this->query->get(['transaction_journals.transaction_group_id'])->pluck('transaction_group_id')->toArray();
@@ -1070,20 +1084,7 @@ class GroupCollector implements GroupCollectorInterface
->orderBy('transaction_journals.order', 'ASC')
->orderBy('transaction_journals.id', 'DESC')
->orderBy('transaction_journals.description', 'DESC')
->orderBy('source.amount', 'DESC');
->orderBy('source.amount', 'DESC')
;
}
public function setEndRow(int $endRow): self
{
$this->endRow = $endRow;
return $this;
}
public function setStartRow(int $startRow): self
{
$this->startRow = $startRow;
return $this;
}
}