diff options
| author | sowgro <tpoke.ferrari@gmail.com> | 2025-03-26 18:14:47 -0400 | 
|---|---|---|
| committer | sowgro <tpoke.ferrari@gmail.com> | 2025-03-26 18:14:47 -0400 | 
| commit | ab35efb06b926e8a3aee5cfc8d1fa908aa4a4707 (patch) | |
| tree | 6f456fe322a32510c611cd787d653ed186b0777d /ufund-ui | |
| parent | ea13cf6ab3b71ff5e83fca876ec71fec1f7b00ae (diff) | |
| download | JellySolutions-ab35efb06b926e8a3aee5cfc8d1fa908aa4a4707.tar.gz JellySolutions-ab35efb06b926e8a3aee5cfc8d1fa908aa4a4707.tar.bz2 JellySolutions-ab35efb06b926e8a3aee5cfc8d1fa908aa4a4707.zip  | |
Fix cupboard access checking and logging
Diffstat (limited to 'ufund-ui')
| -rw-r--r-- | ufund-ui/src/app/components/home-page/home-page.component.ts | 10 | ||||
| -rw-r--r-- | ufund-ui/src/app/components/need-page/need-page.component.ts | 38 | ||||
| -rw-r--r-- | ufund-ui/src/app/models/Need.ts | 16 | ||||
| -rw-r--r-- | ufund-ui/src/app/models/User.ts | 2 | 
4 files changed, 32 insertions, 34 deletions
diff --git a/ufund-ui/src/app/components/home-page/home-page.component.ts b/ufund-ui/src/app/components/home-page/home-page.component.ts index 5b2277c..95e8962 100644 --- a/ufund-ui/src/app/components/home-page/home-page.component.ts +++ b/ufund-ui/src/app/components/home-page/home-page.component.ts @@ -1,10 +1,10 @@ -import { Component } from '@angular/core'; +import {Component} from '@angular/core';  @Component({ -  selector: 'app-home-page', -  standalone: false, -  templateUrl: './home-page.component.html', -  styleUrl: './home-page.component.css' +    selector: 'app-home-page', +    standalone: false, +    templateUrl: './home-page.component.html', +    styleUrl: './home-page.component.css'  })  export class HomePageComponent { diff --git a/ufund-ui/src/app/components/need-page/need-page.component.ts b/ufund-ui/src/app/components/need-page/need-page.component.ts index 597d0e0..e38554c 100644 --- a/ufund-ui/src/app/components/need-page/need-page.component.ts +++ b/ufund-ui/src/app/components/need-page/need-page.component.ts @@ -2,30 +2,30 @@ import {Component, Input} from '@angular/core';  import {GoalType, Need} from '../../models/Need';  import {ActivatedRoute} from "@angular/router";  import {CupboardService} from "../../services/cupboard.service"; -import { NgFor } from '@angular/common'; +import {NgFor} from '@angular/common';  @Component({ -  selector: 'app-need-page', -  standalone: false, -  templateUrl: './need-page.component.html', -  styleUrl: './need-page.component.css' +    selector: 'app-need-page', +    standalone: false, +    templateUrl: './need-page.component.html', +    styleUrl: './need-page.component.css'  })  export class NeedPageComponent { -  constructor( -     private route: ActivatedRoute, -     private cupboardService: CupboardService, -  ) {} +    constructor( +        private route: ActivatedRoute, +        private cupboardService: CupboardService, +    ) {} -  public GoalType = GoalType; +    public GoalType = GoalType; -  @Input() need?: Need; +    @Input() need?: Need; -  ngOnInit(): void { -    const id = Number(this.route.snapshot.paramMap.get('id')); -    this.cupboardService.getNeed(id).subscribe(n => this.need = n); -  } +    ngOnInit(): void { +        const id = Number(this.route.snapshot.paramMap.get('id')); +        this.cupboardService.getNeed(id).subscribe(n => this.need = n); +    } -  back() { -    window.history.back(); -  } -}
\ No newline at end of file +    back() { +        window.history.back(); +    } +} diff --git a/ufund-ui/src/app/models/Need.ts b/ufund-ui/src/app/models/Need.ts index 9e97fd4..5cd4e39 100644 --- a/ufund-ui/src/app/models/Need.ts +++ b/ufund-ui/src/app/models/Need.ts @@ -1,13 +1,13 @@  export interface Need { -  name: string, -  id: number, -  filterAttributes: string[], -  type: GoalType; -  maxGoal: number; -  current: number; +    name: string, +    id: number, +    filterAttributes: string[], +    type: GoalType; +    maxGoal: number; +    current: number;  }  export enum GoalType { -  MONETARY, -  PHYSICAL +    MONETARY, +    PHYSICAL  } diff --git a/ufund-ui/src/app/models/User.ts b/ufund-ui/src/app/models/User.ts index f4396f6..e6848fa 100644 --- a/ufund-ui/src/app/models/User.ts +++ b/ufund-ui/src/app/models/User.ts @@ -1,5 +1,3 @@ -import {Need} from './Need'; -  export enum userType {      HELPER,      MANAGER  | 
