diff --git a/locales/en.yml b/locales/en.yml
index 4f36d30..962fa06 100644
--- a/locales/en.yml
+++ b/locales/en.yml
@@ -195,7 +195,6 @@ account:
order-no: No
order-name: Name
order-date: Date
- order-status: Status
order-total: Total
order-action: Action
save-changes: Save changes
diff --git a/src/components.d.ts b/src/components.d.ts
index 81e92fb..19071a5 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -11,6 +11,7 @@ declare module 'vue' {
CarbonLanguage: typeof import('~icons/carbon/language')['default']
CarbonMoon: typeof import('~icons/carbon/moon')['default']
CarbonSun: typeof import('~icons/carbon/sun')['default']
+ CarbonWarning: typeof import('~icons/carbon/warning')['default']
CASellerList: typeof import('./components/admin/CASellerList.vue')['default']
CBAccount: typeof import('./components/buyer/CBAccount.vue')['default']
CBBanner: typeof import('./components/buyer/CBBanner.vue')['default']
@@ -30,6 +31,7 @@ declare module 'vue' {
CBMenuItem: typeof import('./components/head/CBMenuItem.vue')['default']
CBMonthSale: typeof import('./components/buyer/CBMonthSale.vue')['default']
CBOurProducts: typeof import('./components/buyer/CBOurProducts.vue')['default']
+ CBreadcrumbNavigation: typeof import('./components/CBreadcrumbNavigation.vue')['default']
CBSearch: typeof import('./components/head/CBSearch.vue')['default']
CBService: typeof import('./components/buyer/CBService.vue')['default']
CBSwipper: typeof import('./components/buyer/CBSwipper.vue')['default']
@@ -43,7 +45,8 @@ declare module 'vue' {
CMap: typeof import('./components/CMap.vue')['default']
Counter: typeof import('./components/Counter.vue')['default']
CPagination: typeof import('./components/CPagination.vue')['default']
- CProductCard: typeof import('./components/CProductCard.vue')['default']
+ CProductCardFlow: typeof import('./components/CProductCardFlow.vue')['default']
+ CProductCardGrid: typeof import('./components/CProductCardGrid.vue')['default']
CProgress: typeof import('./components/CProgress.vue')['default']
CSChooseCategory: typeof import('./components/seller/CSChooseCategory.vue')['default']
CSFooter: typeof import('./components/seller/CSFooter.vue')['default']
@@ -81,6 +84,7 @@ declare module 'vue' {
IBMinus: typeof import('./components/icons/product/IBMinus.vue')['default']
IBook: typeof import('./components/icons/about/IBook.vue')['default']
IBOrder: typeof import('./components/icons/account/IBOrder.vue')['default']
+ IBOrderArrowRight: typeof import('./components/icons/account/IBOrderArrowRight.vue')['default']
IBPassword: typeof import('./components/icons/auth/IBPassword.vue')['default']
IBPayment: typeof import('./components/icons/account/IBPayment.vue')['default']
IBPlus: typeof import('./components/icons/product/IBPlus.vue')['default']
@@ -92,6 +96,7 @@ declare module 'vue' {
IBShipping: typeof import('./components/icons/services/IBShipping.vue')['default']
IBSupport: typeof import('./components/icons/services/IBSupport.vue')['default']
IBThreeDot: typeof import('./components/icons/product/IBThreeDot.vue')['default']
+ IBTrackOrder: typeof import('./components/icons/account/IBTrackOrder.vue')['default']
IBUnlock: typeof import('./components/icons/auth/IBUnlock.vue')['default']
IBUsername: typeof import('./components/icons/auth/IBUsername.vue')['default']
ICake: typeof import('./components/icons/ICake.vue')['default']
@@ -172,6 +177,8 @@ declare module 'vue' {
PSRegister: typeof import('./components/partterns/seller/PSRegister.vue')['default']
README: typeof import('./components/README.md')['default']
RMenu: typeof import('./components/header/RMenu.vue')['default']
+ RProductCardGrid: typeof import('./components/rendering/RProductCardGrid.vue')['default']
+ RProductSearch: typeof import('./components/rendering/RProductSearch.vue')['default']
SHead: typeof import('./components/seller/SHead.vue')['default']
SLMenu: typeof import('./components/seller/SLMenu.vue')['default']
}
diff --git a/src/components/CBreadcrumbNavigation.vue b/src/components/CBreadcrumbNavigation.vue
new file mode 100644
index 0000000..f69491d
--- /dev/null
+++ b/src/components/CBreadcrumbNavigation.vue
@@ -0,0 +1,148 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/CProductCardFlow.vue b/src/components/CProductCardFlow.vue
new file mode 100644
index 0000000..ae43af0
--- /dev/null
+++ b/src/components/CProductCardFlow.vue
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+ -10%
+ {{ t('search.new') }}
+
+
+
![product_img]()
+
+
+
+
+
+
+ {{ props.card.name }}
+
+
+
![](https://img.icons8.com/fluency/48/ffffff/star.png)
+
+
+
+ $999
+
+
+ {{ productPrice }}
+
+
+
+
+
+
+
+
{{ t('search.availability') }}: {{ productStock }} In Stock
+
+
+
+
+ {{ t('search.add-to-cart') }}
+
+
+
+
+
+
+
+
+
diff --git a/src/components/CProductCard.vue b/src/components/CProductCardGrid.vue
similarity index 98%
rename from src/components/CProductCard.vue
rename to src/components/CProductCardGrid.vue
index f4f40d1..6300587 100644
--- a/src/components/CProductCard.vue
+++ b/src/components/CProductCardGrid.vue
@@ -65,7 +65,7 @@ const onVisitProduct = (prod_id, shop_id) => {
-
![thumbnail]()
+
diff --git a/src/components/head/CBSearch.vue b/src/components/head/CBSearch.vue
index 756f37a..2c471fd 100644
--- a/src/components/head/CBSearch.vue
+++ b/src/components/head/CBSearch.vue
@@ -6,6 +6,7 @@ const useKeyword = keyword()
const key = ref(useKeyword.savedKeyword)
const router = useRouter()
+
const go = async() => {
if (key.value) {
await router.push(`/search/${encodeURIComponent(key.value)}`)
@@ -13,6 +14,7 @@ const go = async() => {
key.value = ''
}
}
+
diff --git a/src/components/icons/account/IBOrderArrowRight.vue b/src/components/icons/account/IBOrderArrowRight.vue
new file mode 100644
index 0000000..ae6b6c5
--- /dev/null
+++ b/src/components/icons/account/IBOrderArrowRight.vue
@@ -0,0 +1,3 @@
+
+
+
diff --git a/src/components/icons/account/IBTrackOrder.vue b/src/components/icons/account/IBTrackOrder.vue
new file mode 100644
index 0000000..61b0fe7
--- /dev/null
+++ b/src/components/icons/account/IBTrackOrder.vue
@@ -0,0 +1,3 @@
+
+
+
diff --git a/src/components/rendering/RProductCardGrid.vue b/src/components/rendering/RProductCardGrid.vue
new file mode 100644
index 0000000..8c0edbf
--- /dev/null
+++ b/src/components/rendering/RProductCardGrid.vue
@@ -0,0 +1,21 @@
+
+
+
+
![thumbnail](/img/product/1.jpg)
+
+
+
+
diff --git a/src/data/order_id.json b/src/data/order_id.json
new file mode 100644
index 0000000..8f7609d
--- /dev/null
+++ b/src/data/order_id.json
@@ -0,0 +1,64 @@
+{
+ "status": true,
+ "data": {
+ "id": 4,
+ "name": "M220 Silent Wireless Mouse 1600DPI Optical Tracking accessories mice wireless mouse wireless gaming mice computer mouse",
+ "variations": [
+ "Black M220"
+ ],
+ "quantity": 3,
+ "total": "369",
+ "grand_total": "369",
+ "created_at": "2022-06-05 06:57:47",
+ "user_id": 21,
+ "product_id": 25,
+ "product_model_id": 55,
+ "received_address_id": 22,
+ "pickup_address_id": null,
+ "status_id": 1,
+ "shop_id": 6,
+ "product": {
+ "id": 25,
+ "name": "M220 Silent Wireless Mouse 1600DPI Optical Tracking accessories mice wireless mouse wireless gaming mice computer mouse",
+ "description": "M220 Silent Wireless Mouse 1600DPI Optical Tracking accessories mice wireless mouse wireless gaming mice computer mouse wireless bluetooth wireless gaming mouse wireless mouse silent blue tooth mouse\\nSpecification\\nModel: M220\\nType\uff1awireless mouse\\nColor\uff1ablack \/ red \/ blue\\nWireless transmission frequency:\uff1a2.4GHz\\nNumber of buttons\uff1a3\\nInterface\uff1aUSB\\nResolution\uff1a1600DPI\\nOperating distance\uff1a10 m\\nBattery type\uff1aAA\\nErgonomics\uff1aYes\\nApplicable system\uff1aWindows 10 or Higher version \/ Windows 8 \/ Windows RT \/ Windows 7 \/ Mac OS X 10.5 or Higher version \/ Chrome OS \/ Linus Kernel 2.6+2\\nMouse size\uff1a99 * 60 * 39 mm\\nWeight of mouse (including battery) \uff1a85g\\naccessories mice wireless mouse wireless gaming mice computer mouse ergonomic mouse wireless bluetooth wireless gaming mouse wireless mouse silent blue tooth mouse",
+ "weight": "5000",
+ "avg_rating": "0",
+ "sold": 0,
+ "images": [
+ "demo-dd787648e6a85debc81100ab1d12d724",
+ "demo-57e75a92ec7668c4fee7fc1314bbf69e"
+ ],
+ "videos": [],
+ "variations": [
+ {
+ "name": "Color",
+ "options": [
+ "Black M220"
+ ]
+ }
+ ],
+ "created_at": "2022-06-04 07:14:57",
+ "shop_id": 6,
+ "brand_id": 1,
+ "status_id": 1
+ },
+ "received_address": {
+ "id": 22,
+ "full_name": "Tran Nguyen Thuong Truong",
+ "phone": "12345678911",
+ "state": "HoChiMinh",
+ "city": "Thu Duc",
+ "town": "Linh Trung",
+ "address": "International University",
+ "is_home": null
+ },
+ "pickup_address": null,
+ "progresses": [
+ {
+ "note": "",
+ "created_at": "2022-06-05 06:57:47",
+ "status_id": 1
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/src/layouts/buyer/LBOrder.vue b/src/layouts/buyer/LBOrder.vue
new file mode 100644
index 0000000..af0b43b
--- /dev/null
+++ b/src/layouts/buyer/LBOrder.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/buyer/account/address.vue b/src/pages/buyer/account/address.vue
index a67d81c..0503f37 100644
--- a/src/pages/buyer/account/address.vue
+++ b/src/pages/buyer/account/address.vue
@@ -81,8 +81,8 @@ const handleDelete = async() => {
@@ -176,10 +176,10 @@ const handleDelete = async() => {
-
diff --git a/src/pages/buyer/account/credit.vue b/src/pages/buyer/account/credit.vue
index 390ce1e..7dcaec9 100644
--- a/src/pages/buyer/account/credit.vue
+++ b/src/pages/buyer/account/credit.vue
@@ -47,13 +47,13 @@ watch(async() => {
const handleCreate = async(e) => {
e.preventDefault()
await AccountRequest.createCreditCard(payload)
- useToast.updateToast('sucess', 'your card has been created successfully!', true)
+ useToast.updateToast('success', 'A new card has been created successfully!', true)
}
// ----------------------------------
const handleUpdate = async(e) => {
e.preventDefault()
await AccountRequest.updateCreditCardById(user.credit.id, payload)
- useToast.updateToast('updated', 'Your card has been successfully!', true)
+ useToast.updateToast('success', 'Your card has been updated!', true)
}
// ------------------------------
const handleDelete = async(e) => {
diff --git a/src/pages/buyer/account/dashboard.vue b/src/pages/buyer/account/dashboard.vue
index 51d923e..9e490ba 100644
--- a/src/pages/buyer/account/dashboard.vue
+++ b/src/pages/buyer/account/dashboard.vue
@@ -61,6 +61,10 @@ watch(async() => {
// --------------------------------------------
const genderType = reactive([
+ {
+ id: 0,
+ type: 'Others',
+ },
{
id: 1,
type: 'Male',
@@ -68,10 +72,6 @@ const genderType = reactive([
{
id: 2,
type: 'Female',
- },
- {
- id: 3,
- type: 'Others',
}])
const handleUpdate = async() => {
await AccountRequest.updateProfile(payload)
@@ -131,7 +131,7 @@ const signOut = async() => {
-
+
-
+
-
-
+
{{ t('account.save-changes') }}
diff --git a/src/pages/buyer/account/orders.vue b/src/pages/buyer/account/orders.vue
index 8356718..7949404 100644
--- a/src/pages/buyer/account/orders.vue
+++ b/src/pages/buyer/account/orders.vue
@@ -4,13 +4,12 @@ meta:
@@ -53,9 +57,6 @@ watch(async() => {
{{ t('account.order-no') }} |
{{ t('account.order-name') }} |
- {{ t('account.order-date') }} |
- {{ t('account.order-status') }} |
- Quantity |
{{ t('account.order-total') }} |
{{ t('account.order-action') }} |
@@ -65,11 +66,14 @@ watch(async() => {
{{ index+1 }} |
{{ item.name }} |
- {{ item.created_at }} |
- {{ orderStatus(item.status_id) }} |
- {{ item.quantity }} |
- ${{ item.total }} |
- Download |
+
+ ${{ item.total }}
+ |
+
+
+ Track
+
+ |
diff --git a/src/pages/buyer/cart.vue b/src/pages/buyer/cart.vue
index 48a23e6..ffa519d 100644
--- a/src/pages/buyer/cart.vue
+++ b/src/pages/buyer/cart.vue
@@ -38,7 +38,7 @@ onMounted(async() => {
loading.isLoading = true
const { data: cartData } = await CartRequest.getCart({ params: { limit: payget.limit, page: payget.page } })
loading.isLoading = false
- cart.result = cartData.data
+ cart.result = cartData
})
// ---------------------------------------------
diff --git a/src/pages/buyer/cart_nhap.vue b/src/pages/buyer/cart_nhap.vue
deleted file mode 100644
index ffa519d..0000000
--- a/src/pages/buyer/cart_nhap.vue
+++ /dev/null
@@ -1,547 +0,0 @@
-
-meta:
- layout: buyer/LBCart
-
-
-
-
-
-
-
-
-
-
-
-
- š {{ t('cart.preview') }}
- |
-
- š· {{ t('cart.name') }}
- |
-
- ā³ {{ t('cart.variations') }}
- |
-
- š {{ t('cart.price') }}
- |
-
- ā {{ t('cart.quantity') }}
- |
-
- š° {{ t('cart.subtotal') }}
- |
-
- š {{ t('cart.action') }}
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
- {{ t('cart.total') }}${{ floorNumber(cart.result.reduce((accum,item) => accum + item.total_price, 0)) }}
-
-
-
-
-
- {{ t('cart.checkout') }}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/pages/buyer/order/[order].vue b/src/pages/buyer/order/[order].vue
new file mode 100644
index 0000000..e3a7f21
--- /dev/null
+++ b/src/pages/buyer/order/[order].vue
@@ -0,0 +1,230 @@
+
+meta:
+ layout: buyer/LBOrder
+
+
+
+
+
+
+
+
+
+
Order check detail
+
+
+
+
+
+
![](https://drive.google.com/uc?id=15iXUI6DkRr5Zcp0yH5uF2U47ycr-WzUY)
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('account.order-date') }}: {{ handleDate(payget.created_at) }}
+
+
+ Order ID: {{ payget.id }}
+
+
+ Product ID: {{ payget.product_id }}
+
+
+
+
+ {{ t('account.order-total') }}: ${{ payget.total }}
+
+
+ Quantity: {{ payget.quantity }}
+
+
+ {{ order.orderVariation.name }}: {{ order.orderVariation.options }}
+
+
+
+
+
{{ payget.name }}
+
+
+
+
![product_order_img]()
+
+
+
+
+
+ Address
+
+
+
+ Name: {{ order.orderAddress.full_name }}
+
+
Phone: {{ order.orderAddress.phone }}
+
Address: {{ order.orderAddress.address }}, {{ order.orderAddress.town }}, {{ order.orderAddress.city }}, {{ order.orderAddress.state }}
+
+
+
+
+ See product
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/search/[keyword].vue b/src/pages/search/[keyword].vue
index 92771c2..759bd25 100644
--- a/src/pages/search/[keyword].vue
+++ b/src/pages/search/[keyword].vue
@@ -5,11 +5,15 @@ meta:
@@ -339,7 +180,7 @@ const products = reactive([{
@@ -383,108 +224,20 @@ const products = reactive([{
-
-
-
+
-
-
-
- -10%
- {{ t('search.new') }}
-
-
-
-
-
-
- {{ prod.desc }}
-
-
-
![](https://img.icons8.com/fluency/48/ffffff/star.png)
-
-
-
- ${{ prod.price }}
-
-
- ${{ prod.discountPrice }}
-
-
-
-
-
-
{{ t('search.availability') }}: {{ prod.quantity }} In Stock
-
-
-
- {{ t('search.add-to-cart') }}
-
-
-
-
-
+
@@ -696,17 +449,15 @@ input[type=range]:focus::-webkit-slider-runnable-track {
font-weight: lighter;
cursor: pointer;
}
-.product-tag > li:hover{
+.product-tag > li:hover,
+.product-tag > li.active{
background: #F33535;
color: white;
}
.product-infor{
font-family: "Gilroy-Light";
}
-/* ************************ POPUP MODAL **************************** */
-.popup-modal{
- animation: popup-animate 0.1s linear;
-}
+
/* ************************ TRANSITION ***************************** */
.slide-fade-enter-active {
transition: all 0.3s ease-out;
diff --git a/src/services/order-request.js b/src/services/order-request.js
index ddd7b5c..9a20eec 100644
--- a/src/services/order-request.js
+++ b/src/services/order-request.js
@@ -12,7 +12,7 @@ class OrderRequest {
}
getOrdersById(id) {
- const url = `/user/orders${id}`
+ const url = `/user/orders/${id}`
return AxiosInstance.get(url)
}
diff --git a/src/stores/order.ts b/src/stores/order.ts
index 1ff9f4a..5d8e164 100644
--- a/src/stores/order.ts
+++ b/src/stores/order.ts
@@ -1,7 +1,23 @@
-import { defineStore } from 'pinia'
+import { acceptHMRUpdate, defineStore } from 'pinia'
import { ref } from 'vue'
export const useOrder = defineStore('order', () => {
const payget = ref
([])
- return { payget }
+
+ const savedOrder = ref('')
+ const previousOrder = ref(new Set())
+
+ const usedOrder = computed(() => Array.from(previousOrder.value))
+ function setNewOrder(order_id: string) {
+ if (savedOrder.value)
+ previousOrder.value.add(savedOrder.value)
+
+ savedOrder.value = order_id
+ }
+
+ const orderVariation = ref([])
+ const orderAddress = ref('')
+ return { payget, savedOrder, previousOrder, usedOrder, setNewOrder, orderVariation, orderAddress }
})
+if (import.meta.hot)
+ import.meta.hot.accept(acceptHMRUpdate(useOrder, import.meta.hot))
diff --git a/src/styles/variables.css b/src/styles/variables.css
index 9bccb98..c95a2c4 100644
--- a/src/styles/variables.css
+++ b/src/styles/variables.css
@@ -16,4 +16,6 @@
--dark-bg: #111a2e;
--dark-text: #94a3b8;
+
+ --light-rendering: #d1d5db;
}
\ No newline at end of file
diff --git a/src/utils/date.ts b/src/utils/date.ts
index d2f948c..f026000 100644
--- a/src/utils/date.ts
+++ b/src/utils/date.ts
@@ -1,4 +1,4 @@
export const handleDate = (date: string) => {
const result = new Date(date)
- return `${result.getUTCDate()}/${result.getUTCMonth()}/${result.getUTCFullYear()}`
+ return `${result.getDate()}/${result.getMonth() + 1}/${result.getFullYear()}`
}
diff --git a/windi.config.ts b/windi.config.ts
index ff7d63c..cb925d4 100644
--- a/windi.config.ts
+++ b/windi.config.ts
@@ -6,7 +6,7 @@ export default defineConfig({
darkMode: 'class',
// https://windicss.org/posts/v30.html#attributify-mode
attributify: true,
- safelist: ['accent-[#34B1AA]', 'accent-[#FFAF00]', 'accent-[#F95F53]', 'accent-[#34B1AA]', 'bg-[#FCA130]', 'bg-[#F93E3E]', 'bg-[#49CC90]', 'bg-[#61AFFE]', 'bg-[#6B7280]', 'bg-[#9061F9]', 'bg-[#C27803]', 'bg-[#E74694]'].join(' '),
+ safelist: ['accent-[#34B1AA]', 'accent-[#FFAF00]', 'accent-[#F95F53]', 'accent-[#34B1AA]', 'bg-[#FCA130]', 'bg-[#F93E3E]', 'bg-[#49CC90]', 'bg-[#61AFFE]', 'bg-[#6B7280]', 'bg-[#9061F9]', 'bg-[#C27803]', 'bg-[#E74694]', 'before:w-[10%]', 'before:w-[29%]', 'before:w-[51%]', 'before:w-[75%]', 'before:w-[99%]'].join(' '),
plugins: [
typography(),
],