Skip to content

Commit

Permalink
Merge branch 'develop' into feature/#152
Browse files Browse the repository at this point in the history
  • Loading branch information
sunflower888 authored Apr 20, 2024
2 parents 592b9c4 + d89b504 commit 8c4e3e6
Show file tree
Hide file tree
Showing 85 changed files with 1,915 additions and 872 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"react-datepicker": "^6.4.0",
"react-dom": "^18.2.0",
"react-fullpage": "^0.1.19",
"react-icons": "^5.0.1",
"react-icons": "^5.1.0",
"react-router-dom": "^6.22.3",
"react-select": "^5.8.0",
"recoil": "^0.7.7",
Expand Down
15 changes: 3 additions & 12 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ import { Navigate, useLocation } from 'react-router-dom';
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
import { getCurrentUser } from 'aws-amplify/auth';
import { RecoilRoot } from 'recoil';
import RetroTeamPage from './pages/RetroTeamPage';
import AcceptInvite from './components/inviteTeam/AcceptInvite';
import RetroRevisePage from './pages/RevisePage';
import RetroTeamPage from './pages/SectionPage';
import MainLayout from '@/components/layout/MainLayout';
import ProfileLayout from '@/components/layout/ProfileLayout';
import AuthPage from '@/pages/AuthPage';
import CreateRetroPage from '@/pages/CreateRetroPage';
import HomePage from '@/pages/HomePage';
import MyPage from '@/pages/MyPage';
import RetroListPage from '@/pages/RetroListPage';
import RetroPersonalPage from '@/pages/RetroPersonalPage';
import SurveyPage from '@/pages/SurveyPage';

