feat: dedicated list view for document batch downloading
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user