94 lines
2.1 KiB
HTML
94 lines
2.1 KiB
HTML
<h1>
|
|
Page d'accueil
|
|
</h1>
|
|
|
|
<h2>
|
|
Section tâches
|
|
</h2>
|
|
<div>
|
|
<div>
|
|
@for (task of tasks(); track task.id_task) {
|
|
<p>
|
|
{{ task.name_task }}
|
|
</p>
|
|
|
|
<button (click)="deleteTask(task.id_task)">Supprimer la tâche </button>
|
|
}
|
|
</div>
|
|
<br/>
|
|
<button (click)="toggleTaskForm()">
|
|
Ajouter une tâche
|
|
</button>
|
|
|
|
@if (showTaskForm){
|
|
<form [formGroup]="newTaskForm" (ngSubmit)="submitTask()">
|
|
<label for="name-task">Nom </label>
|
|
<input id="name-task" type="text" formControlName="name" />
|
|
|
|
<label for="date-task">Date limite </label>
|
|
<input id="date-task" type="date" formControlName="dueDate" />
|
|
|
|
<label for="priority-task">Priorité </label>
|
|
<input id="priority-task" type="number" formControlName="priority" />
|
|
|
|
<label for="status-task">Statut </label>
|
|
<input id="status-task" type="status" formControlName="status" />
|
|
|
|
<button type="submit" [disabled]="!newTaskForm.valid">Valider</button>
|
|
</form>
|
|
}
|
|
</div>
|
|
|
|
<h2>
|
|
Section groupes de tâches
|
|
</h2>
|
|
<div>
|
|
<div>
|
|
@for (group of groups(); track group.id_group) {
|
|
<p>
|
|
{{ group.name_group }}
|
|
</p>
|
|
|
|
<button (click)="deleteGroup(group.id_group)">Supprimer le groupe </button>
|
|
}
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
<button (click)="toggleGroupForm()">Ajouter un groupe</button>
|
|
|
|
|
|
@if (showGroupForm){
|
|
<form [formGroup]="newGroupForm" (ngSubmit)="submitGroup()">
|
|
<label for="name-group">Nom </label>
|
|
<input id="name-group" type="text" formControlName="name" />
|
|
|
|
<button type="submit" [disabled]="!newGroupForm.valid">Valider</button>
|
|
</form>
|
|
}
|
|
</div>
|
|
|
|
<h2>
|
|
Section projets
|
|
</h2>
|
|
<div>
|
|
@for (project of projects(); track project.id_project){
|
|
<p>
|
|
{{ project.name_project }}
|
|
</p>
|
|
}
|
|
|
|
<button (click)="toggleProjectForm()">Ajouter un projet</button>
|
|
|
|
@if (showProjectForm){
|
|
<form [formGroup]="newProjectForm" (ngSubmit)="submitProject()">
|
|
<label for="name-project">Nom </label>
|
|
<input id="name-project" type="text" formControlName="name" />
|
|
|
|
<button type="submit" [disabled]="!newProjectForm.valid">Valider</button>
|
|
</form>
|
|
}
|
|
</div>
|
|
|
|
<router-outlet />
|