mirror of
https://github.com/a-mayb3/KanbanCloneAngular.git
synced 2026-03-21 09:55:37 +01:00
Created task creation page
This commit is contained in:
parent
782f58a4a2
commit
dd043b3385
5 changed files with 254 additions and 13 deletions
56
src/app/pages/task-create/task-create.component.html
Normal file
56
src/app/pages/task-create/task-create.component.html
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<div class="create-task">
|
||||
<div class="card">
|
||||
<h1>Create task</h1>
|
||||
|
||||
@if (errorMessage()) {
|
||||
<div class="error">{{ errorMessage() }}</div>
|
||||
}
|
||||
|
||||
<form (ngSubmit)="onSubmit()" #taskForm="ngForm">
|
||||
<div class="form-group">
|
||||
<label for="title">Task title</label>
|
||||
<input
|
||||
id="title"
|
||||
type="text"
|
||||
name="title"
|
||||
[(ngModel)]="title"
|
||||
placeholder="Enter a task title"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="description">Description</label>
|
||||
<textarea
|
||||
id="description"
|
||||
name="description"
|
||||
[(ngModel)]="description"
|
||||
rows="4"
|
||||
placeholder="Enter a task description"
|
||||
></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="status">Status</label>
|
||||
<select id="status" name="status" [(ngModel)]="status" required>
|
||||
<option value="pending">Pending</option>
|
||||
<option value="in_progress">In progress</option>
|
||||
<option value="completed">Completed</option>
|
||||
<option value="stashed">Stashed</option>
|
||||
<option value="failed">Failed</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<button type="button" class="btn-secondary" (click)="onCancel()">Cancel</button>
|
||||
<button type="submit" class="btn-primary" [disabled]="isSaving() || !taskForm.form.valid">
|
||||
@if (isSaving()) {
|
||||
<span>Creating...</span>
|
||||
} @else {
|
||||
<span>Create task</span>
|
||||
}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue