From d256691ac0e4d2e1cd41ef1c1d9ce3c310e77dc6 Mon Sep 17 00:00:00 2001 From: Alex Tatiyants Date: Fri, 29 Jan 2016 21:05:29 -0800 Subject: fix #12 --- app/components/plan-list/plan-list.html | 34 ++++++++++++++++----------------- app/components/plan-list/plan-list.ts | 7 +++++-- 2 files changed, 22 insertions(+), 19 deletions(-) (limited to 'app/components') diff --git a/app/components/plan-list/plan-list.html b/app/components/plan-list/plan-list.html index 28c95af..09e9262 100644 --- a/app/components/plan-list/plan-list.html +++ b/app/components/plan-list/plan-list.html @@ -5,26 +5,26 @@ + +
+ + +
+ -
{{plan.name}} created on {{plan.createdOn | momentDate }} - -
- - - -
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(); } -- cgit v1.2.3