feat: new dispositions widget on admin dashboard
This commit is contained in:
@@ -42,7 +42,9 @@ class IndexController extends AbstractController
|
||||
$newDocumentsCount = $uploadRepository->getCountByStatus(Upload::STATUS_NEW);
|
||||
$pendingDocumentsCount = $uploadRepository->getCountByStatus(Upload::STATUS_PENDING);
|
||||
|
||||
$overdueContracts = $this->entityManager->getRepository(Disposition::class)->findOverdueContracts();
|
||||
$dispositionRepository = $this->entityManager->getRepository(Disposition::class);
|
||||
$overdueContracts = $dispositionRepository->findOverdueContracts();
|
||||
$newDispositions = $dispositionRepository->getNew();
|
||||
|
||||
return $this->render('admin/index.html.twig', [
|
||||
'applications' => $applications,
|
||||
@@ -56,6 +58,7 @@ class IndexController extends AbstractController
|
||||
'newDocumentsCount' => $newDocumentsCount,
|
||||
'pendingDocumentsCount' => $pendingDocumentsCount,
|
||||
'overdueContracts' => $overdueContracts,
|
||||
'newDispositions' => $newDispositions,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{% set assignment = disposition.assignment %}
|
||||
<span class="whitespace-nowrap">{{ disposition.teamer.fullName(true) }}</span>
|
||||
{% include '_partials/_dot.html.twig' %}
|
||||
<span class="whitespace-nowrap">{{ assignment.effectivePeriod.start|date('d.m.y') }} - {{ assignment.effectivePeriod.end|date('d.m.y') }}</span>
|
||||
{% include '_partials/_dot.html.twig' %}
|
||||
<span class="whitespace-nowrap">{{ assignment.destination.hotel }}</span>
|
||||
{% include '_partials/_dot.html.twig' %}
|
||||
<span class="whitespace-nowrap">{{ assignment.jobProfile.name }}</span>
|
||||
@@ -36,6 +36,26 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="bg-gray-100 border border-gray-200 rounded-md px-4 py-2">
|
||||
<h2 class="font-bold text-lg pb-2">
|
||||
Neue Einteilungen
|
||||
</h2>
|
||||
<ul class="divide-y divide-gray-200">
|
||||
{% for disposition in newDispositions %}
|
||||
{% set assignment = disposition.assignment %}
|
||||
<li class="py-2 first:pt-0 last:pb-0">
|
||||
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid }) }}" class="flex items-center space-x-1 truncate">
|
||||
{{ icon('hand', 'w-4 h-4 shrink-0') }}
|
||||
{% include '_partials/_disposition_data.html.twig' with { 'disposition': disposition } %}
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="py-2 first:pt-0 last:pb-0">
|
||||
-
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="bg-gray-100 border border-gray-200 rounded-md px-4 py-2">
|
||||
<h2 class="font-bold text-lg pb-2">
|
||||
Neue Dokumente
|
||||
|
||||
@@ -1,16 +1,5 @@
|
||||
{% extends 'manager/layout.html.twig' %}
|
||||
|
||||
{% macro dispositionData(disposition) %}
|
||||
{% set assignment = disposition.assignment %}
|
||||
<span class="whitespace-nowrap">{{ disposition.teamer.fullName(true) }}</span>
|
||||
{% include '_partials/_dot.html.twig' %}
|
||||
<span class="whitespace-nowrap">{{ assignment.effectivePeriod.start|date('d.m.y') }} - {{ assignment.effectivePeriod.end|date('d.m.y') }}</span>
|
||||
{% include '_partials/_dot.html.twig' %}
|
||||
<span class="whitespace-nowrap">{{ assignment.destination.hotel }}</span>
|
||||
{% include '_partials/_dot.html.twig' %}
|
||||
<span class="whitespace-nowrap">{{ assignment.jobProfile.name }}</span>
|
||||
{% endmacro %}
|
||||
|
||||
{% block content %}
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
||||
<div class="bg-gray-100 border border-gray-200 rounded-md px-4 py-2">
|
||||
@@ -53,7 +42,7 @@
|
||||
<li class="py-2 first:pt-0 last:pb-0">
|
||||
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid }) }}" class="flex items-center space-x-1 truncate">
|
||||
{{ icon('hand', 'w-4 h-4 shrink-0') }}
|
||||
{{ _self.dispositionData(disposition) }}
|
||||
{% include '_partials/_disposition_data.html.twig' with { 'disposition': disposition } %}
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
|
||||
Reference in New Issue
Block a user