This commit is contained in:
Sana EL HIRI 2022-03-22 09:42:03 +01:00
parent d9800d3ae5
commit 03a825ec76
3 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ export class Plant {
public name: string='',
public price: number =1,
public quantity: number= 0,
public instock: string[]=['disponible', 'patriellement disponible', 'non disponible'],
public inStock: string[]=['disponible', 'patriellement disponible', 'non disponible'],
public category:Category,
public urlPicture: string = "https//picsum.photos/id/18/200/300",
public rating: number = 0,

View File

@ -48,7 +48,7 @@ export class PageModifierComponent implements OnInit {
quantity: [plant ? plant.quantity : ''],
category: [plant ? plant.category : ''],
rating: [plant ? plant.rating : ''],
inStock: [plant ? plant.instock : ['']],
inStock: [plant ? plant.inStock : ['']],
});
}
@ -70,7 +70,7 @@ export class PageModifierComponent implements OnInit {
quantity: quantityValue,
rating: ratingValue,
category: categoryValue,
instock: [inStockValue],
inStock: [inStockValue],
urlPicture
};
this.adminService.updatePlant(plant)?.subscribe((resp) => {

View File

@ -19,7 +19,7 @@
<td>{{products.name}}</td>
<td>{{products.price}}</td>
<td>{{products.quantity}}</td>
<td>{{products.instock}}</td>
<td>{{products.inStock}}</td>
<td>{{products.category}}</td>
<td>{{products.rating}}</td>
<td><a class="bi-pencil-square" routerLink="../modifier/{{products.id}}"></a></td>