Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] 선호시간대 입력 다음 버튼 활성화, 시간 입력 POST 요청값 변경 배포 #249

Merged
merged 8 commits into from
Jul 4, 2024
64 changes: 4 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# 🏃 모든 회의의 시작, ASAP 💨

![BRANDING 1_PLAN](https://github.com/ASAP-as-soon-as-possible/ASAP_Client/assets/55528304/2526c8a1-21e7-471d-bce8-db8874a5cc5c)
![BRANDING 3_PLAN](https://github.com/ASAP-as-soon-as-possible/ASAP_Client/assets/55528304/ddf9b475-a825-4577-8e14-b8d190a864b2)

ASAP 은 회의를 진행하는 업무시간 외 일련의 사전작업들을 쉽고 빠르고 간편하게 처리해주는 웹서비스입니다.

ASAP은 회의를 진행하는 업무시간 외 일련의 사전작업들을 쉽고 빠르고 간편하게 처리해주는 '최적의 회의시간 도출' 웹서비스입니다.
ASAP은 회의를 진행하는 업무시간 외 일련의 사전작업들을 쉽고 빠르고 간편하게 처리해주는 '최적의 회의시간 도출' 웹 서비스입니다.

2. **회의 관련 정보를 하나의 큐카드로 정리해 제공**함으로써
회의 시간 외 추가 공지사항을 단톡방에 올리는 수고로움 또한 덜어주고자 합니다.
Expand All @@ -21,20 +17,18 @@ ASAP은 회의를 진행하는 업무시간 외 일련의 사전작업들을 쉽
| :---: | :---: | :---: |
| 4️⃣ 회의 장소 입력 | 5️⃣ 회의 시간 설정 | 6️⃣ 방장 정보 입력 |

| <img src="https://github.com/ASAP-as-soon-as-possible/ASAP_Client/assets/55528304/25dd8132-299a-45d1-9fbb-d6c449ebfdf7"/> |
| <img src="https://github.com/ASAP-as-soon-as-possible/ASAP_Client/assets/55528304/25dd8132-299a-45d1-9fbb-d6c449ebfdf7" width="300"/> |
| :-----------------------------------------------------------------------------------------------------------------------: |
| 7️⃣  준비물 등 추가 내용 |

## 📥  가능 시간 입력하기

## 📥 가능 시간 입력하기
| <img src="https://github.com/ASAP-as-soon-as-possible/ASAP_Client/assets/98143826/4b66f45e-1a08-490c-bc0f-04f4517e3c4e" width="400"/> | <img src="https://github.com/ASAP-as-soon-as-possible/ASAP_Client/assets/98143826/d5c089e3-8338-4152-9f2a-d316e87a5dcb"/> |
| <img src="https://github.com/ASAP-as-soon-as-possible/ASAP_Client/assets/98143826/4b66f45e-1a08-490c-bc0f-04f4517e3c4e" width="300"/> | <img src="https://github.com/ASAP-as-soon-as-possible/ASAP_Client/assets/98143826/d5c089e3-8338-4152-9f2a-d316e87a5dcb" width="300"/> |
| :---: | :---: |
| 1️⃣ 일정 등록 | 2️⃣ 우선 순위 입력 |


## 📥 회의 일정 확인하기
| <img src="https://github.com/ASAP-as-soon-as-possible/ASAP_Client/assets/98143826/095396f0-42f7-45ca-b33d-328b7f5f7b50" width="400"/> | <img src="https://github.com/ASAP-as-soon-as-possible/ASAP_Client/assets/98143826/1ffe6158-1672-4edb-8f83-fc6b0a17e53e4" width="400"/> | <img src="https://github.com/ASAP-as-soon-as-possible/ASAP_Client/assets/55528304/1326806e-65a2-40b6-9611-46bd2f404612"/> |
| <img src="https://github.com/ASAP-as-soon-as-possible/ASAP_Client/assets/98143826/095396f0-42f7-45ca-b33d-328b7f5f7b50" width="400"/> | <img src="https://github.com/ASAP-as-soon-as-possible/ASAP_Client/assets/98143826/1ffe6158-1672-4edb-8f83-fc6b0a17e53e4" width="400"/> | <img src="https://github.com/ASAP-as-soon-as-possible/ASAP_Client/assets/55528304/1326806e-65a2-40b6-9611-46bd2f404612" width="400"/> |
| :---: | :---: | :---: |
| 1️⃣ 종합 일정 시간표 확인 | 2️⃣ 최적의 회의시간 추천 | 3️⃣ 큐카드 공유하기 |

Expand All @@ -45,56 +39,6 @@ ASAP은 회의를 진행하는 업무시간 외 일련의 사전작업들을 쉽
| [이재훈](https://github.com/ljh0608) | [이동헌](https://github.com/eastlaw80) | [심은서](https://github.com/simeunseo) | [정찬우](https://github.com/Chanwoo-Jeong) |
| `WEB FE` `리드개발자` | `WEB FE` | `WEB FE` | `WEB FE` |

# ⚒️ 기술 스택

```jsx
"@types/axios": "^0.14.0",
"@types/react-copy-to-clipboard": "^5.0.4",
"axios": "^1.4.0",
"copy-text-to-clipboard": "^3.2.0",
"html2canvas": "^1.4.1",
"postcss-syntax": "^0.36.2",
"prettier": "1.13",
"react": "^18.2.0",
"react-copy-to-clipboard": "^5.1.0",
"react-dom": "^18.2.0",
"react-error-boundary": "^4.0.10",
"react-multi-date-picker": "^4.1.2",
"react-router-dom": "6",
"react-toastify": "^9.1.3",
"recoil": "^0.7.7",
"recoil-persist": "^5.1.0",
"styled-reset": "^4.5.1",
"swiper": "^10.0.4",
"vite-plugin-svgr": "^3.2.0"
"@stylelint/postcss-css-in-js": "^0.38.0",
"@types/node": "^20.3.2",
"@types/react": "^18.0.37",
"@types/react-dom": "^18.0.11",
"@types/styled-components": "^5.1.26",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"@vitejs/plugin-react": "^4.0.0",
"babel-plugin-styled-components": "^2.1.4",
"eslint": "^8.43.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.3.4",
"postcss": "^8.4.24",
"prettier-plugin-style-order": "^0.2.2",
"styled-components": "^6.0.1",
"stylelint": "15.5.0",
"stylelint-config-concentric-order": "^5.1.0",
"stylelint-config-prettier": "^9.0.5",
"stylelint-config-recommended": "^12.0.0",
"stylelint-config-styled-components": "^0.1.1",
"typescript": "^5.0.2",
"vite": "^4.3.9",
"vite-plugin-babel-macros": "^1.0.6"
```

### 🏙️  환경 구축

`React.js` `TypeScript` `Yarn` `Vite`
Expand Down
42 changes: 0 additions & 42 deletions src/components/TestComponents.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/components/atomComponents/PasswordInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ function PasswordInput({ value, placeholder, passWordOnChange, page }: ValueProp
const [inputType, setInputType] = useState(true);

const changePasswordType = () => {
console.log(inputType);
setInputType((prev) => !prev);
};
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ function PriorityDropdown() {
handleDropdown(i);
};

// useEffect(
// () => {
// console.log(input_);
// },
// [input_],
// );
return (
<PriorityDropdownWrapper>
{scheduleList.map(
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ComponentTesting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function ComponentTesting() {

{buttonType.map((type, i) => {
return (
<Button key={i} typeState={type} onClick={() => console.log(`${type}`)}>
<Button key={i} typeState={type}>
<Text font={'button2'}>약속 생성하기</Text>
</Button>
);
Expand Down
4 changes: 0 additions & 4 deletions src/pages/OverallSchedule/OverallSchedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ const OverallSchedule = () => {
const result = await overallScheduleApi(meetingId);
const { data } = result.data;
const uniqueData = [...new Set(data.totalUserNames)];
console.log(uniqueData);
setOverallScheduleData(data);
setMemberCount(data.memberCount);
setTotalUserNames(uniqueData);
Expand All @@ -61,9 +60,6 @@ const OverallSchedule = () => {
const formattedAvailableDateTimes =
overallScheduleData && getFormattedAvailableDateTimes(overallScheduleData);

console.log(timeSlotUserNames);
console.log(formattedAvailableDateTimes);
console.log(timeSlotUserNames);
return (
<OverallScheduleWrapper>
{overallScheduleData ? (
Expand Down
1 change: 0 additions & 1 deletion src/pages/OverallSchedule/components/Column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const Column = (props: ColumnProps) => {
} = props;

const handleSlotClick = () => {
console.log(filterUserNames(userNames));
setTimeSlotUserName(userNames);
setClickedTimeSlot(rowIdx + timeSlot);
};
Expand Down
1 change: 0 additions & 1 deletion src/pages/OverallSchedule/components/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const Row = (props: RowProps) => {
if (objArray === undefined) return;
const targetObj = objArray.find((obj)=> obj.time === targetTime);
if(targetObj){
console.log(targetObj.userNames);
const temp=filterUserNames(targetObj.userNames);
return temp;
}
Expand Down
9 changes: 0 additions & 9 deletions src/pages/SteppingStone/SteppingLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ function SteppingLayout({ steppingType }: SteppingProps) {
);

const handlePopstate = () => {
alert('handle 작동');
navigate('/');
};

Expand All @@ -49,14 +48,6 @@ function SteppingLayout({ steppingType }: SteppingProps) {
};
}, []);

// useEffect(() => {
// history.pushState(null, '', location.href);
// console.log(location.href);
// window.onpopstate = function() {
// history.go(1);
// };
// }, []);

return (
<>
<SteppingWrapper>
Expand Down
19 changes: 7 additions & 12 deletions src/pages/createMeeting/components/useFunnel/SetTimes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ function SetTimes({ meetingInfo, setMeetingInfo, setStep }: FunnelProps) {
meetingInfo.preferTimes.length >= 2 ||
(meetingInfo.preferTimes[0].startTime !== '00:00' &&
meetingInfo.preferTimes[0].endTime !== '00:00')
)
) {
return true;
}

return false;
};
Expand Down Expand Up @@ -180,13 +181,7 @@ function SetTimes({ meetingInfo, setMeetingInfo, setStep }: FunnelProps) {

<StyledBtnSection>
<Button
typeState={
meetingInfo.preferTimes.length >= 1 &&
meetingInfo.preferTimes[0].startTime &&
meetingInfo.preferTimes[0].endTime !== '00:00'
? 'primaryActive'
: 'primaryDisabled'
}
typeState={buttonStateHandler() ? 'primaryActive' : 'primaryDisabled'}
onClick={
buttonStateHandler()
? () => {
Expand Down Expand Up @@ -271,12 +266,12 @@ const DropUpIcon = styled(DropUpIc)`

const DropDownContainer = styled.div`
position: absolute;
background-color: white;
margin-top: 4.8rem;
z-index: 2;
margin-top: 4.8rem;
border-bottom-left-radius: 0.8rem;
border-bottom-right-radius: 0.8rem;
background-color: white;
width: 15.1rem;
height: 14.4rem;
overflow: auto;
border-bottom-left-radius: 0.8rem;
border-bottom-right-radius: 0.8rem;
`;
11 changes: 0 additions & 11 deletions src/pages/selectSchedule/SelectModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,12 @@ function SelectModal({ setShowModal }: ModalProps) {
const navigate = useNavigate();
const { auth, meetingId } = useParams();
const updateScheduleType = transformHostScheduleType(scheduleList);
console.log(updateScheduleType);
const updateMemberScheduleType = transformUserScheduleType(scheduleList, userName);
console.log(updateMemberScheduleType);

const postHostAvailableApi = async () => {
try {
if (meetingId && updateScheduleType) {
const { data } = await hostAvailableApi(meetingId, updateScheduleType);
console.log(data);
if (data.code === 201) {
setShowModal(false);
navigate(`/${auth}/schedule-complete/${meetingId}`);
Expand Down Expand Up @@ -80,14 +77,6 @@ function SelectModal({ setShowModal }: ModalProps) {
}
};

useEffect(
() => {
console.log(scheduleList);
},
[scheduleList],
);

// console.log(transformedScheduleList);
const finishConfirm = () => {
//여기에 api 연결하세요.
if (auth === 'host') {
Expand Down
5 changes: 2 additions & 3 deletions src/pages/selectSchedule/SelectSchedulePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ function SelectSchedulePage() {
priority: 0,
};
setScheduleList([...scheduleList, schedule]);
console.log(scheduleList);
};

const deleteDataList = (index: number) => {
Expand Down Expand Up @@ -269,9 +268,9 @@ const StyledBtnSection = styled.section`
bottom: 0;
align-items: end;
justify-content: center;
background: ${({ theme }) => theme.colors.dim_gradient};

margin-top:3rem;
margin-top: 3rem;
background: ${({ theme }) => theme.colors.dim_gradient};
padding-bottom: 2.9rem;

width: 100%;
Expand Down
1 change: 0 additions & 1 deletion src/pages/selectSchedule/components/DateSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ function DateSelect({ id, handleDate, availableDates, scheduleList }: PropTypes)

const [isOpen, setIsOpen] = useState(false);
const ref = useRef<HTMLDivElement>(null);
console.log(id);
useEffect(
() => {
const clickOutSide = (e: MouseEvent) => {
Expand Down
20 changes: 6 additions & 14 deletions src/pages/selectSchedule/utils/changeApiReq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,15 @@ export const transformHostScheduleType = (
scheduleList: ScheduleStates[],
): (HostAvailableSchduleRequestType | null)[] => {
return scheduleList.map((item) => {
// const regexResult = item.date.match(/(\d+)월 (\d+)일 \((\S+)\)/);
// console.log(regexResult);

const matchedResult = item.date.match(/(\d+)월 (\d+)일 \((\S+)\)/);
if (!matchedResult) {
return null; // Handle the case when there is no match for the date pattern
}
const [, month, day, dateOfWeek] = matchedResult;
const [, month, day, ,] = matchedResult;

return {
id: item.id.toString(),
month: month.padStart(2, '0'),
day: day.padStart(2, '0'),
dayOfWeek: dateOfWeek,
month: month,
day: day,
startTime: item.startTime,
endTime: item.endTime,
priority: item.priority,
Expand All @@ -40,7 +35,6 @@ export const transformUserScheduleType = (
// Handle the case when there is no match for the date pattern
// For example, you can return an empty object or any default value you prefer.
return {
id: '',
month: '',
day: '',
dayOfWeek: '',
Expand All @@ -52,12 +46,10 @@ export const transformUserScheduleType = (
// const [, month, day, dateOfWeek]: string[] | null = item.date.match(
// /(\d+)월 (\d+)일 \((\S+)\)/,
// );
const [, month, day, dateOfWeek] = matchedResult;
const [, month, day, ,] = matchedResult;
return {
id: item.id.toString(),
month: month.padStart(2, '0'),
day: day.padStart(2, '0'),
dayOfWeek: dateOfWeek,
month: month,
day: day,
startTime: item.startTime,
endTime: item.endTime,
priority: item.priority,
Expand Down
4 changes: 0 additions & 4 deletions src/types/createAvailableSchduleType.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
export interface HostAvailableSchduleRequestType {
id: string;
month: string;
day: string;
dayOfWeek: string;
startTime: string;
endTime: string;
priority: number;
Expand All @@ -19,10 +17,8 @@ export interface HostAvailableScheduleResponseType {
export interface UserAvailableScheduleRequestType {
name: string;
availableTimes: {
id: string;
month: string;
day: string;
dayOfWeek: string;
startTime: string;
endTime: string;
priority: number;
Expand Down
Loading
Loading