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
8 changes: 0 additions & 8 deletions BE/apps/api-server/src/modules/mindmap/mindmap.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,6 @@ export class MindmapService {
throw new MindmapException('마인드맵을 찾을 수 없습니다.');
}

if (!nodes) {
return {
title: mindmap.title,
content: mindmap.content,
aiCount: mindmap.aiCount,
connectionId: mindmap.connectionId,
};
}
return {
title: mindmap.title,
content: mindmap.content,
Expand Down
10 changes: 8 additions & 2 deletions BE/libs/entity/src/mindmap.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,19 @@ export class Mindmap {
@Column({ name: 'ai_count', default: 5 })
aiCount: number;

@OneToMany(() => UserMindmapRole, (userMindmapRole) => userMindmapRole.mindmap)
@OneToMany(() => UserMindmapRole, (userMindmapRole) => userMindmapRole.mindmap, {
cascade: true,
onDelete: 'CASCADE',
})
userMindmapRoles: UserMindmapRole[];

@Column({ name: 'connection_id' })
connectionId: string;

@OneToMany(() => Node, (node) => node.mindmap)
@OneToMany(() => Node, (node) => node.mindmap, {
cascade: true,
onDelete: 'CASCADE',
})
nodes: Node[];

@CreateDateColumn({ type: 'timestamp', name: 'create_date' })
Expand Down
2 changes: 1 addition & 1 deletion BE/libs/entity/src/node.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class Node {
@PrimaryGeneratedColumn()
id: number;

@Column({ type: 'varchar', length: 32 })
@Column({ type: 'varchar', length: 128 })
keyword: string;

@Column({ name: 'location_x', type: 'float', default: 0 })
Expand Down
5 changes: 4 additions & 1 deletion BE/libs/entity/src/user.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export class User {
@CreateDateColumn({ type: 'timestamp', name: 'create_date' })
createDate: Date;

@OneToMany(() => UserMindmapRole, (userMindmapRole) => userMindmapRole.user)
@OneToMany(() => UserMindmapRole, (userMindmapRole) => userMindmapRole.user, {
cascade: true,
onDelete: 'CASCADE',
})
userMindmapRoles: UserMindmapRole[];
}
6 changes: 3 additions & 3 deletions BE/libs/entity/src/user.mindmap.role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ export class UserMindmapRole {
@PrimaryGeneratedColumn()
id: number;

@ManyToOne(() => User, (user) => user.userMindmapRoles, { onDelete: 'CASCADE', nullable: false })
@ManyToOne(() => User, (user) => user.userMindmapRoles, { nullable: false })
@JoinColumn({ name: 'user_id' })
user: User;

@ManyToOne(() => Mindmap, (mindmap) => mindmap.userMindmapRoles, { onDelete: 'CASCADE', nullable: false })
@ManyToOne(() => Mindmap, (mindmap) => mindmap.userMindmapRoles, { nullable: false })
@JoinColumn({ name: 'mindmap_id' })
mindmap: Mindmap;

@Column({ type: 'enum', enum: Role, default: Role.OWNER })
role: Role;

@DeleteDateColumn()
deleteAt: Date | null;
deletedAt: Date | null;
}
Binary file removed client/src/assets/arrowDown.png
Binary file not shown.
9 changes: 4 additions & 5 deletions client/src/components/Sidebar/ToggleButton.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Button } from "@headlessui/react";
import arrowDown from "@/assets/arrowDown.png";
import { FaAnglesLeft } from "react-icons/fa6";

export default function ToggleButton({ isSidebarOpen, toggleSidebar }) {
const animateOptions = {
button: isSidebarOpen ? "left-64" : "left-0",
arrow: isSidebarOpen ? "rotate-90" : "-rotate-90",
arrow: isSidebarOpen ? "rotate-0" : "rotate-180",
};
const transitionClasses = {
button: "transition-all duration-300",
Expand All @@ -17,10 +17,9 @@ export default function ToggleButton({ isSidebarOpen, toggleSidebar }) {
className={`absolute top-20 h-10 w-10 rounded-r-lg bg-grayscale-600 ${transitionClasses.button} ${animateOptions.button}`}
>
<div
className={`ml-[-2px] flex w-full flex-col items-center justify-center ${transitionClasses.arrow} ${animateOptions.arrow} `}
className={`flex w-full flex-col items-center justify-center ${transitionClasses.arrow} ${animateOptions.arrow} `}
>
<img className="h-3 w-5" src={arrowDown} alt="토글 화살표" />
<img className="h-3 w-5" src={arrowDown} alt="토글 화살표" />
<FaAnglesLeft className="text-2xl text-grayscale-200" />
</div>
</Button>
);
Expand Down
5 changes: 0 additions & 5 deletions client/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import Layout from "@/pages/layout";
import MindMap from "@/pages/Mindmap";
import { ErrorBoundary } from "react-error-boundary";
import { useConnectionStore } from "@/store/useConnectionStore";
import TestPage from "./pages/TestPage";

const router = createBrowserRouter([
{
Expand All @@ -28,10 +27,6 @@ const router = createBrowserRouter([
path: "/mindmap/:mindMapId",
element: <MindMap />,
},
{
path: "/test",
element: <TestPage />,
},
],
},
{
Expand Down
40 changes: 0 additions & 40 deletions client/src/pages/TestPage.tsx

This file was deleted.

Loading