From d85eeb6918d521197c2e6ad1e3da2dec8ce95398 Mon Sep 17 00:00:00 2001 From: sowgro Date: Fri, 4 Apr 2025 17:22:10 -0400 Subject: Edit modal --- .../components/cupboard/cupboard.component.html | 8 +-- .../app/components/cupboard/cupboard.component.ts | 13 +++-- .../components/home-page/home-page.component.css | 2 +- .../components/need-edit/need-edit.component.css | 42 ++++++++++++--- .../components/need-edit/need-edit.component.html | 62 +++++++++++++++------- .../components/need-edit/need-edit.component.ts | 9 ++-- .../components/need-page/need-page.component.css | 4 +- .../components/need-page/need-page.component.html | 9 ++-- .../components/need-page/need-page.component.ts | 4 +- 9 files changed, 109 insertions(+), 44 deletions(-) (limited to 'ufund-ui/src/app/components') diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.html b/ufund-ui/src/app/components/cupboard/cupboard.component.html index 71c258e..5e88582 100644 --- a/ufund-ui/src/app/components/cupboard/cupboard.component.html +++ b/ufund-ui/src/app/components/cupboard/cupboard.component.html @@ -33,7 +33,10 @@ - +

Update Need

+ +
+ Name: + +
+
+ Image: + +
+
+ Location: + +
+
+ Max Goal: + +
+
+ Type: + + +
+
+ Urgency: + +
+
+ Description: + +
diff --git a/ufund-ui/src/app/components/need-edit/need-edit.component.ts b/ufund-ui/src/app/components/need-edit/need-edit.component.ts index 2462534..d312183 100644 --- a/ufund-ui/src/app/components/need-edit/need-edit.component.ts +++ b/ufund-ui/src/app/components/need-edit/need-edit.component.ts @@ -1,8 +1,9 @@ import { Component, Input, Output, EventEmitter } from '@angular/core'; -import { Need, GoalType } from '../../models/Need'; +import { Need, GoalType } from '../../models/Need'; import { CupboardService } from '../../services/cupboard.service'; import { catchError, of } from 'rxjs'; import { ToastsService, ToastType } from '../../services/toasts.service'; +import {ModalService} from '../../services/modal.service'; @Component({ selector: 'app-need-edit', @@ -13,8 +14,8 @@ import { ToastsService, ToastType } from '../../services/toasts.service'; export class NeedEditComponent { constructor( private cupboardService: CupboardService, - private toastService: ToastsService - + private toastService: ToastsService, + protected modalService: ModalService ) {} @Input() selectedNeed!: Need; @@ -58,4 +59,4 @@ export class NeedEditComponent { ); } -} \ No newline at end of file +} diff --git a/ufund-ui/src/app/components/need-page/need-page.component.css b/ufund-ui/src/app/components/need-page/need-page.component.css index 844410f..5a92ee9 100644 --- a/ufund-ui/src/app/components/need-page/need-page.component.css +++ b/ufund-ui/src/app/components/need-page/need-page.component.css @@ -56,8 +56,8 @@ .actionArea { display: flex; - padding: 5px; - gap: 5px; + padding: 5px 0; + gap: 10px; margin-top: 10px; } 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 522b710..d494ccf 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 @@ -35,9 +35,12 @@ - - - + + + + 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 ad4cacf..e9be093 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 @@ -7,6 +7,7 @@ import {AuthService} from '../../services/auth.service'; import {catchError, of} from 'rxjs'; import {ToastsService, ToastType} from '../../services/toasts.service'; import {UsersService} from '../../services/users.service'; +import {ModalService} from '../../services/modal.service'; @Component({ selector: 'app-need-page', @@ -21,7 +22,8 @@ export class NeedPageComponent { private authService: AuthService, private usersService: UsersService, private toastService: ToastsService, - private router: Router + private router: Router, + protected modalService: ModalService ) {} public GoalType = GoalType; -- cgit v1.2.3