Last change
on this file since 8d391a1 was 8d391a1, checked in by Ema <ema_spirova@…>, 3 years ago |
disabling to add location if it already exists in the planner
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Line | |
---|
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';
|
---|
5 | import { DynamicDialogRef } from 'primeng/dynamicdialog';
|
---|
6 | import { LocationService } from 'src/app/_services/location.service';
|
---|
7 | import { Location } from 'src/app/_models/location';
|
---|
8 | import { PlannerLocationDto } from 'src/app/_models/dto/plannerLocationDto';
|
---|
9 |
|
---|
10 |
|
---|
11 | @Component({
|
---|
12 | selector: 'app-add-location-to-planner-panel',
|
---|
13 | templateUrl: './add-location-to-planner-panel.component.html',
|
---|
14 | styleUrls: ['./add-location-to-planner-panel.component.css']
|
---|
15 | })
|
---|
16 | export class AddLocationToPlannerPanelComponent implements OnInit {
|
---|
17 |
|
---|
18 | planners: Planner[];
|
---|
19 |
|
---|
20 | constructor(private plannerService: PlannerService,
|
---|
21 | private route: ActivatedRoute, private ref: DynamicDialogRef, private locationService : LocationService) {
|
---|
22 | this.planners = [];
|
---|
23 | }
|
---|
24 |
|
---|
25 | ngOnInit(): void {
|
---|
26 |
|
---|
27 | this.plannerService.getAllPlanners().subscribe(
|
---|
28 | planner => {
|
---|
29 | this.planners = planner;
|
---|
30 | }
|
---|
31 | );
|
---|
32 |
|
---|
33 | }
|
---|
34 |
|
---|
35 | selectPlanner(planner: Planner) {
|
---|
36 | this.ref.close(planner);
|
---|
37 | }
|
---|
38 |
|
---|
39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.