feat(transaction): add transaction retrieval and DTO mapping
This commit is contained in:
parent
5575955440
commit
d6077645d9
13 changed files with 146 additions and 13 deletions
|
@ -1,16 +1,18 @@
|
|||
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
|
||||
import { CurrencyPipe, NgFor } from '@angular/common';
|
||||
import { ChangeDetectionStrategy, Component, inject, OnInit } from '@angular/core';
|
||||
import { AsyncPipe, CurrencyPipe, DatePipe, NgFor } from '@angular/common';
|
||||
import { DepositComponent } from '../deposit/deposit.component';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ConfirmationComponent } from '@shared/components/confirmation/confirmation.component';
|
||||
import { Transaction } from 'app/model/Transaction';
|
||||
import { NavbarComponent } from '@shared/components/navbar/navbar.component';
|
||||
import { Game } from 'app/model/Game';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { TransactionService } from '@service/transaction.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-homepage',
|
||||
standalone: true,
|
||||
imports: [NavbarComponent, CurrencyPipe, NgFor, DepositComponent, ConfirmationComponent],
|
||||
imports: [NavbarComponent, CurrencyPipe, NgFor, DepositComponent, ConfirmationComponent, AsyncPipe, DatePipe],
|
||||
templateUrl: './home.component.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
|
@ -74,7 +76,7 @@ export default class HomeComponent implements OnInit {
|
|||
|
||||
allGames: Game[] = [...this.featuredGames];
|
||||
|
||||
recentTransactions: Transaction[] = [];
|
||||
recentTransactions: Observable<Transaction[]> = inject(TransactionService).getUsersTransactions(5);
|
||||
|
||||
openDepositModal() {
|
||||
this.isDepositModalOpen = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue