-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WorkSpace -> Company -> People Flow 체크 및 구현 (#43)
* feat: people, member 코드 분리 및 구현 * feat: workspace 이동시 id 및 이름 localStorage에 저장 및 구현 * env: msw 시작 멈추기 * feat: 회사 데이터 get으로 받아오기 * chore: 필요없는 코드 제거 * chore: 필요없는 코드 제거 people * feat: workspace 받아오기 및 만들기 구현 * fix: reissue-workspace 수정 * feat: 해당 워크 스페이스 클릭시 reissue-workspace되도록 로직 구현 * feat: Company Data 받아오기 구현 * feat: people 데이터 받아오기 및 post 구현 * fix: PR Conflict 수정
- Loading branch information
Showing
32 changed files
with
391 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { axiosClient } from '../AxiosClient'; | ||
|
||
export const useGetWCompany = async () => { | ||
try { | ||
const response = await axiosClient.get(`/workspaces/companies`); | ||
|
||
return response.data; | ||
} catch (error) { | ||
console.error(error); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { axiosClient } from '../AxiosClient'; | ||
|
||
export const postWCompany = async ({ | ||
columnId, | ||
workspaceId, | ||
columnName, | ||
columnType, | ||
columnIndex, | ||
isHided, | ||
dtype, | ||
}: { | ||
columnId: number; | ||
workspaceId: number; | ||
columnName: 'string'; | ||
columnType: 'string'; | ||
columnIndex: number; | ||
isHided: boolean; | ||
dtype: 'string'; | ||
}) => { | ||
try { | ||
const response = await axiosClient.post(`/workspaces`, { | ||
columnId, | ||
workspaceId, | ||
columnName, | ||
columnType, | ||
columnIndex, | ||
isHided, | ||
dtype, | ||
}); | ||
|
||
return response.data; | ||
} catch (error) { | ||
console.error(error); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { axiosClient } from '../AxiosClient'; | ||
|
||
export const postWCompany = async ({ | ||
domain, | ||
companyName, | ||
}: { | ||
domain: string; | ||
companyName: string; | ||
}) => { | ||
try { | ||
const response = await axiosClient.post(`/workspaces/companies`, { | ||
domain, | ||
companyName, | ||
}); | ||
|
||
return response.data; | ||
} catch (error) { | ||
console.error(error); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { axiosClient } from '@finnect/apis/AxiosClient'; | ||
|
||
import { IMemberProps } from '@finnect/interface/MemberInterface'; | ||
|
||
export const useGetMember = async (): Promise<IMemberProps> => { | ||
try { | ||
const response = await axiosClient.get(`/workspaces/members`); | ||
return response.data; | ||
} catch (error) { | ||
console.error(error); | ||
throw error; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { axiosClient } from '@finnect/apis/AxiosClient'; | ||
import { IMemberProps } from '@finnect/interface/MemberInterface'; | ||
|
||
export const postMember = async ( | ||
nickname: string, | ||
role: string, | ||
phone: string | ||
): Promise<IMemberProps> => { | ||
try { | ||
const response = await axiosClient.post(`/workspaces/members`, { | ||
nickname, | ||
role, | ||
phone, | ||
}); | ||
return response.data; | ||
} catch (error) { | ||
console.error(error); | ||
throw error; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { axiosClient } from '@finnect/apis/AxiosClient'; | ||
|
||
export const useDeletePeople = async () => { | ||
try { | ||
const response = await axiosClient.delete(`/workspaces/people`); | ||
return response.data; | ||
} catch (error) { | ||
console.error(error); | ||
throw error; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
import axios from 'axios'; | ||
import { axiosClient } from '@finnect/apis/AxiosClient'; | ||
|
||
export const useGetPeople = async () => { | ||
import { IPeopleAxiosProps } from '@finnect/interface/PeopleInterface'; | ||
|
||
export const useGetPeople = async (): Promise<IPeopleAxiosProps> => { | ||
try { | ||
const response = await axios.get(`/workspaces/members`); | ||
const response = await axiosClient.get(`/workspaces/people`); | ||
return response.data; | ||
} catch (error) { | ||
console.error(error); | ||
throw error; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { axiosClient } from '@finnect/apis/AxiosClient'; | ||
|
||
import { IPeopleProps } from '@finnect/interface/PeopleInterface'; | ||
|
||
export const patchPeople = async ( | ||
personName: string, | ||
personRole: string, | ||
personEmail: string, | ||
personPhone: string | ||
): Promise<IPeopleProps> => { | ||
try { | ||
const response = await axiosClient.patch(`/workspaces/people`, { | ||
personName, | ||
personRole, | ||
personEmail, | ||
personPhone, | ||
}); | ||
return response.data; | ||
} catch (error) { | ||
console.error(error); | ||
throw error; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.