diff options
| author | Gunther6070 <haydenhartman10@yahoo.com> | 2025-04-01 07:47:16 -0400 | 
|---|---|---|
| committer | Gunther6070 <haydenhartman10@yahoo.com> | 2025-04-01 07:47:16 -0400 | 
| commit | d8330f1ac85b26d08ca4df5ce3875078d7b4f47f (patch) | |
| tree | 2046e58c146097aac21c9e352771420c31df6589 /ufund-ui/src/app/components/need-page/need-page.component.html | |
| parent | bc9d3417795d841b4cb3e9fb022f8d61448af946 (diff) | |
| parent | 233fe120d2a9b30e0150401ebdfeb946dc9c2c07 (diff) | |
| download | JellySolutions-d8330f1ac85b26d08ca4df5ce3875078d7b4f47f.tar.gz JellySolutions-d8330f1ac85b26d08ca4df5ce3875078d7b4f47f.tar.bz2 JellySolutions-d8330f1ac85b26d08ca4df5ce3875078d7b4f47f.zip  | |
Merge branch 'main' of https://github.com/RIT-SWEN-261-02/team-project-2245-swen-261-02-2b
Diffstat (limited to '')
| -rw-r--r-- | ufund-ui/src/app/components/need-page/need-page.component.html | 63 | 
1 files changed, 43 insertions, 20 deletions
diff --git a/ufund-ui/src/app/components/need-page/need-page.component.html b/ufund-ui/src/app/components/need-page/need-page.component.html index 90fd459..958dfa6 100644 --- a/ufund-ui/src/app/components/need-page/need-page.component.html +++ b/ufund-ui/src/app/components/need-page/need-page.component.html @@ -1,22 +1,45 @@ -<button routerLink="/dashboard">Back to dashboard</button> -<h1>Viewing Need: {{need?.name}}</h1> -<a>internal id: {{need?.id}}</a> -<div style="display: flex; column-gap: 6px;"> -    <h3>Looking for</h3> -    <h3><u>{{need?.type}}</u></h3> -    <h3>Donations.</h3> -</div> -<div *ngIf="need?.filterAttributes != null"> -    <p>Tags:</p> -    <ul style="display: flex; column-gap: 24px;"> -        <li *ngFor="let tag of need?.filterAttributes"> -            <p>{{tag}}</p> -        </li> -    </ul> -</div> +<div id="box"> +    <h1>{{need?.name}}</h1> +    <span class="needType">{{need?.type}} GOAL</span> + +    <img *ngIf="need.image" alt="Need image" [src]="need?.image"/> + +    <p>{{need?.description}}</p> +    <div class="prog"> +<!--        <span>{{need?.current}} / {{need?.maxGoal}}</span>--> +        <progress [value]="need?.current" [max]="need?.maxGoal"></progress> +        <span>This goal is <strong>{{(((need?.current ?? 0)*100) / (need?.maxGoal ?? 0)).toFixed(0)}}%</strong> complete!</span> +    </div> + +    <span><strong>Target Goal:</strong> {{need.maxGoal}}</span> -<hr> +    <span><strong>Amount Currently Collected:</strong> {{need.current}}</span> -<p>Goal: {{need?.maxGoal}}</p> -<p>Current: {{need?.current}}</p> -<p>This goal is <strong>{{(((need?.current ?? 0)*100) / (need?.maxGoal ?? 0)).toFixed(0)}}%</strong> complete!</p>
\ No newline at end of file +    <span><strong>Location:</strong> {{need.location}}</span> + +    <span><strong>Urgency: </strong> +        <span *ngIf="!need.urgent">Not urgent</span> +        <span *ngIf="need.urgent" class="urgent">URGENT</span> +    </span> + +    <div *ngIf="need.filterAttributes.length > 0"> +        <strong>Tags:</strong> +        <ul style="display: flex; column-gap: 24px;"> +            <li *ngFor="let tag of need?.filterAttributes"> +                <p>{{tag}}</p> +            </li> +        </ul> +    </div> + +    <div class="actionArea"> +        <button *ngIf="isHelper()" (click)="add(need!)"> +            <span class="icon">add</span>Add To Basket +        </button> +<!--        <button *ngIf="isManager()" (click)="edit(need!)">--> +<!--            <span class="icon">edit</span>Edit Need--> +<!--        </button>--> +        <button *ngIf="isManager()" (click)="delete(need!.id)" > +            <span class="icon">delete</span>Delete Need +        </button> +    </div> +</div>  | 
