feat: add better tab view
CI / build-and-test (push) Canceled after 0s

This commit is contained in:
2026-10-28 00:37:16 +01:00
parent bca6e88138
commit ca3af671cf
37 changed files with 740 additions and 79 deletions
+18
View File
@@ -60,3 +60,21 @@ Sent by the test button next to a customer's email address.
|---|---|
| `{{customerName}}` | Jan Peeters |
| `{{venueName}}` | Café De Kroon |
### `cash-payment`
Sent to the venue's cash payment addresses (dashboard settings) whenever a tab is paid in cash, on a terminal or on
the dashboard.
| Placeholder | Example |
|---|---|
| `{{customerName}}` | Jan Peeters |
| `{{venueName}}` | Café De Kroon |
| `{{amount}}` | € 29,00 |
| `{{settledAt}}` | 27 oktober 2026 om 22:15 |
| `{{settledBy}}` | Bar tablet, or the dashboard user's name |
| `{{#hasItems}}…{{/hasItems}}` | Shown when anything was paid for |
| `{{#items}}…{{/items}}` | Repeated for each paid line, with: |
|   `{{quantity}}` | 10 |
|   `{{productName}}` | Cola |
|   `{{lineTotal}}` | € 25,00 |
@@ -0,0 +1,31 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>{{customerName}} betaalde {{amount}} cash bij {{venueName}}</title>
</head>
<body>
<p>De poef van <strong>{{customerName}}</strong> is cash betaald.</p>
<table cellpadding="4" cellspacing="0" style="border-collapse: collapse;">
<tr><td>Bedrag</td><td style="padding-left: 24px;"><strong>{{amount}}</strong></td></tr>
<tr><td>Betaald op</td><td style="padding-left: 24px;">{{settledAt}}</td></tr>
<tr><td>Afgerekend door</td><td style="padding-left: 24px;">{{settledBy}}</td></tr>
</table>
{{#hasItems}}
<p>Overzicht:</p>
<table cellpadding="4" cellspacing="0" style="border-collapse: collapse;">
{{#items}}
<tr>
<td>{{quantity}}x {{productName}}</td>
<td style="text-align: right; padding-left: 24px;">{{lineTotal}}</td>
</tr>
{{/items}}
<tr>
<td style="border-top: 1px solid #ccc;"><strong>Totaal</strong></td>
<td style="border-top: 1px solid #ccc; text-align: right; padding-left: 24px;"><strong>{{amount}}</strong></td>
</tr>
</table>
{{/hasItems}}
<p>{{venueName}}</p>
</body>
</html>
@@ -0,0 +1,11 @@
De poef van {{customerName}} is cash betaald.
Bedrag: {{amount}}
Betaald op: {{settledAt}}
Afgerekend door: {{settledBy}}
{{#hasItems}}
Overzicht:
{{#items}}{{quantity}}x {{productName}} {{lineTotal}}
{{/items}}Totaal: {{amount}}
{{/hasItems}}
{{venueName}}