From c8128ba379cf72e5863bc4fcd7877d5ddd2e0361 Mon Sep 17 00:00:00 2001 From: Laura Luiz Date: Thu, 4 Apr 2019 20:52:10 +0200 Subject: [PATCH 01/69] Refactor cart-like components for better re-use --- src/assets/scss/_cart.scss | 16 +- src/components/cartdetail/CartContent.vue | 138 -------------- .../cartdetail/LineItemDeleteForm.vue | 26 +++ .../cartdetail/LineItemQuantityForm.vue | 69 +++++++ src/components/cartdetail/PageCartDetail.vue | 86 ++++++++- ...alculation.vue => CartLikePriceDetail.vue} | 0 src/components/common/CartLikeSummary.vue | 96 ++++++++++ src/components/common/LineItem.vue | 180 ------------------ src/components/common/LineItemInfo.vue | 54 ++++++ src/components/common/ProductThumbnail.vue | 10 +- src/components/header/MiniCart.vue | 41 ++-- .../useraccount/myorders/OrderDetail.vue | 30 +-- src/mixins/productMixin.js | 7 + 13 files changed, 356 insertions(+), 397 deletions(-) delete mode 100644 src/components/cartdetail/CartContent.vue create mode 100644 src/components/cartdetail/LineItemDeleteForm.vue create mode 100644 src/components/cartdetail/LineItemQuantityForm.vue rename src/components/common/{PriceCalculation.vue => CartLikePriceDetail.vue} (100%) create mode 100644 src/components/common/CartLikeSummary.vue delete mode 100644 src/components/common/LineItem.vue create mode 100644 src/components/common/LineItemInfo.vue diff --git a/src/assets/scss/_cart.scss b/src/assets/scss/_cart.scss index 959a7724..b5d419e1 100755 --- a/src/assets/scss/_cart.scss +++ b/src/assets/scss/_cart.scss @@ -125,8 +125,12 @@ height: 15px; margin-right: 0.5em; } -.single-cart-item { + +.cart-content .single-cart-item { margin: 0 1em; +} + +.single-cart-item { padding: 1em; border-bottom: 1px solid $alto; } @@ -399,16 +403,10 @@ } // MIN-WIDTH ------------------------------------------------------------------------------ -@media screen and (min-width: 991px) { - .single-cart-item { - height: 169px; - min-height: 169px; - } -} @media screen and (min-width: 768px) { .single-cart-item { - min-height: 230px; - height: 230px; + min-height: 169px; + height: 169px; .cart-edit-delete { min-height: 100%; height: 100%; diff --git a/src/components/cartdetail/CartContent.vue b/src/components/cartdetail/CartContent.vue deleted file mode 100644 index 1c5a5bfc..00000000 --- a/src/components/cartdetail/CartContent.vue +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -en: - description: "Description" - quantity: "Quantity" - price: "Price" - total: "Total" -de: - description: "Beschreibung" - quantity: "Menge" - price: "Preis" - total: "Gesamtpreis" - diff --git a/src/components/cartdetail/LineItemDeleteForm.vue b/src/components/cartdetail/LineItemDeleteForm.vue new file mode 100644 index 00000000..4f07b1c8 --- /dev/null +++ b/src/components/cartdetail/LineItemDeleteForm.vue @@ -0,0 +1,26 @@ + + + diff --git a/src/components/cartdetail/LineItemQuantityForm.vue b/src/components/cartdetail/LineItemQuantityForm.vue new file mode 100644 index 00000000..110aabdb --- /dev/null +++ b/src/components/cartdetail/LineItemQuantityForm.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/src/components/cartdetail/PageCartDetail.vue b/src/components/cartdetail/PageCartDetail.vue index 3c32e789..f80a4281 100644 --- a/src/components/cartdetail/PageCartDetail.vue +++ b/src/components/cartdetail/PageCartDetail.vue @@ -17,13 +17,25 @@ -
+
- - + + +
@@ -48,12 +60,17 @@ + + +en: + description: "Description" + quantity: "Quantity" + price: "Price" + total: "Total" +de: + description: "Beschreibung" + quantity: "Menge" + price: "Preis" + total: "Gesamtpreis" + diff --git a/src/components/common/LineItem.vue b/src/components/common/LineItem.vue deleted file mode 100644 index ea74c357..00000000 --- a/src/components/common/LineItem.vue +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - -en: - delete: "Delete" - quantity: "Quantity" - price: "Price" - total: "Total" -de: - delete: "Löschen" - quantity: "Menge" - price: "Preis" - total: "Gesamtpreis" - diff --git a/src/components/common/LineItemInfo.vue b/src/components/common/LineItemInfo.vue new file mode 100644 index 00000000..34b05735 --- /dev/null +++ b/src/components/common/LineItemInfo.vue @@ -0,0 +1,54 @@ + + + diff --git a/src/components/common/ProductThumbnail.vue b/src/components/common/ProductThumbnail.vue index 19077ca4..fa7d6916 100644 --- a/src/components/common/ProductThumbnail.vue +++ b/src/components/common/ProductThumbnail.vue @@ -1,6 +1,6 @@