Lint errors
Signed-off-by: Rodrigo Martins <rodrigo.sousa.577@gmail.com>
This commit is contained in:
1 parent
9742d62ba2
commit
5acec6b71e
196 files changed
+10885
-6655
No files matched your search
@@ -1,59 +1,60 @@
|
||||
import { useQuery } from 'react-query';
|
||||
import api from '../services/api';
|
||||
import { useQuery } from "react-query";
|
||||
|
||||
import api from "../services/api";
|
||||
|
||||
export const useDashboardStats = () => {
|
||||
const queryKeys = {
|
||||
processos: 'dashboard-processos-stats',
|
||||
tarefas: 'dashboard-tarefas-stats',
|
||||
atendimentos: 'dashboard-atendimentos-stats',
|
||||
financeiro: 'dashboard-financeiro-stats',
|
||||
prazos: 'dashboard-prazos',
|
||||
atividades: 'dashboard-atividades'
|
||||
processos: "dashboard-processos-stats",
|
||||
tarefas: "dashboard-tarefas-stats",
|
||||
atendimentos: "dashboard-atendimentos-stats",
|
||||
financeiro: "dashboard-financeiro-stats",
|
||||
prazos: "dashboard-prazos",
|
||||
atividades: "dashboard-atividades",
|
||||
};
|
||||
|
||||
const processosStats = useQuery(queryKeys.processos, async () => {
|
||||
try {
|
||||
const response = await api.get('/dashboard/processos/stats');
|
||||
const response = await api.get("/dashboard/processos/stats");
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error('Erro ao buscar estatísticas:', error);
|
||||
console.error("Erro ao buscar estatísticas:", error);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
const tarefasStats = useQuery(queryKeys.tarefas, async () => {
|
||||
try {
|
||||
const response = await api.get('/dashboard/tarefas/stats');
|
||||
const response = await api.get("/dashboard/tarefas/stats");
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error('Erro ao buscar estatísticas de tarefas:', error);
|
||||
console.error("Erro ao buscar estatísticas de tarefas:", error);
|
||||
return {
|
||||
pendentes: 0,
|
||||
atrasadas: 0,
|
||||
concluidas: 0,
|
||||
total: 0,
|
||||
taxaConclusao: 0
|
||||
taxaConclusao: 0,
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
const atendimentosStats = useQuery(queryKeys.atendimentos, async () => {
|
||||
const response = await api.get('/dashboard/atendimentos/stats');
|
||||
const response = await api.get("/dashboard/atendimentos/stats");
|
||||
return response.data;
|
||||
});
|
||||
|
||||
const financeiroStats = useQuery(queryKeys.financeiro, async () => {
|
||||
const response = await api.get('/dashboard/financeiro/stats');
|
||||
const response = await api.get("/dashboard/financeiro/stats");
|
||||
return response.data;
|
||||
});
|
||||
|
||||
const proximosPrazos = useQuery(queryKeys.prazos, async () => {
|
||||
const response = await api.get('/dashboard/prazos/proximos');
|
||||
const response = await api.get("/dashboard/prazos/proximos");
|
||||
return response.data;
|
||||
});
|
||||
|
||||
const atividades = useQuery(queryKeys.atividades, async () => {
|
||||
const response = await api.get('/dashboard/atividades');
|
||||
const response = await api.get("/dashboard/atividades");
|
||||
return response.data;
|
||||
});
|
||||
|
||||
@@ -63,6 +64,6 @@ export const useDashboardStats = () => {
|
||||
atendimentosStats,
|
||||
financeiroStats,
|
||||
proximosPrazos,
|
||||
atividades
|
||||
atividades,
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user