Răsfoiți Sursa

feat(products): finaliza card expansible

ebagabee 1 lună în urmă
părinte
comite
922afa9dcf
1 a modificat fișierele cu 16 adăugiri și 7 ștergeri
  1. 16 7
      src/pages/products/components/ProductCard.vue

+ 16 - 7
src/pages/products/components/ProductCard.vue

@@ -2,15 +2,24 @@
   <q-card flat bordered class="product-card">
     <q-expansion-item v-model="expanded" hide-expand-icon>
       <template #header>
-        <div class="row items-center justify-between full-width q-px-md q-py-sm">
+        <div class="row items-center justify-between full-width q-px-xs q-py-sm" style="gap: 8px">
           <span class="text-subtitle2 text-weight-bold text-primary">
             {{ title }}
           </span>
-          <q-icon
-            :name="expanded ? 'mdi-chevron-up' : 'mdi-chevron-down'"
-            size="24px"
-            color="secondary"
-          />
+          <div class="row items-center" style="gap: 8px">
+            <q-badge
+              v-if="!expanded"
+              color="secondary"
+              text-color="black"
+              :label="currentStock"
+              class="q-px-lg q-py-sm"
+            />
+            <q-icon
+              :name="expanded ? 'mdi-chevron-up' : 'mdi-chevron-down'"
+              size="24px"
+              color="secondary"
+            />
+          </div>
         </div>
       </template>
 
@@ -80,7 +89,7 @@ defineProps({
 
 .ellipsis-2-lines {
   display: -webkit-box;
-  -webkit-line-clamp: 2;
+
   -webkit-box-orient: vertical;
   overflow: hidden;
 }