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,9 +1,11 @@
|
||||
import React from 'react';
|
||||
import { useQuery } from 'react-query';
|
||||
import { DragDropContext, Droppable } from 'react-beautiful-dnd';
|
||||
import { Tarefa } from '../../types/entities';
|
||||
import { TarefaCard } from './TarefaCard';
|
||||
import api from '../../services/api';
|
||||
import React from "react";
|
||||
import { DragDropContext, Droppable } from "react-beautiful-dnd";
|
||||
import { useQuery } from "react-query";
|
||||
|
||||
import api from "../../services/api";
|
||||
import { Tarefa } from "../../types/entities";
|
||||
|
||||
import { TarefaCard } from "./TarefaCard";
|
||||
|
||||
interface TarefaKanbanProps {
|
||||
onEdit: (tarefa: Tarefa) => void;
|
||||
@@ -11,14 +13,17 @@ interface TarefaKanbanProps {
|
||||
}
|
||||
|
||||
const colunas = [
|
||||
{ id: 'PENDENTE', titulo: 'Pendentes' },
|
||||
{ id: 'EM_ANDAMENTO', titulo: 'Em Andamento' },
|
||||
{ id: 'CONCLUIDA', titulo: 'Concluídas' },
|
||||
{ id: "PENDENTE", titulo: "Pendentes" },
|
||||
{ id: "EM_ANDAMENTO", titulo: "Em Andamento" },
|
||||
{ id: "CONCLUIDA", titulo: "Concluídas" },
|
||||
];
|
||||
|
||||
export const TarefaKanban: React.FC<TarefaKanbanProps> = ({ onEdit, onStatusChange }) => {
|
||||
const { data: tarefas = [], refetch } = useQuery('tarefas', async () => {
|
||||
const response = await api.get('/tarefas');
|
||||
export const TarefaKanban: React.FC<TarefaKanbanProps> = ({
|
||||
onEdit,
|
||||
onStatusChange,
|
||||
}) => {
|
||||
const { data: tarefas = [], refetch } = useQuery("tarefas", async () => {
|
||||
const response = await api.get("/tarefas");
|
||||
return response.data;
|
||||
});
|
||||
|
||||
@@ -26,7 +31,7 @@ export const TarefaKanban: React.FC<TarefaKanbanProps> = ({ onEdit, onStatusChan
|
||||
if (!result.destination) return;
|
||||
|
||||
const { draggableId, source, destination } = result;
|
||||
|
||||
|
||||
if (source.droppableId !== destination.droppableId) {
|
||||
onStatusChange(draggableId, destination.droppableId);
|
||||
}
|
||||
@@ -36,11 +41,14 @@ export const TarefaKanban: React.FC<TarefaKanbanProps> = ({ onEdit, onStatusChan
|
||||
<DragDropContext onDragEnd={handleDragEnd}>
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||
{colunas.map((coluna) => (
|
||||
<div key={coluna.id} className="bg-gray-50 dark:bg-gray-800 rounded-lg p-4">
|
||||
<div
|
||||
key={coluna.id}
|
||||
className="bg-gray-50 dark:bg-gray-800 rounded-lg p-4"
|
||||
>
|
||||
<h3 className="text-lg font-medium text-gray-900 dark:text-white mb-4">
|
||||
{coluna.titulo}
|
||||
</h3>
|
||||
|
||||
|
||||
<Droppable droppableId={coluna.id}>
|
||||
{(provided) => (
|
||||
<div
|
||||
|
||||
Reference in new issue
Block a user