Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/model/task.model.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { TUserModel } from './user.model';

export type TTaskStatus = 'BEFORE_TRIP' | 'DURING_TRIP' | 'AFTER_TRIP';
export type TTaskScope = 'PUBLIC' | 'PRIVATE';

Expand Down Expand Up @@ -28,9 +26,10 @@ export type TGetTaskResponse = {
taskScope: TTaskScope;
isCompleted: boolean;
taskCompletionDate?: string;
createdBy: TUserModel;
registrantId: number;
createdBy: string;
createdAt: string;
modifiedBy: TUserModel;
modifiedBy: string;
modifiedAt: string;
taskAssignees: TTaskAssignee[];
};
Expand Down
6 changes: 0 additions & 6 deletions src/model/user.model.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import { TPostRegisterRequest } from './auth.model';

export type TGetUserResponse = Omit<TPostRegisterRequest, 'password'>;

export type TUserModel = {
id: number;
username: string;
email: string;
};
4 changes: 2 additions & 2 deletions src/ui/box/AllTodoBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function AllTodoBox() {
}

return (
<div className="flex h-[250px] flex-col gap-4 rounded-xl bg-white px-4 pb-6 pt-4 tablet:px-6">
<div className="flex h-[250px] flex-col gap-4 rounded-xl bg-white px-6 pb-6 pt-4 tablet:px-6">
<div className="flex items-center justify-between">
<Subtitle
title="모든 할 일"
Expand All @@ -52,7 +52,7 @@ export default function AllTodoBox() {
</Button>
</div>
{/* 데이터 렌더링 */}
<div className="flex flex-1">
<div className="flex flex-1 overflow-auto">
{displayedTasks.length > 0 ? (
<TaskList tasks={displayedTasks} />
) : (
Expand Down
4 changes: 2 additions & 2 deletions src/ui/card/taskCard/TaskItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function TaskItem({
taskScope,
isCompleted,
taskCompletionDate,
createdBy,
registrantId,
taskAssignees,
}: ITaskItemProps) {
const [isCompletedTask, setIsCompletedTask] = useState(isCompleted || false);
Expand Down Expand Up @@ -142,7 +142,7 @@ function TaskItem({
taskAssignees={taskAssignees}
taskId={taskId}
hasFilePath={!!taskFilePath}
createdBy={createdBy}
registrantId={registrantId}
onFileClick={handleFileClick}
onEditTaskClick={handleEditTaskClick}
onDeleteTaskClick={handleDeleteTaskClick}
Expand Down
1 change: 1 addition & 0 deletions src/ui/card/taskCard/TaskList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default function TaskList({ tripId, tasks }: ITaskListProps) {
taskStatus={task.taskStatus}
taskDDay={task.taskDDay}
taskScope={task.taskScope}
registrantId={task.registrantId}
isCompleted={task.isCompleted}
taskCompletionDate={task.taskCompletionDate}
createdBy={task.createdBy}
Expand Down
8 changes: 4 additions & 4 deletions src/ui/common/ButtonIconGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { twMerge } from 'tailwind-merge';
import DropdownMenu from './DropdownMenu';
import Link from 'next/link';
import Image from 'next/image';
import { TUserModel } from '@model/user.model';
import { useLogin } from '@hooks/auth/useLogin';
import { TTaskAssignee } from '@model/task.model';

Expand All @@ -27,7 +26,7 @@ interface IButtonIconGroupProps {
onFileClick: () => void;
onEditTaskClick: () => void;
onDeleteTaskClick: () => void;
createdBy: TUserModel;
registrantId: number;
className?: string;
taskAssignees: TTaskAssignee[];
}
Expand All @@ -37,7 +36,7 @@ export default function ButtonIconGroup({
hasFilePath,
onFileClick,
taskAssignees,
createdBy,
registrantId,
onEditTaskClick,
onDeleteTaskClick,
className,
Expand All @@ -47,8 +46,9 @@ export default function ButtonIconGroup({
const buttonStyle =
'relative flex h-6 w-6 items-center justify-center rounded-full bg-slate-50';

//오너 response로 받아서추가처리
const showDropdownMenu =
createdBy.id === user?.user.id ||
registrantId === user?.user.id ||
taskAssignees.some((assignee) => assignee.userId === user?.user.id);

return (
Expand Down
17 changes: 10 additions & 7 deletions src/ui/trip/TripTask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,22 @@ export default function TripTask({ id }: TTripTaskProps) {
}

return (
<div className="section-box flex flex-1 flex-col gap-5 px-0 pr-0">
<div className="flex flex-col gap-5 px-6">
// <div className="flex w-full flex-col gap-4 rounded-xl bg-white py-6 desktop:px-6"></div>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이부분은 뭘까용?!

<div className="section-box flex flex-1 flex-col gap-5 px-0 pr-0 desktop:px-6">
<div className="flex flex-col gap-5 px-6 desktop:px-0">
<h4 className="text-lg font-semibold leading-7 text-slate-800">Todo</h4>
<div className="flex items-center justify-between">
<FilterButton onClick={handleTaskFilterClick} />
<AddTaskButton onClick={handleAddTaskClick} />
</div>
</div>
<TaskCarousel
tripId={id}
tasks={data?.success ? data?.result : []}
height="500px"
/>
<div className="px-4 tablet:px-0">
<TaskCarousel
tripId={id}
tasks={data?.success ? data?.result : []}
height="500px"
/>
</div>
</div>
);
}
Loading