|
@@ -1,5 +1,12 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <q-card class="financial-card">
|
|
|
|
|
|
|
+ <q-card
|
|
|
|
|
+ class="financial-card"
|
|
|
|
|
+ :class="{
|
|
|
|
|
+ 'financial-card--selected': selected,
|
|
|
|
|
+ 'financial-card--clickable': clickable,
|
|
|
|
|
+ }"
|
|
|
|
|
+ @click="clickable && emit('click')"
|
|
|
|
|
+ >
|
|
|
<div class="row justify-between items-start no-wrap">
|
|
<div class="row justify-between items-start no-wrap">
|
|
|
<span class="text-subtitle1 text-dark card-title">{{ title }}</span>
|
|
<span class="text-subtitle1 text-dark card-title">{{ title }}</span>
|
|
|
<q-icon :name="icon" size="22px" color="dark" />
|
|
<q-icon :name="icon" size="22px" color="dark" />
|
|
@@ -41,8 +48,12 @@ const props = defineProps({
|
|
|
integerLabel: { type: String, default: "pagamentos restantes" },
|
|
integerLabel: { type: String, default: "pagamentos restantes" },
|
|
|
description: { type: String, default: "" },
|
|
description: { type: String, default: "" },
|
|
|
hideValues: { type: Boolean, default: false },
|
|
hideValues: { type: Boolean, default: false },
|
|
|
|
|
+ clickable: { type: Boolean, default: false },
|
|
|
|
|
+ selected: { type: Boolean, default: false },
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+const emit = defineEmits(["click"]);
|
|
|
|
|
+
|
|
|
const formattedValue = computed(() =>
|
|
const formattedValue = computed(() =>
|
|
|
props.hideValues
|
|
props.hideValues
|
|
|
? "R$ ••••"
|
|
? "R$ ••••"
|
|
@@ -59,6 +70,18 @@ const hasFooter = computed(
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
@import "src/css/quasar.variables.scss";
|
|
@import "src/css/quasar.variables.scss";
|
|
|
|
|
|
|
|
|
|
+.financial-card--clickable {
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+
|
|
|
|
|
+ &:hover {
|
|
|
|
|
+ box-shadow: 0 0 0 1.5px $primary !important;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.financial-card--selected {
|
|
|
|
|
+ box-shadow: 0 0 0 2px $primary !important;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.financial-card {
|
|
.financial-card {
|
|
|
flex: 1 1 0;
|
|
flex: 1 1 0;
|
|
|
min-width: 220px;
|
|
min-width: 220px;
|