Ver código fonte

feat(packages): display detailed pricing breakdown on package cards

alvesantos 1 semana atrás
pai
commit
bbf65cc8b8
1 arquivos alterados com 18 adições e 10 exclusões
  1. 18 10
      src/pages/packages/components/PackageCard.vue

+ 18 - 10
src/pages/packages/components/PackageCard.vue

@@ -12,16 +12,24 @@
         Duração padrão: {{ (pkg.class_duration_minutes ?? 120) / 60 }}h
         Duração padrão: {{ (pkg.class_duration_minutes ?? 120) / 60 }}h
       </div>
       </div>
 
 
-      <div class="row q-gutter-xs">
-        <q-badge v-if="pkg.pavao" color="primary" outline>
-          Pavão {{ formatToBRLCurrency(pkg.pavao.total_value) }}
-        </q-badge>
-
-        <q-badge v-if="pkg.irrecusavel" color="secondary" outline>
-          Irrecusável {{ formatToBRLCurrency(pkg.irrecusavel.total_value) }}
-        </q-badge>
-
-        <span v-if="!pkg.pavao && !pkg.irrecusavel" class="text-caption text-grey-5">
+      <div class="q-mt-sm row q-col-gutter-sm">
+        <div v-if="pkg.pavao" class="col-12 col-md-6">
+          <div class="text-caption text-weight-bold text-primary q-mb-xs">PAVÃO</div>
+          <div class="text-caption text-grey-8">Matrícula: {{ formatToBRLCurrency(pkg.pavao.registration_value) }}</div>
+          <div class="text-caption text-grey-8">Aulas: {{ formatToBRLCurrency(pkg.pavao.classes_value) }}</div>
+          <div class="text-caption text-grey-8">Materiais: {{ formatToBRLCurrency(pkg.pavao.materials_total_value) }}</div>
+          <div class="text-caption text-weight-bold q-mt-xs">Total: {{ formatToBRLCurrency(pkg.pavao.total_value) }}</div>
+        </div>
+
+        <div v-if="pkg.irrecusavel" class="col-12 col-md-6">
+          <div class="text-caption text-weight-bold text-secondary q-mb-xs">IRRECUSÁVEL</div>
+          <div class="text-caption text-grey-8">Matrícula: {{ formatToBRLCurrency(pkg.irrecusavel.registration_value) }}</div>
+          <div class="text-caption text-grey-8">Aulas: {{ formatToBRLCurrency(pkg.irrecusavel.classes_value) }}</div>
+          <div class="text-caption text-grey-8">Materiais: {{ formatToBRLCurrency(pkg.irrecusavel.materials_total_value) }}</div>
+          <div class="text-caption text-weight-bold q-mt-xs">Total: {{ formatToBRLCurrency(pkg.irrecusavel.total_value) }}</div>
+        </div>
+
+        <span v-if="!pkg.pavao && !pkg.irrecusavel" class="col-12 text-caption text-grey-5">
           Sem precificação definida
           Sem precificação definida
         </span>
         </span>
       </div>
       </div>