aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/funding-basket/funding-basket.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ufund-ui/src/app/components/funding-basket/funding-basket.component.ts')
-rw-r--r--ufund-ui/src/app/components/funding-basket/funding-basket.component.ts19
1 files changed, 8 insertions, 11 deletions
diff --git a/ufund-ui/src/app/components/funding-basket/funding-basket.component.ts b/ufund-ui/src/app/components/funding-basket/funding-basket.component.ts
index a39b4f3..371015a 100644
--- a/ufund-ui/src/app/components/funding-basket/funding-basket.component.ts
+++ b/ufund-ui/src/app/components/funding-basket/funding-basket.component.ts
@@ -2,9 +2,10 @@ import {Component, Input, OnInit, ViewChild} from '@angular/core';
import {UsersService} from '../../services/users.service';
import {Router} from '@angular/router';
import {CupboardService} from '../../services/cupboard.service';
-import {firstValueFrom} from 'rxjs';
+import {firstValueFrom, of} from 'rxjs';
import {AuthService} from '../../services/auth.service';
import {ToastsService, ToastType} from '../../services/toasts.service';
+import {userType} from '../../models/User';
@Component({
selector: 'app-funding-basket',
@@ -18,18 +19,13 @@ export class FundingBasketComponent implements OnInit {
private router: Router,
protected cupboardService: CupboardService,
protected usersService: UsersService,
- private authService: AuthService,
+ protected authService: AuthService,
private toastService: ToastsService
) {}
@ViewChild("contribution") contribution?: Input;
- // this is for login rerouting
ngOnInit(): void {
- if (!this.authService.getCurrentUser()) {
- this.router.navigate(['/login'], {queryParams: {redir: this.router.url}});
- return;
- }
this.usersService.refreshBasket();
}
@@ -63,9 +59,10 @@ export class FundingBasketComponent implements OnInit {
}
resetColor(ev: any) {
- for (let contribution of document.querySelectorAll<HTMLInputElement>('.contribution')!) {
-
- }
- (ev.target as HTMLInputElement).setAttribute("style", "border-color: unset")
+ // for (let contribution of document.querySelectorAll<HTMLInputElement>('.contribution')!) {}
+ (ev.target as HTMLInputElement).setAttribute("style", "")
}
+
+ protected readonly of = of;
+ protected readonly userType = userType;
}