Feat: Enable bookmark toggling from overview, improve disposition detail
This commit is contained in:
@@ -43,6 +43,7 @@ class IndexController extends AbstractController
|
||||
);
|
||||
|
||||
return $this->render('teamer/bookmark/index.html.twig', [
|
||||
'teamer' => $teamer,
|
||||
'pagination' => $pagination,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -85,6 +85,11 @@ class Upload implements BlameableEntityInterface, TimestampableEntityInterface
|
||||
return $instance;
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
return $this->getDisplayName() ?? $this->getOriginalFilename();
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</h1>
|
||||
<div class="grid sm:grid-cols-2 md:grid-cols-3 gap-4 pb-4">
|
||||
{% for assignment in pagination %}
|
||||
<div class="flex flex-col justify-between rounded-md border border-gray-200 bg-gray-100 p-4">
|
||||
<div class="relative flex flex-col justify-between rounded-md border border-gray-200 bg-gray-100 p-4">
|
||||
<div class="flex flex-col space-y-2 pb-2">
|
||||
<div class="flex items-start space-x-2">
|
||||
{{ icon('flag-' ~ assignment.destination.country, 'w-5 h-5 shrink-0') }}
|
||||
@@ -56,6 +56,12 @@
|
||||
<span>{{ label }}</span>
|
||||
</a>
|
||||
</div>
|
||||
{% set isBookmarked = teamer.bookmarks.contains(assignment) %}
|
||||
<a href="{{ path('app_teamer_bookmark_toggle', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
|
||||
class="absolute top-0 right-0 mt-2 mr-2"
|
||||
title="{{ isBookmarked ? 'Von der Merkliste löschen' : 'Auf die Merkliste setzen' }}">
|
||||
{{ icon('star', html_classes('w-5 h-5', { 'text-yellow-500': isBookmarked, 'text-gray-200': not isBookmarked } )) }}
|
||||
</a>
|
||||
</div>
|
||||
{% else %}
|
||||
... ist leer
|
||||
|
||||
-3
@@ -31,9 +31,6 @@
|
||||
{{ icon('info', 'w-4 h-4 shrink-0') }}
|
||||
<span>Details</span>
|
||||
</a>
|
||||
{% if teamer.bookmarks.contains(assignment) %}
|
||||
{{ icon('star', 'w-5 h-5 text-yellow-500 absolute top-0 right-0 mt-2 mr-2') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -10,35 +10,62 @@
|
||||
{% endmacro %}
|
||||
|
||||
{% block content %}
|
||||
{% set assignment = disposition.assignment %}
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
Einsatzdetails
|
||||
</h1>
|
||||
<div class="grid lg:grid-cols-2 gap-8 items-start">
|
||||
<div class="bg-gray-100 rounded-md p-4">
|
||||
{% set assignment = disposition.assignment %}
|
||||
{% include '_partials/_assignment_info.html.twig' %}
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="text-2xl font-bold pb-8">
|
||||
<h2 class="text-xl font-bold pb-4">
|
||||
Dein Einsatz wurde bestätigt!
|
||||
</h2>
|
||||
<p class="pb-4">
|
||||
<div class="pb-2">
|
||||
Dein Ansprechpartner für alle reisebezogenen Themen ist:
|
||||
<br>
|
||||
{{ assignment.contact }}, <a href="mailto:{{ assignment.contact.email }}" class="underline">{{ assignment.contact.email }}</a>
|
||||
</p>
|
||||
<p class="pb-4">
|
||||
<a href="{{ path('app_teamer_disposition_ics', { 'uuid': disposition.uuid }) }}" class="underline">
|
||||
Hier kannst du den Einsatz in deinen Kalender eintragen (ICS).
|
||||
</div>
|
||||
<div class="pb-4">
|
||||
<strong>{{ assignment.contact }}</strong>, <a href="mailto:{{ assignment.contact.email }}" class="underline">{{ assignment.contact.email }}</a>
|
||||
</div>
|
||||
<div class="pb-4">
|
||||
<a href="{{ path('app_teamer_disposition_ics', { 'uuid': disposition.uuid }) }}"
|
||||
title="In den Kalender eintragen"
|
||||
class="group">
|
||||
<div class="flex items-center justify-between">
|
||||
<span class="flex-1">Klicke hier, um den Einsatz in deinen Kalender einzutragen</span>
|
||||
{{ icon('calendar', 'w-4 h-4 duration-200 group-hover:scale-125') }}
|
||||
</div>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
{% if disposition.assignment.documents|length %}
|
||||
<h3 class="text-lg font-bold">
|
||||
Dokumente
|
||||
</h3>
|
||||
<ul class="pb-4 divide-y divide-gray-200">
|
||||
{% for document in disposition.assignment.documents %}
|
||||
<li class="py-2">
|
||||
<a href="{{ path('app_common_download', { 'uuid': document.uuid }) }}"
|
||||
target="_blank"
|
||||
title="Download {{ document }}"
|
||||
class="group">
|
||||
<div class="flex items-center justify-between">
|
||||
<span class="flex-1">{{ document }}</span>
|
||||
{{ icon('download', 'w-4 h-4 duration-200 group-hover:scale-125') }}
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<div class="bg-gray-100 rounded-md p-4">
|
||||
{% include '_partials/_assignment_info.html.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
{# Upload contract #}
|
||||
{% if workflow_has_marked_place(disposition, 'new') %}
|
||||
<h3 class="text-xl font-bold pb-4">
|
||||
Honorarvertrag
|
||||
</h3>
|
||||
{% if workflow_can(disposition, 'upload_contract') %}
|
||||
<h3 class="text-xl font-bold pb-4">
|
||||
Hier findest du deinen Honorarvertrag
|
||||
</h3>
|
||||
<div class="pb-4">
|
||||
<a href="{{ path('app_teamer_disposition_contractpdf', { 'uuid': disposition.uuid }) }}" target="_blank" class="inline-block">
|
||||
<img src="{{ asset('build/images/contract_thumb.jpg') }}" alt="Honorarvertrag" class="block w-32 h-auto shadow-md">
|
||||
@@ -68,10 +95,10 @@
|
||||
|
||||
{# Upload invoice #}
|
||||
{% if workflow_has_marked_place(disposition, 'confirmed') %}
|
||||
<h3 class="text-xl font-bold pb-4">
|
||||
Honorarnote
|
||||
</h3>
|
||||
{% if workflow_can(disposition, 'upload_invoice') %}
|
||||
<h3 class="text-xl font-bold pb-4">
|
||||
Hier findest du deine Honorarnote
|
||||
</h3>
|
||||
<div class="pb-4">
|
||||
<a href="{{ path('app_teamer_disposition_invoicepdf', { 'uuid': disposition.uuid }) }}" target="_blank" class="inline-block">
|
||||
<img src="{{ asset('build/images/invoice_thumb.jpg') }}" alt="Honorarnote" class="block w-32 h-auto shadow-md">
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
Meine letzten Einsätze
|
||||
</h1>
|
||||
{% include 'teamer/disposition/_table.html.twig' %}
|
||||
{% include 'teamer/disposition/_list.html.twig' %}
|
||||
{% endblock %}
|
||||
@@ -6,5 +6,5 @@
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
Meine nächsten Einsätze
|
||||
</h1>
|
||||
{% include 'teamer/disposition/_table.html.twig' %}
|
||||
{% include 'teamer/disposition/_list.html.twig' %}
|
||||
{% endblock %}
|
||||
@@ -68,9 +68,12 @@
|
||||
<span>{{ label }}</span>
|
||||
</a>
|
||||
</div>
|
||||
{% if teamer.bookmarks.contains(assignment) %}
|
||||
{{ icon('star', 'w-5 h-5 text-yellow-500 absolute top-0 right-0 mt-2 mr-2') }}
|
||||
{% endif %}
|
||||
{% set isBookmarked = teamer.bookmarks.contains(assignment) %}
|
||||
<a href="{{ path('app_teamer_bookmark_toggle', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
|
||||
class="absolute top-0 right-0 mt-2 mr-2"
|
||||
title="{{ isBookmarked ? 'Von der Merkliste löschen' : 'Auf die Merkliste setzen' }}">
|
||||
{{ icon('star', html_classes('w-5 h-5', { 'text-yellow-500': isBookmarked, 'text-gray-200': not isBookmarked } )) }}
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user