|
|
@@ -65,6 +65,17 @@
|
|
|
:show-search-field="true"
|
|
|
/>
|
|
|
</div>
|
|
|
+
|
|
|
+ <div v-else-if="activeTab === 'usos-convenio'">
|
|
|
+ <DefaultTableServerSide
|
|
|
+ ref="tableRef"
|
|
|
+ :key="tableKey"
|
|
|
+ :columns="columnsUsosConvenio"
|
|
|
+ :api-call="getUsosConvenioPaginated"
|
|
|
+ :add-item="false"
|
|
|
+ :show-search-field="true"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -79,6 +90,7 @@ import {
|
|
|
getNovoAssociadosPaginated,
|
|
|
getContatosAssociadosPaginated,
|
|
|
getExclusoesMesPaginated,
|
|
|
+ getUsosConvenioPaginated,
|
|
|
exportRelatorio,
|
|
|
} from "src/api/relatorio.js";
|
|
|
|
|
|
@@ -93,6 +105,7 @@ const counters = ref({
|
|
|
novos_associados: undefined,
|
|
|
contatos: undefined,
|
|
|
exclusoes_mes: undefined,
|
|
|
+ usos_convenio: undefined,
|
|
|
});
|
|
|
|
|
|
const tabs = computed(() => [
|
|
|
@@ -114,6 +127,12 @@ const tabs = computed(() => [
|
|
|
icon: "mdi-account-remove-outline",
|
|
|
counterKey: "exclusoes_mes",
|
|
|
},
|
|
|
+ {
|
|
|
+ name: "usos-convenio",
|
|
|
+ label: t("relatorio.usos_convenio"),
|
|
|
+ icon: "mdi-calendar-check-outline",
|
|
|
+ counterKey: "usos_convenio",
|
|
|
+ },
|
|
|
]);
|
|
|
|
|
|
const columnsNovosAssociados = computed(() => [
|
|
|
@@ -188,6 +207,54 @@ const columnsExclusoes = computed(() => [
|
|
|
},
|
|
|
]);
|
|
|
|
|
|
+const columnsUsosConvenio = computed(() => [
|
|
|
+ {
|
|
|
+ name: "convenio",
|
|
|
+ label: t("relatorio.col.convenio"),
|
|
|
+ field: "convenio",
|
|
|
+ align: "left",
|
|
|
+ sortable: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "type",
|
|
|
+ label: t("relatorio.col.tipo"),
|
|
|
+ field: "type",
|
|
|
+ align: "left",
|
|
|
+ sortable: false,
|
|
|
+ format: (val) =>
|
|
|
+ val === "agreement" ? t("relatorio.tipo.convenio_medico") : t("relatorio.tipo.parceiro"),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "servico",
|
|
|
+ label: t("parceiro.service"),
|
|
|
+ field: "servico",
|
|
|
+ align: "left",
|
|
|
+ sortable: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "associado",
|
|
|
+ label: t("agendamento.associado"),
|
|
|
+ field: "associado",
|
|
|
+ align: "left",
|
|
|
+ sortable: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "criado_em",
|
|
|
+ label: t("relatorio.col.criacao_agendamento"),
|
|
|
+ field: "criado_em",
|
|
|
+ align: "left",
|
|
|
+ sortable: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "agendado_em",
|
|
|
+ label: t("relatorio.col.data_agendamento"),
|
|
|
+ field: "agendado_em",
|
|
|
+ align: "left",
|
|
|
+ sortable: false,
|
|
|
+ format: (val) => val || "—",
|
|
|
+ },
|
|
|
+]);
|
|
|
+
|
|
|
const selectTab = (name) => {
|
|
|
activeTab.value = name;
|
|
|
tableKey.value++;
|
|
|
@@ -220,11 +287,12 @@ onMounted(async () => {
|
|
|
|
|
|
.relatorio-tabs-row {
|
|
|
display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
gap: 12px;
|
|
|
}
|
|
|
|
|
|
.relatorio-tab-card {
|
|
|
- flex: 1;
|
|
|
+ flex: 1 1 200px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
gap: 12px;
|