diff options
Diffstat (limited to '')
3 files changed, 11 insertions, 6 deletions
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 @@          <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>--> +        <ng-template #edit> +            <app-need-edit *ngIf="need" [selectedNeed]="need"></app-need-edit> +        </ng-template> +        <button *ngIf="isManager()" (click)="modalService.showModal(edit)"> +            <span class="icon">edit</span>Edit Need +        </button>          <button *ngIf="isManager()" (click)="delete(need!.id)" >              <span class="icon">delete</span>Delete Need          </button> 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;  | 
