source: trip-planner-front/node_modules/.cache/babel-webpack/dc1db31b89fcb9a60acad946220957fd.json@ 6fe77af

Last change on this file since 6fe77af was 188ee53, checked in by Ema <ema_spirova@…>, 3 years ago

location-form

  • Property mode set to 100644
File size: 37.3 KB
Line 
1{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/region.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"../_services/location.service\";\nimport * as i6 from \"@angular/common\";\nimport * as i7 from \"@angular/material/form-field\";\nimport * as i8 from \"@angular/material/input\";\nimport * as i9 from \"@angular/forms\";\nimport * as i10 from \"@angular/material/autocomplete\";\nimport * as i11 from \"@angular/material/select\";\nimport * as i12 from \"@angular/material/chips\";\nimport * as i13 from \"@angular/material/button\";\nimport * as i14 from \"@angular/material/core\";\nimport * as i15 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_div_9_mat_option_8_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"mat-option\", 16);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const city_r7 = ctx.$implicit;\n i0.ɵɵproperty(\"value\", city_r7.id)(\"value\", city_r7.id);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", city_r7.name, \"\");\n }\n}\n\nfunction LocationsFormComponent_div_9_Template(rf, ctx) {\n if (rf & 1) {\n const _r9 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"div\");\n i0.ɵɵelementStart(1, \"label\");\n i0.ɵɵelementStart(2, \"h5\");\n i0.ɵɵtext(3, \"Please select a city\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"mat-form-field\", 5);\n i0.ɵɵelementStart(5, \"mat-label\");\n i0.ɵɵtext(6, \"Please select a city\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(7, \"mat-select\", 15);\n i0.ɵɵlistener(\"ngModelChange\", function LocationsFormComponent_div_9_Template_mat_select_ngModelChange_7_listener($event) {\n i0.ɵɵrestoreView(_r9);\n const ctx_r8 = i0.ɵɵnextContext();\n return ctx_r8.cityId = $event;\n });\n i0.ɵɵtemplate(8, LocationsFormComponent_div_9_mat_option_8_Template, 2, 3, \"mat-option\", 9);\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance(7);\n i0.ɵɵproperty(\"ngModel\", ctx_r0.cityId);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngForOf\", ctx_r0.cities);\n }\n}\n\nfunction LocationsFormComponent_mat_option_16_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"mat-option\", 16);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const option_r10 = ctx.$implicit;\n i0.ɵɵproperty(\"value\", option_r10);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", option_r10, \" \");\n }\n}\n\nfunction LocationsFormComponent_div_18_mat_option_8_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"mat-option\", 16);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const region_r12 = ctx.$implicit;\n i0.ɵɵproperty(\"value\", region_r12.id)(\"value\", region_r12.id);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", region_r12.name, \"\");\n }\n}\n\nfunction LocationsFormComponent_div_18_Template(rf, ctx) {\n if (rf & 1) {\n const _r14 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"div\");\n i0.ɵɵelementStart(1, \"label\");\n i0.ɵɵelementStart(2, \"h5\");\n i0.ɵɵtext(3, \"Please select a region\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"mat-form-field\", 5);\n i0.ɵɵelementStart(5, \"mat-label\");\n i0.ɵɵtext(6, \"Please select a region\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(7, \"mat-select\", 17);\n i0.ɵɵlistener(\"ngModelChange\", function LocationsFormComponent_div_18_Template_mat_select_ngModelChange_7_listener($event) {\n i0.ɵɵrestoreView(_r14);\n const ctx_r13 = i0.ɵɵnextContext();\n return ctx_r13.regionId = $event;\n });\n i0.ɵɵtemplate(8, LocationsFormComponent_div_18_mat_option_8_Template, 2, 3, \"mat-option\", 9);\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵadvance(7);\n i0.ɵɵproperty(\"ngModel\", ctx_r3.regionId);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngForOf\", ctx_r3.regions);\n }\n}\n\nfunction LocationsFormComponent_mat_option_25_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"mat-option\", 16);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const companion_r15 = ctx.$implicit;\n i0.ɵɵproperty(\"value\", companion_r15.id);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate(companion_r15.type);\n }\n}\n\nfunction LocationsFormComponent_mat_chip_35_mat_icon_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"mat-icon\");\n i0.ɵɵtext(1, \"check\");\n i0.ɵɵelementEnd();\n }\n}\n\nfunction LocationsFormComponent_mat_chip_35_Template(rf, ctx) {\n if (rf & 1) {\n const _r20 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"mat-chip\", 18, 19);\n i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_35_Template_mat_chip_click_0_listener() {\n const restoredCtx = i0.ɵɵrestoreView(_r20);\n const category_r16 = restoredCtx.$implicit;\n\n const _r17 = i0.ɵɵreference(1);\n\n const ctx_r19 = i0.ɵɵnextContext();\n return ctx_r19.toggleSelection(_r17, category_r16);\n });\n i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_35_mat_icon_2_Template, 2, 0, \"mat-icon\", 4);\n i0.ɵɵtext(3);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const category_r16 = ctx.$implicit;\n\n const _r17 = i0.ɵɵreference(1);\n\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", !_r17.selected);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", category_r16.name, \" \");\n }\n}\n\nexport class LocationsFormComponent {\n constructor(cityService, regionService, companionService, categoryService, locationService) {\n this.cityService = cityService;\n this.regionService = regionService;\n this.companionService = companionService;\n this.categoryService = categoryService;\n this.locationService = locationService;\n this.myControl = new FormControl();\n this.disableSelect = new FormControl(false);\n this.cityOption = false;\n this.regionOption = false;\n this.filteredOptions = new Observable();\n this.cities = [];\n this.regions = [];\n this.companions = [];\n this.categories = [];\n this.chipsSeletion = [];\n this.locationId = 0;\n this.companionId = 0;\n this.lengthOfStay = 1;\n this.categoryIds = '';\n this.regionId = 0;\n this.cityId = 0;\n this.value = 0;\n this.max = 30;\n }\n\n ngOnInit() {\n this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n return this.filter(val || '');\n }));\n this.cityService.getAllCities().subscribe(data => {\n this.cities = data;\n });\n this.regionService.getAllRegions().subscribe(data => {\n this.regions = data;\n });\n this.categoryService.getAllCategories().subscribe(data => {\n this.categories = data;\n });\n this.companionService.getAllCompanions().subscribe(data => {\n this.companions = data;\n });\n }\n\n filter(val) {\n // call the service which makes the http-request\n return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n })));\n }\n\n toggleSelection(chip, category) {\n chip.toggleSelected();\n\n if (this.chipsSeletion.length > 0) {\n if (this.chipsSeletion.indexOf(category.id) <= -1) {\n this.chipsSeletion.push(category.id);\n } else {\n const index = this.chipsSeletion.indexOf(category.id);\n this.chipsSeletion.splice(index, 1);\n }\n } else {\n this.chipsSeletion.push(category.id);\n }\n\n console.log(this.chipsSeletion);\n }\n\n createMyPlanner() {\n this.categoryIds = this.chipsSeletion.join(',');\n console.log(this.categoryIds);\n\n if (this.cityOption) {\n this.locationService.getLocationsFromCity(this.cityId, this.companionId, this.lengthOfStay, this.categoryIds).subscribe(result => {\n console.log(result);\n });\n } else if (this.regionOption) {\n this.locationService.getLocationsFromRegion(this.regionId, this.companionId, this.lengthOfStay, this.categoryIds).subscribe(result => {\n console.log(result);\n });\n }\n }\n\n chooseCityOption() {\n this.cityOption = true;\n this.regionOption = false;\n }\n\n chooseRegionOption() {\n this.regionOption = true;\n this.cityOption = false;\n }\n\n constraintMaxNumberDays() {\n if (this.value > this.max) {\n this.value = this.max;\n }\n }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.RegionService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService), i0.ɵɵdirectiveInject(i5.LocationService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n type: LocationsFormComponent,\n selectors: [[\"app-locations-form\"]],\n decls: 39,\n vars: 11,\n consts: [[\"href\", \"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\", \"rel\", \"stylesheet\", \"integrity\", \"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\", \"crossorigin\", \"anonymous\"], [1, \"example-form\"], [1, \"form-group\"], [1, \"btn\", 3, \"click\"], [4, \"ngIf\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Number\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [\"placeholder\", \"Please select a companion\", 3, \"ngModel\", \"ngModelChange\"], [\"matInput\", \"\", \"placeholder\", \"No. Days\", \"type\", \"number\", \"min\", \"1\", \"value\", \"0\", \"max\", \"30\", 3, \"constraintMaxNumberDays()\", \"ngModel\", \"ngModelChange\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\", 3, \"click\"], [\"placeholder\", \"Select city\", 3, \"ngModel\", \"ngModelChange\"], [3, \"value\"], [\"placeholder\", \"Select region\", 3, \"ngModel\", \"ngModelChange\"], [\"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"]],\n template: function LocationsFormComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"link\", 0);\n i0.ɵɵelementStart(1, \"div\", 1);\n i0.ɵɵelementStart(2, \"div\", 2);\n i0.ɵɵelementStart(3, \"button\", 3);\n i0.ɵɵlistener(\"click\", function LocationsFormComponent_Template_button_click_3_listener() {\n return ctx.chooseCityOption();\n });\n i0.ɵɵtext(4, \" City \");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(5, \"button\", 3);\n i0.ɵɵlistener(\"click\", function LocationsFormComponent_Template_button_click_5_listener() {\n return ctx.chooseRegionOption();\n });\n i0.ɵɵtext(6, \" Region \");\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵelement(7, \"br\");\n i0.ɵɵelement(8, \"br\");\n i0.ɵɵtemplate(9, LocationsFormComponent_div_9_Template, 9, 2, \"div\", 4);\n i0.ɵɵelementStart(10, \"mat-form-field\", 5);\n i0.ɵɵelementStart(11, \"mat-label\");\n i0.ɵɵtext(12, \"Number\");\n i0.ɵɵelementEnd();\n i0.ɵɵelement(13, \"input\", 6);\n i0.ɵɵelementStart(14, \"mat-autocomplete\", 7, 8);\n i0.ɵɵtemplate(16, LocationsFormComponent_mat_option_16_Template, 2, 2, \"mat-option\", 9);\n i0.ɵɵpipe(17, \"async\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(18, LocationsFormComponent_div_18_Template, 9, 2, \"div\", 4);\n i0.ɵɵelementStart(19, \"h5\");\n i0.ɵɵtext(20, \"Who are you travelling with? \");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(21, \"mat-form-field\", 5);\n i0.ɵɵelementStart(22, \"mat-label\");\n i0.ɵɵtext(23, \"Please select a companion\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(24, \"mat-select\", 10);\n i0.ɵɵlistener(\"ngModelChange\", function LocationsFormComponent_Template_mat_select_ngModelChange_24_listener($event) {\n return ctx.companionId = $event;\n });\n i0.ɵɵtemplate(25, LocationsFormComponent_mat_option_25_Template, 2, 2, \"mat-option\", 9);\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(26, \"h5\");\n i0.ɵɵtext(27, \"How many days are you willing to stay ?\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(28, \"mat-form-field\", 5);\n i0.ɵɵelementStart(29, \"mat-label\");\n i0.ɵɵtext(30, \"Please select a number of days\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(31, \"input\", 11);\n i0.ɵɵlistener(\"ngModelChange\", function LocationsFormComponent_Template_input_ngModelChange_31_listener($event) {\n return ctx.lengthOfStay = $event;\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(32, \"h5\");\n i0.ɵɵtext(33, \"What are your priorities to visit?\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(34, \"mat-chip-list\", 12);\n i0.ɵɵtemplate(35, LocationsFormComponent_mat_chip_35_Template, 4, 2, \"mat-chip\", 13);\n i0.ɵɵelementEnd();\n i0.ɵɵelement(36, \"br\");\n i0.ɵɵelementStart(37, \"button\", 14);\n i0.ɵɵlistener(\"click\", function LocationsFormComponent_Template_button_click_37_listener() {\n return ctx.createMyPlanner();\n });\n i0.ɵɵtext(38, \"Create my planner\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const _r1 = i0.ɵɵreference(15);\n\n i0.ɵɵadvance(9);\n i0.ɵɵproperty(\"ngIf\", ctx.cityOption);\n i0.ɵɵadvance(4);\n i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r1);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(17, 9, ctx.filteredOptions));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.regionOption);\n i0.ɵɵadvance(6);\n i0.ɵɵproperty(\"ngModel\", ctx.companionId);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n i0.ɵɵadvance(6);\n i0.ɵɵproperty(\"ngModel\", ctx.lengthOfStay);\n i0.ɵɵadvance(4);\n i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n }\n },\n directives: [i6.NgIf, i7.MatFormField, i7.MatLabel, i8.MatInput, i9.DefaultValueAccessor, i10.MatAutocompleteTrigger, i9.NgControlStatus, i9.FormControlDirective, i10.MatAutocomplete, i6.NgForOf, i11.MatSelect, i9.NgModel, i9.MinValidator, i9.MaxValidator, i9.NumberValueAccessor, i12.MatChipList, i13.MatButton, i14.MatOption, i12.MatChip, i15.MatIcon],\n pipes: [i6.AsyncPipe],\n styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n min-width: 150px;\\r\\n max-width: 380px;\\r\\n width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n height: 20px;\\r\\n width: 20px;\\r\\n font-size: 20px;\\r\\n margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n float: right;\\r\\n}\\r\\n\\r\\n.colorClass[_ngcontent-%COMP%]{\\r\\n color:yellow;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZDs7QUFFQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufVxyXG5cclxuLmNvbG9yQ2xhc3N7XHJcbiAgY29sb3I6eWVsbG93O1xyXG59Il19 */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;;ACkCQ,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAA6E,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAa,IAAA,EAAA,CAAA,YAAA;;;;;AAA9E,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,OAAA,CAAA,EAAA,EAAiB,OAAjB,EAAiB,OAAA,CAAA,EAAjB;AAAiE,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,OAAA,CAAA,IAAA,EAAA,EAAA;;;;;;;;AALnF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,KAAA;AACE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,OAAA;AAAO,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,IAAA;AAAI,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,sBAAA;AAAoB,IAAA,EAAA,CAAA,YAAA;AAAK,IAAA,EAAA,CAAA,YAAA;AACpC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,gBAAA,EAAA,CAAA;AACE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,WAAA;AAAW,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,sB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A;AAC+C,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAOkD,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,YAAA;AAKxD,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\nimport { LocationService } from '../_services/location.service';\nimport { Region } from '../_models/region';\nimport { RegionService } from '../_services/region.service';\n\n@Component({\n selector: 'app-locations-form',\n templateUrl: './locations-form.component.html',\n styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n myControl = new FormControl();\n cities: City[];\n regions: Region[];\n companions: Companion[];\n categories: Category[];\n filteredOptions: Observable<City[]>;\n disableSelect = new FormControl(false);\n chipsSeletion: number[];\n categoryIds: string;\n locationId: number;\n regionId: number;\n cityId: number;\n companionId: number;\n lengthOfStay: number;\n cityOption: boolean = false;\n regionOption: boolean = false;\n value:number;\n max: number;\n\n constructor(private cityService : CityService, private regionService: RegionService,\n private companionService : CompanionService, private categoryService : CategoryService,\n private locationService: LocationService){\n this.filteredOptions = new Observable<City[]>();\n this.cities = [];\n this.regions = [];\n this.companions = [];\n this.categories = [];\n this.chipsSeletion = [];\n this.locationId = 0;\n this.companionId = 0;\n this.lengthOfStay = 1;\n this.categoryIds = '';\n this.regionId = 0;\n this.cityId = 0;\n this.value = 0;\n this.max = 30;\n }\n \n ngOnInit() :void {\n this.filteredOptions = this.myControl.valueChanges\n .pipe(\n startWith(''),\n switchMap(val => {\n return this.filter(val || '')\n }) \n );\n\n this.cityService.getAllCities().subscribe(\n data => {\n this.cities = data;\n }\n );\n\n this.regionService.getAllRegions().subscribe(\n data => {\n this.regions = data;\n }\n );\n\n this.categoryService.getAllCategories().subscribe(\n data => {\n this.categories = data;\n }\n );\n\n this.companionService.getAllCompanions().subscribe(\n data => {\n this.companions = data;\n }\n )\n }\n \n filter(val: string): Observable<City[]> {\n // call the service which makes the http-request\n return this.cityService.getAllCities()\n .pipe(\n map(response => response.filter(option => { \n return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n }))\n )\n \n } \n\n toggleSelection(chip: MatChip, category: Category){\n chip.toggleSelected();\n if(this.chipsSeletion.length > 0){\n if(this.chipsSeletion.indexOf(category.id) <= -1){\n this.chipsSeletion.push(category.id);\n }else{\n const index = this.chipsSeletion.indexOf(category.id);\n this.chipsSeletion.splice(index, 1);\n }\n }else{\n this.chipsSeletion.push(category.id);\n }\n console.log(this.chipsSeletion);\n }\n\n\n createMyPlanner(){\n this.categoryIds = this.chipsSeletion.join(',');\n console.log(this.categoryIds);\n \n if(this.cityOption){\n this.locationService.getLocationsFromCity(this.cityId, this.companionId, this.lengthOfStay, this.categoryIds).subscribe(\n result => {\n console.log(result);\n }\n );\n }else if(this.regionOption){\n \n this.locationService.getLocationsFromRegion(this.regionId, this.companionId, this.lengthOfStay, this.categoryIds).subscribe(\n result => {\n console.log(result);\n }\n );\n }\n \n \n }\n chooseCityOption(){\n this.cityOption = true;\n this.regionOption = false;\n }\n chooseRegionOption() {\n this.regionOption = true;\n this.cityOption = false;\n }\n\n constraintMaxNumberDays(){\n if(this.value > this.max){\n this.value = this.max;\n }\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<div class=\"example-form\">\n\n <div class=\"form-group\">\n <button class=\"btn\" (click)=\"chooseCityOption()\" >\n City\n </button>\n <button class=\"btn\" (click)=\"chooseRegionOption()\">\n Region\n </button>\n </div>\n <br>\n <br>\n <!--\n <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n <mat-label>Please select a place</mat-label>\n <input type=\"text\"\n placeholder=\"Pick one\"\n aria-label=\"Place\"\n matInput\n [formControl]=\"myControl\"\n [matAutocomplete]=\"auto\">\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n {{option.name}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n -->\n\n\n <div *ngIf=\"cityOption\">\n <label><h5>Please select a city</h5></label>\n <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n <mat-label>Please select a city</mat-label>\n <mat-select [(ngModel)]=\"cityId\" placeholder=\"Select city\">\n <mat-option [value]=\"city.id\" *ngFor=\"let city of cities\" [value]=\"city.id\"> {{city.name}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n <mat-label>Number</mat-label>\n <input type=\"text\"\n placeholder=\"Pick one\"\n aria-label=\"Number\"\n matInput\n [formControl]=\"myControl\"\n [matAutocomplete]=\"auto\">\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option\">\n {{option}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n\n <div *ngIf=\"regionOption\">\n <label><h5>Please select a region</h5></label>\n <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n <mat-label>Please select a region</mat-label>\n <mat-select [(ngModel)]=\"regionId\" placeholder=\"Select region\">\n <mat-option [value]=\"region.id\" *ngFor=\"let region of regions\" [value]=\"region.id\"> {{region.name}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <h5>Who are you travelling with? </h5>\n <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n <mat-label>Please select a companion</mat-label>\n <mat-select [(ngModel)]=\"companionId\" placeholder=\"Please select a companion\">\n <mat-option [value]=\"companion.id\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n </mat-select>\n </mat-form-field>\n\n <h5>How many days are you willing to stay ?</h5>\n <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n <mat-label>Please select a number of days</mat-label>\n <input matInput placeholder=\"No. Days\" type=\"number\" min=\"1\" value=\"0\" max=\"30\" [constraintMaxNumberDays()] [(ngModel)]=\"lengthOfStay\">\n </mat-form-field>\n\n <h5>What are your priorities to visit?</h5> \n <mat-chip-list selectable multiple>\n <mat-chip #c=\"matChip\" selected *ngFor=\"let category of categories\" \n (click)=\"toggleSelection(c, category)\">\n <mat-icon *ngIf=\"!c.selected\" >check</mat-icon>\n {{category.name}}\n </mat-chip>\n </mat-chip-list>\n <br>\n <button mat-raised-button color=\"primary\" (click)=\"createMyPlanner()\">Create my planner</button>\n\n</div>\n "],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Note: See TracBrowser for help on using the repository browser.