diff options
Diffstat (limited to 'ufund-ui/src/app/components/need-page/need-page.component.html')
| -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>  | 
