Skip to content

Commit

Permalink
feat :: faq 기숙사 type 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
dutexion committed Jul 15, 2024
1 parent 56046a0 commit 6a75772
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/pages/Customer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ const CustomerPage = () => {
const categories: Record<string, FaqType> = {
전체: '',
'입학 문의': 'ADMISSION',
'진학 문의': 'COURSE',
진로: 'COURSE',
'학교 생활': 'SCHOOL_LIFE',
기숙사: 'DORMITORY',
기타: 'OTHER',
};

Expand Down
8 changes: 8 additions & 0 deletions src/pages/admin/WriteFAQ.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ const WriteFAQPage = () => {
onClick={setInputValue}
checked={inputValue.faqType === 'SCHOOL_LIFE'}
/>
<Radio
name="faqType"
label="기숙사"
value="DORMITORY"
color={authorityColor}
onClick={setInputValue}
checked={inputValue.faqType === 'DORMITORY'}
/>
<Radio
name="faqType"
label="기타"
Expand Down
2 changes: 1 addition & 1 deletion src/utils/api/faq/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type FaqType = 'ADMISSION' | 'COURSE' | 'SCHOOL_LIFE' | 'OTHER' | '';
export type FaqType = 'ADMISSION' | 'COURSE' | 'SCHOOL_LIFE' | 'OTHER' | 'DORMITORY' | '';

export interface ICreateFaq {
title: string;
Expand Down
3 changes: 2 additions & 1 deletion src/utils/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { FaqType } from './api/faq/types';
export const faqTypeToKorean: Record<FaqType, string> = {
ADMISSION: '입학 문의',
SCHOOL_LIFE: '학교 생활',
COURSE: '진학 문의',
COURSE: '진로',
DORMITORY: '기숙사',
OTHER: '기타',
'': '전체',
};

0 comments on commit 6a75772

Please sign in to comment.