aboutsummaryrefslogtreecommitdiff
path: root/app/components/plan-list/plan-list.ts
diff options
context:
space:
mode:
Diffstat (limited to 'app/components/plan-list/plan-list.ts')
-rw-r--r--app/components/plan-list/plan-list.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/components/plan-list/plan-list.ts b/app/components/plan-list/plan-list.ts
index 888e2e2..32583a3 100644
--- a/app/components/plan-list/plan-list.ts
+++ b/app/components/plan-list/plan-list.ts
@@ -20,6 +20,7 @@ export class PlanList {
newPlanContent: any;
newPlanId: string;
openDialog: boolean = false;
+ planToDelete: IPlan;
constructor(private _planService: PlanService) { }
@@ -27,13 +28,15 @@ export class PlanList {
this.plans = this._planService.getPlans();
}
- requestDelete() {
+ requestDelete(plan) {
this.openDialog = true;
+ this.planToDelete = plan;
}
deletePlan(plan) {
this.openDialog = false;
- this._planService.deletePlan(plan);
+ console.log(this.planToDelete);
+ this._planService.deletePlan(this.planToDelete);
this.plans = this._planService.getPlans();
}