feat: contacts and voucher assignment
This commit is contained in:
1 parent
c86ec8bd36
commit
f2b1d0293a
8 files changed
+154
-4
No files matched your search
@@ -15,6 +15,7 @@ type Voucher = {
|
||||
kategorie: string | null;
|
||||
notiz: string | null;
|
||||
status: string;
|
||||
contacts?: { contact: { id: number; name: string; email: string | null; telegramChatId: string | null } }[];
|
||||
};
|
||||
|
||||
export default function VoucherDetailPage({ params }: { params: Promise<{ id: string }> }) {
|
||||
@@ -62,6 +63,9 @@ export default function VoucherDetailPage({ params }: { params: Promise<{ id: st
|
||||
{v.codeText && <div><dt className="font-medium">Code</dt><dd>{v.codeText}</dd></div>}
|
||||
{v.kategorie && <div><dt className="font-medium">Kategorie</dt><dd>{v.kategorie}</dd></div>}
|
||||
{v.notiz && <div><dt className="font-medium">Notiz</dt><dd>{v.notiz}</dd></div>}
|
||||
{v.contacts && v.contacts.length > 0 && (
|
||||
<div><dt className="font-medium">Empfänger</dt><dd>{v.contacts.map((c) => c.contact.name).join(", ")}</dd></div>
|
||||
)}
|
||||
</dl>
|
||||
{v.status !== "eingeloest" && (
|
||||
<button onClick={redeem} className="rounded bg-black px-4 py-2 text-white">
|
||||
|
||||
Reference in new issue
Block a user