|
|
@@ -1,91 +1,52 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <DefaultHeaderPage show-filter-icon title="Dashboard" />
|
|
|
+ <DefaultHeaderPage
|
|
|
+ title="Dashboard"
|
|
|
+ :filter-open="showFilter"
|
|
|
+ @show-filter="showFilter = !showFilter"
|
|
|
+ />
|
|
|
|
|
|
<div class="q-pa-sm">
|
|
|
<div class="filter-row">
|
|
|
- <q-select
|
|
|
- v-model="selectedPeriod"
|
|
|
- :options="periodOptions"
|
|
|
- option-value="value"
|
|
|
- option-label="label"
|
|
|
- emit-value
|
|
|
- map-options
|
|
|
- dense
|
|
|
- label="Selecione o Período"
|
|
|
- color="secondary"
|
|
|
- class="filter-item"
|
|
|
- hide-dropdown-icon
|
|
|
- >
|
|
|
- <template #append>
|
|
|
- <q-icon name="mdi-chevron-down" color="secondary" />
|
|
|
- </template>
|
|
|
- </q-select>
|
|
|
-
|
|
|
- <template v-if="selectedPeriod === 'custom'">
|
|
|
- <q-input
|
|
|
- v-model="startDate"
|
|
|
+ <template v-if="showFilter">
|
|
|
+ <UnitSelect
|
|
|
+ v-model="selectedUnit"
|
|
|
dense
|
|
|
- label="Data Inicial"
|
|
|
- mask="##/##/####"
|
|
|
- placeholder="DD/MM/AAAA"
|
|
|
- color="secondary"
|
|
|
+ label="Unidade"
|
|
|
class="filter-item"
|
|
|
- >
|
|
|
- <template #append>
|
|
|
- <q-icon
|
|
|
- name="mdi-calendar"
|
|
|
- color="secondary"
|
|
|
- class="cursor-pointer"
|
|
|
- >
|
|
|
- <q-popup-proxy
|
|
|
- cover
|
|
|
- transition-show="scale"
|
|
|
- transition-hide="scale"
|
|
|
- >
|
|
|
- <q-date
|
|
|
- v-model="startDate"
|
|
|
- mask="DD/MM/YYYY"
|
|
|
- color="secondary"
|
|
|
- >
|
|
|
- <div class="row items-center justify-end">
|
|
|
- <q-btn v-close-popup label="OK" color="secondary" flat />
|
|
|
- </div>
|
|
|
- </q-date>
|
|
|
- </q-popup-proxy>
|
|
|
- </q-icon>
|
|
|
- </template>
|
|
|
- </q-input>
|
|
|
-
|
|
|
- <q-input
|
|
|
- v-model="endDate"
|
|
|
+ color="secondary"
|
|
|
+ />
|
|
|
+
|
|
|
+ <DefaultSelect
|
|
|
+ v-model="selectedPeriod"
|
|
|
+ :options="periodOptions"
|
|
|
+ option-value="value"
|
|
|
+ option-label="label"
|
|
|
+ emit-value
|
|
|
+ map-options
|
|
|
dense
|
|
|
- label="Data Final"
|
|
|
- mask="##/##/####"
|
|
|
- placeholder="DD/MM/AAAA"
|
|
|
+ label="Selecione o Período"
|
|
|
color="secondary"
|
|
|
class="filter-item"
|
|
|
- >
|
|
|
- <template #append>
|
|
|
- <q-icon
|
|
|
- name="mdi-calendar"
|
|
|
- color="secondary"
|
|
|
- class="cursor-pointer"
|
|
|
- >
|
|
|
- <q-popup-proxy
|
|
|
- cover
|
|
|
- transition-show="scale"
|
|
|
- transition-hide="scale"
|
|
|
- >
|
|
|
- <q-date v-model="endDate" mask="DD/MM/YYYY" color="secondary">
|
|
|
- <div class="row items-center justify-end">
|
|
|
- <q-btn v-close-popup label="OK" color="secondary" flat />
|
|
|
- </div>
|
|
|
- </q-date>
|
|
|
- </q-popup-proxy>
|
|
|
- </q-icon>
|
|
|
- </template>
|
|
|
- </q-input>
|
|
|
+ />
|
|
|
+
|
|
|
+ <template v-if="selectedPeriod === 'custom'">
|
|
|
+ <DefaultInputDatePicker
|
|
|
+ v-model="startDate"
|
|
|
+ dense
|
|
|
+ label="Data Inicial"
|
|
|
+ color="secondary"
|
|
|
+ class="filter-item"
|
|
|
+ />
|
|
|
+
|
|
|
+ <DefaultInputDatePicker
|
|
|
+ v-model="endDate"
|
|
|
+ dense
|
|
|
+ label="Data Final"
|
|
|
+ color="secondary"
|
|
|
+ class="filter-item"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -198,6 +159,9 @@ import { onMounted, ref, watch } from "vue";
|
|
|
import { useQuasar } from "quasar";
|
|
|
import { useI18n } from "vue-i18n";
|
|
|
import DefaultHeaderPage from "src/components/layout/DefaultHeaderPage.vue";
|
|
|
+import DefaultSelect from "src/components/defaults/DefaultSelect.vue";
|
|
|
+import DefaultInputDatePicker from "src/components/defaults/DefaultInputDatePicker.vue";
|
|
|
+import UnitSelect from "src/components/selects/UnitSelect.vue";
|
|
|
import DashboardStatCard from "src/components/charts/DashboardStatCard.vue";
|
|
|
import DashboardChartCard from "src/components/charts/DashboardChartCard.vue";
|
|
|
import GroupedBarChart from "src/components/charts/normal/GroupedBarChart.vue";
|
|
|
@@ -241,6 +205,8 @@ const openTicketsAbertoDialog = () => {
|
|
|
const defaultPeriod = ref("month");
|
|
|
const defaultEventId = ref(1);
|
|
|
|
|
|
+const showFilter = ref(false);
|
|
|
+const selectedUnit = ref(null);
|
|
|
const selectedPeriod = ref("custom");
|
|
|
const startDate = ref("");
|
|
|
const endDate = ref("");
|