feat(admin): enhance adult verification file handling and localization

- Added a new method in AdminService to resolve adult verification file paths, improving file retrieval logic.
- Updated the AdminVerificationView to display a message when the verification document is missing.
- Localized the missing document message in German, English, and Spanish for better user experience.
This commit is contained in:
Torsten Schulz (local)
2026-03-27 11:08:52 +01:00
parent 0f0c102ded
commit 25b658acce
5 changed files with 47 additions and 4 deletions

View File

@@ -45,6 +45,7 @@
"previewTitle": "Nachweis-Vorschau",
"closePreview": "Vorschau schließen",
"previewUnavailable": "Für diesen Dateityp ist hier keine Vorschau verfügbar.",
"documentMissing": "Die Nachweisdatei wurde auf dem Server nicht gefunden.",
"empty": "Keine passenden Anfragen gefunden.",
"loadError": "Die Freigaben konnten nicht geladen werden.",
"updateError": "Der Status konnte nicht geändert werden.",

View File

@@ -45,6 +45,7 @@
"previewTitle": "Proof preview",
"closePreview": "Close preview",
"previewUnavailable": "No inline preview is available for this file type.",
"documentMissing": "The verification file was not found on the server.",
"empty": "No matching requests found.",
"loadError": "Could not load approvals.",
"updateError": "Could not update the status.",

View File

@@ -45,6 +45,7 @@
"previewTitle": "Vista previa de la prueba",
"closePreview": "Cerrar vista previa",
"previewUnavailable": "No hay vista previa integrada para este tipo de archivo.",
"documentMissing": "El archivo de verificación no se encontró en el servidor.",
"empty": "No se han encontrado solicitudes.",
"loadError": "No se pudieron cargar las aprobaciones.",
"updateError": "No se pudo actualizar el estado.",

View File

@@ -44,7 +44,15 @@
<template v-if="row.adultVerificationRequest">
<strong>{{ row.adultVerificationRequest.originalName }}</strong>
<span v-if="row.adultVerificationRequest.note">{{ row.adultVerificationRequest.note }}</span>
<button type="button" class="secondary" @click="openDocument(row)">
<span v-if="!row.adultVerificationDocumentAvailable" class="adult-verification__missing-file">
{{ $t('admin.adultVerification.documentMissing') }}
</span>
<button
type="button"
class="secondary"
:disabled="!row.adultVerificationDocumentAvailable"
@click="openDocument(row)"
>
{{ $t('admin.adultVerification.openDocument') }}
</button>
</template>
@@ -149,6 +157,10 @@ export default {
}
},
async openDocument(row) {
if (!row.adultVerificationDocumentAvailable) {
showApiError(this, null, this.$t('admin.adultVerification.documentMissing'));
return;
}
try {
const response = await apiClient.get(`/api/admin/users/${row.id}/adult-verification/document`, {
responseType: 'blob'
@@ -269,6 +281,11 @@ export default {
gap: 4px;
}
.adult-verification__missing-file {
color: #a94442;
font-size: 0.9rem;
}
.adult-verification__actions .secondary {
background: transparent;
}