feat: driver license check for teamers
closes #869bup9vf
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
{% extends 'teamer/layout.html.twig' %}
|
||||
|
||||
{% block title %}Führerschein-Check{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% set formAttr = stimulus_controller('form-upload-guard')|stimulus_action('form-upload-guard', 'guard', 'submit') %}
|
||||
{{ form_start(form, { 'attr': formAttr.toArray() }) }}
|
||||
|
||||
<div class="max-w-2xl">
|
||||
<h1 class="text-2xl font-bold pb-2">
|
||||
Führerschein-Check
|
||||
</h1>
|
||||
<p class="pb-6">
|
||||
Bitte gib an, ob du einen Führerschein besitzt. Wenn ja, lade bitte einmalig ein Foto oder PDF deines
|
||||
Führerscheins hoch.
|
||||
</p>
|
||||
|
||||
{% if not form.vars.valid %}
|
||||
<div class="border border-red-500 rounded-md p-4 text-red-500 mb-6">
|
||||
{% include '_partials/_form_errors.html.twig' with { 'form': form } %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if teamer.driverLicenseStatus == constant('App\\Entity\\Teamer::DRIVER_LICENSE_STATUS_DENIED') %}
|
||||
<div class="border border-red-500 rounded-md p-4 text-red-500 mb-6">
|
||||
Dein zuletzt hochgeladener Führerschein wurde abgelehnt.
|
||||
{% if teamer.driverLicenseReviewComment %}
|
||||
<br>
|
||||
Begründung: {{ teamer.driverLicenseReviewComment }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="flex flex-col space-y-4 pb-6">
|
||||
{{ form_row(form.hasDriverLicense) }}
|
||||
|
||||
{% if teamer.driverLicenseUpload %}
|
||||
<div class="text-sm">
|
||||
Aktuell hochgeladen:
|
||||
<a href="{{ path('app_common_download', { 'uuid': teamer.driverLicenseUpload.uuid, 'inline': true }) }}" target="_blank" class="font-bold underline">
|
||||
{{ teamer.driverLicenseUpload.originalFilename }}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div>
|
||||
<label class="block font-bold pb-2">
|
||||
Führerschein hochladen (JPG, PNG, PDF)
|
||||
</label>
|
||||
{% include '_partials/_upload_collection_form.html.twig' with {
|
||||
'endpoint_upload': path('_uploader_upload_driver_license'),
|
||||
'upload_session_params': form.vars.upload_session_params,
|
||||
'accepted_files': 'image/jpg,image/jpeg,image/png,application/pdf',
|
||||
} %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn" {{ stimulus_target('form-upload-guard', 'submit') }}>
|
||||
Speichern
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{{ form_rest(form) }}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
@@ -127,6 +127,27 @@
|
||||
{{ form_row(form.healthInsuranceCompany) }}
|
||||
{{ form_row(form.language) }}
|
||||
{{ form_row(form.size) }}
|
||||
<div>
|
||||
<div class="font-bold pb-2">Führerschein</div>
|
||||
<div class="pb-2">
|
||||
{% if teamer.driverLicenseDeclaration is same as(null) %}
|
||||
noch nicht angegeben
|
||||
{% elseif teamer.driverLicenseDeclaration %}
|
||||
{% if teamer.driverLicenseVerified %}
|
||||
bestätigt
|
||||
{% elseif teamer.driverLicenseStatus == constant('App\\Entity\\Teamer::DRIVER_LICENSE_STATUS_DENIED') %}
|
||||
abgelehnt
|
||||
{% else %}
|
||||
in Prüfung
|
||||
{% endif %}
|
||||
{% else %}
|
||||
nicht vorhanden
|
||||
{% endif %}
|
||||
</div>
|
||||
<a href="{{ path('app_teamer_check_driver_license') }}" class="btn btn--small btn--secondary">
|
||||
Führerscheinstatus bearbeiten
|
||||
</a>
|
||||
</div>
|
||||
<div {{ stimulus_controller('form-collection', { 'prototype': _self.collectionRow(form.pickups.vars.prototype)|json_encode }) }}>
|
||||
<h4 class="font-bold pb-2">
|
||||
Buszustiege
|
||||
|
||||
Reference in New Issue
Block a user