diff --git a/src/Entity/Upload.php b/src/Entity/Upload.php index 9987b41..f4b1810 100644 --- a/src/Entity/Upload.php +++ b/src/Entity/Upload.php @@ -113,6 +113,18 @@ class Upload implements BlameableEntityInterface, TimestampableEntityInterface return $this; } + public function getTypeLabel(): string + { + return match($this->getType()) { + self::TYPE_PHOTO => 'Foto', + self::TYPE_CERTIFICATE => 'Lizenz', + self::TYPE_CONTRACT => 'Honorarvertrag', + self::TYPE_INVOICE => 'Honorarnote', + self::TYPE_DOCUMENT => 'Info', + default => 'Dokument', + }; + } + public function getStatus(): ?string { return $this->status; diff --git a/templates/admin/index.html.twig b/templates/admin/index.html.twig index 87fa392..425c8ee 100644 --- a/templates/admin/index.html.twig +++ b/templates/admin/index.html.twig @@ -56,7 +56,7 @@ {{ icon('download', 'w-4 h-4 shrink-0') }} {{ document.owner.teamer.fullName(true) }} {% include '_partials/_dot.html.twig' %} - {{ document.originalFilename }} + {{ document.typeLabel }} {% else %}