feat: add pagination support for user transactions retrieval
This commit is contained in:
parent
9817fb95db
commit
03d67ef362
6 changed files with 92 additions and 17 deletions
|
@ -1,10 +1,41 @@
|
|||
<div *ngIf="isOpen" [@fadeInOut] class="modal-bg" style="z-index: 1000; position: fixed;">
|
||||
<div class="modal-card" [@cardAnimation]>
|
||||
<button type="button" (click)="closeDialog()" class="absolute top-2 right-2 text-text-secondary">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 6L6 18M6 6l12 12"/></svg>
|
||||
</button>
|
||||
<h2 class="modal-heading">Transaktionen</h2>
|
||||
<p class="py-2 text-text-secondary mb-4">Hier siehst du alle vergangenen Einzahlungen</p>
|
||||
|
||||
<button type="button" (click)="closeDialog()" class="button-primary w-full py-2">
|
||||
Verstanden
|
||||
</button>
|
||||
<div *ngIf="!loading()">
|
||||
<div *ngFor="let transaction of transactions$ | async">
|
||||
<div class="flex justify-between items-center mb-4">
|
||||
<div>
|
||||
<p class="text-sm font-medium">{{ transaction.status }}</p>
|
||||
<p class="text-xs text-text-secondary">{{ transaction.createdAt | date : 'd.m.Y H:m'}}</p>
|
||||
</div>
|
||||
<span [class]="transaction.amount > 0 ? 'text-emerald' : 'text-accent-red'">
|
||||
{{ transaction.amount | currency: 'EUR' }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="loading()">
|
||||
<div *ngFor="let item of skeletonItems">
|
||||
<div class="flex justify-between items-center mb-4 animate-pulse">
|
||||
<div>
|
||||
<div class="h-4 bg-gray-200 rounded w-20"></div>
|
||||
<div class="h-3 bg-gray-200 rounded w-24 mt-2"></div>
|
||||
</div>
|
||||
<div class="h-4 bg-gray-200 rounded w-16"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline inline-flex w-full">
|
||||
<button type="button" (click)="back()" class="button-primary w-full py-2">
|
||||
<
|
||||
</button>
|
||||
<button type="button" (click)="forward()" class="button-primary w-full py-2">
|
||||
>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue