merge page supprimer

This commit is contained in:
Vincent Ramiere 2022-03-21 18:49:20 +01:00
parent 04f3b22fd3
commit 2d808feb25
3 changed files with 2 additions and 60 deletions

View file

@ -14,18 +14,6 @@
</tr>
</thead>
<tbody>
<<<<<<< HEAD
<tr *ngFor="let products of listData">
<th scope="row">{{products.id}}</th>
<td>{{products.product_name}}</td>
<td>{{products.product_price}}</td>
<td>{{products.product_qty}}</td>
<td>{{products.product_instock}}</td>
<td>{{products.product_breadcrumb_label}}</td>
<td>{{products.product_rating}}</td>
<td><a class="bi-pencil-square" routerLink="../modifier"></a></td>
<td class="bi-trash-fill" style="color: red; cursor: pointer;" (click)="onClickDelete(products.id)"></td>
=======
<tr *ngFor="let products of collection">
<th scope="row">{{products.id}}</th>
<td>{{products.name}}</td>
@ -35,8 +23,7 @@
<!-- <td>{{products.Catégorie.}}</td> -->
<td>{{products.rating}}</td>
<td><a class="bi-pencil-square" routerLink="../modifier"></a></td>
<td class="bi-trash-fill" style="color: red; cursor: pointer;" (click)="onClickDelete(5)"></td>
>>>>>>> main
<td class="bi-trash-fill" style="color: red; cursor: pointer;" (click)="onClickDelete(products.id)"></td>
</tr>
</tbody>
</table>

View file

@ -1,8 +1,5 @@
import { Component, OnInit } from '@angular/core';
<<<<<<< HEAD
=======
import { Subject } from 'rxjs';
>>>>>>> main
import { Plant } from '../../models/plant';
import { AdminService } from '../../services/admin.service';
@ -31,7 +28,7 @@ export class PageTableauComponent implements OnInit {
// })
}
onClickDelete(id: number){
onClickDelete(id: any){
console.log(id);
this.adminService.onClickDelete(id).subscribe((resp) => {
console.log("Suppression successful : ", resp);