|
6 | 6 | <div class="order-last md:order-first pt-8 pr-0 md:pr-16 md:pt-0 flex justify-center w-full md:w-auto"> |
7 | 7 | <img src="/assets/images/card.png" class="mx-auto" style="width: 200px; height: fit-content; transform: rotate(-11deg)"> |
8 | 8 | </div> |
9 | | - <ul class="order-first md:order-last"> |
10 | | - {{#each locals.enrollments}} |
11 | | - <li class="p-3 hover:bg-slate-400/25 focus:bg-slate-400/25 active:bg-slate-400/25"> |
12 | | - <div class="flex items-center space-x-4 rtl:space-x-reverse"> |
13 | | - <div class="flex-1 min-w-0"> |
14 | | - <p class="text-md font-large text-gray-900 truncate"> |
15 | | - {{this.productName}} |
16 | | - </p> |
17 | | - <p class="text-xs font-medium {{#if (equals this.status "ACCEPTED")}} text-green-700 {{ else }} text-red-700 {{/if}}"> |
18 | | - Status: {{this.status}} |
19 | | - </p> |
20 | | - <p class="text-xs font-medium text-gray-700"> |
21 | | - Status Reason: {{this.statusReason}} |
22 | | - </p> |
23 | | - <p class="text-xs font-medium text-gray-700"> |
24 | | - Requested: {{prettyPrintDate this.requestedDate}} |
25 | | - </p> |
26 | | - <p class="text-xs font-medium text-gray-700"> |
27 | | - Reviewed: {{prettyPrintDate this.reviewedOn}} |
28 | | - </p> |
| 9 | + {{#if (isNonEmptyArray locals.enrollments) }} |
| 10 | + |
| 11 | + <ul class="order-first md:order-last"> |
| 12 | + {{#each locals.enrollments}} |
| 13 | + <li class="p-3 hover:bg-slate-400/25 focus:bg-slate-400/25 active:bg-slate-400/25"> |
| 14 | + <div class="flex items-center space-x-4 rtl:space-x-reverse"> |
| 15 | + <div class="flex-1 min-w-0"> |
| 16 | + <p class="text-md font-large text-gray-900 truncate"> |
| 17 | + {{this.productName}} |
| 18 | + </p> |
| 19 | + <p class="text-xs font-medium {{#if (equals this.status "ACCEPTED")}} text-green-700 {{ else }} text-red-700 {{/if}}"> |
| 20 | + Status: {{this.status}} |
| 21 | + </p> |
| 22 | + <p class="text-xs font-medium text-gray-700"> |
| 23 | + Status Reason: {{this.statusReason}} |
| 24 | + </p> |
| 25 | + <p class="text-xs font-medium text-gray-700"> |
| 26 | + Requested: {{prettyPrintDate this.requestedDate}} |
| 27 | + </p> |
| 28 | + <p class="text-xs font-medium text-gray-700"> |
| 29 | + Reviewed: {{prettyPrintDate this.reviewedOn}} |
| 30 | + </p> |
| 31 | + </div> |
29 | 32 | </div> |
30 | | - </div> |
31 | | - </li> |
32 | | - {{/each}} |
33 | | - </ul> |
| 33 | + </li> |
| 34 | + {{/each}} |
| 35 | + </ul> |
| 36 | + {{else}} |
| 37 | + <div class="order-first md:order-last"> |
| 38 | + <h2 class="text-2xl font-bold text-gray-900">No Enrollments</h2> |
| 39 | + <p class="text-sm font-medium text-gray-700">You have no enrollments</p> |
| 40 | + </div> |
| 41 | + {{/if}} |
34 | 42 | </div> |
35 | 43 | </div> |
0 commit comments