diff --git a/Front/kantor-angular/src/app/currency-account/currency-account.component.html b/Front/kantor-angular/src/app/currency-account/currency-account.component.html index 67b23cfe..f90c2c55 100644 --- a/Front/kantor-angular/src/app/currency-account/currency-account.component.html +++ b/Front/kantor-angular/src/app/currency-account/currency-account.component.html @@ -16,7 +16,7 @@
-
+
Loading...
diff --git a/Front/kantor-angular/src/app/currency-account/currency-account.component.ts b/Front/kantor-angular/src/app/currency-account/currency-account.component.ts index 2eda4d01..4523414d 100644 --- a/Front/kantor-angular/src/app/currency-account/currency-account.component.ts +++ b/Front/kantor-angular/src/app/currency-account/currency-account.component.ts @@ -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", { @@ -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; + }); } @@ -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", { @@ -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; + });; }