From 4aced57191ed8c476bcf7437a7273d2e9aa5db76 Mon Sep 17 00:00:00 2001 From: HarmandI Date: Tue, 22 Mar 2022 12:54:31 +0100 Subject: [PATCH] der des der? --- db.json | 65 +++++++++++++------ .../page-ajouter/page-ajouter.component.ts | 3 +- 2 files changed, 46 insertions(+), 22 deletions(-) diff --git a/db.json b/db.json index 3de8066..3dee62e 100644 --- a/db.json +++ b/db.json @@ -1,5 +1,26 @@ { "list_products": [ + { + "id": "801427", + "product_name": "Strelitzia Nicolai : D.21-H.75", + "product_price": "59,99", + "product_instock": "disponible", + "product_discount_code": "", + "product_color": "Blanc", + "product_unitprice_ati": "59.99", + "product_unitprice_tf": "54.5", + "product_discount_tf": "0.00", + "product_discount_ati": "0.00", + "product_qty": 0, + "product_rating": 3, + "product_breadcrumb_label": "plantes fleuries", + "product_url_page": "https://www.truffaut.com/strelitzia-nicolai-d-21-h-75-801427.html", + "product_url_picture": "https://images.truffaut.com/media/catalog/product/cdn:///Articles/jpg/0801000/801427_001.jpg", + "product_shipping_method": null, + "product_image_source": "https://images.truffaut.com/media/catalog/product/cdn:///Articles/jpg/0801000/801427_001.jpg", + "product_seller": "market place", + "product_web_only": "non" + }, { "id": "910744", "product_name": "Spathiphyllum 'Sweet Lauretta' Pot déco foncé D24cm", @@ -420,27 +441,6 @@ "product_seller": "Truffaut", "product_web_only": "oui" }, - { - "id": "871522", - "product_name": "Amaryllis rouge pot kraft Ø14 cm", - "product_price": "8,50", - "product_instock": "disponible", - "product_discount_code": "", - "product_color": "", - "product_unitprice_ati": "8.50", - "product_unitprice_tf": "7.7", - "product_discount_tf": "0.00", - "product_discount_ati": "0.00", - "product_qty": 25, - "product_rating": 3, - "product_breadcrumb_label": "plantes fleuries", - "product_url_page": "https://www.truffaut.com/amaryllis-rouge-pot-kraft-14-cm-871522.html", - "product_url_picture": "https://images.truffaut.com/media/catalog/product/cdn:///Articles/jpg/0871000/871522_003.jpg", - "product_shipping_method": null, - "product_image_source": "https://images.truffaut.com/media/catalog/product/cdn:///Articles/jpg/0871000/871522_003.jpg", - "product_seller": "Truffaut", - "product_web_only": "oui" - }, { "id": "308624", "product_name": "Amaryllis : 2 boutons pot Ø13cm", @@ -5986,6 +5986,29 @@ "product_seller": "market place", "product_web_only": "non", "id": "Fcq4EWk" + }, + { + "product_name": "Très Joli cactus", + "product_price": "35", + "product_qty": 1, + "product_rating": 2, + "product_breadcrumb_label": "cactus et plantes grasses", + "product_instock": [ + "disponible" + ], + "product_url_picture": "https//picsum.photos/id/18/200/300", + "product_discount_code": "", + "product_color": "", + "product_unitprice_ati": "", + "product_unitprice_tf": "", + "product_discount_tf": "", + "product_discount_ati": "", + "product_url_page": "", + "product_shipping_method": null, + "product_image_source": "", + "product_seller": "market place", + "product_web_only": "non", + "id": "mO_eBN3" } ], "users": [ diff --git a/src/app/modules/admin/pages/page-ajouter/page-ajouter.component.ts b/src/app/modules/admin/pages/page-ajouter/page-ajouter.component.ts index 7156692..d577db0 100644 --- a/src/app/modules/admin/pages/page-ajouter/page-ajouter.component.ts +++ b/src/app/modules/admin/pages/page-ajouter/page-ajouter.component.ts @@ -60,7 +60,8 @@ export class PageAjouterComponent implements OnInit { }; this.adminService.addPlant(plante)?.subscribe((resp)=>{ + this.router.navigate(['admin']); }) - this.router.navigate(['admin']); + } }