Changeset 6fe77af for trip-planner-front


Ignore:
Timestamp:
02/06/22 18:15:51 (2 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
571e0df
Parents:
76712b2
Message:

add location feature

Location:
trip-planner-front
Files:
42 added
26 edited

Legend:

Unmodified
Added
Removed
  • trip-planner-front/node_modules/@angular/cdk/stepper/index.d.ts

    r76712b2 r6fe77af  
    33 */
    44export * from './public-api';
     5
     6//# sourceMappingURL=index.d.ts.map
  • trip-planner-front/node_modules/@angular/cdk/stepper/package.json

    r76712b2 r6fe77af  
    22  "name": "@angular/cdk/stepper",
    33  "main": "../bundles/cdk-stepper.umd.js",
     4  "fesm2015_ivy_ngcc": "../__ivy_ngcc__/fesm2015/stepper.js",
    45  "fesm2015": "../fesm2015/stepper.js",
    56  "esm2015": "../esm2015/stepper/index.js",
    67  "typings": "./index.d.ts",
     8  "module_ivy_ngcc": "../__ivy_ngcc__/fesm2015/stepper.js",
    79  "module": "../fesm2015/stepper.js",
    8   "es2015": "../fesm2015/stepper.js"
     10  "es2015_ivy_ngcc": "../__ivy_ngcc__/fesm2015/stepper.js",
     11  "es2015": "../fesm2015/stepper.js",
     12  "__processed_by_ivy_ngcc__": {
     13    "es2015": "12.2.13",
     14    "fesm2015": "12.2.13",
     15    "module": "12.2.13",
     16    "typings": "12.2.13"
     17  },
     18  "scripts": {
     19    "prepublishOnly": "node --eval \"console.error('ERROR: Trying to publish a package that has been compiled by NGCC. This is not allowed.\\nPlease delete and rebuild the package, without compiling with NGCC, before attempting to publish.\\nNote that NGCC may have been run by importing this package into another project that is being built with Ivy enabled.\\n')\" && exit 1"
     20  }
    921}
  • trip-planner-front/node_modules/@angular/cdk/stepper/step-header.d.ts

    r76712b2 r6fe77af  
    88import { ElementRef } from '@angular/core';
    99import { FocusableOption } from '@angular/cdk/a11y';
     10import * as ɵngcc0 from '@angular/core';
    1011export declare class CdkStepHeader implements FocusableOption {
    1112    _elementRef: ElementRef<HTMLElement>;
     
    1314    /** Focuses the step header. */
    1415    focus(): void;
     16    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<CdkStepHeader, never>;
     17    static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<CdkStepHeader, "[cdkStepHeader]", never, {}, {}, never>;
    1518}
     19
     20//# sourceMappingURL=step-header.d.ts.map
  • trip-planner-front/node_modules/@angular/cdk/stepper/step-label.d.ts

    r76712b2 r6fe77af  
    77 */
    88import { TemplateRef } from '@angular/core';
     9import * as ɵngcc0 from '@angular/core';
    910export declare class CdkStepLabel {
    1011    template: TemplateRef<any>;
    1112    constructor(/** @docs-private */ template: TemplateRef<any>);
     13    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<CdkStepLabel, never>;
     14    static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<CdkStepLabel, "[cdkStepLabel]", never, {}, {}, never>;
    1215}
     16
     17//# sourceMappingURL=step-label.d.ts.map
  • trip-planner-front/node_modules/@angular/cdk/stepper/stepper-button.d.ts

    r76712b2 r6fe77af  
    88import { CdkStepper } from './stepper';
    99/** Button that moves to the next step in a stepper workflow. */
     10import * as ɵngcc0 from '@angular/core';
    1011export declare class CdkStepperNext {
    1112    _stepper: CdkStepper;
     
    1415    constructor(_stepper: CdkStepper);
    1516    _handleClick(): void;
     17    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<CdkStepperNext, never>;
     18    static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<CdkStepperNext, "button[cdkStepperNext]", never, { "type": "type"; }, {}, never>;
    1619}
    1720/** Button that moves to the previous step in a stepper workflow. */
     
    2225    constructor(_stepper: CdkStepper);
    2326    _handleClick(): void;
     27    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<CdkStepperPrevious, never>;
     28    static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<CdkStepperPrevious, "button[cdkStepperPrevious]", never, { "type": "type"; }, {}, never>;
    2429}
     30
     31//# sourceMappingURL=stepper-button.d.ts.map
  • trip-planner-front/node_modules/@angular/cdk/stepper/stepper-module.d.ts

    r76712b2 r6fe77af  
    66 * found in the LICENSE file at https://angular.io/license
    77 */
     8import * as ɵngcc0 from '@angular/core';
     9import * as ɵngcc1 from './stepper';
     10import * as ɵngcc2 from './step-header';
     11import * as ɵngcc3 from './step-label';
     12import * as ɵngcc4 from './stepper-button';
     13import * as ɵngcc5 from '@angular/cdk/bidi';
    814export declare class CdkStepperModule {
     15    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<CdkStepperModule, never>;
     16    static ɵmod: ɵngcc0.ɵɵNgModuleDeclaration<CdkStepperModule, [typeof ɵngcc1.CdkStep, typeof ɵngcc1.CdkStepper, typeof ɵngcc2.CdkStepHeader, typeof ɵngcc3.CdkStepLabel, typeof ɵngcc4.CdkStepperNext, typeof ɵngcc4.CdkStepperPrevious], [typeof ɵngcc5.BidiModule], [typeof ɵngcc1.CdkStep, typeof ɵngcc1.CdkStepper, typeof ɵngcc2.CdkStepHeader, typeof ɵngcc3.CdkStepLabel, typeof ɵngcc4.CdkStepperNext, typeof ɵngcc4.CdkStepperPrevious]>;
     17    static ɵinj: ɵngcc0.ɵɵInjectorDeclaration<CdkStepperModule>;
    918}
     19
     20//# sourceMappingURL=stepper-module.d.ts.map
  • trip-planner-front/node_modules/@angular/cdk/stepper/stepper.d.ts

    r76712b2 r6fe77af  
    1616 * the content into correct position upon step selection change.
    1717 */
     18import * as ɵngcc0 from '@angular/core';
    1819export declare type StepContentPositionState = 'previous' | 'current' | 'next';
    1920/** Possible orientation of a stepper. */
     
    113114    static ngAcceptInputType_optional: BooleanInput;
    114115    static ngAcceptInputType_completed: BooleanInput;
     116    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<CdkStep, [null, { optional: true; }]>;
     117    static ɵcmp: ɵngcc0.ɵɵComponentDeclaration<CdkStep, "cdk-step", ["cdkStep"], { "editable": "editable"; "optional": "optional"; "completed": "completed"; "hasError": "hasError"; "stepControl": "stepControl"; "label": "label"; "errorMessage": "errorMessage"; "ariaLabel": "aria-label"; "ariaLabelledby": "aria-labelledby"; "state": "state"; }, { "interactedStream": "interacted"; }, ["stepLabel"], ["*"]>;
    115118}
    116119export declare class CdkStepper implements AfterContentInit, AfterViewInit, OnDestroy {
     
    197200    static ngAcceptInputType_linear: BooleanInput;
    198201    static ngAcceptInputType_selectedIndex: NumberInput;
     202    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<CdkStepper, [{ optional: true; }, null, null, null]>;
     203    static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<CdkStepper, "[cdkStepper]", ["cdkStepper"], { "linear": "linear"; "selectedIndex": "selectedIndex"; "selected": "selected"; "orientation": "orientation"; }, { "selectionChange": "selectionChange"; }, ["_steps", "_stepHeader"]>;
    199204}
    200205/**
     
    253258}
    254259export {};
     260
     261//# sourceMappingURL=stepper.d.ts.map
  • trip-planner-front/node_modules/@angular/material/stepper/index.d.ts

    r76712b2 r6fe77af  
    33 */
    44export * from './public-api';
     5
     6//# sourceMappingURL=index.d.ts.map
  • trip-planner-front/node_modules/@angular/material/stepper/package.json

    r76712b2 r6fe77af  
    22  "name": "@angular/material/stepper",
    33  "main": "../bundles/material-stepper.umd.js",
     4  "fesm2015_ivy_ngcc": "../__ivy_ngcc__/fesm2015/stepper.js",
    45  "fesm2015": "../fesm2015/stepper.js",
    56  "esm2015": "../esm2015/stepper/index.js",
    67  "typings": "./index.d.ts",
     8  "module_ivy_ngcc": "../__ivy_ngcc__/fesm2015/stepper.js",
    79  "module": "../fesm2015/stepper.js",
    8   "es2015": "../fesm2015/stepper.js"
     10  "es2015_ivy_ngcc": "../__ivy_ngcc__/fesm2015/stepper.js",
     11  "es2015": "../fesm2015/stepper.js",
     12  "__processed_by_ivy_ngcc__": {
     13    "es2015": "12.2.13",
     14    "fesm2015": "12.2.13",
     15    "module": "12.2.13",
     16    "typings": "12.2.13"
     17  },
     18  "scripts": {
     19    "prepublishOnly": "node --eval \"console.error('ERROR: Trying to publish a package that has been compiled by NGCC. This is not allowed.\\nPlease delete and rebuild the package, without compiling with NGCC, before attempting to publish.\\nNote that NGCC may have been run by importing this package into another project that is being built with Ivy enabled.\\n')\" && exit 1"
     20  }
    921}
  • trip-planner-front/node_modules/@angular/material/stepper/step-content.d.ts

    r76712b2 r6fe77af  
    1010 * Content for a `mat-step` that will be rendered lazily.
    1111 */
     12import * as ɵngcc0 from '@angular/core';
    1213export declare class MatStepContent {
    1314    _template: TemplateRef<any>;
    1415    constructor(_template: TemplateRef<any>);
     16    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<MatStepContent, never>;
     17    static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<MatStepContent, "ng-template[matStepContent]", never, {}, {}, never>;
    1518}
     19
     20//# sourceMappingURL=step-content.d.ts.map
  • trip-planner-front/node_modules/@angular/material/stepper/step-header.d.ts

    r76712b2 r6fe77af  
    1414import { CanColor } from '@angular/material/core';
    1515/** @docs-private */
     16import * as ɵngcc0 from '@angular/core';
    1617declare const _MatStepHeaderBase: import("@angular/material/core/common-behaviors/constructor").Constructor<CanColor> & import("@angular/material/core/common-behaviors/constructor").AbstractConstructor<CanColor> & {
    1718    new (elementRef: ElementRef): {
     
    5859    _getIconContext(): MatStepperIconContext;
    5960    _getDefaultTextForState(state: StepState): string;
     61    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<MatStepHeader, never>;
     62    static ɵcmp: ɵngcc0.ɵɵComponentDeclaration<MatStepHeader, "mat-step-header", never, { "color": "color"; "state": "state"; "label": "label"; "errorMessage": "errorMessage"; "iconOverrides": "iconOverrides"; "index": "index"; "selected": "selected"; "active": "active"; "optional": "optional"; "disableRipple": "disableRipple"; }, {}, never, never>;
    6063}
    6164export {};
     65
     66//# sourceMappingURL=step-header.d.ts.map
  • trip-planner-front/node_modules/@angular/material/stepper/step-label.d.ts

    r76712b2 r6fe77af  
    77 */
    88import { CdkStepLabel } from '@angular/cdk/stepper';
     9import * as ɵngcc0 from '@angular/core';
    910export declare class MatStepLabel extends CdkStepLabel {
     11    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<MatStepLabel, never>;
     12    static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<MatStepLabel, "[matStepLabel]", never, {}, {}, never>;
    1013}
     14
     15//# sourceMappingURL=step-label.d.ts.map
  • trip-planner-front/node_modules/@angular/material/stepper/stepper-button.d.ts

    r76712b2 r6fe77af  
    88import { CdkStepperNext, CdkStepperPrevious } from '@angular/cdk/stepper';
    99/** Button that moves to the next step in a stepper workflow. */
     10import * as ɵngcc0 from '@angular/core';
    1011export declare class MatStepperNext extends CdkStepperNext {
     12    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<MatStepperNext, never>;
     13    static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<MatStepperNext, "button[matStepperNext]", never, { "type": "type"; }, {}, never>;
    1114}
    1215/** Button that moves to the previous step in a stepper workflow. */
    1316export declare class MatStepperPrevious extends CdkStepperPrevious {
     17    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<MatStepperPrevious, never>;
     18    static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<MatStepperPrevious, "button[matStepperPrevious]", never, { "type": "type"; }, {}, never>;
    1419}
     20
     21//# sourceMappingURL=stepper-button.d.ts.map
  • trip-planner-front/node_modules/@angular/material/stepper/stepper-icon.d.ts

    r76712b2 r6fe77af  
    99import { StepState } from '@angular/cdk/stepper';
    1010/** Template context available to an attached `matStepperIcon`. */
     11import * as ɵngcc0 from '@angular/core';
    1112export interface MatStepperIconContext {
    1213    /** Index of the step. */
     
    2526    name: StepState;
    2627    constructor(templateRef: TemplateRef<MatStepperIconContext>);
     28    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<MatStepperIcon, never>;
     29    static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<MatStepperIcon, "ng-template[matStepperIcon]", never, { "name": "matStepperIcon"; }, {}, never>;
    2730}
     31
     32//# sourceMappingURL=stepper-icon.d.ts.map
  • trip-planner-front/node_modules/@angular/material/stepper/stepper-intl.d.ts

    r76712b2 r6fe77af  
    99import { Subject } from 'rxjs';
    1010/** Stepper data that is required for internationalization. */
     11import * as ɵngcc0 from '@angular/core';
    1112export declare class MatStepperIntl {
    1213    /**
     
    2122    /** Label that is used to indicate step as editable to screen readers. */
    2223    editableLabel: string;
     24    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<MatStepperIntl, never>;
    2325}
    2426/** @docs-private */
     
    3032    useFactory: typeof MAT_STEPPER_INTL_PROVIDER_FACTORY;
    3133};
     34
     35//# sourceMappingURL=stepper-intl.d.ts.map
  • trip-planner-front/node_modules/@angular/material/stepper/stepper-module.d.ts

    r76712b2 r6fe77af  
    66 * found in the LICENSE file at https://angular.io/license
    77 */
     8import * as ɵngcc0 from '@angular/core';
     9import * as ɵngcc1 from './stepper';
     10import * as ɵngcc2 from './step-label';
     11import * as ɵngcc3 from './stepper-button';
     12import * as ɵngcc4 from './step-header';
     13import * as ɵngcc5 from './stepper-icon';
     14import * as ɵngcc6 from './step-content';
     15import * as ɵngcc7 from '@angular/material/core';
     16import * as ɵngcc8 from '@angular/common';
     17import * as ɵngcc9 from '@angular/cdk/portal';
     18import * as ɵngcc10 from '@angular/material/button';
     19import * as ɵngcc11 from '@angular/cdk/stepper';
     20import * as ɵngcc12 from '@angular/material/icon';
    821export declare class MatStepperModule {
     22    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<MatStepperModule, never>;
     23    static ɵmod: ɵngcc0.ɵɵNgModuleDeclaration<MatStepperModule, [typeof ɵngcc1.MatHorizontalStepper, typeof ɵngcc1.MatVerticalStepper, typeof ɵngcc1.MatStep, typeof ɵngcc2.MatStepLabel, typeof ɵngcc1.MatStepper, typeof ɵngcc3.MatStepperNext, typeof ɵngcc3.MatStepperPrevious, typeof ɵngcc4.MatStepHeader, typeof ɵngcc5.MatStepperIcon, typeof ɵngcc6.MatStepContent], [typeof ɵngcc7.MatCommonModule, typeof ɵngcc8.CommonModule, typeof ɵngcc9.PortalModule, typeof ɵngcc10.MatButtonModule, typeof ɵngcc11.CdkStepperModule, typeof ɵngcc12.MatIconModule, typeof ɵngcc7.MatRippleModule], [typeof ɵngcc7.MatCommonModule, typeof ɵngcc1.MatStep, typeof ɵngcc2.MatStepLabel, typeof ɵngcc1.MatStepper, typeof ɵngcc3.MatStepperNext, typeof ɵngcc3.MatStepperPrevious, typeof ɵngcc4.MatStepHeader, typeof ɵngcc5.MatStepperIcon, typeof ɵngcc6.MatStepContent]>;
     24    static ɵinj: ɵngcc0.ɵɵInjectorDeclaration<MatStepperModule>;
    925}
     26
     27//# sourceMappingURL=stepper-module.d.ts.map
  • trip-planner-front/node_modules/@angular/material/stepper/stepper.d.ts

    r76712b2 r6fe77af  
    1818import { MatStepperIcon, MatStepperIconContext } from './stepper-icon';
    1919import { MatStepContent } from './step-content';
     20import * as ɵngcc0 from '@angular/core';
    2021export declare class MatStep extends CdkStep implements ErrorStateMatcher, AfterContentInit, OnDestroy {
    2122    private _errorStateMatcher;
     
    3536    /** Custom error state matcher that additionally checks for validity of interacted form. */
    3637    isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean;
     38    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<MatStep, [null, { skipSelf: true; }, null, { optional: true; }]>;
     39    static ɵcmp: ɵngcc0.ɵɵComponentDeclaration<MatStep, "mat-step", ["matStep"], { "color": "color"; }, {}, ["stepLabel", "_lazyContent"], ["*"]>;
    3740}
    3841/**
     
    5558 */
    5659export declare class MatHorizontalStepper extends _MatProxyStepperBase {
     60    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<MatHorizontalStepper, never>;
     61    static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<MatHorizontalStepper, "mat-horizontal-stepper", never, {}, {}, never>;
    5762}
    5863/**
     
    6166 */
    6267export declare class MatVerticalStepper extends _MatProxyStepperBase {
     68    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<MatVerticalStepper, never>;
     69    static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<MatVerticalStepper, "mat-vertical-stepper", never, {}, {}, never>;
    6370}
    6471export declare class MatStepper extends CdkStepper implements AfterContentInit {
     
    8996    ngAfterContentInit(): void;
    9097    _stepIsNavigable(index: number, step: MatStep): boolean;
     98    static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<MatStepper, [{ optional: true; }, null, null, null]>;
     99    static ɵcmp: ɵngcc0.ɵɵComponentDeclaration<MatStepper, "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", ["matStepper", "matVerticalStepper", "matHorizontalStepper"], { "selectedIndex": "selectedIndex"; "labelPosition": "labelPosition"; "disableRipple": "disableRipple"; "color": "color"; }, { "animationDone": "animationDone"; }, ["_steps", "_icons"], never>;
    91100}
    92101export {};
     102
     103//# sourceMappingURL=stepper.d.ts.map
  • trip-planner-front/src/app/_services/location.service.ts

    r76712b2 r6fe77af  
    1 import { HttpClient } from "@angular/common/http";
     1import { HttpClient, HttpHeaders } from "@angular/common/http";
    22import { Injectable } from "@angular/core";
    33import { Observable } from "rxjs";
     4import { LocationDto } from "../_models/dto/locationDto";
    45import { PlannerLocationDto } from "../_models/dto/plannerLocationDto";
    56import { Location } from "../_models/location";
     
    910})
    1011export class LocationService{
     12
     13    httpHeaders: HttpHeaders = new HttpHeaders({
     14        'Authorization': '' + sessionStorage.getItem("token"),
     15        'Accept': 'application/json',
     16        'Content-Type': 'application/json'
     17    });
     18
    1119    constructor(private httpClient : HttpClient){}
    1220
     
    6573        return this.httpClient.get<Location[]>(url + "?place=" + place);
    6674    }
     75
     76    save(locationDto : LocationDto) : Observable<Location>{
     77        let url = "http://localhost:8080/api/add";
     78        return this.httpClient.post<Location>(url, locationDto, {headers: this.httpHeaders});
     79    }
    6780}
  • trip-planner-front/src/app/app-routing.module.ts

    r76712b2 r6fe77af  
    55import { HomepageComponent } from './homepage/homepage.component';
    66import { LoginComponent } from './homepage/login/login.component';
     7import { AddLocationComponent } from './location/add-location/add-location.component';
    78import { LocationDetailsComponent } from './location/location-details/location-details.component';
    89import { LocationComponent } from './location/location.component';
     
    1011import { EditPlannerComponent } from './planner/edit-planner/edit-planner.component';
    1112import { PlannerComponent } from './planner/planner.component';
     13
    1214
    1315const routes: Routes = [
     
    2022  {path: 'location', component: LocationDetailsComponent},
    2123  {path: 'explore', component: ExploreComponent},
    22   {path: 'results', component: ExploreResultComponent}
     24  {path: 'results', component: ExploreResultComponent},
     25  {path: 'add-location', component: AddLocationComponent}
    2326];
    2427
  • trip-planner-front/src/app/app.module.ts

    r76712b2 r6fe77af  
    5252import { ExploreResultComponent } from './explore/explore-result/explore-result.component';
    5353import {RatingModule} from 'primeng/rating';
    54 import { CustomValidators } from './providers/CustomValidators';
     54import { AddLocationComponent } from './location/add-location/add-location.component';
     55import {StepsModule} from 'primeng/steps';
     56import {MatStepperModule} from '@angular/material/stepper';
     57import {FileUploadModule} from 'primeng/fileupload';
    5558
    5659@NgModule({
     
    6871    LoginComponent,
    6972    ExploreComponent,
    70     ExploreResultComponent
    71   ],
     73    ExploreResultComponent,
     74    AddLocationComponent
     75    ],
    7276  imports: [
    7377    BrowserModule,
     
    110114    CardModule,
    111115    AutoCompleteModule,
    112     RatingModule
    113   ],
     116    RatingModule,
     117    StepsModule,
     118    MatStepperModule,
     119    FileUploadModule
     120    ],
    114121
    115122
  • trip-planner-front/src/app/explore/explore-result/explore-result.component.html

    r76712b2 r6fe77af  
    1515
    1616  <main role="main">
    17     <h1 style="color: #F77D62; display: inline; ">Explore </h1>
     17    <h1 style="color: #F77D62; display: inline;">Explore</h1>
    1818    <h1 style=" display: inline;">{{place}}</h1>
    1919    <div class="lightbox" *ngFor="let l of allLocation">
     
    2525      </div>
    2626    </div>
     27
     28
     29   
    2730    <div class="container">
    2831      <li *ngFor="let location of allLocation">
  • trip-planner-front/src/app/explore/explore-result/explore-result.component.ts

    r76712b2 r6fe77af  
    1717  }
    1818
     19  responsiveOptions:any[] = [
     20    {
     21        breakpoint: '1024px',
     22        numVisible: 5
     23    },
     24    {
     25        breakpoint: '768px',
     26        numVisible: 3
     27    },
     28    {
     29        breakpoint: '560px',
     30        numVisible: 1
     31    }
     32];
    1933  ngOnInit(): void {
    2034    this.route.queryParams
     
    2539
    2640      this.locationService.getAllLocationsSearch(this.place).subscribe(
    27         data => {
    28           this.allLocation = data;
     41        res => {
     42          this.allLocation = res;
    2943        }
    3044    )
  • trip-planner-front/src/app/location/location-details/location-details.component.ts

    r76712b2 r6fe77af  
    11import { Component, OnInit } from '@angular/core';
    2 import { ActivatedRoute, Router } from '@angular/router';
     2import { ActivatedRoute } from '@angular/router';
    33import { Images } from 'src/app/_models/images';
    44import { Location } from 'src/app/_models/location';
     
    1717  images: Images[];
    1818
    19   constructor(private route: ActivatedRoute, private router: Router, private locationService: LocationService,
     19  constructor(private route: ActivatedRoute, private locationService: LocationService,
    2020    private imagesService: ImagesService) {
    2121    this.locationId = 1;
  • trip-planner-front/src/app/locations-form/locations-form.component.html

    r76712b2 r6fe77af  
    3535      <mat-label>Please select a region</mat-label>
    3636      <mat-select [(ngModel)]="regionId" placeholder="Select region" name="region">
    37         <mat-option [value]="region.id" *ngFor="let region of regions" [value]="region.id"> {{region.name}}
     37        <mat-option [value]="region.id" *ngFor="let region of regions"> {{region.name}}
    3838        </mat-option>
    3939      </mat-select>
  • trip-planner-front/src/app/planner/planner.component.html

    r76712b2 r6fe77af  
    1313</nav>
    1414
     15<button pButton pRipple type="button" label="Add location" class="p-button-help " (click)="onClickAddLocation()"></button>
    1516
    1617<br>
  • trip-planner-front/src/app/planner/planner.component.ts

    r76712b2 r6fe77af  
    9999    window.location.reload();
    100100  }
     101
     102  onClickAddLocation(){
     103    this.router.navigate(['add-location']);
     104  }
    101105}
Note: See TracChangeset for help on using the changeset viewer.