Merge pull request #103 from AlineRinquin/isa2

Isa2
This commit is contained in:
AlineRinquin 2022-03-13 20:57:33 +01:00 committed by GitHub
commit c04b5da615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 8 deletions

View File

@ -110,8 +110,6 @@ export class ToDoListComponent implements OnInit {
tache.editing = false; tache.editing = false;
} }
//supprimer la tache //supprimer la tache
deleteTache(id: number) { deleteTache(id: number) {
this.TodoService.deleteTacheById(id).subscribe((resp) => { this.TodoService.deleteTacheById(id).subscribe((resp) => {

View File

@ -1,7 +1,7 @@
<app-header></app-header> <app-header></app-header>
<app-side-bar [backgroundColor]="'#4E9E7B'"></app-side-bar> <app-side-bar [backgroundColor]="'#4E9E7B'"></app-side-bar>
<h2 class="titre">To-Do-List</h2> <h2 class="titre">To-Do-List</h2>
<div class="row "> <div class="row">
<div class="col menu text-center"> <div class="col menu text-center">
<div class="d-flex align-items-stretch"></div> <div class="d-flex align-items-stretch"></div>
<input <input

View File

@ -2,7 +2,6 @@ import { Component, OnInit } from '@angular/core';
import { ToDoList } from 'src/app/models/to-do-list'; import { ToDoList } from 'src/app/models/to-do-list';
import { TodoService } from 'src/app/services/todo.service'; import { TodoService } from 'src/app/services/todo.service';
@Component({ @Component({
selector: 'app-page-to-do-list', selector: 'app-page-to-do-list',
templateUrl: './page-to-do-list.component.html', templateUrl: './page-to-do-list.component.html',
@ -42,8 +41,8 @@ export class PageToDoListComponent implements OnInit {
console.log(todoList); console.log(todoList);
window.location.reload(); //rafraîchit l'aperçu window.location.reload(); //rafraîchit l'aperçu
}); });
}else{ } else {
window.alert('Il faut saisir du texte'); // sinon msg d'erreur window.alert('Il faut saisir du texte'); // sinon msg d'erreur
} }
} }
} }

View File

@ -43,10 +43,10 @@ export class TodoService {
return this.http.put(`${this.apiUrl}/taches/update/1`, tache); return this.http.put(`${this.apiUrl}/taches/update/1`, tache);
} }
//ajoute ne todoList sur une team (par son id) via le token //ajoute une todoList sur une team (par son id) via le token
addTodoByTeamId(newtodoList: TodoList): Observable<any> { addTodoByTeamId(newtodoList: TodoList): Observable<any> {
const teamId = this.tokenService.getCurrentTeamId(); const teamId = this.tokenService.getCurrentTeamId();
console.log(newtodoList + 'newtodoList'); console.log(newtodoList);
return this.http.post(`${this.apiUrl}/todolist/add/${teamId}`, newtodoList); return this.http.post(`${this.apiUrl}/todolist/add/${teamId}`, newtodoList);
} }