Skip to content

Commit

Permalink
HotFix
Browse files Browse the repository at this point in the history
  • Loading branch information
iwokonl committed Apr 18, 2024
1 parent ac561cf commit 793bc13
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h5 class="card-title">
<button class="btn btn-outline-primary withdraw" (click)="createPayout(account)">Wypłać fundusze</button>

<input class="form-control" type="text" placeholder="Wprowadź kwotę do wpłaty/wypłaty" [(ngModel)]="account.amount">
<div class="loading-overlay" *ngIf="isLoading">
<div class="loading-overlay" *ngIf="account.isLoading">
<div class="spinner-border text-primary" role="status">
<span class="sr-only">Loading...</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class CurrencyAccountComponent implements OnInit {
console.log("Invalid amount");
return;
}
this.isLoading = true;
account.isLoading = true;
this.axiosService.request("POST",
"/api/payment/create",
{
Expand All @@ -74,13 +74,17 @@ export class CurrencyAccountComponent implements OnInit {

}).then((response) => {
console.log(response.data);
window.location.href = response.data.url;
this.getCurrencyAccounts();
window.location.href = response.data.url;


setTimeout(() => {
this.isLoading = false; // Wyłącz animację ładowania po przeniesieniu
}, 200000000);
account.isLoading = false;
// Wyłącz animację ładowania po przeniesieniu
}, 2000000);
}).catch((error) => {
this.isLoading = false;
account.isLoading = false;

});
}

Expand All @@ -91,7 +95,7 @@ export class CurrencyAccountComponent implements OnInit {
console.log("Invalid amount");
return;
}
this.isLoading = true;
account.isLoading = true;
this.axiosService.request("POST",
"/api/payment/createPayout",
{
Expand All @@ -104,10 +108,12 @@ export class CurrencyAccountComponent implements OnInit {

window.location.href = response.data.url;
setTimeout(() => {
this.isLoading = false; // Wyłącz animację ładowania po przeniesieniu
}, 200000000);
account.isLoading = false;
// Wyłącz animację ładowania po przeniesieniu
}, 2000000);
}).catch((error) => {
this.isLoading = false;
account.isLoading = false;

});;

}
Expand Down

0 comments on commit 793bc13

Please sign in to comment.