Feat: 리뷰 거절 상태 추가
This commit is contained in:
parent
eb0d824b09
commit
64c07fbb93
@ -1,6 +1,6 @@
|
||||
import { cn } from '@/lib/utils';
|
||||
import { ImageResponse } from '@/types';
|
||||
import { ArrowDownToLine, Check, Image, Loader, Minus, Send } from 'lucide-react';
|
||||
import { ArrowDownToLine, Check, CircleSlash, Image, Loader, Minus, Send } from 'lucide-react';
|
||||
import useCanvasStore from '@/stores/useCanvasStore';
|
||||
import useProjectStore from '@/stores/useProjectStore';
|
||||
|
||||
@ -52,7 +52,7 @@ export default function ProjectFileItem({
|
||||
) : item.status === 'IN_PROGRESS' ? (
|
||||
<Loader
|
||||
size={12}
|
||||
className="shrink-0 stroke-yellow-500"
|
||||
className="shrink-0 stroke-yellow-400"
|
||||
/>
|
||||
) : item.status === 'SAVE' ? (
|
||||
<ArrowDownToLine
|
||||
@ -64,10 +64,15 @@ export default function ProjectFileItem({
|
||||
size={12}
|
||||
className="shrink-0 stroke-blue-400"
|
||||
/>
|
||||
) : item.status === 'REVIEW_REJECTED' ? (
|
||||
<CircleSlash
|
||||
size={12}
|
||||
className="shrink-0 stroke-red-400"
|
||||
/>
|
||||
) : (
|
||||
<Check
|
||||
size={12}
|
||||
className="shrink-0 stroke-green-500"
|
||||
className="shrink-0 stroke-green-400"
|
||||
/>
|
||||
)}
|
||||
</button>
|
||||
|
@ -9,11 +9,13 @@ import { useEffect } from 'react';
|
||||
import WorkspaceDropdownMenu from '../WorkspaceDropdownMenu';
|
||||
import useAutoLabelQuery from '@/queries/projects/useAutoLabelQuery';
|
||||
import useProjectStore from '@/stores/useProjectStore';
|
||||
import { useQueryClient } from '@tanstack/react-query';
|
||||
|
||||
export default function ProjectStructure({ project }: { project: Project }) {
|
||||
const setProject = useProjectStore((state) => state.setProject);
|
||||
const image = useCanvasStore((state) => state.image);
|
||||
const { data: folderData, refetch } = useFolderQuery(project.id.toString(), 0);
|
||||
const queryClient = useQueryClient();
|
||||
const requestAutoLabel = useAutoLabelQuery();
|
||||
|
||||
useEffect(() => {
|
||||
@ -61,14 +63,14 @@ export default function ProjectStructure({ project }: { project: Project }) {
|
||||
<div className="flex">
|
||||
<Button
|
||||
variant="outlinePrimary"
|
||||
className="w-full"
|
||||
className="w-full overflow-hidden"
|
||||
disabled={requestAutoLabel.isPending}
|
||||
onClick={() => {
|
||||
requestAutoLabel.mutate(
|
||||
{ projectId: project.id },
|
||||
{
|
||||
onSuccess: () => {
|
||||
refetch;
|
||||
queryClient.invalidateQueries({ queryKey: ['folder', project!.id.toString()] });
|
||||
setTimeout(() => {
|
||||
alert('레이블링 성공!');
|
||||
}, 100);
|
||||
|
@ -68,7 +68,7 @@ export interface FolderResponse {
|
||||
children: ChildFolder[];
|
||||
}
|
||||
|
||||
export type ImageStatus = 'PENDING' | 'IN_PROGRESS' | 'SAVE' | 'REVIEW_REQUEST' | 'COMPLETED';
|
||||
export type ImageStatus = 'PENDING' | 'IN_PROGRESS' | 'SAVE' | 'REVIEW_REQUEST' | 'REVIEW_REJECTED' | 'COMPLETED';
|
||||
|
||||
export interface ImageResponse {
|
||||
id: number;
|
||||
|
Loading…
Reference in New Issue
Block a user