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

merge: dev to main #334

Merged
merged 60 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
6a76e1a
#309 feat: 안내 메일 동의 칸 구현
hanjeonghyun Sep 18, 2024
6d8d16e
Merge pull request #310 from CheckMate-sookmyung/fix/home
hanjeonghyun Sep 18, 2024
eb524c6
#311 fix: 평균 참석 인원 API 연동
misung-dev Sep 18, 2024
a9c41e8
#311 fix: 행사 시간 불러오는 API 수정
misung-dev Sep 18, 2024
db35aa3
#311 fix: 행사 담당자 등록 메서드 변경
misung-dev Sep 18, 2024
c613d92
#311 fix: 이메일 예약 발송 쿼리 파라미터 코드 추가
misung-dev Sep 18, 2024
7c3230d
#311 fix: 설문 조사 링크 발송 API 연결
misung-dev Sep 18, 2024
56642b0
#311 fix: 출석체크 페이지 내 타이틀 안뜨고, 외부인 행사임에도 학번 입력해야하는 이슈 해결
misung-dev Sep 18, 2024
f160a06
#311 fix: 행사 출석 명단 확인 API 일부 수정
misung-dev Sep 18, 2024
0680596
Merge pull request #312 from CheckMate-sookmyung/fix/#311-dashboard-api
misung-dev Sep 18, 2024
19e4b0c
#313 [FIX] API path 내 오타 수정
misung-dev Sep 20, 2024
991df13
Merge pull request #314 from CheckMate-sookmyung/fix/#313-manager
misung-dev Sep 20, 2024
2024111
#315 feat: 이메일 발송 페이지들 UI 수정
misung-dev Sep 20, 2024
026f0cb
#315 design: 버튼 컴포넌트 높이 수정
misung-dev Sep 20, 2024
372016c
#315 feat: 설문조사 링크 조회 API 연동
misung-dev Sep 20, 2024
aa3464f
#315 feat: 메일 제목 불러오는 API 연동
misung-dev Sep 20, 2024
d5f50f7
#315 design: 버튼 반응형 적용 및 이메일 페이지 UI 재수정
misung-dev Sep 20, 2024
e4c4620
#315 feat: 이메일 수정하는 함수 추가
misung-dev Sep 20, 2024
8ae0c05
Merge pull request #316 from CheckMate-sookmyung/feat/#315-email
misung-dev Sep 20, 2024
1c25dfe
#292 fix: 참석자 관리 페이지 내 문제되는 오류 일부 해결
misung-dev Sep 20, 2024
624a780
#292 feat: 참석자 정보 가져오는 기능 구현
misung-dev Sep 20, 2024
eaa1e09
Merge pull request #317 from CheckMate-sookmyung/fix/#292-attendee
misung-dev Sep 20, 2024
9807b04
#318 refactor: 검색부분 파일 분리
misung-dev Sep 20, 2024
1e99df0
#318 feat: 테이블에 출석 시간 표시
misung-dev Sep 20, 2024
5a06a61
Merge pull request #319 from CheckMate-sookmyung/feat/#318-attendance…
misung-dev Sep 20, 2024
e11e3c9
#272 fix: 행사 삭제 및 등록 후 이동하는 행사 목록 페이지 path 수정
misung-dev Sep 21, 2024
792a292
#272 fix: 사이드바 화면에 고정(컨텐츠 부분만 스크롤 가능하도록 수정)
misung-dev Sep 21, 2024
c977997
#272 fix: 행사 수정 페이지에서 행사 타입 컴포넌트 선택해도 활성화 안되는 문제 해결
misung-dev Sep 21, 2024
6a3752b
#272 fix: 행사 정보 수정 페이지 내 커버 이미지 불러오는 API 연동
misung-dev Sep 21, 2024
4b09a7b
#272 fix: 출석체크 및 서명API 수정
misung-dev Sep 21, 2024
22fd290
#272 fix: 대시보드 내 페이지들에 행사 타이틀 가져오는 기능 구현
misung-dev Sep 21, 2024
bbaab61
#272 fix: 참석자 관리 테이블 내 눈 아이콘 주석 처리
misung-dev Sep 21, 2024
b9bf6fa
#320 feat: 리디렉션 주소 변경
hanjeonghyun Sep 22, 2024
eb6c180
Merge pull request #322 from CheckMate-sookmyung/fix/home
hanjeonghyun Sep 22, 2024
c616382
#272 fix: 서명 API 수정
misung-dev Sep 22, 2024
1911fd1
Merge pull request #323 from CheckMate-sookmyung/modify/#272-api
misung-dev Sep 22, 2024
796c499
#324 design: 업로드 박스 디자인 변경
hanjeonghyun Sep 22, 2024
fc194f3
Merge branch 'dev' into fix/uploadbox
hanjeonghyun Sep 22, 2024
252fa1c
Merge pull request #325 from CheckMate-sookmyung/fix/uploadbox
hanjeonghyun Sep 22, 2024
d3e5a73
#233 fix: 출석 명단 테이블 내에 출석 시간 추가
misung-dev Sep 22, 2024
a2f7f60
#233 fix: 페이지 하단 여백 수정 및 출석여부 수정 드롭다운 스타일 수정
misung-dev Sep 22, 2024
0e905b3
#233 fix: 행사별 통계계 API 연동
misung-dev Sep 22, 2024
5847bcd
#233 fix: 행사별 통계 내 날짜 API 연동
misung-dev Sep 22, 2024
4c43265
#326 fix: 참석자 명단, 리마인드 메일 api path 변경
misung-dev Sep 22, 2024
4935ff3
#326 fix: 대시보드 내 사이드바 옵션명 변경
misung-dev Sep 22, 2024
c643ed9
#326 remove: 행사 기본 정보 내 wise 주소 제거
misung-dev Sep 22, 2024
260690a
#326 feat: 메일 안내 페이지 일부 수정
misung-dev Sep 22, 2024
38cd1d5
Merge pull request #327 from CheckMate-sookmyung/fix/#326-api
misung-dev Sep 22, 2024
c639d37
#328 feat: 유저 로그아웃/회원탈퇴 시를 위한 드랍다운 구현
hanjeonghyun Sep 22, 2024
d9ad635
#328 feat: 클릭 시 드랍다운
hanjeonghyun Sep 22, 2024
db9fc04
#328 feat: 유저 드랍다운 인덱스 추가
hanjeonghyun Sep 22, 2024
c640bb6
Merge pull request #329 from CheckMate-sookmyung/fix/logout
hanjeonghyun Sep 22, 2024
fc3610c
#321 modify: API 스펙 변경 + 온라인 버전 시 최소 이수 기준 인풋 구현
hanjeonghyun Sep 22, 2024
7060ca2
Merge pull request #330 from CheckMate-sookmyung/fix/register
hanjeonghyun Sep 22, 2024
68344f9
#326 fix: 출석체크 API 수정
misung-dev Sep 22, 2024
ca02343
#331 fix: 출석 버튼 바로 가기 시 이벤트 id 전달
hanjeonghyun Sep 22, 2024
50bb164
Merge pull request #332 from CheckMate-sookmyung/fix/eventcard
hanjeonghyun Sep 22, 2024
b975790
#326 fix: 통계 정보 API 수정
misung-dev Sep 22, 2024
b9244b8
#326 fix: 출석여부 수정 api 수정
misung-dev Sep 22, 2024
f35b6d5
Merge pull request #333 from CheckMate-sookmyung/fix/#326-api
misung-dev Sep 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion src/Layout/PageLayout.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import styled from 'styled-components';

