feat: sort documents by status 'new' on initial render
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@
|
|||||||
"ext-ctype": "*",
|
"ext-ctype": "*",
|
||||||
"ext-iconv": "*",
|
"ext-iconv": "*",
|
||||||
"ext-simplexml": "*",
|
"ext-simplexml": "*",
|
||||||
"beberlei/doctrineextensions": "^1.3",
|
"beberlei/doctrineextensions": "^1.5",
|
||||||
"doctrine/doctrine-bundle": "^2.10",
|
"doctrine/doctrine-bundle": "^2.10",
|
||||||
"doctrine/doctrine-migrations-bundle": "^3.2",
|
"doctrine/doctrine-migrations-bundle": "^3.2",
|
||||||
"doctrine/orm": "^2.15",
|
"doctrine/orm": "^2.15",
|
||||||
|
|||||||
Generated
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "18ff369a6df51ed294b3946625466f92",
|
"content-hash": "1e48d4a4ffe643c14cf370b7083adddb",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "beberlei/doctrineextensions",
|
"name": "beberlei/doctrineextensions",
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ doctrine:
|
|||||||
dql:
|
dql:
|
||||||
string_functions:
|
string_functions:
|
||||||
DATE_FORMAT: DoctrineExtensions\Query\Mysql\DateFormat
|
DATE_FORMAT: DoctrineExtensions\Query\Mysql\DateFormat
|
||||||
|
FIELD: DoctrineExtensions\Query\Mysql\Field
|
||||||
datetime_functions:
|
datetime_functions:
|
||||||
DATEDIFF: DoctrineExtensions\Query\Mysql\DateDiff
|
DATEDIFF: DoctrineExtensions\Query\Mysql\DateDiff
|
||||||
when@test:
|
when@test:
|
||||||
|
|||||||
@@ -30,11 +30,7 @@ class IndexController extends AbstractController
|
|||||||
$pagination = $this->paginator->paginate(
|
$pagination = $this->paginator->paginate(
|
||||||
$query,
|
$query,
|
||||||
$request->query->getInt('page', 1),
|
$request->query->getInt('page', 1),
|
||||||
10,
|
10
|
||||||
[
|
|
||||||
'defaultSortFieldName' => 'upload.createdAt',
|
|
||||||
'defaultSortDirection' => 'asc',
|
|
||||||
]
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return $this->render('administrative/document/index.html.twig', [
|
return $this->render('administrative/document/index.html.twig', [
|
||||||
|
|||||||
@@ -89,6 +89,9 @@ class UploadRepository extends ServiceEntityRepository
|
|||||||
->innerJoin('assignment.jobProfile', 'job_profile')
|
->innerJoin('assignment.jobProfile', 'job_profile')
|
||||||
->innerJoin('assignment.destination', 'destination')
|
->innerJoin('assignment.destination', 'destination')
|
||||||
->innerJoin('disposition.teamer', 'teamer')
|
->innerJoin('disposition.teamer', 'teamer')
|
||||||
|
->addOrderBy('FIELD(upload.status, :new, :checked)', 'ASC')
|
||||||
|
->setParameter('new', Upload::STATUS_NEW)
|
||||||
|
->setParameter('checked', Upload::STATUS_CHECKED)
|
||||||
->getQuery()
|
->getQuery()
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
{{ knp_pagination_sortable(pagination, 'Teamer:in', 'teamer.lastName') }}
|
{{ knp_pagination_sortable(pagination, 'Teamer:in', 'teamer.lastName') }}
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
{{ knp_pagination_sortable(pagination, 'Status', 'disposition.status') }}
|
{{ knp_pagination_sortable(pagination, 'Status', 'upload.status') }}
|
||||||
</th>
|
</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user