489aafed made isContractDue() and isInvoiceDue() take the deadline days,
but teamer/index.html.twig still called them as bare getters, throwing an
ArgumentCountError for every teamer with an upcoming disposition. The
controller now resolves which reason applies and hands it to the template.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
168 lines
8.8 KiB
Twig
168 lines
8.8 KiB
Twig
{% extends 'teamer/layout.html.twig' %}
|
|
|
|
{% block title %}Dashboard{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="flex items-start justify-between pb-4">
|
|
<h1 class="text-2xl font-bold">
|
|
Dashboard
|
|
</h1>
|
|
</div>
|
|
{% if not teamer.photo %}
|
|
{% include '_partials/_toast.html.twig' with { level: 'info', messages: ['Bitte lade ein Foto von dir hoch'] } %}
|
|
{% endif %}
|
|
{% if news is not null %}
|
|
{% set alertType = news.status == 2 ? 'warning' : 'info' %}
|
|
{% include '_partials/_alert.html.twig' with { 'type': alertType, 'message': news.message } %}
|
|
{% endif %}
|
|
<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">
|
|
<h2 class="font-bold text-lg pb-2">
|
|
Meine Bewerbungen
|
|
</h2>
|
|
<ul class="divide-y divide-gray-200">
|
|
{% for application in pendingApplications %}
|
|
{% set assignment = application.assignment %}
|
|
<li class="py-2 first:pt-0 last:pb-0">
|
|
<a href="{{ path('app_teamer_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
|
<div class="flex items-center space-x-1">
|
|
{{ icon('hand', 'w-4 h-4 shrink-0') }}
|
|
<div class="flex items-center space-x-1 truncate">
|
|
<span class="whitespace-nowrap">{{ assignment.destination.dateFrom|date('d.m.y') }} - {{ assignment.destination.dateTo|date('d.m.y') }}</span>
|
|
{% include '_partials/_dot.html.twig' %}
|
|
<span class="whitespace-nowrap">{{ assignment.destination.hotel }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="pl-5 whitespace-nowrap">{{ assignment.jobProfile.name }}</div>
|
|
</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">
|
|
Meine Dokumente
|
|
</h2>
|
|
<ul class="divide-y divide-gray-200">
|
|
{% for document in dispositionDocuments %}
|
|
{% set disposition = document.disposition %}
|
|
{% set assignment = disposition.assignment %}
|
|
<li class="py-2 first:pt-0 last:pb-0">
|
|
<a href="{{ path('app_teamer_disposition_detail', { 'uuid': disposition.uuid }) }}">
|
|
<div class="flex items-center space-x-1">
|
|
{{ icon('alert', 'w-4 h-4 shrink-0') }}
|
|
<div class="flex items-center space-x-1 truncate">
|
|
<span class="whitespace-nowrap">{{ assignment.destination.dateFrom|date('d.m.y') }} - {{ assignment.destination.dateTo|date('d.m.y') }}</span>
|
|
{% include '_partials/_dot.html.twig' %}
|
|
<span class="whitespace-nowrap">{{ assignment.destination.hotel }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="pl-5 whitespace-nowrap text-red-500">
|
|
{%- if document.reason == 'contract_due' -%}
|
|
Honorarvertrag fällig
|
|
{%- elseif document.reason == 'contract_rejected' %}
|
|
Honorarvertrag muss erneut hochgeladen werden
|
|
{%- elseif document.reason == 'invoice_due' -%}
|
|
Honorarnote fällig
|
|
{%- endif %}
|
|
</div>
|
|
</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">
|
|
Mein Feedback
|
|
</h2>
|
|
<ul class="divide-y divide-gray-200">
|
|
{% for feedback in recentFeedback %}
|
|
<li class="py-2 first:pt-0 last:pb-0">
|
|
<button type="button"
|
|
title="Feedback ansehen"
|
|
hx-get="{{ path('app_teamer_feedback', { 'uuid': feedback.uuid }) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
<span class="flex items-center space-x-1">
|
|
{{ icon('feedback', 'w-4 h-4 shrink-0') }}
|
|
<span class="flex items-center space-x-1 truncate">
|
|
<span class="whitespace-nowrap">{{ feedback.createdAt|date('d.m.y') }}</span>
|
|
{% include '_partials/_dot.html.twig' %}
|
|
<span class="whitespace-nowrap">{{ feedback.author }}</span>
|
|
{% include '_partials/_dot.html.twig' %}
|
|
<span class="whitespace-nowrap">{{ feedback.averageRating|format_rating }}</span>
|
|
</span>
|
|
</span>
|
|
<span class="block pl-5">{{ feedback.comment }}</span>
|
|
</button>
|
|
</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">
|
|
Meine Einsätze
|
|
</h2>
|
|
<ul class="divide-y divide-gray-200">
|
|
{% for disposition in upcomingDispositions %}
|
|
{% set assignment = disposition.assignment %}
|
|
<li class="py-2 first:pt-0 last:pb-0">
|
|
<a href="{{ path('app_teamer_disposition_detail', { 'uuid': disposition.uuid }) }}">
|
|
<div class="flex items-center space-x-1">
|
|
{{ icon('check', 'w-4 h-4 shrink-0') }}
|
|
<div class="flex items-center space-x-1 truncate">
|
|
<span class="whitespace-nowrap">{{ assignment.destination.dateFrom|date('d.m.y') }} - {{ assignment.destination.dateTo|date('d.m.y') }}</span>
|
|
{% include '_partials/_dot.html.twig' %}
|
|
<span class="whitespace-nowrap">{{ assignment.destination.hotel }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="pl-5 whitespace-nowrap">{{ assignment.jobProfile.name }}</div>
|
|
</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">
|
|
Mögliche Einsätze
|
|
</h2>
|
|
<ul class="divide-y divide-gray-200">
|
|
{% for assignment in matchingAssignments %}
|
|
<li class="py-2 first:pt-0 last:pb-0">
|
|
<a href="{{ path('app_teamer_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
|
<div class="flex items-center space-x-1 truncate">
|
|
{{ icon('calendar', 'w-4 h-4 shrink-0') }}
|
|
<span class="whitespace-nowrap">{{ assignment.destination.dateFrom|date('d.m.y') }} - {{ assignment.destination.dateTo|date('d.m.y') }}</span>
|
|
{% include '_partials/_dot.html.twig' %}
|
|
<span class="whitespace-nowrap">{{ assignment.destination.hotel }}</span>
|
|
</div>
|
|
<div class="pl-5 whitespace-nowrap">{{ assignment.jobProfile.name }}</div>
|
|
</a>
|
|
</li>
|
|
{% else %}
|
|
<li class="py-2 first:pt-0 last:pb-0">
|
|
-
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|