-
Notifications
You must be signed in to change notification settings - Fork 4
[feature] 관리자는 동아리 상세 페이지에서 지원서 모집 기간을 원클릭으로 수정할 수 있다 #2032
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
base: develop-fe
Are you sure you want to change the base?
Changes from all commits
7fa86ab
7836747
53486c3
0a12c99
9ab22dd
bf5e410
407eba9
eb88e4a
96c2c21
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import styled from 'styled-components'; | ||
| import { colors } from '@/styles/theme/colors'; | ||
| import { setTypography, typography } from '@/styles/theme/typography'; | ||
|
|
||
| export const Button = styled.button<{ $active: boolean }>` | ||
| display: inline-flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| border-radius: 10px; | ||
| padding: 9px 16px; | ||
| ${setTypography(typography.button.button1)}; | ||
| cursor: pointer; | ||
| transition: | ||
| background-color 0.12s ease, | ||
| transform 0.06s ease; | ||
|
|
||
| color: ${({ $active }) => ($active ? colors.base.white : colors.gray[700])}; | ||
| background-color: ${({ $active }) => | ||
| $active ? colors.primary[800] : colors.gray[300]}; | ||
| border: ${({ $active }) => | ||
| $active ? `1px solid transparent` : `1px solid ${colors.gray[500]}`}; | ||
|
|
||
| &:active { | ||
| transform: translateY(1px); | ||
| } | ||
| `; | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,19 @@ | ||||||
| import type { ButtonHTMLAttributes } from 'react'; | ||||||
| import * as Styled from './ToggleButton.styles'; | ||||||
|
|
||||||
| interface ToggleButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> { | ||||||
| active: boolean; | ||||||
| } | ||||||
|
|
||||||
| const ToggleButton = ({ | ||||||
| active, | ||||||
| children, | ||||||
| type = 'button', | ||||||
| ...rest | ||||||
| }: ToggleButtonProps) => ( | ||||||
| <Styled.Button $active={active} type={type} {...rest}> | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Line 14는 시각 상태만 변경하고 수정 예시- <Styled.Button $active={active} type={type} {...rest}>
+ <Styled.Button $active={active} type={type} {...rest} aria-pressed={active}>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| {children} | ||||||
| </Styled.Button> | ||||||
| ); | ||||||
|
|
||||||
| export default ToggleButton; | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,11 @@ export const FAQ_ANSWER_MAX = 300; | |
|
|
||
| // 모집 정보 수정 (RecruitEditTab) | ||
| export const RECRUIT_TARGET_MAX = 10; | ||
| // 상시모집 종료일로 쓰는 더미 연도 | ||
| export const FAR_FUTURE_YEAR = 2999; | ||
|
|
||
| // 모집 기간 변경 모달 (RecruitmentPeriodModal) | ||
| export const PERIOD_CHANGE_DAYS_MAX = 365; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 지금은 "기간"만 나타내고 있어서 "모집"이라는 의미도 있으면 좋겠네요 |
||
|
|
||
| // 계정 관리 (AccountEditTab) | ||
| export const PASSWORD_MAX = 20; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -173,6 +173,10 @@ export const ADMIN_EVENT = { | |
| PASSWORD_CHANGE_BUTTON_CLICKED: '비밀번호 변경 버튼클릭', | ||
| NEW_PASSWORD_CLEAR_BUTTON_CLICKED: '새 비밀번호 입력 초기화 버튼클릭', | ||
| CONFIRM_PASSWORD_CLEAR_BUTTON_CLICKED: '확인 비밀번호 입력 초기화 버튼클릭', | ||
|
|
||
| // 동아리 상세 - 모집 기간 변경 (관리자 전용) | ||
| PERIOD_CHANGE_BUTTON_CLICKED: '모집 기간 변경 버튼클릭', | ||
| PERIOD_CHANGE_CONFIRMED: '모집 기간 변경 완료', | ||
|
Comment on lines
+178
to
+179
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이것도 "모집"포함하면 좋을 것 같아요 |
||
| } as const; | ||
|
|
||
| export const PAGE_VIEW = { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,6 +32,8 @@ export const queryKeys = { | |
| }, | ||
| club: { | ||
| all: ['clubs'] as const, | ||
| /** 모든 clubDetail 쿼리를 한 번에 무효화하는 prefix */ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 주석은 제거해도 좋아요 |
||
| allDetails: ['clubDetail'] as const, | ||
| detail: (clubParam: string) => ['clubDetail', clubParam] as const, | ||
| calendarEvents: (clubParam: string) => | ||
| ['clubCalendarEvents', clubParam] as const, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -122,9 +122,12 @@ export const useUpdateClubDescription = () => { | |
| return useMutation({ | ||
| mutationFn: (updatedData: ClubDescription) => | ||
| updateClubDescription(updatedData), | ||
| onSuccess: (_, variables) => { | ||
| onSuccess: () => { | ||
| queryClient.invalidateQueries({ | ||
| queryKey: queryKeys.club.allDetails, | ||
| }); | ||
| queryClient.invalidateQueries({ | ||
| queryKey: queryKeys.club.detail(variables.id), | ||
| queryKey: queryKeys.club.all, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. all은 동아리명 중복확인용 캐시라 모집기간 변경이랑 상관없지 않나요? |
||
| }); | ||
| }, | ||
| onError: (error) => { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| import styled from 'styled-components'; | ||
| import { media } from '@/styles/mediaQuery'; | ||
| import { colors } from '@/styles/theme/colors'; | ||
| import { setTypography, typography } from '@/styles/theme/typography'; | ||
| import { Z_INDEX } from '@/styles/zIndex'; | ||
|
|
||
| export const ButtonArea = styled.div` | ||
| position: sticky; | ||
| bottom: 0; | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| gap: 8px; | ||
| padding: 10px 0 24px; | ||
| z-index: ${Z_INDEX.clubDetailFooter}; | ||
| background: ${colors.base.white}; | ||
| box-shadow: 0px 0px 14px rgba(0, 0, 0, 0.16); | ||
|
|
||
| ${media.tablet} { | ||
| position: fixed; | ||
| bottom: 0; | ||
| left: 50%; | ||
| transform: translateX(-50%); | ||
| width: 100%; | ||
| max-width: 500px; | ||
| padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); | ||
| background: transparent; | ||
| box-shadow: none; | ||
| } | ||
|
|
||
| ${media.mobile} { | ||
| left: 0; | ||
| transform: none; | ||
| max-width: 100%; | ||
| } | ||
| `; | ||
|
|
||
| export const StatusInfo = styled.div` | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 6px; | ||
| ${setTypography(typography.paragraph.p7)}; | ||
| color: ${colors.gray[500]}; | ||
| `; | ||
|
|
||
| export const StatusDot = styled.span` | ||
| width: 6px; | ||
| height: 6px; | ||
| border-radius: 50%; | ||
| background: ${colors.primary[800]}; | ||
| `; | ||
|
|
||
| export const StatusText = styled.span` | ||
| color: ${colors.gray[600]}; | ||
| font-weight: 600; | ||
| `; | ||
|
|
||
| export const StatusDate = styled.span` | ||
| color: ${colors.gray[500]}; | ||
| font-weight: 600; | ||
| `; | ||
|
|
||
| export const ChangePeriodButton = styled.button` | ||
| width: 517px; | ||
| height: 60px; | ||
| border-radius: 14px; | ||
| border: 1.5px solid ${colors.primary[800]}; | ||
| background: ${colors.base.white}; | ||
| ${setTypography(typography.title.title5)}; | ||
| color: ${colors.primary[800]}; | ||
| cursor: pointer; | ||
| transition: | ||
| background 0.15s ease, | ||
| color 0.15s ease; | ||
|
|
||
| &:hover { | ||
| background: ${colors.primary[500]}; | ||
| } | ||
|
|
||
| ${media.tablet} { | ||
| width: 100%; | ||
| height: 50px; | ||
| ${setTypography(typography.paragraph.p2)}; | ||
| } | ||
| `; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
버튼이 생길 때마다 그마다의 이유로 새로운 스타일을 만들고 있어서
이제는 공통 컴포넌트의 경계를 확실히 정할 때가 온 것 같네요