({
- baseUrl: BASE_URL.HD,
- endpoint: `${TEMP_PREFIX}/${eventId}/actions`,
- });
-};
diff --git a/client/src/apis/requestPostEvent.ts b/client/src/apis/requestPostEvent.ts
deleted file mode 100644
index cf6b4716e..000000000
--- a/client/src/apis/requestPostEvent.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import {requestPost} from './fetcher';
-
-interface RequestPostEventProps {
- name: string;
-}
-
-export const requestPostEvent = async ({name}: RequestPostEventProps) => {
- requestPost({
- headers: {'Content-Type': 'application/json'},
- body: {name},
- endpoint: '/api/events',
- });
-};
diff --git a/client/src/apis/tempPrefix.ts b/client/src/apis/tempPrefix.ts
deleted file mode 100644
index 949981b73..000000000
--- a/client/src/apis/tempPrefix.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// TODO: (@weadie) 반복되서 쓰이는 이 api/events가 추후 수정 가능성이 있어서 일단 편집하기 편하게 이 변수를 재사용하도록 했습니다.
-export const TEMP_PREFIX = '/api/events';
diff --git a/client/src/apis/withEventId.type.ts b/client/src/apis/withEventId.type.ts
deleted file mode 100644
index b88160e3e..000000000
--- a/client/src/apis/withEventId.type.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export type WithEventId = P & {
- eventId: string;
-};
diff --git a/client/src/components/MemberReportList/MemberReportList.tsx b/client/src/components/MemberReportList/MemberReportList.tsx
deleted file mode 100644
index ebf1cf72e..000000000
--- a/client/src/components/MemberReportList/MemberReportList.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import {ExpenseList, Flex, Input} from 'haengdong-design';
-import React, {useState} from 'react';
-
-import useSearchMemberReportList from '@hooks/useSearchMemberReportList/useSearchMemberReportList';
-
-const MemberReportList = () => {
- const [name, setName] = useState('');
- const {memberReportSearchList} = useSearchMemberReportList({name, eventId: '므와아아아'});
-
- const changeName = ({target}: React.ChangeEvent) => {
- setName(target.value);
- };
-
- return (
-
-
-
-
- );
-};
-
-export default MemberReportList;
diff --git a/client/src/components/Modal/Modal.style.ts b/client/src/components/Modal/Modal.style.ts
deleted file mode 100644
index 727d0482f..000000000
--- a/client/src/components/Modal/Modal.style.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import {css} from '@emotion/react';
-
-export const modalBodyStyle = css`
- z-index: 100;
- background-color: white;
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- padding: 20px;
- border-radius: 20px 20px 0 0;
- box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
-`;
-
-export const modalBackdropStyle = css`
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-color: rgba(0, 0, 0, 0.5);
- z-index: 99;
-`;
diff --git a/client/src/components/Modal/SetActionModalContent/SetActionModalContent.style.ts b/client/src/components/Modal/SetActionModalContent/SetActionModalContent.style.ts
deleted file mode 100644
index 560f672d5..000000000
--- a/client/src/components/Modal/SetActionModalContent/SetActionModalContent.style.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import {css} from '@emotion/react';
-
-export const setActionModalContentStyle = css({
- display: 'flex',
- flexDirection: 'column',
- width: '100%',
- height: '100%',
- padding: '0 1.5rem',
- gap: '1.5rem',
-});
-
-export const setActionModalContentSwitchContainerStyle = css({
- display: 'flex',
- width: '100%',
- justifyContent: 'space-between',
-});
diff --git a/client/src/components/Modal/SetActionModalContent/SetActionModalContent.tsx b/client/src/components/Modal/SetActionModalContent/SetActionModalContent.tsx
deleted file mode 100644
index 93a917652..000000000
--- a/client/src/components/Modal/SetActionModalContent/SetActionModalContent.tsx
+++ /dev/null
@@ -1,61 +0,0 @@
-import {useState} from 'react';
-import {BottomSheet, Switch} from 'haengdong-design';
-
-import {InOutType, ParticipantType, PurchaseInformation} from '@pages/Event/Event';
-
-import SetPurchase from './SetPurchase';
-import UpdateParticipants from './UpdateParticipants';
-import {setActionModalContentStyle, setActionModalContentSwitchContainerStyle} from './SetActionModalContent.style';
-
-export type ActionType = '지출' | '인원';
-
-interface SetActionModalContentProps {
- participants: string[];
- openBottomSheet: boolean;
-
- setOpenBottomSheet: React.Dispatch>;
- setOrder: React.Dispatch>;
-}
-
-const SetActionModalContent = ({
- participants,
- openBottomSheet,
-
- setOpenBottomSheet,
- setOrder,
-}: SetActionModalContentProps) => {
- const [action, setAction] = useState('지출');
- const [participantAction, setParticipantAction] = useState('탈주');
-
- const handleActionTypeChange = (value: string) => {
- setAction(value as ActionType);
- };
-
- const handleParticipantTypeChange = (value: string) => {
- setParticipantAction(value as InOutType);
- };
-
- return (
- setOpenBottomSheet(false)}>
-
-
-
- {action === '인원' && (
-
- )}
-
-
- {action === '지출' &&
}
- {action === '인원' && (
-
- )}
-
-
- );
-};
-
-export default SetActionModalContent;
diff --git a/client/src/components/Modal/SetActionModalContent/SetPurchase.style.ts b/client/src/components/Modal/SetActionModalContent/SetPurchase.style.ts
deleted file mode 100644
index cc852da28..000000000
--- a/client/src/components/Modal/SetActionModalContent/SetPurchase.style.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import {css} from '@emotion/react';
-
-export const setPurchaseStyle = () =>
- css({
- height: '100%',
- });
-
-export const setPurchaseInputContainerStyle = () =>
- css({
- display: 'flex',
- height: '100%',
- flexDirection: 'column',
- gap: '1.5rem',
- overflow: 'auto',
- paddingBottom: '14rem',
- });
-
-export const setPurchaseInputStyle = () =>
- css({
- display: 'flex',
- flexDirection: 'column',
- gap: '0.5rem',
- });
diff --git a/client/src/components/Modal/SetActionModalContent/SetPurchase.tsx b/client/src/components/Modal/SetActionModalContent/SetPurchase.tsx
deleted file mode 100644
index 515c048dd..000000000
--- a/client/src/components/Modal/SetActionModalContent/SetPurchase.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import {Input, FixedButton} from 'haengdong-design';
-
-import useDynamicInputPairs from '@hooks/useDynamicInputPairs';
-
-import {setPurchaseInputStyle, setPurchaseStyle, setPurchaseInputContainerStyle} from './SetPurchase.style';
-
-interface SetPurchaseProps {
- setOpenBottomSheet: React.Dispatch>;
- setOrder: React.Dispatch>;
-}
-
-const SetPurchase = ({setOpenBottomSheet, setOrder}: SetPurchaseProps) => {
- const {inputPairs, inputRefs, handleInputChange, handleInputBlur} = useDynamicInputPairs();
-
- const handleSetPurchaseSubmit = () => {
- setOrder(prev => prev + 1);
- // TODO: (@soha) api 요청시 inputPairs를 보내면 됨
- setOpenBottomSheet(false);
- };
-
- return (
-
- );
-};
-
-export default SetPurchase;
diff --git a/client/src/components/Modal/SetActionModalContent/UpdateParticipants.style.ts b/client/src/components/Modal/SetActionModalContent/UpdateParticipants.style.ts
deleted file mode 100644
index 087e25a85..000000000
--- a/client/src/components/Modal/SetActionModalContent/UpdateParticipants.style.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import {css} from '@emotion/react';
-
-export const updateParticipantsStyle = () =>
- css({
- display: 'flex',
- flexDirection: 'column',
- gap: '1.5rem',
- height: '100%',
- });
-
-export const updateParticipantsInputStyle = () =>
- css({
- display: 'flex',
- flexDirection: 'column',
- gap: '1rem',
- overflow: 'auto',
- paddingBottom: '14rem',
- });
diff --git a/client/src/components/Modal/SetActionModalContent/UpdateParticipants.tsx b/client/src/components/Modal/SetActionModalContent/UpdateParticipants.tsx
deleted file mode 100644
index 72b86faa7..000000000
--- a/client/src/components/Modal/SetActionModalContent/UpdateParticipants.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import {Input, FixedButton} from 'haengdong-design';
-import {useState} from 'react';
-
-import {InOutType} from '@pages/Event/Event';
-
-import useDynamicInput from '@hooks/useDynamicAdditionalInput';
-
-import {updateParticipantsInputStyle, updateParticipantsStyle} from './UpdateParticipants.style';
-
-interface UpdateParticipantsProps {
- participants: string[];
- participantAction: InOutType;
- setOpenBottomSheet: React.Dispatch>;
-}
-
-const UpdateParticipants = ({participantAction, participants, setOpenBottomSheet}: UpdateParticipantsProps) => {
- const {inputs, inputRefs, handleInputChange, handleInputBlur, getNonEmptyInputs} = useDynamicInput();
-
- const handleUpdateParticipantsSubmit = () => {
- const newParticipants = () => {
- if (participantAction === '탈주') {
- return participants.filter(participant => !getNonEmptyInputs().includes(participant));
- } else {
- return [...participants, ...getNonEmptyInputs()];
- }
- };
-
- // TODO: (@soha) api 요청시 newParticipants()를 보내면 됨
- setOpenBottomSheet(false);
- };
-
- return (
-
-
- {/* TODO: (@soha) Search로 변경하기 */}
- {inputs.map((name, index) => (
- (inputRefs.current[index] = el)}
- onChange={e => handleInputChange(index, e.target.value)}
- onBlur={() => handleInputBlur(index)}
- />
- ))}
-
-
-
- );
-};
-
-export default UpdateParticipants;
diff --git a/client/src/components/Modal/SetActionModalContent/index.ts b/client/src/components/Modal/SetActionModalContent/index.ts
deleted file mode 100644
index c7514135c..000000000
--- a/client/src/components/Modal/SetActionModalContent/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {default as SetActionModalContent} from './SetActionModalContent';
diff --git a/client/src/components/Modal/SetInitialParticipants/SetInitialParticipants.style.ts b/client/src/components/Modal/SetInitialParticipants/SetInitialParticipants.style.ts
deleted file mode 100644
index f0f5bf996..000000000
--- a/client/src/components/Modal/SetInitialParticipants/SetInitialParticipants.style.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import {css} from '@emotion/react';
-
-export const setInitialParticipantsStyle = () =>
- css({
- display: 'flex',
- flexDirection: 'column',
- gap: '1.5rem',
- width: '100%',
- height: '100%',
- padding: '0 1.5rem',
- });
-
-export const setInitialParticipantsInputGroupStyle = () =>
- css({
- display: 'flex',
- flexDirection: 'column',
- gap: '1rem',
- overflow: 'auto',
- paddingBottom: '11rem',
- });
diff --git a/client/src/components/Modal/SetInitialParticipants/SetInitialParticipants.tsx b/client/src/components/Modal/SetInitialParticipants/SetInitialParticipants.tsx
deleted file mode 100644
index 15a0b0460..000000000
--- a/client/src/components/Modal/SetInitialParticipants/SetInitialParticipants.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-import {Text, Input, BottomSheet, FixedButton} from 'haengdong-design';
-
-import useDynamicInput from '@hooks/useDynamicAdditionalInput';
-
-import {setInitialParticipantsInputGroupStyle, setInitialParticipantsStyle} from './SetInitialParticipants.style';
-
-interface SetInitialParticipantsProps {
- openBottomSheet: boolean;
- setOpenBottomSheet: React.Dispatch>;
- setParticipants: React.Dispatch>;
-}
-
-const SetInitialParticipants = ({
- openBottomSheet,
- setOpenBottomSheet,
- setParticipants,
-}: SetInitialParticipantsProps) => {
- const {inputs, inputRefs, handleInputChange, handleInputBlur, getNonEmptyInputs} = useDynamicInput();
-
- const handleSubmit = () => {
- setParticipants(getNonEmptyInputs());
- // TODO: (@soha) api 요청시 getNonEmptyInputs() 보낼 형태 생성
- setOpenBottomSheet(false);
- };
-
- return (
- setOpenBottomSheet(false)}>
-
-
초기 인원 설정하기
-
- {inputs.map((participant, index) => (
- (inputRefs.current[index] = el)}
- onChange={e => handleInputChange(index, e.target.value)}
- onBlur={() => handleInputBlur(index)}
- />
- ))}
-
-
-
-
- );
-};
-
-export default SetInitialParticipants;
diff --git a/client/src/components/Modal/SetInitialParticipants/index.ts b/client/src/components/Modal/SetInitialParticipants/index.ts
deleted file mode 100644
index c41b6a206..000000000
--- a/client/src/components/Modal/SetInitialParticipants/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {default as SetInitialParticipants} from './SetInitialParticipants';
diff --git a/client/src/components/Modal/index.ts b/client/src/components/Modal/index.ts
deleted file mode 100644
index e5d5264cd..000000000
--- a/client/src/components/Modal/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {default as SetInitialParticipants} from './SetInitialParticipants/SetInitialParticipants';
-export {default as SetActionModalContent} from './SetActionModalContent/SetActionModalContent';
diff --git a/client/src/components/StepList/StepList.tsx b/client/src/components/StepList/StepList.tsx
deleted file mode 100644
index 76dedc41b..000000000
--- a/client/src/components/StepList/StepList.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import {Flex, InOutItem, StepItem} from 'haengdong-design';
-
-import {useStepList} from '@hooks/useStepList/useStepList';
-import {MemberType} from 'types/stepList';
-
-const StepList = () => {
- const {stepList} = useStepList();
-
- // TODO: (@weadie) if else 구문이 지저분하므로 리펙터링이 필요합니다.
- return (
-
- {stepList.map(step => {
- if (step.type === 'BILL') {
- return ;
- } else if (step.type === 'IN' || step.type === 'OUT') {
- return name)} />;
- } else {
- return <>>;
- }
- })}
-
- );
-};
-
-export default StepList;
diff --git a/client/src/constants/routerUrls.ts b/client/src/constants/routerUrls.ts
deleted file mode 100644
index 228e25c7c..000000000
--- a/client/src/constants/routerUrls.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export const ROUTER_URLS = {
- main: '',
- eventCreateName: '/event/create/name',
- eventCreateComplete: '/event/create/complete',
- event: '/event',
- eventManage: '/event/:eventId/admin',
- home: '/event/:eventId/home',
-};
diff --git a/client/src/hooks/useDynamicAdditionalInput.tsx b/client/src/hooks/useDynamicAdditionalInput.tsx
deleted file mode 100644
index 6bd592254..000000000
--- a/client/src/hooks/useDynamicAdditionalInput.tsx
+++ /dev/null
@@ -1,52 +0,0 @@
-import {useEffect, useRef, useState} from 'react';
-
-const useDynamicInput = () => {
- const [inputs, setInputs] = useState(['']);
- const inputRefs = useRef<(HTMLInputElement | null)[]>([]);
-
- // TODO: (@soha) 입력이 완료되고 중간에 값을 모두 지웠을 경우 Input이 없애지도록 수정하기
- const handleInputChange = (index: number, value: string) => {
- const newInputs = [...inputs];
- newInputs[index] = value;
- setInputs(newInputs);
- };
-
- const handleInputBlur = (index: number) => {
- if (inputs[index].trim() === '') {
- setInputs(prev => {
- const newInputs = [...prev];
- newInputs[index] = '';
- return newInputs;
- });
- } else if (inputs[index].trim() !== '' && index === inputs.length - 1) {
- setInputs(prev => {
- const newInputs = [...prev, ''];
- newInputs[index] = inputs[index].trim();
- return newInputs;
- });
- }
- };
-
- const getNonEmptyInputs = () => {
- return inputs.filter(input => input.trim() !== '');
- };
-
- useEffect(() => {
- if (inputRefs.current.length > 0) {
- const lastInput = inputRefs.current[inputRefs.current.length - 1];
- if (lastInput) {
- lastInput.scrollIntoView({behavior: 'smooth', block: 'center'});
- }
- }
- }, [inputs]);
-
- return {
- inputs,
- inputRefs,
- handleInputChange,
- handleInputBlur,
- getNonEmptyInputs,
- };
-};
-
-export default useDynamicInput;
diff --git a/client/src/hooks/useDynamicInputPairs.tsx b/client/src/hooks/useDynamicInputPairs.tsx
deleted file mode 100644
index db5347dd8..000000000
--- a/client/src/hooks/useDynamicInputPairs.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-import {useEffect, useRef, useState} from 'react';
-
-import {PurchaseInformation} from '@pages/Event/Event';
-
-const useDynamicInputPairs = () => {
- const [inputPairs, setInputPairs] = useState([{name: '', price: 0}]);
- const inputRefs = useRef<(HTMLInputElement | null)[]>([]);
-
- const handleInputChange = (index: number, field: 'name' | 'price', value: string) => {
- const newInputPairs = [...inputPairs];
- newInputPairs[index] = {
- ...newInputPairs[index],
- [field]: field === 'price' ? parseFloat(value) : value,
- };
- setInputPairs(newInputPairs);
- };
-
- const handleInputBlur = (index: number) => {
- const currentPair = inputPairs[index];
- if (currentPair.name.trim() === '' && currentPair.price === 0) {
- setInputPairs(prev => prev.filter((_, i) => i !== index));
- } else if (currentPair.name.trim() !== '' && currentPair.price !== 0 && index === inputPairs.length - 1) {
- setInputPairs(prev => [...prev, {name: '', price: 0}]);
- }
- };
-
- useEffect(() => {
- if (inputRefs.current.length > 0) {
- const lastInputPair = inputRefs.current.slice(-2);
- lastInputPair.forEach(ref => ref?.scrollIntoView({behavior: 'smooth', block: 'center'}));
- }
- }, [inputPairs]);
-
- return {
- inputPairs,
- inputRefs,
- handleInputChange,
- handleInputBlur,
- };
-};
-
-export default useDynamicInputPairs;
diff --git a/client/src/hooks/useSearchMemberReportList/useSearchMemberReportList.tsx b/client/src/hooks/useSearchMemberReportList/useSearchMemberReportList.tsx
deleted file mode 100644
index 589317f7d..000000000
--- a/client/src/hooks/useSearchMemberReportList/useSearchMemberReportList.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-import {useEffect, useState} from 'react';
-
-import {MemberReport} from 'types/stepList';
-import {requestMemberReportList} from '@apis/request/report';
-
-import {WithEventId} from '@apis/withEventId.type';
-
-import memberReportSearchJsonList from '@mocks/memberReportSearchList.json';
-
-const memberReportSearchMockList = memberReportSearchJsonList as MemberReport[];
-
-type UseSearchMemberReportListParams = {
- name: string;
-};
-
-const useSearchMemberReportList = ({name, eventId}: WithEventId) => {
- const [memberReportList, setMemberReportList] = useState(memberReportSearchMockList);
- const [memberReportSearchList, setMemberReportSearchList] = useState([]);
-
- useEffect(() => {
- const fetchMemberReportList = async () => {
- // TODO: (@weadie) cors 고쳐지면 주석 풀게요.
- // const memberReportListData = await requestMemberReportList({eventId});
-
- const memberReportListData = memberReportSearchMockList;
-
- setMemberReportList(memberReportListData);
- };
-
- fetchMemberReportList();
- }, []);
-
- // TODO: (@weadie) 글자가 완성될 때마다 아래 로직이 실행되어야 합니다.
- useEffect(() => {
- if (name === '') setMemberReportSearchList(memberReportList);
-
- setMemberReportSearchList(memberReportList.filter(memberReport => memberReport.name.includes(name)));
- }, [name]);
-
- return {
- memberReportSearchList,
- };
-};
-
-export default useSearchMemberReportList;
diff --git a/client/src/hooks/useStepList/useStepList.tsx b/client/src/hooks/useStepList/useStepList.tsx
deleted file mode 100644
index 9adb2d684..000000000
--- a/client/src/hooks/useStepList/useStepList.tsx
+++ /dev/null
@@ -1,49 +0,0 @@
-import {PropsWithChildren, createContext, useEffect, useState} from 'react';
-
-import {BillAction, MemberType, StepList} from 'types/stepList';
-
-import stepListJsonData from '@mocks/stepList.json';
-
-const stepListMockData = stepListJsonData as StepList;
-
-const useStepList = () => {
- const [stepList, setStepList] = useState(stepListMockData);
-
- useEffect(() => {
- // TODO: (@weadie) useEffect를 꼭 써야하는가?
- // 초기 리스트 불러서 setActionList
- }, []);
-
- const updateMemberList = (type: MemberType, memberList: string[]) => {
- // api를 호출하고 set한다
- };
-
- const addBill = (title: string, price: number) => {
- // api를 호출하고 set한다.
- };
-
- const calculateBillSum = (actions: BillAction[]) => {
- return actions.reduce((sum, {price}) => sum + price, 0);
- };
-
- const getTotalPrice = () => {
- return stepList.reduce((sum, {type, actions}) => {
- if (type === 'BILL') {
- return sum + calculateBillSum(actions);
- }
- return sum;
- }, 0);
- };
-
- return {stepList, getTotalPrice};
-};
-
-const StepListContext = createContext([]); // TODO: (@weadie) 인자를 어떻게 줘야 하는지 고민하기.
-
-const StepListProvider = ({children}: PropsWithChildren) => {
- const {stepList} = useStepList();
-
- return {children};
-};
-
-export {useStepList, StepListProvider};
diff --git a/client/src/index.css b/client/src/index.css
deleted file mode 100644
index 8ebdb5ba8..000000000
--- a/client/src/index.css
+++ /dev/null
@@ -1,15 +0,0 @@
-body {
- max-width: 768px;
- height: 100lvh;
- margin: 0 auto;
-}
-
-section {
- width: 100%;
-}
-
-#root {
- display: flex;
- flex-direction: column;
- height: 100%;
-}
diff --git a/client/src/index.tsx b/client/src/index.tsx
deleted file mode 100644
index b3d742c43..000000000
--- a/client/src/index.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-import React from 'react';
-import ReactDOM from 'react-dom/client';
-import {RouterProvider} from 'react-router-dom';
-
-import router from './router';
-import './reset.css';
-import './index.css';
-
-ReactDOM.createRoot(document.getElementById('root')!).render(
-
-
- ,
-);
diff --git a/client/src/mocks/memberReportSearchList.json b/client/src/mocks/memberReportSearchList.json
deleted file mode 100644
index dfcb684b1..000000000
--- a/client/src/mocks/memberReportSearchList.json
+++ /dev/null
@@ -1,10 +0,0 @@
-[
- {"name": "망쵸", "price": 1033200},
- {"name": "이상", "price": 10100},
- {"name": "소하", "price": 10000},
- {"name": "쿠키", "price": 100012},
- {"name": "토다리", "price": 1001230},
- {"name": "감자", "price": 1012300},
- {"name": "백호", "price": 10300},
- {"name": "웨디", "price": 1000}
-]
diff --git a/client/src/mocks/stepList.json b/client/src/mocks/stepList.json
deleted file mode 100644
index cc3815a75..000000000
--- a/client/src/mocks/stepList.json
+++ /dev/null
@@ -1,86 +0,0 @@
-[
- {
- "type": "IN",
- "stepName": null,
- "actions": [
- {
- "actionId": 3,
- "name": "망쵸",
- "price": null,
- "sequence": 3
- },
- {
- "actionId": 4,
- "name": "백호",
- "price": null,
- "sequence": 4
- }
- ]
- },
- {
- "type": "BILL",
- "stepName": "1차",
- "actions": [
- {
- "actionId": 1,
- "name": "감자탕",
- "price": 10000,
- "sequence": 1
- },
- {
- "actionId": 2,
- "name": "인생네컷",
- "price": 10000,
- "sequence": 2
- }
- ]
- },
- {
- "type": "IN",
- "stepName": null,
- "actions": [
- {
- "actionId": 3,
- "name": "망쵸",
- "price": null,
- "sequence": 3
- },
- {
- "actionId": 4,
- "name": "백호",
- "price": null,
- "sequence": 4
- }
- ]
- },
- {
- "type": "OUT",
- "stepName": null,
- "actions": [
- {
- "actionId": 5,
- "name": "소하",
- "price": null,
- "sequence": 5
- },
- {
- "actionId": 6,
- "name": "웨디",
- "price": null,
- "sequence": 6
- }
- ]
- },
- {
- "type": "BILL",
- "stepName": "2차",
- "actions": [
- {
- "actionId": 8,
- "name": "노래방",
- "price": 20000,
- "sequence": 7
- }
- ]
- }
-]
diff --git a/client/src/pages/Create/Complete.tsx b/client/src/pages/Create/Complete.tsx
deleted file mode 100644
index b4496d0cd..000000000
--- a/client/src/pages/Create/Complete.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import {useEffect, useState} from 'react';
-import {useLocation, useNavigate} from 'react-router-dom';
-import {FixedButton, MainLayout, Title} from 'haengdong-design';
-
-import {ROUTER_URLS} from '@constants/routerUrls';
-
-const CompleteCreateEvent = () => {
- const [url, setUrl] = useState('');
- const navigate = useNavigate();
- const location = useLocation();
-
- useEffect(() => {
- const getUrl = async () => {
- const eventTitle = location.search;
- // console.log(eventTitle);
-
- // const url = await fetch();
- setUrl('hangsapage');
- };
-
- getUrl();
- }, []);
-
- return (
-
- {/* */}
-
- navigate(`${ROUTER_URLS.event}/${url}/admin`)}>관리 페이지로 이동
-
- );
-};
-
-export default CompleteCreateEvent;
diff --git a/client/src/pages/Create/Name.tsx b/client/src/pages/Create/Name.tsx
deleted file mode 100644
index 8a1261662..000000000
--- a/client/src/pages/Create/Name.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import {useState} from 'react';
-import {useNavigate} from 'react-router-dom';
-import {FixedButton, Input, MainLayout, TextButton, Title, TopNav} from 'haengdong-design';
-
-import {requestPostEvent} from '@apis/requestPostEvent';
-
-import {ROUTER_URLS} from '@constants/routerUrls';
-
-const CreateEvent = () => {
- const [eventTitle, setEventTitle] = useState('');
- const navigate = useNavigate();
-
- const submitEventTitle = async (event: React.FormEvent) => {
- event.preventDefault();
- const result = await requestPostEvent({name: eventTitle});
-
- navigate(`${ROUTER_URLS.eventCreateComplete}?${new URLSearchParams({title: eventTitle})}`);
- };
-
- return (
-
-
-
-
-
- );
-};
-
-export default CreateEvent;
diff --git a/client/src/pages/Create/index.ts b/client/src/pages/Create/index.ts
deleted file mode 100644
index 5ce37a93e..000000000
--- a/client/src/pages/Create/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {default as CreateNamePage} from './Name';
-export {default as CreateCompletePage} from './Complete';
diff --git a/client/src/pages/CreateEvent/CreateEvent.tsx b/client/src/pages/CreateEvent/CreateEvent.tsx
deleted file mode 100644
index 9697200e0..000000000
--- a/client/src/pages/CreateEvent/CreateEvent.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-import {useState} from 'react';
-import {useNavigate} from 'react-router-dom';
-
-import {ROUTER_URLS} from '@constants/routerUrls';
-
-const CreateEvent = () => {
- const [eventTitle, setEventTitle] = useState('');
- const navigate = useNavigate();
-
- const submitEventTitle = (event: React.FormEvent) => {
- event.preventDefault();
- navigate(`${ROUTER_URLS.eventCreateName}?${new URLSearchParams({title: eventTitle})}`);
- };
-
- return (
-
- 행사 생성하기
- 시작할 행사 이름을 입력해 주세요.
-
-
- );
-};
-
-export default CreateEvent;
diff --git a/client/src/pages/Event/Event.style.ts b/client/src/pages/Event/Event.style.ts
deleted file mode 100644
index 15e2443b4..000000000
--- a/client/src/pages/Event/Event.style.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import {css} from '@emotion/react';
-
-export const ReceiptStyle = () =>
- css({
- display: 'flex',
- flexDirection: 'column',
- gap: '8px',
- padding: '0 8px',
- });
diff --git a/client/src/pages/Event/Event.tsx b/client/src/pages/Event/Event.tsx
deleted file mode 100644
index 79c1f9950..000000000
--- a/client/src/pages/Event/Event.tsx
+++ /dev/null
@@ -1,102 +0,0 @@
-import {useState} from 'react';
-import {TopNav, Title, FixedButton, StepItem, InOutItem, MainLayout} from 'haengdong-design';
-
-import StepList from '@components/StepList/StepList';
-import {useStepList} from '@hooks/useStepList/useStepList';
-import {StepListProvider} from '@hooks/useStepList/useStepList';
-
-import {SetActionModalContent, SetInitialParticipants} from '@components/Modal';
-
-import {ReceiptStyle} from './Event.style';
-
-export type PurchaseInformation = {
- name: string;
- price: number;
-};
-
-export type InOutType = '늦참' | '탈주';
-
-export type ParticipantType = {
- name: string;
- type: InOutType;
-};
-
-interface ModalRenderingProps {
- participants: string[];
- openBottomSheet: boolean;
-
- setOrder: React.Dispatch>;
- setOpenBottomSheet: React.Dispatch>;
- setParticipants: React.Dispatch>;
-}
-
-const ModalRendering = ({
- participants,
- setOrder,
- setOpenBottomSheet,
- setParticipants,
- openBottomSheet,
-}: ModalRenderingProps) => {
- switch (participants.length) {
- case 0:
- return (
-
- );
-
- default:
- return (
-
- );
- }
-};
-
-const Event = () => {
- const [openBottomSheet, setOpenBottomSheet] = useState(false);
- const [participants, setParticipants] = useState([]);
- const [order, setOrder] = useState(0);
-
- const {getTotalPrice} = useStepList();
-
- return (
-
-
-
-
- {order > 0 && (
- // TODO: (@soha) order가 0일때 기본 Step 뜨기
-
-
-
- )}
- {/* TODO: (@soha) 추후 버튼 width 화면에 맞게 수정 */}
- setOpenBottomSheet(prev => !prev)}
- />
- {openBottomSheet &&
- ModalRendering({
- participants,
- setOrder,
- setParticipants,
- setOpenBottomSheet,
- openBottomSheet,
- })}
-
-
- );
-};
-
-export default Event;
diff --git a/client/src/pages/Event/index.ts b/client/src/pages/Event/index.ts
deleted file mode 100644
index fa85db27a..000000000
--- a/client/src/pages/Event/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {default as EventPage} from './Event';
diff --git a/client/src/pages/Home/HomeContent.tsx b/client/src/pages/Home/HomeContent.tsx
deleted file mode 100644
index 171729636..000000000
--- a/client/src/pages/Home/HomeContent.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import {Tab, Tabs, Title} from 'haengdong-design';
-
-import MemberReportList from '@components/MemberReportList/MemberReportList';
-import StepList from '@components/StepList/StepList';
-import {useStepList} from '@hooks/useStepList/useStepList';
-
-const HomeContent = () => {
- const {getTotalPrice} = useStepList();
-
- return (
-
-
-
- } />
- } />
-
-
- );
-};
-
-export default HomeContent;
diff --git a/client/src/pages/Home/HomeLayout.tsx b/client/src/pages/Home/HomeLayout.tsx
deleted file mode 100644
index 8cae579d6..000000000
--- a/client/src/pages/Home/HomeLayout.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import {Flex, MainLayout, TopNav} from 'haengdong-design';
-
-import {StepListProvider} from '@hooks/useStepList/useStepList';
-
-import HomeContent from './HomeContent';
-
-const HomeLayout = () => {
- return (
-
-
-
-
-
-
-
-
- );
-};
-
-export default HomeLayout;
diff --git a/client/src/pages/Home/index.ts b/client/src/pages/Home/index.ts
deleted file mode 100644
index fde362f5c..000000000
--- a/client/src/pages/Home/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {default as HomePage} from './HomeLayout';
diff --git a/client/src/pages/Main/Main.tsx b/client/src/pages/Main/Main.tsx
deleted file mode 100644
index 1cb9f6b26..000000000
--- a/client/src/pages/Main/Main.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import {useNavigate} from 'react-router-dom';
-import {FixedButton, MainLayout, Title} from 'haengdong-design';
-
-import {ROUTER_URLS} from '@constants/routerUrls';
-
-const Main = () => {
- const navigate = useNavigate();
-
- return (
-
- {/* */}
-
- navigate(ROUTER_URLS.eventCreateName)}>행사 생성하기
-
- );
-};
-
-export default Main;
diff --git a/client/src/pages/Main/index.ts b/client/src/pages/Main/index.ts
deleted file mode 100644
index c3cce532e..000000000
--- a/client/src/pages/Main/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {default as MainPage} from './Main';
diff --git a/client/src/reset.css b/client/src/reset.css
deleted file mode 100644
index 1a7ea162d..000000000
--- a/client/src/reset.css
+++ /dev/null
@@ -1,136 +0,0 @@
-/* http://meyerweb.com/eric/tools/css/reset/
- v2.0 | 20110126
- License: none (public domain)
-*/
-
-html,
-body,
-div,
-span,
-applet,
-object,
-iframe,
-h1,
-h2,
-h3,
-h4,
-h5,
-h6,
-p,
-blockquote,
-pre,
-a,
-abbr,
-acronym,
-address,
-big,
-cite,
-code,
-del,
-dfn,
-em,
-img,
-ins,
-kbd,
-q,
-s,
-samp,
-small,
-strike,
-strong,
-sub,
-sup,
-tt,
-b,
-u,
-i,
-center,
-dl,
-dt,
-dd,
-ol,
-ul,
-li,
-fieldset,
-form,
-label,
-legend,
-table,
-caption,
-tbody,
-tfoot,
-thead,
-tr,
-th,
-td,
-article,
-aside,
-canvas,
-details,
-embed,
-figure,
-figcaption,
-footer,
-header,
-hgroup,
-menu,
-nav,
-output,
-ruby,
-section,
-summary,
-time,
-mark,
-audio,
-video {
- vertical-align: baseline;
- margin: 0;
- border: 0;
- padding: 0;
- font-size: 100%;
- font: inherit;
-}
-/* HTML5 display-role reset for older browsers */
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-menu,
-nav,
-section {
- display: block;
-}
-body {
- line-height: 1;
-}
-ol,
-ul {
- list-style: none;
-}
-blockquote,
-q {
- quotes: none;
-}
-blockquote:before,
-blockquote:after,
-q:before,
-q:after {
- content: '';
- content: none;
-}
-table {
- border-collapse: collapse;
- border-spacing: 0;
-}
-button {
- cursor: pointer;
- border: none;
- background-color: transparent;
-}
-* {
- box-sizing: border-box;
-}
diff --git a/client/src/router.tsx b/client/src/router.tsx
deleted file mode 100644
index a84ea18e5..000000000
--- a/client/src/router.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-import {createBrowserRouter} from 'react-router-dom';
-
-import {MainPage} from '@pages/Main';
-import {CreateNamePage, CreateCompletePage} from '@pages/Create';
-import {EventPage} from '@pages/Event';
-import {HomePage} from '@pages/Home';
-
-import {ROUTER_URLS} from '@constants/routerUrls';
-
-import App from './App';
-
-const router = createBrowserRouter([
- {
- path: '',
- element: ,
- children: [
- {
- index: true,
- path: ROUTER_URLS.main,
- element: ,
- },
- {
- path: ROUTER_URLS.eventCreateName,
- element: ,
- },
- {
- path: ROUTER_URLS.eventCreateComplete,
- element: ,
- },
- {
- path: ROUTER_URLS.eventManage,
- element: ,
- },
- {
- path: ROUTER_URLS.home,
- element: ,
- },
- ],
- },
-]);
-
-export default router;
diff --git a/client/src/types/stepList.ts b/client/src/types/stepList.ts
deleted file mode 100644
index f106306e9..000000000
--- a/client/src/types/stepList.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-export type MemberType = 'IN' | 'OUT';
-
-// TODO: (@weadie) 준 데이터 형식에서 steps를 빼내 flat하게 사용중. 일관성있게 하는게 좋긴 하나 사용시 번거로움이 있을 거라고 판단.
-export type StepList = (MemberStep | BillStep)[];
-
-export type Step = {
- type: MemberType | 'BILL';
- stepName: string | null;
- actions: (BillAction | MemberAction)[];
-};
-
-export type MemberStep = Omit & {
- type: MemberType;
- stepName: null;
- actions: MemberAction[];
-};
-
-export type BillStep = Omit & {
- type: 'BILL';
- stepName: string;
- actions: BillAction[];
-};
-
-export type Action = {
- actionId: number;
- name: string;
- price: number | null;
- sequence?: number;
-};
-
-export type BillAction = Omit & {
- price: number;
-};
-
-export type MemberAction = Omit & {
- price: null;
-};
-
-export type Member = {
- name: string;
- status: MemberType;
-};
-
-export type Bill = {
- title: string;
- price: number;
-};
-
-export type MemberReport = {
- name: string;
- price: number;
-};
diff --git a/client/tsconfig.json b/client/tsconfig.json
deleted file mode 100644
index b049bf464..000000000
--- a/client/tsconfig.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "compilerOptions": {
- "sourceMap": true,
- "module": "ES2020",
- "target": "ESNext",
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
- "useDefineForClassFields": true,
- "removeComments": true,
- "skipLibCheck": true,
-
- "moduleResolution": "bundler",
- "allowImportingTsExtensions": true,
- "resolveJsonModule": true,
- "isolatedModules": true,
- "noEmit": true,
-
- "jsx": "react-jsx",
- "strict": true,
- // "noUnusedLocals": true,
- // "noUnusedParameters": true,
- "noFallthroughCasesInSwitch": true,
-
- "types": ["node", "jest"],
- "esModuleInterop": true,
- "strictNullChecks": true,
- "strictFunctionTypes": true,
- "strictBindCallApply": true,
- "strictPropertyInitialization": true,
- "noImplicitAny": true,
- "noImplicitThis": true,
- "alwaysStrict": true,
- "noImplicitReturns": true,
- "forceConsistentCasingInFileNames": true,
- "jsxImportSource": "@emotion/react",
-
- "baseUrl": "./src",
- "paths": {
- "@apis/*": ["apis/*"],
- "@assets/*": ["assets/*"],
- "@components/*": ["components/*"],
- "@constants/*": ["constants/*"],
- "@hooks/*": ["hooks/*"],
- "@mocks/*": ["mocks/*"],
- "@pages/*": ["pages/*"],
- "@utils/*": ["utils/*"]
- },
- "outDir": "./dist"
- },
- "node": true,
- "include": ["src"]
-}
diff --git a/client/webpack.config.js b/client/webpack.config.js
deleted file mode 100644
index 9545ecf2f..000000000
--- a/client/webpack.config.js
+++ /dev/null
@@ -1,75 +0,0 @@
-import path from 'path';
-import HtmlWebpackPlugin from 'html-webpack-plugin';
-import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
-import {ModifySourcePlugin, ConcatOperation} from 'modify-source-webpack-plugin';
-import {fileURLToPath} from 'url';
-import Dotenv from 'dotenv-webpack';
-
-const __filename = fileURLToPath(import.meta.url);
-const __dirname = path.dirname(__filename);
-
-// dotenv.config({path: path.join(__dirname, '.env')});
-
-export default {
- mode: 'development',
- entry: './src/index.tsx',
- resolve: {
- extensions: ['.js', '.jsx', '.ts', '.tsx'],
- alias: {
- '@apis': path.resolve(__dirname, 'src/apis/'),
- '@assets': path.resolve(__dirname, 'src/assets/'),
- '@components': path.resolve(__dirname, 'src/components/'),
- '@constants': path.resolve(__dirname, 'src/constants/'),
- '@hooks': path.resolve(__dirname, 'src/hooks/'),
- '@mocks': path.resolve(__dirname, 'src/mocks/'),
- '@pages': path.resolve(__dirname, 'src/pages/'),
- '@utils': path.resolve(__dirname, 'src/utils/'),
- },
- },
- output: {
- path: path.join(__dirname, 'dist'),
- filename: 'bundle.min.js',
- publicPath: '/',
- },
- module: {
- rules: [
- {
- test: /\.tsx?$/,
- loader: 'ts-loader',
- exclude: /node_modules/,
- },
- {
- test: /\.css$/i,
- use: ['style-loader', 'css-loader'],
- },
- {
- test: /\.svg$/,
- use: [
- {
- loader: '@svgr/webpack',
- },
- ],
- },
- ],
- },
- plugins: [
- new HtmlWebpackPlugin({
- template: './index.html',
- }),
- new ForkTsCheckerWebpackPlugin(),
- new ModifySourcePlugin({
- rules: [
- {
- test: /\.tsx$/i,
- operations: [new ConcatOperation('start', '/** @jsxImportSource @emotion/react */\n\n')],
- },
- ],
- }),
- new Dotenv(),
- ],
- devServer: {
- port: 3000,
- hot: true,
- historyApiFallback: true,
- },
-};
diff --git a/server/docs/24-08-04-haengdong-erd.sql b/server/docs/24-08-04-haengdong-erd.sql
new file mode 100644
index 000000000..ae2fbc4a5
--- /dev/null
+++ b/server/docs/24-08-04-haengdong-erd.sql
@@ -0,0 +1,65 @@
+-- Create tables
+CREATE TABLE action
+(
+ event_id BIGINT,
+ id BIGINT AUTO_INCREMENT,
+ sequence BIGINT,
+ PRIMARY KEY (id)
+);
+
+CREATE TABLE bill_action
+(
+ action_id BIGINT UNIQUE,
+ id BIGINT AUTO_INCREMENT,
+ price BIGINT,
+ title VARCHAR(30),
+ PRIMARY KEY (id)
+);
+
+CREATE TABLE event
+(
+ id BIGINT AUTO_INCREMENT,
+ name VARCHAR(255),
+ token VARCHAR(255),
+ PRIMARY KEY (id)
+);
+
+CREATE TABLE event_step
+(
+ event_id BIGINT,
+ id BIGINT AUTO_INCREMENT,
+ sequence BIGINT,
+ name VARCHAR(255),
+ PRIMARY KEY (id)
+);
+
+CREATE TABLE member_action
+(
+ action_id BIGINT UNIQUE,
+ id BIGINT AUTO_INCREMENT,
+ member_group_id BIGINT,
+ member_name VARCHAR(255),
+ status ENUM('IN', 'OUT'),
+ PRIMARY KEY (id)
+);
+
+-- Add foreign key constraints
+ALTER TABLE action
+ ADD CONSTRAINT FKgf0qmub9va1xbe44nehny31yw
+ FOREIGN KEY (event_id)
+ REFERENCES event (id);
+
+ALTER TABLE bill_action
+ ADD CONSTRAINT FK54tx517tp0ry6453olkply4us
+ FOREIGN KEY (action_id)
+ REFERENCES action (id);
+
+ALTER TABLE event_step
+ ADD CONSTRAINT FKe3rkib91cvl0x5w9wqkshmn81
+ FOREIGN KEY (event_id)
+ REFERENCES event (id);
+
+ALTER TABLE member_action
+ ADD CONSTRAINT FK5jna51dn8fs2ir52l4uwn517u
+ FOREIGN KEY (action_id)
+ REFERENCES action (id);
diff --git a/server/docs/24-08-04-haengdong-erd.svg b/server/docs/24-08-04-haengdong-erd.svg
new file mode 100644
index 000000000..5a4bac225
--- /dev/null
+++ b/server/docs/24-08-04-haengdong-erd.svg
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file