Skip to content

Commit

Permalink
Version 1.0
Browse files Browse the repository at this point in the history
Version 1.0
  • Loading branch information
JuneParkCode authored Oct 6, 2023
2 parents 875d443 + 71d1424 commit 9232614
Show file tree
Hide file tree
Showing 119 changed files with 2,645 additions and 2,023 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: BUG REPORT
about: 버그 내용을 기술합니다.
title: "[bug]"
labels: bug
assignees: ''

---

**버그 설명**
어떤 버그가 발생하는지 정확하게 기술해주세요.

**재현 방법**
재현 방법은 다음과 같이 기술합니다.
1. A 페이지에 접속
2. B 버튼 클릭 후
3. C 행동을 취하면
4. 다음과 같은 에러를 볼 수 있음.

**정상 동작**
예상했던 정상 동작을 기술해주세요.

**스크린샷**
가능하다면, 스크린샷 혹은 영상으로 버그를 보여주세요.

**데스크탑 환경 정보**
- OS: [e.g. Windows 11]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**모바일 환경 정보**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**추가 설명**
해당 버그에 대해서 추가로 기술할 내용에 대해 작성해주세요.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/todo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: TODO
about: 새로운 작업에 대한 할 일을 기술합니다.
title: "[todo]"
labels: todo
assignees: ''

---

## 분류
- fix, feature, refactor ..

## 목표
- 해당 작업에서 이루고자 하는 목표를 작성해주세요. (기대하는 동작, 완성 후 모습 등..)

## 기한
- 해당 작업의 기한을 명시해주세요.

## 할 일
- [ ] A
- [ ] B

## 추가 설명
- 해당 작업에 대한 추가 설명을 작성해주세요
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/제안---요청.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: 제안 / 요청
about: 프로젝트에 관련된 아이디어 제안 / 요청 사항을 기술합니다.
title: "[request]"
labels: request
assignees: ''

---

## 분류
- 해당 아이디어 혹은 제안에 대한 분류를 작성해주세요
- 수정사항 / 기능 / 리팩토링 / UI/UX ...

## 설명
- 자세히 제안에 대한 내용을 기술해주세요.
64 changes: 32 additions & 32 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
# .github/workflows/chromatic.yml
# # .github/workflows/chromatic.yml

# Workflow name
name: 'Chromatic'
# # Workflow name
# name: 'Chromatic'

# Event for the workflow
on:
pull_request:
branches: [ dev ]
paths: [ '**.stories.ts', '**.stories.tsx' ]
# # Event for the workflow
# on:
# pull_request:
# branches: [ dev ]
# paths: [ '**.stories.ts', '**.stories.tsx' ]

# List of jobs
jobs:
chromatic-deployment:
# Operating System
runs-on: ubuntu-latest
# Job steps
steps:
- uses: actions/checkout@v1
- name: Install dependencies
# 👇 Install dependencies with the same package manager used in the project (replace it as needed), e.g. yarn, npm, pnpm
run: cd 42manito && yarn
# 👇 Adds Chromatic as a step in the workflow
- name: Publish to Chromatic
id: chromatic
uses: chromaui/action@v1
# Chromatic GitHub Action options
with:
# 👇 Chromatic projectToken, refer to the manage page to obtain it.
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
workingDir: 42manito/
# Option to prevent the workflow from failing
exitZeroOnChanges: true
- name: Publish Summary
run: echo -e "| Results | |\n| --- | --- |\n| Build Results | ${{steps.chromatic.outputs.buildUrl}} |\n| Storybook Preview | ${{steps.chromatic.outputs.storybookUrl}} |\n| Component Count | ${{steps.chromatic.outputs.componentCount}} |" >> $GITHUB_STEP_SUMMARY
# # List of jobs
# jobs:
# chromatic-deployment:
# # Operating System
# runs-on: ubuntu-latest
# # Job steps
# steps:
# - uses: actions/checkout@v1
# - name: Install dependencies
# # 👇 Install dependencies with the same package manager used in the project (replace it as needed), e.g. yarn, npm, pnpm
# run: cd 42manito && yarn
# # 👇 Adds Chromatic as a step in the workflow
# - name: Publish to Chromatic
# id: chromatic
# uses: chromaui/action@v1
# # Chromatic GitHub Action options
# with:
# # 👇 Chromatic projectToken, refer to the manage page to obtain it.
# projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
# workingDir: 42manito/
# # Option to prevent the workflow from failing
# exitZeroOnChanges: true
# - name: Publish Summary
# run: echo -e "| Results | |\n| --- | --- |\n| Build Results | ${{steps.chromatic.outputs.buildUrl}} |\n| Storybook Preview | ${{steps.chromatic.outputs.storybookUrl}} |\n| Component Count | ${{steps.chromatic.outputs.componentCount}} |" >> $GITHUB_STEP_SUMMARY
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified 42manito/.yarn/install-state.gz
Binary file not shown.
38 changes: 0 additions & 38 deletions 42manito/README.md

