Ignore:
Timestamp:
11/23/21 14:58:44 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
e29cc2e
Parents:
ceaed42
Message:

adding photos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trip-planner-front/src/app/location/location.component.ts

    rceaed42 r59329aa  
    1 import { Route } from '@angular/compiler/src/core';
    21import { Component, Input, OnInit, Output } from '@angular/core';
    32import { FormBuilder, FormGroup, Validators } from '@angular/forms';
    43import { MatDialog } from '@angular/material/dialog';
    54import { ActivatedRoute, Router } from '@angular/router';
    6 import { Location } from '../_models/location';
    75import { LocationService } from '../_services/location.service';
    86import { AddLocationToPlannerPanelComponent } from './add-location-to-planner-panel/add-location-to-planner-panel.component';
     
    2422  regionOption: boolean = false;
    2523  regionId: number;
     24  locationId: number;
    2625
    2726  constructor(private fb: FormBuilder, private route: ActivatedRoute, private locationService: LocationService,
     
    3635    this.listLocations = [];
    3736    this.regionId = 1;
     37    this.locationId = 1;
    3838  }
    3939
     
    7171  }
    7272
    73   openDialogSave(locationId: number){
    74     console.log(locationId);
     73  openDialogSave(locationId){
     74   // console.log(locationId);
    7575      const dialogRef = this.dialog.open(AddLocationToPlannerPanelComponent, {
    7676        width: '250px',
    7777        data: {}
    7878      });
    79       this.router.navigate(['locations'], {queryParams: {locationId: locationId}});
     79      this.router.navigate(['locations'], {queryParams: {regionId: this.regionId, companionId: this.companionId, lengthOfStay: this.lengthOfStay, categoryIds: this.categoryIds, locationId: locationId}});
     80     
    8081  }
    8182
     83  onClickSeeDetails(id: number){
     84    this.router.navigate(['location'], {queryParams: {id: id}});
     85  }
    8286}
Note: See TracChangeset for help on using the changeset viewer.