Add functionalty to add task

This commit is contained in:
2025-05-18 16:15:34 +02:00
parent f72cc8a802
commit 61694e340f
8 changed files with 124 additions and 35 deletions

View File

@@ -1,7 +1,7 @@
<ion-header [translucent]="true">
<ion-toolbar>
<ion-title *ngIf="isAddMode">Create Task</ion-title>
<ion-title **ngIf="!isAddMode">Edit Task</ion-title>
<ion-title *ngIf="!isAddMode">Edit Task</ion-title>
</ion-toolbar>
</ion-header>
@@ -13,7 +13,12 @@
<label>Reward</label>
<input id="name" type="number" formControlName="reward"/>
<button type="button" [disabled]="!form.valid">
<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>