Skip to content

Commit

Permalink
fix(admin): 확인 중 추가하며 접수 -> 확인 중
Browse files Browse the repository at this point in the history
  • Loading branch information
oxjadex committed Oct 15, 2024
1 parent ae81712 commit c43e28b
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 5 deletions.
4 changes: 2 additions & 2 deletions apps/admin/src/app/form/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ const FormPage = () => {
<Dropdown
data={[
{ value: 'RESET', label: '전체 보기' },
{ value: 'RECEIVED', label: '접수' },
{ value: 'APPROVED', label: '확인 중' },
{ value: 'FIRST_FAILED', label: '1차 불합격' },
{ value: 'FAILED', label: '불합격' },
{ value: 'FINAL_SUBMITTED', label: '최종 제출' },
{ value: 'SUBMITTED', label: '제출' },
{ value: 'APPROVED', label: '승인' },
{ value: 'RECEIVED', label: '승인' },
{ value: 'NO_SHOW', label: '불참' },
{ value: 'FIRST_PASSED', label: '1차 합격' },
{ value: 'PASSED', label: '최종 합격' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,21 @@ const FinalScoreConfirm = ({ id, isOpen, onClose }: Props) => {
hidden
/>
</CardRadio>
<CardRadio approvalStatusType="확인 중" $checked={approvalStatus === '확인 중'}>
<Text
fontType="context"
color={approvalStatus === '확인 중' ? color.green : color.gray600}
>
확인 중
</Text>
<input
type="radio"
name="approvalStatus"
value="확인 중"
onChange={handleApprovalRadioChange}
hidden
/>
</CardRadio>
</Row>
<Row gap={16} style={{ alignSelf: 'flex-end' }}>
<Button size="SMALL" styleType="SECONDARY" onClick={onClose}>
Expand Down Expand Up @@ -141,5 +156,10 @@ const CardRadio = styled.label<{ approvalStatusType: ApprovalStatus; $checked: b
border: 1px solid ${color.red};
background: rgba(244, 67, 54, 0.1);
`
: approvalStatusType === '확인 중'
? css`
border: 1px solid ${color.green};
background: rgba(0, 191, 64, 0.1);
`
: null)}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ const FormTableItem = ({
return color.maruDefault;
case 'REJECTED':
return color.red;
case 'APPROVED':
return color.green;
default:
return color.gray900;
}
Expand All @@ -65,6 +67,8 @@ const FormTableItem = ({
return '승인';
case 'REJECTED':
return '반려';
case 'APPROVED':
return '확인 중';
default:
return '접수 중';
}
Expand Down
4 changes: 2 additions & 2 deletions apps/admin/src/constants/form/constants.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { FormCategory, FormStatus, FormType } from '@/types/form/client';

export const FORM_STATUS_CATEGORY: Record<FormStatus, string> = {
RECEIVED: '접수',
RECEIVED: '승인',
FIRST_FAILED: '1차 불합격',
FAILED: '불합격',
FINAL_SUBMITTED: '최종 제출',
SUBMITTED: '제출',
APPROVED: '승인',
APPROVED: '확인 중',
NO_SHOW: '불참',
FIRST_PASSED: '1차 합격',
PASSED: '최종 합격',
Expand Down
4 changes: 4 additions & 0 deletions apps/admin/src/services/form/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ export const patchFinalScore = async (id: number, status: ApprovalStatus) => {
if (status === '반려') {
const { data } = await maru.patch(`/form/${id}/reject`, {}, authorization());

return data;
} else if (status === '확인 중') {
const { data } = await maru.patch(`/form/${id}/approve`, {}, authorization());

return data;
}
const { data } = await maru.patch(`/form/${id}/receive`, {}, authorization());
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/src/types/form/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@ export interface Attendance {
classAbsenceCount: number;
}

export type ApprovalStatus = '승인' | '반려' | '';
export type ApprovalStatus = '승인' | '반려' | '확인 중' | '';
1 change: 1 addition & 0 deletions packages/design-token/src/color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const color = {
white: '#FFFFFF',
orange: '#FF763B',
red: '#F44336',
green: '#00BF40',

bamdoliro: '#1E2E3D',
maruDefault: '#257CFF',
Expand Down

0 comments on commit c43e28b

Please sign in to comment.