Skip to content

Commit 0f10263

Browse files
authored
Merge pull request #407 from kakao-tech-campus-3rd-step3/style/applicant-status-ui#398
[STYLE] ์ง€์›์ž ์ƒํƒœ UI ๊ฐœ์„  ๋ฐ ํŽ˜์ด์ง€ ๋ ˆ์ด์•„์›ƒ ์กฐ์ •(#398)
2 parents ce574cd + 371b45b commit 0f10263

File tree

8 files changed

+102
-6
lines changed

8 files changed

+102
-6
lines changed

โ€Žsrc/app/mocks/client.tsโ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ import { clubHandlers } from '@/app/mocks/handler/club';
44
import { noticeHandlers } from '@/app/mocks/handler/notice';
55
import { applyFormHandlers } from './handler/applyForm';
66
import { authHandlers } from './handler/auth';
7+
import { dashboardHandlers } from './handler/dashboard';
78

89
export const client = setupWorker(
910
...clubHandlers,
1011
...applicantHandlers,
1112
...noticeHandlers,
1213
...applyFormHandlers,
1314
...authHandlers,
15+
...dashboardHandlers,
1416
);
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { http, HttpResponse } from 'msw';
2+
import { dashboardRepository } from '@/app/mocks/repositories/dashboard';
3+
4+
const getDashboardSummaryResolver = () => {
5+
const summary = dashboardRepository.getDashboardSummary();
6+
return HttpResponse.json(summary, { status: 200 });
7+
};
8+
9+
const getApplicantsResolver = () => {
10+
const applicants = dashboardRepository.getApplicants();
11+
return HttpResponse.json(applicants, { status: 200 });
12+
};
13+
14+
export const dashboardHandlers = [
15+
http.get(
16+
import.meta.env.VITE_API_BASE_URL + '/clubs/:clubId/dashboard',
17+
getDashboardSummaryResolver,
18+
),
19+
http.get(
20+
import.meta.env.VITE_API_BASE_URL + '/clubs/:clubId/dashboard/applicants',
21+
getApplicantsResolver,
22+
),
23+
];
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import type {
2+
DashboardSummary,
3+
ApplicantsApiResponse,
4+
ApplicantData,
5+
} from '@/pages/admin/Dashboard/types/dashboard';
6+
7+
const MOCK_DASHBOARD_SUMMARY: DashboardSummary = {
8+
totalApplicantCount: 45,
9+
pendingApplicationCount: 12,
10+
startDay: '2024-03-01',
11+
endDay: '2024-03-31',
12+
};
13+
14+
const MOCK_APPLICANTS: ApplicantData[] = [
15+
{
16+
applicantId: 1,
17+
name: '๊น€์ฒ ์ˆ˜',
18+
studentId: '202401',
19+
department: '์ปดํ“จํ„ฐ๊ณตํ•™๊ณผ',
20+
phoneNumber: '010-1234-5678',
21+
email: 'test1@example.com',
22+
status: 'PENDING',
23+
},
24+
{
25+
applicantId: 2,
26+
name: '์ด์˜ํฌ',
27+
studentId: '202402',
28+
department: '๊ฒฝ์˜ํ•™๊ณผ',
29+
phoneNumber: '010-2345-6789',
30+
email: 'test2@example.com',
31+
status: 'APPROVED',
32+
},
33+
{
34+
applicantId: 3,
35+
name: '๋ฐ•๋ฏผ์ˆ˜',
36+
studentId: '202403',
37+
department: '์ „์ž๊ณตํ•™๊ณผ',
38+
phoneNumber: '010-3456-7890',
39+
email: 'test3@example.com',
40+
status: 'REJECTED',
41+
},
42+
];
43+
44+
export const dashboardRepository = {
45+
getDashboardSummary: (): DashboardSummary => {
46+
return MOCK_DASHBOARD_SUMMARY;
47+
},
48+
49+
getApplicants: (): ApplicantsApiResponse => {
50+
return {
51+
applicants: MOCK_APPLICANTS,
52+
message: null,
53+
};
54+
},
55+
};

โ€Žsrc/pages/admin/ApplicationDetail/components/ApplicantProfileSection/ApplicantStatusButton.tsxโ€Ž

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,44 @@ const Wrapper = styled.button<Pick<Props, 'selected' | 'label'>>(({ theme, selec
2121
ํ•ฉ๊ฒฉ: {
2222
backgroundColor: theme.colors.primary100,
2323
color: theme.colors.primary800,
24+
border: `2px solid ${theme.colors.primary800}`,
2425
},
2526
๋ถˆํ•ฉ๊ฒฉ: {
2627
backgroundColor: theme.colors.red100,
2728
color: theme.colors.red600,
29+
border: `2px solid ${theme.colors.red600}`,
2830
},
2931
๋ฏธ์ •: {
3032
backgroundColor: theme.colors.gray200,
3133
color: theme.colors.gray700,
34+
border: `2px solid ${theme.colors.gray700}`,
3235
},
3336
};
3437

3538
const defaultStyle = {
3639
backgroundColor: theme.colors.gray100,
3740
color: theme.colors.gray600,
41+
border: `2px solid ${theme.colors.gray300}`,
3842
};
3943

4044
const appliedStyle = selected ? statusStyles[label] : defaultStyle;
4145

4246
return {
43-
border: 'none',
44-
padding: '0.4rem 1.7rem',
47+
padding: '0.3rem 1.5rem',
4548
cursor: 'pointer',
46-
fontSize: theme.font.size.sm,
49+
fontSize: theme.font.size.base,
4750
fontWeight: selected ? theme.font.weight.bold : theme.font.weight.regular,
4851
transition: 'all 200ms ease-in-out',
4952
borderRadius: '4rem',
53+
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)',
54+
'&:hover': {
55+
transform: 'translateY(-2px)',
56+
boxShadow: '0 4px 8px rgba(0, 0, 0, 0.15)',
57+
},
58+
'&:active': {
59+
transform: 'translateY(0)',
60+
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)',
61+
},
5062
...appliedStyle,
5163
};
5264
});

โ€Žsrc/pages/admin/ApplicationDetail/components/ApplicantProfileSection/ApplicantStatusToggle.tsxโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ export const ApplicantStatusToggle = ({ status, updateStatus }: Props) => {
4242

4343
const Container = styled.div(() => ({
4444
display: 'flex',
45-
gap: '2rem',
45+
gap: '1.5rem',
4646
}));

โ€Žsrc/pages/admin/ApplicationDetail/components/CommentSection/CommentForm.tsxโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,6 @@ const ButtonWrapper = styled.div({
102102
display: 'flex',
103103
justifyContent: 'space-between',
104104
alignItems: 'center',
105-
marginRight: '-2rem',
105+
marginRight: '-0.35rem',
106106
padding: '0 0.3rem',
107107
});

โ€Žsrc/pages/admin/ApplicationDetail/index.styled.tsโ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ export const PageLayout = styled.div({
44
display: 'flex',
55
gap: '1.5rem',
66
padding: '2rem 2.2rem 2rem 2rem',
7+
maxWidth: '1400px',
8+
margin: '1rem auto',
9+
width: '100%',
10+
boxSizing: 'border-box',
711

812
'@media (max-width: 72.5rem)': {
913
flexDirection: 'column',

โ€Žsrc/pages/admin/Dashboard/Page.tsxโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ const Layout = styled.div({
3232
const Container = styled.main({
3333
maxWidth: '1200px',
3434
width: '100%',
35-
padding: '1.5rem',
35+
padding: '3rem 1.5rem',
3636
boxSizing: 'border-box',
3737
});

0 commit comments

Comments
ย (0)