| 1 |
{%- import "partials/_ui.html" as ui -%} |
| 2 |
{% if comp_codes.is_empty() %} |
| 3 |
{% call ui::empty_state("", "No comp codes yet.") %} |
| 4 |
{% else %} |
| 5 |
<div class="scroll-x"> |
| 6 |
<table class="compact-table minw-700" aria-label="Comp codes"> |
| 7 |
<thead> |
| 8 |
<tr> |
| 9 |
<th>Code (recipient)</th> |
| 10 |
<th>Trial</th> |
| 11 |
<th>Uses</th> |
| 12 |
<th>Status</th> |
| 13 |
<th>Expires</th> |
| 14 |
<th>Created</th> |
| 15 |
</tr> |
| 16 |
</thead> |
| 17 |
<tbody> |
| 18 |
{% for cc in comp_codes %} |
| 19 |
<tr> |
| 20 |
<td>{{ cc.code }}</td> |
| 21 |
<td class="text-sm nowrap">{{ cc.trial_label }}</td> |
| 22 |
<td class="text-sm nowrap">{{ cc.uses_label }}</td> |
| 23 |
<td><span class="badge">{{ cc.status }}</span></td> |
| 24 |
<td class="text-sm nowrap">{{ cc.expires_at }}</td> |
| 25 |
<td class="text-sm nowrap">{{ cc.created_at }}</td> |
| 26 |
</tr> |
| 27 |
{% endfor %} |
| 28 |
</tbody> |
| 29 |
</table> |
| 30 |
</div> |
| 31 |
{% endif %} |
| 32 |
|