diff --git a/frontend/src/app/feature/game/slots/slots.component.html b/frontend/src/app/feature/game/slots/slots.component.html
new file mode 100644
index 0000000..ae15b69
--- /dev/null
+++ b/frontend/src/app/feature/game/slots/slots.component.html
@@ -0,0 +1,52 @@
+
+
+
+
Payouts
+ @if (slotInfo(); as info) {
+
+
+ @for (item of info | keyvalue; track item.key) {
+
+ {{ item.key }} |
+ {{ item.value }} |
+
+ }
+
+
+ }
+
+
+
+
{{ slotResult().resultMatrix[0][0] }}
+
{{ slotResult().resultMatrix[0][1] }}
+
{{ slotResult().resultMatrix[0][2] }}
+
+
{{ slotResult().resultMatrix[1][0] }}
+
{{ slotResult().resultMatrix[1][1] }}
+
{{ slotResult().resultMatrix[1][2] }}
+
+
{{ slotResult().resultMatrix[2][0] }}
+
{{ slotResult().resultMatrix[2][1] }}
+
{{ slotResult().resultMatrix[2][2] }}
+
+
+
+
Game result: {{ slotResult().status | uppercase }}
+
Amount: {{ slotResult().amount }}
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/app/feature/game/slots/slots.component.ts b/frontend/src/app/feature/game/slots/slots.component.ts
new file mode 100644
index 0000000..ca8e1d8
--- /dev/null
+++ b/frontend/src/app/feature/game/slots/slots.component.ts
@@ -0,0 +1,55 @@
+import {ChangeDetectionStrategy, Component, inject, OnInit, signal} from "@angular/core";
+import {NavbarComponent} from "@shared/components/navbar/navbar.component";
+import {HttpClient} from "@angular/common/http";
+import {KeyValuePipe, NgClass, UpperCasePipe} from "@angular/common";
+import {FormsModule} from "@angular/forms";
+
+interface SlotResult {
+ status: 'win' | 'lose';
+ amount: number;
+ resultMatrix: string[][];
+}
+
+@Component({
+ selector: 'app-slots',
+ standalone: true,
+ imports: [
+ NavbarComponent,
+ KeyValuePipe,
+ UpperCasePipe,
+ NgClass,
+ FormsModule
+ ],
+ templateUrl: './slots.component.html',
+ changeDetection: ChangeDetectionStrategy.OnPush,
+})
+export default class SlotsComponent implements OnInit {
+ private httpClient: HttpClient = inject(HttpClient);
+ slotInfo = signal
| null>(null);
+ slotResult = signal({
+ status: 'lose',
+ amount: 12,
+ resultMatrix: [
+ ["BAR", "BAR", "BAR"],
+ ["SEVEN", "SEVEN", "SEVEN"],
+ ["BELL", "BELL", "BELL"]
+ ]
+ });
+ betAmount = signal(1);
+
+ ngOnInit(): void {
+ this.httpClient.get>('/backend/slots/info').subscribe(data => {
+ this.slotInfo.set(data);
+ });
+ }
+
+ spin(): void {
+ const payload = {
+ betAmount: this.betAmount()
+ };
+
+ this.httpClient.post('/backend/slots/spin', payload).subscribe(result => {
+ this.slotResult.set(result);
+ });
+ }
+}
diff --git a/frontend/src/app/feature/transaction-history/transaction-history.component.ts b/frontend/src/app/feature/transaction-history/transaction-history.component.ts
index 0bef06d..b0e12f8 100644
--- a/frontend/src/app/feature/transaction-history/transaction-history.component.ts
+++ b/frontend/src/app/feature/transaction-history/transaction-history.component.ts
@@ -1,23 +1,15 @@
-import {
- ChangeDetectionStrategy,
- Component,
- EventEmitter,
- inject,
- Input,
- Output,
-} from '@angular/core';
-import { TransactionService } from '@service/transaction.service';
-import { Observable } from 'rxjs';
-import { AsyncPipe, CurrencyPipe, DatePipe, NgForOf, NgIf } from '@angular/common';
-import { AnimatedNumberComponent } from '@blackjack/components/animated-number/animated-number.component';
-import { TransactionData } from '../../model/TransactionData';
+import {ChangeDetectionStrategy, Component, EventEmitter, inject, Input, Output,} from '@angular/core';
+import {TransactionService} from '@service/transaction.service';
+import {Observable} from 'rxjs';
+import {AsyncPipe, CurrencyPipe, DatePipe, NgIf} from '@angular/common';
+import {TransactionData} from '../../model/TransactionData';
const PER_PAGE = 5;
@Component({
standalone: true,
selector: 'app-transaction-history',
- imports: [NgForOf, AsyncPipe, CurrencyPipe, DatePipe, AnimatedNumberComponent, NgIf],
+ imports: [AsyncPipe, CurrencyPipe, DatePipe, NgIf],
templateUrl: './transaction-history.component.html',
styleUrl: './transaction-history.component.css',
changeDetection: ChangeDetectionStrategy.OnPush,
diff --git a/frontend/src/app/shared/components/navbar/navbar.component.ts b/frontend/src/app/shared/components/navbar/navbar.component.ts
index 6cc6f56..b414092 100644
--- a/frontend/src/app/shared/components/navbar/navbar.component.ts
+++ b/frontend/src/app/shared/components/navbar/navbar.component.ts
@@ -17,7 +17,7 @@ import { AnimatedNumberComponent } from '@blackjack/components/animated-number/a
selector: 'app-navbar',
templateUrl: './navbar.component.html',
standalone: true,
- imports: [RouterModule, CurrencyPipe, AnimatedNumberComponent],
+ imports: [RouterModule, AnimatedNumberComponent],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class NavbarComponent implements OnInit, OnDestroy {