Lint errors

Signed-off-by: Rodrigo Martins <rodrigo.sousa.577@gmail.com>
This commit is contained in:
rodrigo committed 2025-04-12 20:32:39 -03:00
1 parent 9742d62ba2
commit 5acec6b71e
196 files changed
+10885 -6655

No files matched your search

+19 -13
View File
@@ -1,20 +1,22 @@
import React from 'react';
import { useQuery } from 'react-query';
import { format, differenceInDays } from 'date-fns';
import { ptBR } from 'date-fns/locale';
import { ExclamationTriangleIcon } from '@heroicons/react/24/outline';
import api from '../../services/api';
import { ExclamationTriangleIcon } from "@heroicons/react/24/outline";
import { format, differenceInDays, ptBR } from "date-fns";
import React from "react";
import { useQuery } from "react-query";
import api from "../../services/api";
export const AlertasPrazos: React.FC = () => {
const { data: prazos = [] } = useQuery('prazosFuturos', async () => {
const response = await api.get('/dashboard/prazos/proximos');
const { data: prazos = [] } = useQuery("prazosFuturos", async () => {
const response = await api.get("/dashboard/prazos/proximos");
return response.data;
});
const getPrioridadeStyle = (dias: number) => {
if (dias <= 3) return 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200';
if (dias <= 7) return 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200';
return 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200';
if (dias <= 3)
return "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200";
if (dias <= 7)
return "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200";
return "bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200";
};
return (
@@ -38,8 +40,12 @@ export const AlertasPrazos: React.FC = () => {
Processo: {prazo.processo.numero}
</p>
</div>
<span className={`px-2 py-1 rounded-full text-xs ${getPrioridadeStyle(dias)}`}>
{format(new Date(prazo.dataLimite), 'dd/MM/yyyy', { locale: ptBR })}
<span
className={`px-2 py-1 rounded-full text-xs ${getPrioridadeStyle(dias)}`}
>
{format(new Date(prazo.dataLimite), "dd/MM/yyyy", {
locale: ptBR,
})}
</span>
</div>
);