Skip to content

Commit

Permalink
Merge pull request #73 from thuongtruong1009/seller/new-product
Browse files Browse the repository at this point in the history
feat(add): new products management for seller
  • Loading branch information
thuongtruong1009 authored May 5, 2022
2 parents ccb8f31 + 7c8f246 commit 65f56dd
Show file tree
Hide file tree
Showing 16 changed files with 1,497 additions and 9 deletions.
1 change: 1 addition & 0 deletions public/img/product/new.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ 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']
Expand Down Expand Up @@ -118,11 +117,13 @@ declare module 'vue' {
IRupee: typeof import('./components/icons/header/IRupee.vue')['default']
ISave: typeof import('./components/icons/ISave.vue')['default']
ISearch: typeof import('./components/icons/ISearch.vue')['default']
ISEdit: typeof import('./components/icons/seller/ISEdit.vue')['default']
ISell: typeof import('./components/icons/ISell.vue')['default']
ISetting: typeof import('./components/icons/ISetting.vue')['default']
IShakeHand: typeof import('./components/icons/about/IShakeHand.vue')['default']
IShop: typeof import('./components/icons/IShop.vue')['default']
IShopee: typeof import('./components/icons/IShopee.vue')['default']
ISNew: typeof import('./components/icons/seller/ISNew.vue')['default']
IStar: typeof import('./components/icons/IStar.vue')['default']
IStars: typeof import('./components/icons/IStars.vue')['default']
IStatus: typeof import('./components/icons/IStatus.vue')['default']
Expand Down
3 changes: 3 additions & 0 deletions src/components/icons/seller/ISEdit.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" width="1.2em" height="1.2em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M4.333 16.048L16.57 3.81a2.56 2.56 0 0 1 3.62 3.619L7.951 19.667a2 2 0 0 1-1.022.547L3 21l.786-3.93a2 2 0 0 1 .547-1.022Z" /><path d="m14.5 6.5l3 3" /></g></svg>
</template>
3 changes: 3 additions & 0 deletions src/components/icons/seller/ISNew.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1024 1024"><path fill="currentColor" d="M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" /><path fill="currentColor" d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448s448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372s372 166.6 372 372s-166.6 372-372 372z" /></svg>
</template>
6 changes: 3 additions & 3 deletions src/components/seller/SLMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const onClick = (index) => {
</div>
</div>
<div v-if="isOrder === true" class="grid pl-10">
<router-link to="/seller/orders/all" href="seller/orders/all" :style="isClick.zero ? {'color': 'red'} : {'color': 'black'}" @click="onClick('zero')">
<router-link to="/seller/orders/all" :style="isClick.zero ? {'color': 'red'} : {'color': 'black'}" @click="onClick('zero')">
<span class="text-xl">•</span> All order
</router-link>
<router-link to="/seller/orders/all" :style="isClick.one ? {'color': 'red'} : {'color': 'black'}" @click="onClick('one')">
Expand All @@ -65,10 +65,10 @@ const onClick = (index) => {
</div>
</div>
<div v-if="isProd === true" class="grid pl-10">
<router-link to="/seller/prods/all" :style="isClick.two ? {'color': 'red'} : {'color': 'black'}" @click="onClick('two')">
<router-link to="/seller/product/all" :style="isClick.two ? {'color': 'red'} : {'color': 'black'}" @click="onClick('two')">
<span class="text-xl">•</span> All products
</router-link>
<router-link to="/seller/prods/add" :style="isClick.three ? {'color': 'red'} : {'color': 'black'}" @click="onClick('three')">
<router-link to="/seller/product/category" :style="isClick.three ? {'color': 'red'} : {'color': 'black'}" @click="onClick('three')">
<span class="text-xl">•</span> Add products
</router-link>
</div>
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions src/layouts/seller/product/LSProdNew.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template>
<main class="text-gray-700 dark:text-gray-200 overflow-x-hidden h-screen w-screen bg-[#F6F6F6]">
<SHead />
<div class="w-full flex justify-center py-2 bg-[#F6F6F6]">
<router-view />
</div>
</main>
</template>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<route lang="yaml">
meta:
layout: seller/prod/LSProdAll
layout: seller/product/LSProdAll
</route>

<script setup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<route lang="yaml">
meta:
layout: seller/prod/LSProdAdd
layout: seller/product/LSProdAdd
</route>

<script setup>
Expand Down Expand Up @@ -109,9 +109,11 @@ const productsList = reactive([
Thiết Bị Điện Gia Dụng > Thiết bị điện gia dụng lớn > Thiết bị làm mát
</p>
</div>
<button class="bg-[#E54A2B] text-white rounded-md px-10 py-1.5 my-5 shadow-md shadow-gray-300">
Next
</button>
<router-link to="/seller/product/new">
<button class="bg-[#E54A2B] text-white rounded-md px-10 py-1.5 my-5 shadow-md shadow-gray-300">
Next
</button>
</router-link>
</div>
</div>
</template>
Expand Down
Loading

1 comment on commit 65f56dd

@vercel
Copy link

@vercel vercel bot commented on 65f56dd May 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.