Changeset bdd6491 for trip-planner-front/src/app/create-initial-planner
- Timestamp:
- 12/28/21 08:56:55 (3 years ago)
- Branches:
- master
- Children:
- b738035
- Parents:
- 84d0fbb
- Location:
- trip-planner-front/src/app/create-initial-planner
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/src/app/create-initial-planner/create-initial-planner.component.html
r84d0fbb rbdd6491 2 2 <p>Planner name</p> 3 3 <mat-form-field appearance="fill"> 4 <input matInput required type="text" [(ngModel)]="planner.name" name="name" placeholder="Planner name"> 4 <input matInput type="text" [(ngModel)]="plannerDto.name" name="plannerName" placeholder="Planner name"> 5 5 6 </mat-form-field> 6 7 <p>Planner description</p> 7 8 <mat-form-field appearance="fill"> 8 <textarea matInput required name="description" [(ngModel)]="planner.description" type="text"9 <textarea matInput name="description" [(ngModel)]="plannerDto.description" type="text" 9 10 placeholder="Planner description"></textarea> 10 11 </mat-form-field> 11 12 </div> 12 13 <div mat-dialog-actions> 13 <button pButton pRipple type=" submit" label="Save"14 class="p-button-outlined p-button-rounded p-button-help" (click)="onFormSubmitPlanner(planner )"></button>14 <button pButton pRipple type="button" label="Save" 15 class="p-button-outlined p-button-rounded p-button-help" (click)="onFormSubmitPlanner(plannerDto)"></button> 15 16 </div> 17 18 -
trip-planner-front/src/app/create-initial-planner/create-initial-planner.component.ts
r84d0fbb rbdd6491 1 import { PlatformModule } from '@angular/cdk/platform'; 1 2 import { Component, OnInit } from '@angular/core'; 2 3 import { DynamicDialogRef } from 'primeng/dynamicdialog'; … … 11 12 export class CreateInitialPlannerComponent implements OnInit { 12 13 13 planner : Planner;14 plannerDto: PlannerDto; 14 15 15 16 constructor( private ref: DynamicDialogRef) { 16 this.planner = new Planner;17 this.plannerDto = new PlannerDto(); 17 18 } 18 19 19 20 ngOnInit(): void { 20 this.planner = new Planner();21 this.plannerDto = new Planner(); 21 22 } 22 23 23 onFormSubmitPlanner(planner ){24 this.ref.close(planner );24 onFormSubmitPlanner(plannerDto){ 25 this.ref.close(plannerDto); 25 26 window.location.reload(); 26 27 }
Note:
See TracChangeset
for help on using the changeset viewer.