feat: by ค่า productGroup

This commit is contained in:
Net 2024-06-11 15:04:40 +07:00
parent 22f7329267
commit 253303dbf9

View file

@ -206,7 +206,7 @@ onMounted(async () => {
<div class="row q-col-gutter-lg"> <div class="row q-col-gutter-lg">
<div <div
:class="`${$q.screen.gt.sm ? 'col-3' : $q.screen.gt.xs ? 'col-6' : 'col-12'}`" :class="`${$q.screen.gt.sm ? 'col-3' : $q.screen.gt.xs ? 'col-6' : 'col-12'}`"
v-for="i in isType ? 4 : 6" v-for="(v, i) in isType ? productGroup : productGroup"
:key="i" :key="i"
> >
<ProductCardComponent <ProductCardComponent
@ -214,20 +214,28 @@ onMounted(async () => {
:title="cardTypeData.title" :title="cardTypeData.title"
:subtitle="cardTypeData.subtitle" :subtitle="cardTypeData.subtitle"
:date="cardTypeData.date" :date="cardTypeData.date"
:status="cardTypeData.status" :status="v.status"
:color="cardTypeData.color" :color="cardTypeData.color"
@view-detail="drawerInfo = true" @view-detail="drawerInfo = true"
@on-click="drawerInfo = true" @on-click="
() => {
if (isType === true) drawerInfo = true;
}
"
/> />
<ProductCardComponent <ProductCardComponent
v-else v-else
:title="cardData.title" :title="v.name"
:subtitle="cardData.subtitle" :subtitle="v.code"
:date="cardData.date" :date="new Date(v.updatedAt)"
:status="cardData.status" :status="v.status"
:color="cardData.color" color="var(--pink-6)"
@view-detail="drawerInfo = true" @view-detail="drawerInfo = true"
@on-click="isType = true" @on-click="
() => {
if (isType === false) isType = true;
}
"
/> />
</div> </div>
<div <div