interface PrivateRouteProps {
Expand Down Expand Up @@ -99,14 +99,6 @@ const App = () => {
</PrivateRoute>
}
/>
<Route
path="/personal"
element={
<PrivateRoute>
<RetroPersonalPage />
</PrivateRoute>
}
/>
<Route
path="/revise"
element={
Expand All @@ -115,7 +107,6 @@ const App = () => {
</PrivateRoute>
}
/>

<Route
path="/retrolist"
element={
Expand All @@ -125,7 +116,6 @@ const App = () => {
}
/>
</Route>

{/* MainLayout */}
<Route element={<MainLayout />}>
<Route path="/" element={<HomePage />} />
Expand All @@ -141,6 +131,7 @@ const App = () => {
</PrivateRoute>
}
/>
<Route path="/invitations/:invitationId" Component={AcceptInvite} />
</Routes>
</Router>
</RecoilRoot>
Expand Down
7 changes: 4 additions & 3 deletions src/api/@types/@asConst.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
export const Order = {
RECENTLY: 'RECENTLY',
PREVIOUSLY: 'PREVIOUSLY',
NEWEST: 'NEWEST',
OLDEST: 'OLDEST',
} as const;

export const Status = {
ALL: 'ALL',
NOT_STARTED: 'NOT_STARTED',
IN_PROGRESS: 'IN_PROGRESS',
COMPLETED: 'COMPLETED',
Expand All @@ -12,7 +13,7 @@ export const Status = {
export const RetrospectiveType = {
TEAM: 'TEAM',
PERSONAL: 'PERSONAL',
};
} as const;

export const Template = {
1: 'Keep',
Expand Down
52 changes: 27 additions & 25 deletions src/api/@types/Comment.ts
Original file line number Diff line number Diff line change
@@ -1,48 +1,50 @@
export interface GetCommentRequest {
id: string;
//post
export interface PostCommentRequest {
sectionId: number;
commentContent: string;
}

export interface GetCommentResponse {
export interface PostCommentResponse {
code: number;
message: string;
data: {
id: number;
content: string;
};
data: PostCommentData;
}

//put
export interface PutCommentRequest {
export interface PostCommentData {
id: number;
userId: number;
sectionId: number;
commentContent: string;
}

//delete
export interface DeleteCommentRequest {
id: number;
//put
export interface PutCommentRequest {
commentId: number;
commentContent: string;
}

export interface DeleteCommentResponse {
export interface PutCommentResponse {
code: number;
message: string;
data: object;
data: PutCommentData;
}

//GetAllComment
export interface AllGetCommentResponse {
code: number;
message: string;
data: CommentData[];
export interface PutCommentData {
commentId: number;
content: string;
}

export interface CommentData {
id: number;
comment: string;
//delete
export interface DeleteCommentRequest {
commentId: number;
}

//Post
export interface DeleteCommentResponse {
code: number;
}

export interface CommentClient {
getComment(request: GetCommentRequest): Promise<GetCommentResponse>;
post(request: PostCommentRequest): Promise<PostCommentResponse>;
delete(request: DeleteCommentRequest): Promise<DeleteCommentResponse>;
getAllComment(): Promise<AllGetCommentResponse>;
put(request: PutCommentRequest): Promise<PutCommentResponse>;
}
7 changes: 7 additions & 0 deletions src/api/@types/InviteTeam.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// get
export interface GetInviteTeamRequest {
// teamId: number;
}
Expand All @@ -14,3 +15,9 @@ export interface InviteTeamData {
expirationTime: string;
qrCodeImage: string;
}

// post
export interface PostInviteTeamRequest {
invitationCode: string;
}
export interface PostInviteTeamResponse {}
65 changes: 51 additions & 14 deletions src/api/@types/Retrospectives.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TRetrospective, TStatus } from './@asConst';
import { TRetrospective, TStatus, TOrder } from './@asConst';

//onlyGet
export interface onlyGetRetrospectiveRequest {
Expand All @@ -12,35 +12,51 @@ export interface onlyGetRetrospectiveResponse {
}

export interface RetrospectiveData {
description: string;
retrospectiveId: number;
status: keyof TStatus;
teamId: number;
templateId: number;
thumbnail: string;
title: string;
templateId: number;
type: keyof TRetrospective;
userId: number;
leaderName: string;
description: string;
status: string;
thumbnail: string;
}

// get
export interface GetRetrospectiveRequest {
page: number;
size: number;
order: keyof TStatus;
order: keyof TOrder;
status: keyof TStatus;
keyword: string;
isBookmarked: boolean;
}

export interface GetRetrospectiveResponseNodes {
// 추가
id: number;
title: string;
userId: number;
teamId: number | null;
templateId: number;
status: keyof TStatus;
isBookmarked: boolean;
thumbnail: string;
startDate: string;
createdDate: string;
updatedDate: string;
username: string;
}

export interface GetRetrospectiveData {
code: number;
message: string;
data: {
totalCount: number;
nodes: Array<RetrospectiveResponse>;
nodes: Array<GetRetrospectiveResponseNodes>; //RetrospectiveResponse 에서 변경
};
}

//post
export interface PostRetrospectivesRequest {
title: string;
Expand All @@ -49,7 +65,7 @@ export interface PostRetrospectivesRequest {
templateId: number;
status: keyof TStatus;
thumbnail: string | null;
startDate: string;
startDate: Date | string;
description: string;
}

Expand All @@ -69,12 +85,20 @@ export interface DeleteRetrospectiveRequest {
}

//put
export interface PutRetrospectiveRequest {
export interface PutTeamRetrospectiveRequest {
retrospectiveId: number;
title: string;
teamId?: number;
description: string;
status: keyof TStatus;
status: string;
thumbnail?: string;
}

export interface PutPersonalRetrospectiveRequest {
retrospectiveId: number;
title: string;
description: string;
status: string;
thumbnail?: string;
}

Expand All @@ -85,7 +109,7 @@ export interface RetrospectiveResponse {
id: number;
title: string;
userId: number;
teamId: number;
teamId: number | null;
templateId: number;
status: keyof TStatus;
isBookmarked: boolean;
Expand All @@ -96,10 +120,23 @@ export interface RetrospectiveResponse {
};
}

export interface PatchRetrospectiveRequest {
retrospectiveId: number;
// userId: number;
}

export interface PatchRetrospectiveResponse {
code: number;
message: string;
data: boolean;
}

export interface RetrospectivesClient {
onlyGet(request: onlyGetRetrospectiveRequest): Promise<onlyGetRetrospectiveResponse>;
create(request: PostRetrospectivesRequest): Promise<PostRetrospectivesResponse>;
get(request: GetRetrospectiveRequest): Promise<GetRetrospectiveData>;
delete(request: DeleteRetrospectiveRequest): Promise<void>;
put(request: PutRetrospectiveRequest): Promise<RetrospectiveResponse>;
putTeam(request: PutTeamRetrospectiveRequest): Promise<RetrospectiveResponse>;
putPersonal(request: PutPersonalRetrospectiveRequest): Promise<RetrospectiveResponse>;
patch(request: PatchRetrospectiveRequest): Promise<PatchRetrospectiveResponse>;
}
25 changes: 16 additions & 9 deletions src/api/@types/Section.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
//get
export interface GetSectionRequest {
export interface TeamGetSectionRequest {
retrospectiveId: number;
teamId: number;
}

export interface PersonalGetSectionRequest {
retrospectiveId: number;
teamId: number | null;
}

export interface sectionData {
Expand Down Expand Up @@ -35,12 +39,14 @@ export interface CreateSectionRequest {
export interface PostSectionResponse {
code: number;
message: string;
data: {
id: number;
userId: number;
retrospectiveId: number;
sectionContent: string;
};
data: PostSectionData;
}

export interface PostSectionData {
id: number;
userId: number;
retrospectiveId: number;
sectionContent: string;
}

//patch
Expand Down Expand Up @@ -83,7 +89,8 @@ export interface PostLikeSectionResponse {
};
}
export interface SectionClient {
get(request: GetSectionRequest): Promise<GetSectionResponse>;
TeamGet(request: TeamGetSectionRequest): Promise<GetSectionResponse>;
PersonalGet(request: PersonalGetSectionRequest): Promise<GetSectionResponse>;
create(request: CreateSectionRequest): Promise<PostSectionResponse>;
patch(request: PatchSectionRequest): Promise<PatchSectionResponse>;
delete(request: DeleteSectionRequest): Promise<DeleteSectionResponse>;
Expand Down
1 change: 1 addition & 0 deletions src/api/@types/Survey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface PostSurveyRequest {
region: string;
source: string;
purposes: string[] | undefined;

}

export interface PostSurveyResponse {
Expand Down
Loading

0 comments on commit 8c4e3e6

Please sign in to comment.