From aa5cf8d71cb0204773999e150e225ccdcdd23616 Mon Sep 17 00:00:00 2001 From: dungnh-3393 Date: Wed, 2 Oct 2024 16:18:49 +0700 Subject: [PATCH] UI_Detail_product_Order_list_Order_detail_view --- front-end/src/assets/base.css | 5 + front-end/src/components/cart/CartItem.vue | 15 +- .../src/components/layouts/MainLayout.vue | 4 +- .../src/components/layouts/PaymentLayout.vue | 4 +- front-end/src/components/order/OrderItem.vue | 57 ++++ .../src/components/product/ProductItem.vue | 5 +- front-end/src/constants/products.ts | 271 ++++++++++++++++++ front-end/src/locales/en.json | 18 +- front-end/src/locales/vi.json | 18 +- front-end/src/router/index.ts | 24 +- front-end/src/views/CartView.vue | 110 +++---- front-end/src/views/OrderDetailView.vue | 38 +++ front-end/src/views/OrderHistoryView.vue | 69 +++++ front-end/src/views/ProductDetailView.vue | 118 ++++++++ front-end/src/views/ProductsView.vue | 76 +---- 15 files changed, 695 insertions(+), 137 deletions(-) create mode 100644 front-end/src/components/order/OrderItem.vue create mode 100644 front-end/src/constants/products.ts create mode 100644 front-end/src/views/OrderDetailView.vue create mode 100644 front-end/src/views/OrderHistoryView.vue create mode 100644 front-end/src/views/ProductDetailView.vue diff --git a/front-end/src/assets/base.css b/front-end/src/assets/base.css index 05d5e0d..5bfb865 100644 --- a/front-end/src/assets/base.css +++ b/front-end/src/assets/base.css @@ -36,6 +36,11 @@ --section-gap: 160px; } +:root { + display: flex; + justify-content: center; +} + @media (prefers-color-scheme: dark) { :root { --color-background: var(--vt-c-black); diff --git a/front-end/src/components/cart/CartItem.vue b/front-end/src/components/cart/CartItem.vue index 73d05eb..f084021 100644 --- a/front-end/src/components/cart/CartItem.vue +++ b/front-end/src/components/cart/CartItem.vue @@ -12,19 +12,24 @@ export default defineComponent({ type: Number, required: true, }, + isOrderDetailView: { + type: Boolean, + default: false, + }, }, setup(props) { const { t } = useI18n() - const removeItem = () => { + const removeCartItem = () => { console.log(`remove ${props.item.id}`) } return { t, - removeItem + removeCartItem } } }) +