This file was deleted.

2 changes: 2 additions & 0 deletions 42manito/env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NEXT_PUBLIC_GA_ID=""
NEXT_PUBLIC_DEV_URL="https://api.dev.42manito.com"
Binary file added 42manito/public/Slack-mark-RGB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions 42manito/src/RTK/Apis/Home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const homeApi = createApi({
baseUrl: `${process.env.NEXT_PUBLIC_DEV_URL}`,
}),
endpoints: (builder) => ({
getMentors: builder.mutation<HomeResponseDto[], HomeGetAllDto>({
getMentors: builder.query<HomeResponseDto[], HomeGetAllDto>({
query: (args: HomeGetAllDto) => {
const setCategoryQuery = args.category_id ? `/${args.category_id}` : "";
return {
Expand All @@ -21,4 +21,4 @@ export const homeApi = createApi({
}),
});

export const { useGetMentorsMutation } = homeApi;
export const { useGetMentorsQuery } = homeApi;
95 changes: 32 additions & 63 deletions 42manito/src/RTK/Apis/Reservation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { UserReservationReqDto } from "@/Types/UserReservation/UserReservationReqDto";
import { ReservationDefaultDto } from "@/Types/Reservations/ReservationDefault.dto";
import { ReservationPatchAcceptDto } from "@/Types/Reservations/ReservationPatchAccept.dto";
import { ReservationPatchCancelReqDto } from "@/Types/Reservations/ReservationPatchCancelReq.dto";
Expand All @@ -7,7 +6,10 @@ import { ReservationPatchMentorCompletionDto } from "@/Types/Reservations/Reserv
import { ReservationPostDto } from "@/Types/Reservations/ReservationPost.dto";
import { BaseQuery } from "@/utils/BaseQuery";
import { createApi } from "@reduxjs/toolkit/dist/query/react";
import { UserReservationResDto } from "@/Types/UserReservation/UserReservationResDto";
import { ReservationPatchMenteeCheckReqDto } from "@/Types/Reservations/ReservationPatchMenteeCheckReq.dto";
import { ReservationGetResDto } from "@/Types/Reservations/ReservationGetRes.dto";
import { ReservationGetReqDto } from "@/Types/Reservations/ReservationGetReq.dto";
import { ObjectToURLString } from "@/utils/ObjectToURLString";

export const reservationApi = createApi({
reducerPath: "reservationApi",
Expand All @@ -17,69 +19,24 @@ export const reservationApi = createApi({
tagTypes: ["Reservation"],
endpoints: (builder) => ({
// request = REQUEST, ACCEPT, MENTEE_CHECKED
getRequestReservations: builder.query<
UserReservationResDto,
{ id: number }
>({
query: ({ id }) => {
return {
url: `/users/${id}/reservations/request`,
method: "GET",
};
},
}),
// active = NOT DONE, NOT CANCEL
getActiveReservation: builder.query<
UserReservationResDto,
UserReservationReqDto
>({
query: (args: UserReservationReqDto) => {
getReservations: builder.query<ReservationGetResDto, ReservationGetReqDto>({
query: (request: ReservationGetReqDto) => {
const query = ObjectToURLString(request.query);
return {
url: `/users/${args.id}/reservations?take=${args.take}&page=${
args.page
}&active=${true}&as_mentor=${true}&as_mentee=${false}`,
url: `/users/${request.id}/reservations${query}`,
method: "GET",
};
},
providesTags: [{ type: "Reservation", id: "LIST" }],
}),
getActiveMenteeReservation: builder.query<
UserReservationResDto,
UserReservationReqDto
>({
query: (args: UserReservationReqDto) => {
getReservation: builder.query<ReservationDefaultDto, number>({
query: (id: number) => {
return {
url: `/users/${args.id}/reservations?take=${args.take}&page=${
args.page
}&active=${true}&as_mentor=${false}&as_mentee=${true}`,
method: "GET",
};
},
}),
getAllMentorReservation: builder.query<
UserReservationResDto,
UserReservationReqDto
>({
query: (args: UserReservationReqDto) => {
return {
url: `/users/${args.id}/reservations?take=${args.take}&page=${
args.page
}&as_mentor=${true}&as_mentee=${false}&active=${false}`,
method: "GET",
};
},
}),
getAllMenteeReservation: builder.query<
UserReservationResDto,
UserReservationReqDto
>({
query: (args: UserReservationReqDto) => {
return {
url: `/users/${args.id}/reservations?take=${args.take}&page=${
args.page
}&as_mentor=${false}&as_mentee=${true}&active=${false}`,
url: `/reservations/${id}`,
method: "GET",
};
},
providesTags: [{ type: "Reservation", id: "LIST" }],
}),
/** 처음 멘토링 신청을 보낼때 */
postReservationRequest: builder.mutation<
Expand Down Expand Up @@ -123,6 +80,20 @@ export const reservationApi = createApi({
return {
url: `/reservations/${args.id}/cancel`,
method: "PATCH",
data: {content: args.content},
};
},
invalidatesTags: [{ type: "Reservation", id: "LIST" }],
}),
/** 멘티 확인 */
patchReservationMenteeCheck: builder.mutation<
ReservationDefaultDto,
ReservationPatchMenteeCheckReqDto
>({
query: (args: ReservationPatchCancelReqDto) => {
return {
url: `/reservations/${args.id}/check`,
method: "PATCH",
};
},
invalidatesTags: [{ type: "Reservation", id: "LIST" }],
Expand All @@ -141,7 +112,7 @@ export const reservationApi = createApi({
},
invalidatesTags: [{ type: "Reservation", id: "LIST" }],
}),
patchReservationDone: builder.mutation<
patchReservationMentorFeedback: builder.mutation<
ReservationDefaultDto,
ReservationPatchMentorCompletionDto
>({
Expand All @@ -158,14 +129,12 @@ export const reservationApi = createApi({
});

export const {
useGetRequestReservationsQuery,
useGetActiveReservationQuery,
useGetActiveMenteeReservationQuery,
useGetAllMenteeReservationQuery,
useGetAllMentorReservationQuery,
useGetReservationsQuery,
useGetReservationQuery,
usePostReservationRequestMutation,
usePatchReservationAcceptMutation,
usePatchReservationCancelMutation,
usePatchReservationMenteeCheckMutation,
usePatchReservationMenteeFeedbackMutation,
usePatchReservationDoneMutation,
usePatchReservationMentorFeedbackMutation,
} = reservationApi;
7 changes: 4 additions & 3 deletions 42manito/src/RTK/Apis/Search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { MentorProfileDto } from "@/Types/MentorProfiles/MentorProfile.dto";
import { SearchGetDto } from "@/Types/Searchs/SearchGet.dto";
import { BaseQuery } from "@/utils/BaseQuery";
import { createApi } from "@reduxjs/toolkit/dist/query/react";
import { ObjectToURLString } from "@/utils/ObjectToURLString";

export const searchApi = createApi({
reducerPath: "searchApi",
Expand All @@ -12,10 +13,10 @@ export const searchApi = createApi({
endpoints: (builder) => ({
getSearch: builder.mutation<MentorProfileDto[], SearchGetDto>({
query: (args: SearchGetDto) => {
const keyword = args.search_string;
const query = ObjectToURLString({ ...args, search_string: undefined });
return {
url: `/search/mentor/${encodeURIComponent(args.search_string)}?take=${
args.take
}&page=${args.page}`,
url: `/search/mentor/${encodeURIComponent(keyword)}${query}`,
method: "GET",
};
},
Expand Down
2 changes: 1 addition & 1 deletion 42manito/src/RTK/Apis/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const userApi = createApi({
isHide: args.isHide,
};
return {
url: `/mentor_profiles/${args.id}`,
url: `/mentor_profiles/${args.id}/activation`,
data: body,
method: "PATCH",
};
Expand Down
Loading

0 comments on commit 9232614

Please sign in to comment.