From d85eeb6918d521197c2e6ad1e3da2dec8ce95398 Mon Sep 17 00:00:00 2001 From: sowgro Date: Fri, 4 Apr 2025 17:22:10 -0400 Subject: Edit modal --- .../components/need-edit/need-edit.component.css | 42 ++++++++++++--- .../components/need-edit/need-edit.component.html | 62 +++++++++++++++------- .../components/need-edit/need-edit.component.ts | 9 ++-- 3 files changed, 83 insertions(+), 30 deletions(-) (limited to 'ufund-ui/src/app/components/need-edit') diff --git a/ufund-ui/src/app/components/need-edit/need-edit.component.css b/ufund-ui/src/app/components/need-edit/need-edit.component.css index 17605c2..b06e061 100644 --- a/ufund-ui/src/app/components/need-edit/need-edit.component.css +++ b/ufund-ui/src/app/components/need-edit/need-edit.component.css @@ -1,4 +1,4 @@ -:host { +#box { /*position: absolute;*/ /*background-color: rgba(0, 0, 0, 0.5);*/ /*display: flex;*/ @@ -8,14 +8,44 @@ /*right: 0;*/ /*z-index: 5;*/ /*justify-content: center;*/ + padding: 10px; + border-style: solid; + border-width: 1px; + border-color: #6c6c6c; + background-color: #2e2e2e; + border-radius: 5px; + position: relative; + width: 500px; } #create-form, #delete-form, #update-form { - margin-top: 50px; - background-color: #3a3a3a; - padding: 10px 20px 20px 20px; - border: 2px solid #000; - border-radius: 5px; + /*margin-top: 50px;*/ + + /*padding: 10px 20px 20px 20px;*/ + /*border: 2px solid #000;*/ + /*border-radius: 5px;*/ /*visibility: visible;*/ /*position: absolute;*/ + display: flex; + flex-direction: column; + gap: 10px; + + div { + display: flex; + flex-direction: column; + } +} + +#closeButton { + position: absolute; + width: 35px; + right: 10px; +} + +textarea { + height: 200px; +} + +label { + padding: 3px; } diff --git a/ufund-ui/src/app/components/need-edit/need-edit.component.html b/ufund-ui/src/app/components/need-edit/need-edit.component.html index e776415..60637ed 100644 --- a/ufund-ui/src/app/components/need-edit/need-edit.component.html +++ b/ufund-ui/src/app/components/need-edit/need-edit.component.html @@ -1,23 +1,45 @@ -
-

Update Need

-
-
-
-
-
-
-
-
-
-
- -
- -
- -
-
-
+
+ +

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 +} -- cgit v1.2.3