aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/funding-basket/funding-basket.component.ts
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2025-04-05 14:37:01 -0400
committersowgro <tpoke.ferrari@gmail.com>2025-04-05 14:37:01 -0400
commitc2e7b170bfa0678a6ff4576d07388778f30084b0 (patch)
tree57fc334bea1bc15f8b971d499338497dd3fa7388 /ufund-ui/src/app/components/funding-basket/funding-basket.component.ts
parent7cedd8713d30fedcc9fc486a49d4804f37ab8765 (diff)
parent0103ffc6f84d04433943c644ab759c1d04b5e681 (diff)
downloadJellySolutions-c2e7b170bfa0678a6ff4576d07388778f30084b0.tar.gz
JellySolutions-c2e7b170bfa0678a6ff4576d07388778f30084b0.tar.bz2
JellySolutions-c2e7b170bfa0678a6ff4576d07388778f30084b0.zip
Merge branch 'main' into need-image
# Conflicts: # ufund-ui/src/app/components/need-list/need-list.component.ts # ufund-ui/src/app/components/need-page/need-page.component.html
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;
}