import { BREAKPOINTS } from '@/styles';

const Inner = styled.div`
display: ${({ hasSideBar }) =>
hasSideBar === undefined ? undefined : 'flex'};
Expand All @@ -13,13 +15,29 @@ const SideBarLayout = styled.div`
}
`;

const Contents = styled.div`
--top-navigation-height: 57px;

overflow-y: auto;
display: flex;
width: 100%;
height: calc(100vh - var(--top-navigation-height));

@media (max-width: ${BREAKPOINTS[1]}px) {
--top-navigation-height: 55px;
}
@media (max-width: ${BREAKPOINTS[0]}px) {
--top-navigation-height: 54px;
}
`;

export default function PageLayout({ topNavigation, sideBar, children }) {
return (
<div>
{topNavigation}
<Inner hasSideBar={sideBar !== undefined}>
<SideBarLayout>{sideBar}</SideBarLayout>
{children}
<Contents>{children}</Contents>
</Inner>
</div>
);
Expand Down
10 changes: 4 additions & 6 deletions src/apis/attendance.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import { axiosInstance } from '@/axios';

export const getAttendanceList = async (userId, eventId) => {
const { data } = await axiosInstance.get(
`/api/v1/attendance/list/${userId}/${eventId}`,
);
export const getAttendanceList = async (eventId) => {
const { data } = await axiosInstance.get(`/api/v1/attendancelist/${eventId}`);

return data;
};

export const updateAttendanceList = async (userId, eventId, body) => {
export const updateAttendanceList = async (eventId, body) => {
const { data } = await axiosInstance.put(
`/api/v1/attendance/list/${userId}/${eventId}`,
`/api/v1/attendance/manage/${eventId}`,
body,
);

Expand Down
14 changes: 11 additions & 3 deletions src/apis/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export const deleteEvent = async (eventId) => {
return data;
};

export const postEventManager = async (eventId, body) => {
const { data } = await axiosInstance.post(
`/api/v1/events/manger/${eventId}`,
export const putEventManager = async (eventId, body) => {
const { data } = await axiosInstance.put(
`/api/v1/events/manager/${eventId}`,
body,
);

Expand All @@ -26,3 +26,11 @@ export const updateEventDetail = async (eventId, body) => {

return data;
};

export const getEventStatistic = async (eventId) => {
const { data } = await axiosInstance.get(
`/api/v1/events/statistic/${eventId}`,
);

return data;
};
10 changes: 8 additions & 2 deletions src/components/Button/Button.style.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ export const Button = styled.button`
align-items: center;
border-radius: 8px;
padding: 13px 22px;
height: 45px;
background: ${(props) => props.backgroundColor};
color: ${(props) => props.textColor};
font-size: 16px;
font-weight: 600;

