fix: avoid document name exceeding card width

This commit is contained in:
Björn Fromme
2024-04-19 16:16:41 +02:00
parent 4585f189b6
commit c7084b92dd
2 changed files with 13 additions and 1 deletions
+12
View File
@@ -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;
+1 -1
View File
@@ -56,7 +56,7 @@
{{ icon('download', 'w-4 h-4 shrink-0') }}
<span>{{ document.owner.teamer.fullName(true) }}</span>
{% include '_partials/_dot.html.twig' %}
<span>{{ document.originalFilename }}</span>
<span>{{ document.typeLabel }}</span>
</button>
</li>
{% else %}