37 lines
1.1 KiB
HTML
37 lines
1.1 KiB
HTML
<ion-header [translucent]="true">
|
|
<ion-toolbar>
|
|
<div class="toolbar">
|
|
<div class="icon" (click)="navigateBack()">
|
|
<mat-icon>arrow_back</mat-icon>
|
|
</div>
|
|
<ion-title *ngIf="isAddMode">Create Task</ion-title>
|
|
<ion-title *ngIf="!isAddMode">Edit Task</ion-title>
|
|
<button
|
|
*ngIf="!isAddMode"
|
|
class="remove-button"
|
|
(click)="deleteTask()"
|
|
>Delete task</button>
|
|
</div>
|
|
</ion-toolbar>
|
|
</ion-header>
|
|
|
|
<ion-content [fullscreen]="true">
|
|
<form [formGroup]="form">
|
|
<label>Task Name</label>
|
|
<input id="name" type="text" formControlName="name"/>
|
|
|
|
<label>Reward</label>
|
|
<input id="reward" type="number" placeholder="0.00" name="price" min="0" value="0" step="0.01" formControlName="reward"/>
|
|
|
|
<label>Assigned</label>
|
|
<select formControlName="assigned">
|
|
<option *ngFor="let user of users" [value]="user.id">{{ user.name }}</option>
|
|
</select>
|
|
|
|
<button type="button" [disabled]="!form.valid" (click)="submit()">
|
|
<span *ngIf="isAddMode">Add Task</span>
|
|
<span *ngIf="!isAddMode">Update Task</span>
|
|
</button>
|
|
</form>
|
|
</ion-content>
|