@media (max-width: ${BREAKPOINTS[0]}px) {
@media (max-width: ${BREAKPOINTS[1]}px) {
padding: 10px 18px;
font-size: 14px;
height: 35px;
font-size: 12px;
}
@media (max-width: ${BREAKPOINTS[0]}px) {
padding: 6px 10px;
height: 30px;
}
`;
1 change: 1 addition & 0 deletions src/components/Dropdown/Dropdown.style.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import styled from 'styled-components';
export const Dropdown = styled.div`
position: relative;
display: inline-block;
overflow: visible;
`;

export const DropdownButton = styled.button`
Expand Down
1 change: 1 addition & 0 deletions src/components/EventCard/EventCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const EventCard = ({ id, title, poster, startDate, endDate }) => {

const attendanceCheck = (event) => {
event.stopPropagation();
setContent(id);
navigate('/attendance/student-id');
};

Expand Down
1 change: 0 additions & 1 deletion src/components/EventTypeCard/index.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import { eventTypeState } from '@/recoil/atoms/state';
import { useRecoilState } from 'recoil';
import * as S from './EventTypeCard.style';

const EventTypeCard = ({ handleEventType }) => {
const [eventType, setEventType] = useRecoilState(eventTypeState);
import * as S from './EventTypeRadioGroup.style';

const EventTypeRadioGroup = ({ value, onChange }) => {
return (
<S.FlexWrapper style={{ flexWrap: 'wrap' }}>
<S.ChoiceBox
onClick={() => handleEventType('ONLINE')}
isSelected={eventType === 'ONLINE'}
onClick={() => onChange('ONLINE')}
isSelected={value === 'ONLINE'}
>
<S.TitleWrapper>
<S.Category>온라인 행사</S.Category>
Expand All @@ -19,8 +15,8 @@ const EventTypeCard = ({ handleEventType }) => {
</S.ChoiceBox>

<S.ChoiceBox
onClick={() => handleEventType('OFFLINE')}
isSelected={eventType === 'OFFLINE'}
onClick={() => onChange('OFFLINE')}
isSelected={value === 'OFFLINE'}
>
<S.TitleWrapper>
<S.Category>오프라인 행사</S.Category>
Expand All @@ -32,4 +28,4 @@ const EventTypeCard = ({ handleEventType }) => {
);
};

export default EventTypeCard;
export default EventTypeRadioGroup;
1 change: 1 addition & 0 deletions src/components/EventTypeRadioGroup/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as EventTypeRadioGroup } from './EventTypeRadioGroup';
4 changes: 2 additions & 2 deletions src/components/Sidebar/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ const menuItems = [
{
to: '/events/dashboard/email',
icon: <FaEnvelopeCircleCheck />,
text: '이메일 예약 발송',
text: '행사 안내 메일',
},
{
to: '/events/dashboard/survey',
icon: <FaClipboardList />,
text: '설문 조사 링크 발송',
text: '설문조사 안내 메일',
},
{
to: '/events/dashboard/attendee',
Expand Down
4 changes: 2 additions & 2 deletions src/components/Sidebar/Sidebar.style.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export const Sidebar = styled.div`
flex-shrink: 0;
padding-top: 35px;
min-width: 180px;
height: 100vh;

border-right: 1px solid #ebedf0;
height: 100%;
/* @media (max-width: ${BREAKPOINTS[0]}px) {
display: none;
} */
Expand Down
30 changes: 21 additions & 9 deletions src/components/Table/AttendeeTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
} from 'react-icons/fa6';
import { BsEye } from 'react-icons/bs';
import { Dropdown } from '@/components';
import { format } from 'date-fns';

const AttendeeTable = ({
attendees,
Expand All @@ -21,6 +22,15 @@ const AttendeeTable = ({
return <FaArrowDownShortWide />;
};

// 시간 형식 HH:MM
const formatAttendTime = (time) => {
if (!time) return '-';
const date = new Date(time);
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
return `${hours}:${minutes}`;
};

return (
<S.TableContainer>
<S.Table>
Expand All @@ -45,21 +55,22 @@ const AttendeeTable = ({
학번
<SortIcon columnKey="number" />
</S.TableHeader>
<S.TableHeader onClick={() => sortData('year')}>
{/* <S.TableHeader onClick={() => sortData('year')}>
학년
<SortIcon columnKey="year" />
</S.TableHeader>
</S.TableHeader> */}
</>
)}
<S.TableHeader onClick={() => sortData('phoneNumber')}>
휴대폰 번호
<SortIcon columnKey="phoneNumber" />
</S.TableHeader>
<S.TableHeader onClick={() => sortData('email')}>
이메일 주소
<SortIcon columnKey="email" />
{/* 출석 시간 열 추가 */}
<S.TableHeader onClick={() => sortData('attendTime')}>
출석 시간
<SortIcon columnKey="attendTime" />
</S.TableHeader>
<S.TableHeader></S.TableHeader>
{/* <S.TableHeader></S.TableHeader> */}
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -88,13 +99,14 @@ const AttendeeTable = ({
{showStudentInfo && (
<>
<S.TableData>{data.number}</S.TableData>
<S.TableData>{data.year}</S.TableData>
{/* <S.TableData>{data.year}</S.TableData> */}
</>
)}
<S.TableData>{data.phoneNumber}</S.TableData>
<S.TableData>{data.email}</S.TableData>
<S.TableData>
<BsEye />
{data.attendTime === null
? '-'
: format(new Date(data.attendTime), 'HH:mm')}
</S.TableData>
</tr>
))}
Expand Down
1 change: 0 additions & 1 deletion src/components/Table/Table.style.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const TableData = styled.td`
font-size: 14px;
color: #555;
white-space: nowrap;
overflow: hidden;

&:first-child {
text-align: left;
Expand Down
15 changes: 12 additions & 3 deletions src/components/TopNavigation/TopNavigation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import { useEffect, useState } from 'react';
import * as S from './TopNavigation.style';
import { useLocation, useNavigate } from 'react-router-dom';
import { FaBars, FaCircleUser } from 'react-icons/fa6';
import { Sidebar, SlimButton } from '@/components';
import { Sidebar, SlimButton, UserDropdown } from '@/components';
import { BREAKPOINTS } from '@/styles';
import { axiosInstance } from '@/axios';

export default function TopNavigation({ eventTitle } = {}) {
const name = sessionStorage.getItem('name');
const USER_ID = sessionStorage.getItem('id');
const nav = useNavigate();
const [isSidebarOpen, setIsSidebarOpen] = useState(false);
const [isLoggedIn, setIsLoggedIn] = useState(false);
const [isDropdownOpen, setIsDropdownOpen] = useState(false);

const location = useLocation();

Expand All @@ -31,6 +31,10 @@ export default function TopNavigation({ eventTitle } = {}) {
setIsSidebarOpen(!isSidebarOpen);
};

const handleUserControl = () => {
setIsDropdownOpen(!isDropdownOpen);
};

useEffect(() => {
const handleResizeOrScroll = () => {
if (window.innerWidth > BREAKPOINTS[0] || window.scrollY > 0) {
Expand Down Expand Up @@ -97,7 +101,12 @@ export default function TopNavigation({ eventTitle } = {}) {
</S.LogoMenuWrapper>
<S.ProfileMenuWrapper>
{isLoggedIn ? (
<b onClick={() => handleLogout()}>{name}</b>
<>
<div onClick={handleUserControl}>
{name}
{isDropdownOpen && <UserDropdown />}
</div>
</>
) : (
<SlimButton label={'로그인'} onClick={handleLoginClick} />
)}
Expand Down
50 changes: 32 additions & 18 deletions src/components/UploadBox/UploadBox.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import React, { useState } from 'react';
import React, { useEffect, useState } from 'react';
import * as S from './UploadBox.style';
import FileButton from '../../pages/RegisterPage/RegisterComponents/Button/FileButton';

//미리보기 선택 시 전체 프리뷰 기능 미구현

// FileInfo 컴포넌트
const FileInfo = ({ uploadedInfo }) => {
Expand All @@ -15,22 +12,27 @@ const FileInfo = ({ uploadedInfo }) => {

return (
<S.PreviewWrapper>
<S.PreviewBox
style={{
backgroundImage: `url(${uploadedInfo.previewURL})`,
backgroundSize: 'cover',
backgroundPosition: 'center',
}}
>
<S.PreviewLabel onClick={handlePreviewClick}>미리보기</S.PreviewLabel>
</S.PreviewBox>
<FileButton content={uploadedInfo.name} type={'white'} />
{uploadedInfo.previewURL ? (
<S.PreviewBox
style={{
backgroundImage: `url(${uploadedInfo.previewURL})`,
backgroundSize: 'cover',
backgroundPosition: 'center',
}}
>
<S.PreviewLabel onClick={handlePreviewClick}>미리보기</S.PreviewLabel>
</S.PreviewBox>
) : (
<S.NoPreviewMsg>
엑셀 파일은 미리보기를 제공하지 않습니다.
</S.NoPreviewMsg>
)}
</S.PreviewWrapper>
);
};

// UploadBox 컴포넌트
const UploadBox = ({ accept, onFileUpload }) => {
const UploadBox = ({ defaultImageUrl, accept, onFileUpload }) => {
const [isActive, setActive] = useState(false);
const [uploadedInfo, setUploadedInfo] = useState(null);

Expand All @@ -41,9 +43,14 @@ const UploadBox = ({ accept, onFileUpload }) => {
};

const setFileInfo = (file) => {
const name = file.name;
const previewURL = URL.createObjectURL(file);
setUploadedInfo({ name, previewURL });
let previewURL = null;

// 이미지 파일만 미리보기 URL 생성
if (file.type.startsWith('image/')) {
previewURL = URL.createObjectURL(file);
}

setUploadedInfo({ previewURL });
if (onFileUpload) {
onFileUpload(file);
}
Expand All @@ -64,6 +71,13 @@ const UploadBox = ({ accept, onFileUpload }) => {
setFileInfo(file);
};

useEffect(() => {
setUploadedInfo({
name: '',
previewURL: defaultImageUrl,
});
}, [defaultImageUrl]);

return (
<S.StyledLabel
className={`preview${isActive ? ' active' : ''}`}
Expand Down
Loading