New Prio selector
This commit is contained in:
parent
1c858b1529
commit
5db11cc276
@ -29,13 +29,13 @@
|
||||
</div>
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label for="Prio">Prio</label>
|
||||
<select class="form-control custom-select mr-sm-2" id="prio" required name="prio" [(ngModel)]="task.priority">
|
||||
<option value="low">Low</option>
|
||||
<option value="medium">Medium</option>
|
||||
<option value="high">High</option>
|
||||
</select>
|
||||
<div ngbDropdown class="dropdown">
|
||||
<button ngbDropdownToggle class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Prio: {{task.priority}}
|
||||
</button>
|
||||
<div ngbDropdownMenu class="dropdown-menu" aria-labelledby="dropdownMenu2">
|
||||
<option ngbDropdownItem *ngFor="let p of getAllPriorities()" (click)="task.priority=p">{{p}}</option>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -112,4 +112,8 @@ export class TaskFormComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public getAllPriorities(): string[] {
|
||||
return Object.values(Priority);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user