diff options
author | benal01 <bja4245@rit.edu> | 2025-03-17 22:02:12 -0400 |
---|---|---|
committer | benal01 <bja4245@rit.edu> | 2025-03-17 22:02:12 -0400 |
commit | 7dead0216c5847ed808bebaae106137be19784d4 (patch) | |
tree | baa28f9d259e438953618aa88a637c4311a4a307 | |
parent | 3f8a523dbbfcbfed875adc383d91ef6143b651cb (diff) | |
download | JellySolutions-7dead0216c5847ed808bebaae106137be19784d4.tar.gz JellySolutions-7dead0216c5847ed808bebaae106137be19784d4.tar.bz2 JellySolutions-7dead0216c5847ed808bebaae106137be19784d4.zip |
back button for needs and dashboard
4 files changed, 12 insertions, 2 deletions
diff --git a/ufund-ui/src/app/components/dashboard/dashboard.component.html b/ufund-ui/src/app/components/dashboard/dashboard.component.html index 09dc311..fc8baf0 100644 --- a/ufund-ui/src/app/components/dashboard/dashboard.component.html +++ b/ufund-ui/src/app/components/dashboard/dashboard.component.html @@ -1,4 +1,5 @@ <h1>Dashboard</h1> +<input type="button" value="Back to Login" (click)="back()"> <app-cupboard></app-cupboard> -<app-funding-basket></app-funding-basket> +<app-funding-basket></app-funding-basket>
\ No newline at end of file diff --git a/ufund-ui/src/app/components/dashboard/dashboard.component.ts b/ufund-ui/src/app/components/dashboard/dashboard.component.ts index dd323c4..48c5894 100644 --- a/ufund-ui/src/app/components/dashboard/dashboard.component.ts +++ b/ufund-ui/src/app/components/dashboard/dashboard.component.ts @@ -8,4 +8,8 @@ import { Component } from '@angular/core'; }) export class DashboardComponent { constructor() {} + + back() { + window.history.back(); + } } 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 0bc4746..4bb001e 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,7 +1,8 @@ +<input type="button" value="Back" (click)="back()"> <h1>Need page</h1> <p>id: {{need?.id}}</p> <p>name: {{need?.name}}</p> <p>filterAttributes: {{need?.filterAttributes}}</p> <p>type: {{need?.type}}</p> <p>max goal: {{need?.maxGoal}}</p> -<p>current: {{need?.maxGoal}}</p> +<p>current: {{need?.maxGoal}}</p>
\ No newline at end of file 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 15c1e87..0673f86 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 @@ -21,4 +21,8 @@ export class NeedPageComponent { const id = Number(this.route.snapshot.paramMap.get('id')); this.cupboardService.getNeed(id).subscribe(n => this.need = n); } + + back() { + window.history.back(); + } } |