Skip to content

Commit

Permalink
변경된 정책에 맞게 어드민 활동점수 추가/차감 항목을 변경 (#311)
Browse files Browse the repository at this point in the history
* Feat: 변경된 정책에 맞게 어드민 활동점수 추가/차감 항목을 변경한다

* Fix: key prop이 중복되지 않도록 수정한다

* Chore scoreType 프로퍼티명을 변경한다

* Feat: 새로 정의된 scoreType을 적용한다

* Fix: 누락된 scoreType에 대한 Icon을 추가한다

* Fix: 누락된 key prop을 추가한다

* Fix: Navigation 컴포넌트의 누락된 key prop을 추가한다

* Fix: MVP 배포 실패 항목에 대한 점수가 잘못 입력되어있는것을 수정한다
  • Loading branch information
HaJunRyu committed Sep 1, 2024
1 parent 060b2c4 commit fa88111
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 35 deletions.
2 changes: 2 additions & 0 deletions src/components/ActivityScore/Icon/Icon.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const scoreIcon = {
[ScoreType.LATE]: <LATE />,
[ScoreType.ABSENT]: <Absent />,
[ScoreType.SEMINAR_PRESENTATION]: <Presentation />,
[ScoreType.ADD_SCORE_DURING_SEMINAR_ACTIVITY_0_5]: <Presentation />,
[ScoreType.ADD_SCORE_DURING_SEMINAR_ACTIVITY_1]: <Presentation />,
[ScoreType.DEPLOY_SUCCESS]: <ProjectSuccess />,
[ScoreType.DEPLOY_FAILURE]: <ProjectFail />,
[ScoreType.MASHUP_LEADER]: <Leader />,
Expand Down
2 changes: 2 additions & 0 deletions src/components/ActivityScore/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export const ScoreType = {
MASHUP_LEADER: 'MASHUP_LEADER',
MASHUP_SUBLEADER: 'MASHUP_SUBLEADER',
MASHUP_CONTENT_WRITE: 'MASHUP_CONTENT_WRITE',
ADD_SCORE_DURING_SEMINAR_ACTIVITY_0_5: 'ADD_SCORE_DURING_SEMINAR_ACTIVITY_0_5',
ADD_SCORE_DURING_SEMINAR_ACTIVITY_1: 'ADD_SCORE_DURING_SEMINAR_ACTIVITY_1',
DEFAULT: 'DEFAULT',
} as const;

Expand Down
10 changes: 5 additions & 5 deletions src/components/common/Navigation/Navigation.component.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactElement } from 'react';
import React, { Fragment, ReactElement } from 'react';
import { useLocation, useNavigate } from 'react-router-dom';
import { useRecoilValue, useResetRecoilState } from 'recoil';
import { ValueOf } from '@/types';
Expand Down Expand Up @@ -50,7 +50,7 @@ const Navigation = ({ size, inActiveColor, items, showBottomBorder = true }: Nav
return (
<Styled.NavigationContainer showBottomBorder={showBottomBorder}>
{items.map((item) => (
<>
<Fragment key={item.title}>
<Styled.NavigationTitle>{item.title}</Styled.NavigationTitle>
{item.menus.map((menu, menuIdx) => {
if (menu.isMasterOnly && !isMaster) {
Expand All @@ -62,7 +62,7 @@ const Navigation = ({ size, inActiveColor, items, showBottomBorder = true }: Nav
.some((pathNameItem) => `/${pathNameItem}` === menu.to);

return (
<>
<Fragment key={menu.label}>
<Styled.ItemWrapper>
<Styled.NavigationItem
key={menu.to}
Expand All @@ -76,10 +76,10 @@ const Navigation = ({ size, inActiveColor, items, showBottomBorder = true }: Nav
</Styled.NavigationItem>
</Styled.ItemWrapper>
{item.menus.length === menuIdx + 1 && <Styled.NavigationDivider />}
</>
</Fragment>
);
})}
</>
</Fragment>
))}
<Styled.ItemWrapper>
<Styled.LogoutButton size={size} onClick={handleLogout}>
Expand Down
4 changes: 2 additions & 2 deletions src/components/common/Table/Table.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ const TableColumnCell = <T extends object>({
return (
<Styled.TableColumn textAlign={column.textAlign}>
{titles.map((title, index) => (
<>
<Fragment key={title}>
{title}
{index !== titles.length - 1 && <br />}
</>
</Fragment>
))}
</Styled.TableColumn>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,69 +23,66 @@ interface FormValues {
}

const scoreTypes = [
{
label: '출결',
items: [
{ value: ScoreType.ATTENDANCE, label: '출석', rangeType: RangeType.Normal, range: 0 },
{ value: ScoreType.LATE, label: '지각', rangeType: RangeType.Minus, range: 0.5 },
{ value: ScoreType.ABSENT, label: '결석', rangeType: RangeType.Minus, range: 1 },
],
},
{
label: '활동',
items: [
{
value: ScoreType.DEPLOY_FAILURE,
label: '프로젝트 배포 실패',
rangeType: RangeType.Minus,
value: ScoreType.SEMINAR_PRESENTATION,
label: '전체 세미나 발표',
rangeType: RangeType.Plus,
range: 1,
},
{
value: ScoreType.DEPLOY_SUCCESS,
label: '프로젝트 배포 성공',
value: ScoreType.ADD_SCORE_DURING_SEMINAR_ACTIVITY_0_5,
label: '세미나 활동중 추가 점수(0.5)',
rangeType: RangeType.Plus,
range: 1,
range: 0.5,
},
{
value: ScoreType.SEMINAR_PRESENTATION,
label: '전체 세미나 발표',
value: ScoreType.ADD_SCORE_DURING_SEMINAR_ACTIVITY_1,
label: '세미나 활동중 추가 점수(1)',
rangeType: RangeType.Plus,
range: 1,
},
{
value: ScoreType.MASHUP_CONTENT_WRITE,
label: '매시업 콘텐츠 글 작성',
label: 'Mash-Up 콘텐츠 글 작성',
rangeType: RangeType.Plus,
range: 0.5,
},
{
value: ScoreType.HACKATHON_COMMITTEE,
label: '뭐든준비위원회',
label: '준비위원회',
rangeType: RangeType.Plus,
range: 1,
},
{
value: ScoreType.DEPLOY_FAILURE,
label: '프로젝트 MVP 배포 실패',
rangeType: RangeType.Minus,
range: 0.5,
},
],
},
{
label: '직위',
items: [
{ value: ScoreType.MASHUP_LEADER, label: '회장', rangeType: RangeType.Plus, range: 100 },
{ value: ScoreType.MASHUP_SUBLEADER, label: '부회장', rangeType: RangeType.Plus, range: 100 },
{ value: ScoreType.MASHUP_STAFF, label: '스태프', rangeType: RangeType.Plus, range: 99 },
{ value: ScoreType.MASHUP_STAFF, label: '스태프', rangeType: RangeType.Plus, range: 3 },
{
value: ScoreType.PROJECT_LEADER,
label: '프로젝트팀 팀장',
rangeType: RangeType.Plus,
range: 2,
},
{
value: ScoreType.PROJECT_SUBLEADER,
label: '프로젝트팀 부팀장',
label: '프로젝트 팀 리더',
rangeType: RangeType.Plus,
range: 2,
},
],
},
{
label: '출결',
items: [
{ value: ScoreType.LATE, label: '지각', rangeType: RangeType.Minus, range: 0.5 },
{ value: ScoreType.ABSENT, label: '결석', rangeType: RangeType.Minus, range: 1 },
],
},
];

export interface ApplyActivityScoreModalDialogProps {
Expand Down

0 comments on commit fa88111

Please sign in to comment.