- Timestamp:
- 10/19/21 16:40:43 (3 years ago)
- Branches:
- master
- Children:
- 6a80231
- Parents:
- eed0bf8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/src/app/locations-form/locations-form.component.ts
reed0bf8 r188ee53 35 35 locationId: number; 36 36 regionId: number; 37 cityId: number; 37 38 companionId: number; 38 39 lengthOfStay: number; 39 40 cityOption: boolean = false; 40 41 regionOption: boolean = false; 42 value:number; 43 max: number; 41 44 42 45 constructor(private cityService : CityService, private regionService: RegionService, … … 54 57 this.categoryIds = ''; 55 58 this.regionId = 0; 59 this.cityId = 0; 60 this.value = 0; 61 this.max = 30; 56 62 } 57 63 … … 119 125 createMyPlanner(){ 120 126 this.categoryIds = this.chipsSeletion.join(','); 121 console.log(this.companionId); 122 this.locationService.getAllPlaces(this.locationId, this.companionId, this.lengthOfStay, this.categoryIds).subscribe( 123 result => { 124 console.log(result); 125 } 126 ); 127 console.log(this.categoryIds); 128 129 if(this.cityOption){ 130 this.locationService.getLocationsFromCity(this.cityId, this.companionId, this.lengthOfStay, this.categoryIds).subscribe( 131 result => { 132 console.log(result); 133 } 134 ); 135 }else if(this.regionOption){ 136 137 this.locationService.getLocationsFromRegion(this.regionId, this.companionId, this.lengthOfStay, this.categoryIds).subscribe( 138 result => { 139 console.log(result); 140 } 141 ); 142 } 143 144 127 145 } 128 146 chooseCityOption(){ … … 134 152 this.cityOption = false; 135 153 } 154 155 constraintMaxNumberDays(){ 156 if(this.value > this.max){ 157 this.value = this.max; 158 } 159 } 136 160 }
Note:
See TracChangeset
for help on using the changeset viewer.