source: trip-planner-front/src/app/location/add-location-to-planner-panel/add-location-to-planner-panel.component.ts@ 1ad8e64

Last change on this file since 1ad8e64 was 1ad8e64, checked in by Ema <ema_spirova@…>, 3 years ago

spring security

  • Property mode set to 100644
File size: 1.0 KB
RevLine 
[ceaed42]1import { Component, OnInit } from '@angular/core';
2import { ActivatedRoute } from '@angular/router';
3import { Planner } from 'src/app/_models/planner';
4import { PlannerService } from 'src/app/_services/planner.service';
[e29cc2e]5import { DynamicDialogRef } from 'primeng/dynamicdialog';
[8d391a1]6import { LocationService } from 'src/app/_services/location.service';
[1ad8e64]7
[e29cc2e]8
[ceaed42]9
10@Component({
11 selector: 'app-add-location-to-planner-panel',
12 templateUrl: './add-location-to-planner-panel.component.html',
13 styleUrls: ['./add-location-to-planner-panel.component.css']
14})
15export class AddLocationToPlannerPanelComponent implements OnInit {
16
17 planners: Planner[];
[8d391a1]18
[e29cc2e]19 constructor(private plannerService: PlannerService,
[8d391a1]20 private route: ActivatedRoute, private ref: DynamicDialogRef, private locationService : LocationService) {
[ceaed42]21 this.planners = [];
22 }
23
24 ngOnInit(): void {
[e29cc2e]25
[ceaed42]26 this.plannerService.getAllPlanners().subscribe(
[e29cc2e]27 planner => {
28 this.planners = planner;
[ceaed42]29 }
30 );
[8d391a1]31
[ceaed42]32 }
33
[e29cc2e]34 selectPlanner(planner: Planner) {
35 this.ref.close(planner);
[ceaed42]36 }
37
38}
Note: See TracBrowser for help on using the repository browser.