feat: enable document uploads for admins on behalf of teamer
closes #869btf5bm
This commit is contained in:
@@ -176,54 +176,67 @@
|
||||
{{ disposition.remarks|default('-')|nl2br }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex items-start space-x-2">
|
||||
<div class="flex-1">
|
||||
{{ disposition.specialAgreements|default('-')|nl2br }}
|
||||
</div>
|
||||
<button type="button"
|
||||
title="zusätzliche Absprachen {{ disposition.teamer }}"
|
||||
hx-get="{{ path('app_administrative_disposition_special_agreements', { 'uuid': disposition.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('edit') }}
|
||||
</button>
|
||||
</div>
|
||||
<td>
|
||||
{{ disposition.specialAgreements|default('-')|nl2br }}
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex items-center justify-end space-x-2">
|
||||
<button type="button" hx-post="{{ path('app_administrative_disposition_bpn_sync_toggle', { 'uuid': disposition.uuid }) }}" hx-swap="none">
|
||||
{{ icon('chair', html_classes('w-5 h-5', {'text-green-500': disposition.syncedWithBusProNet })) }}
|
||||
</button>
|
||||
{% if is_granted('CONTRACT_SUPPLEMENTARY', disposition) %}
|
||||
<twig:DropDown>
|
||||
<button type="button"
|
||||
title="Dokumentenupload"
|
||||
hx-get="{{ path('app_administrative_disposition_document_upload', { 'uuid': disposition.uuid }) }}"
|
||||
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm w-full text-left"
|
||||
role="menuitem"
|
||||
tabindex="-1"
|
||||
hx-get="{{ path('app_administrative_disposition_special_agreements', { 'uuid': disposition.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('upload') }}
|
||||
zusätzliche Absprachen
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if is_granted('CALL_OFF', disposition) %}
|
||||
<button type="button"
|
||||
title="Absage"
|
||||
class="text-red-500"
|
||||
hx-get="{{ path('app_administrative_disposition_call_off', { 'uuid': disposition.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('cancel') }}
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if is_granted('DELETE', disposition) %}
|
||||
<button type="button"
|
||||
class="text-red-500"
|
||||
title="Einteilung löschen"
|
||||
hx-get="{{ path('app_admin_disposition_delete', { 'uuid': disposition.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('delete') }}
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if is_granted('ADMIN_DOCUMENT_UPLOAD', disposition) %}
|
||||
<button type="button"
|
||||
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm w-full text-left"
|
||||
role="menuitem"
|
||||
tabindex="-1"
|
||||
hx-get="{{ path('app_administrative_disposition_document_upload', { 'uuid': disposition.uuid, 'type': 'contract' }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
Honorarvertrag hochladen
|
||||
</button>
|
||||
<button type="button"
|
||||
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm w-full text-left"
|
||||
role="menuitem"
|
||||
tabindex="-1"
|
||||
hx-get="{{ path('app_administrative_disposition_document_upload', { 'uuid': disposition.uuid, 'type': 'invoice' }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
Honorarnote hochladen
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if is_granted('CALL_OFF', disposition) %}
|
||||
<button type="button"
|
||||
class="text-red-500 hover:text-primary block px-4 py-2 text-sm w-full text-left"
|
||||
role="menuitem"
|
||||
tabindex="-1"
|
||||
hx-get="{{ path('app_administrative_disposition_call_off', { 'uuid': disposition.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
absagen
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if is_granted('DELETE', disposition) %}
|
||||
<button type="button"
|
||||
class="text-red-500 hover:text-primary block px-4 py-2 text-sm w-full text-left"
|
||||
role="menuitem"
|
||||
tabindex="-1"
|
||||
hx-get="{{ path('app_admin_disposition_delete', { 'uuid': disposition.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
löschen
|
||||
</button>
|
||||
{% endif %}
|
||||
</twig:DropDown>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{{ form_start(form, { 'attr': { 'hx-post': app.request.uri, 'hx-target': '#htmx-modal', 'hx-swap': 'outerHTML' }|merge(formAttr.toArray()) }) }}
|
||||
<div class="pb-4">
|
||||
{% include '_partials/_upload_collection_form.html.twig' with {
|
||||
'endpoint_upload': path('_uploader_upload_contract'),
|
||||
'endpoint_upload': path(endpointUpload),
|
||||
'max_filesize': 5,
|
||||
'max_files': 1,
|
||||
'accepted_files': 'image/jpg,image/jpeg,application/pdf',
|
||||
@@ -18,4 +18,4 @@
|
||||
</button>
|
||||
{{ form_rest(form) }}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user