feat: frontend send

This commit is contained in:
eneller
2026-03-18 15:30:19 +01:00
parent 7f3326c4a5
commit 4f8da032b7
8 changed files with 45 additions and 12 deletions

View File

@@ -1,5 +1,6 @@
import { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { APIService } from '../../services/api';
@Component({
selector: 'app-screen-send',
@@ -10,16 +11,27 @@ import { FormsModule } from '@angular/forms';
export class ScreenSend {
amount: number = 0;
recipient: string = '';
note: string = '';
reference: string = '';
constructor(
private api: APIService,
){}
sendMoney() {
console.log('Sending:', this.amount, 'to', this.recipient);
// Add your logic here (e.g., API call)
this.api.send(this.amount, this.recipient, this.reference).subscribe({
next:()=> {
this.cancel()
//TODO show success message
},
error:()=> {
//TODO show error message
}
});
}
cancel() {
this.amount = 0;
this.recipient = '';
this.note = '';
this.reference = '';
}
}