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
|
Rev | Line | |
---|
[ceaed42] | 1 | import { Component, OnInit } from '@angular/core';
|
---|
| 2 | import { ActivatedRoute } from '@angular/router';
|
---|
| 3 | import { Planner } from 'src/app/_models/planner';
|
---|
| 4 | import { PlannerService } from 'src/app/_services/planner.service';
|
---|
[e29cc2e] | 5 | import { DynamicDialogRef } from 'primeng/dynamicdialog';
|
---|
[8d391a1] | 6 | import { 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 | })
|
---|
| 15 | export 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.