From 7dead0216c5847ed808bebaae106137be19784d4 Mon Sep 17 00:00:00 2001 From: benal01 Date: Mon, 17 Mar 2025 22:02:12 -0400 Subject: back button for needs and dashboard --- ufund-ui/src/app/components/dashboard/dashboard.component.html | 3 ++- ufund-ui/src/app/components/dashboard/dashboard.component.ts | 4 ++++ ufund-ui/src/app/components/need-page/need-page.component.html | 3 ++- ufund-ui/src/app/components/need-page/need-page.component.ts | 4 ++++ 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 @@

Dashboard

+ - + \ 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 @@ +

Need page

id: {{need?.id}}

name: {{need?.name}}

filterAttributes: {{need?.filterAttributes}}

type: {{need?.type}}

max goal: {{need?.maxGoal}}

-

current: {{need?.maxGoal}}

+

current: {{need?.maxGoal}}

\ 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(); + } } -- cgit v1.2.3