add way of removing a goal (#88)
closes #66 Reviewed-on: #88
This commit was merged in pull request #88.
This commit is contained in:
@@ -4,6 +4,11 @@
|
||||
<ion-title *ngIf="isAddMode">Create Goal</ion-title>
|
||||
<ion-title *ngIf="!isAddMode && goalId != 0">Edit Goal</ion-title>
|
||||
<ion-title *ngIf="!isAddMode && goalId == 0">Edit Allowance</ion-title>
|
||||
<button
|
||||
*ngIf="!isAddMode && goalId !=0"
|
||||
class="remove-button"
|
||||
(click)="deleteAllowance()"
|
||||
>Delete Goal</button>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.remove-button {
|
||||
background-color: var(--ion-color-primary);
|
||||
margin-right: 15px;
|
||||
width: 100px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
form {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@@ -93,4 +93,9 @@ export class EditAllowancePage implements OnInit {
|
||||
|
||||
this.router.navigate(['/tabs/allowance', this.userId]);
|
||||
}
|
||||
|
||||
deleteAllowance() {
|
||||
this.allowanceService.deleteAllowance(this.goalId, this.userId);
|
||||
this.router.navigate(['/tabs/allowance', this.userId]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user