feat: dedicated list view for document batch downloading

This commit is contained in:
Björn Fromme
2025-02-01 11:42:21 +01:00
parent 3f839f9082
commit 24c8c46ca4
7 changed files with 195 additions and 18 deletions
+21 -3
View File
@@ -80,12 +80,21 @@ class UploadRepository extends ServiceEntityRepository
return $data;
}
public function getBatchDownloadList(
public function getBatchDownloadListQuery(
string $type = Upload::TYPE_INVOICE,
string $status = Upload::STATUS_PAID
): array {
): Query {
$qb = $this->createQueryBuilder('upload');
$qb
->select('upload', 'disposition', 'assignment', 'job_profile', 'destination', 'teamer')
->innerJoin('upload.disposition', 'disposition')
->innerJoin('disposition.assignment', 'assignment')
->innerJoin('assignment.jobProfile', 'job_profile')
->innerJoin('assignment.destination', 'destination')
->innerJoin('disposition.teamer', 'teamer')
;
return $qb->where(
$qb->expr()->andX(
$qb->expr()->eq('upload.type', ':type'),
@@ -95,10 +104,19 @@ class UploadRepository extends ServiceEntityRepository
->setParameter('type', $type)
->setParameter('status', $status)
->getQuery()
->getResult()
;
}
public function getBatchDownloadList(
string $type = Upload::TYPE_INVOICE,
string $status = Upload::STATUS_PAID
): array {
return $this
->getBatchDownloadListQuery($type, $status)
->getResult()
;
}
public function getUploadListQuery(DocumentFilterDto $filterDto): Query
{
$qb = $this->createQueryBuilder('upload');