Skip to content

Commit

Permalink
fix: 검색 버그 픽스
Browse files Browse the repository at this point in the history
  • Loading branch information
JJIIIINN committed Apr 5, 2024
1 parent 5d047b6 commit b0eb29b
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 11 deletions.
22 changes: 18 additions & 4 deletions src/Components/CompanyRecruitment/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { Button, DropDown, Input } from '@team-return/design-system';
import * as _ from './style';
import { useGetCode } from '../../../Apis/Codes';
import { useCompanyRecruitmentQueryString } from '../../../Store/State';
import { companyType } from '../../../Utils/Translation';
import { getValueByKey } from '../../../Utils/useGetPropertyKey';

interface PropsType {
refetchCompanyRecruitment: () => void;
Expand Down Expand Up @@ -38,12 +40,16 @@ export function CompanyRecruitmentSearch({
onChange={(type) =>
companyRecruitmentQueryStringDropDown(
'company_type',
type
getValueByKey(companyType, type)
)
}
width={28}
option={['전체', '선도기업', '참여기업']}
value={companyRecruitmentQueryString.company_type}
value={
companyType[
companyRecruitmentQueryString.company_type
]
}
/>
</_.ContentWrapper>
<_.TitleText>지역</_.TitleText>
Expand Down Expand Up @@ -89,12 +95,20 @@ export function CompanyRecruitmentSearch({
onChange={(industry) =>
companyRecruitmentQueryStringDropDown(
'industry',
industry
businessCode?.codes.find(
(item) => item.keyword === industry
)?.code
)
}
width={90}
option={allKeywords}
value={companyRecruitmentQueryString.industry}
value={
businessCode?.codes.find(
(item) =>
item.code.toString() ===
companyRecruitmentQueryString.industry
)?.keyword
}
/>
</_.ContentWrapper>
<_.Btn>
Expand Down
2 changes: 1 addition & 1 deletion src/Components/CompanyRecruitment/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export function CompanyRecruitmentTable({
<_.ContentText
status={companie.company_type === 'PARTICIPATING'}
>
{companyType[companie.company_type]}기업
{companyType[companie.company_type]}
</_.ContentText>, // 기업구분
<_.ContentText>{companie.convention && 'Y'}</_.ContentText>, // 협약여부
<_.ContentText>
Expand Down
11 changes: 8 additions & 3 deletions src/Components/RecruitmentForm/Search/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button, DropDown, Input } from '@team-return/design-system';
import * as _ from './style';
import { useRecruitmentFormQueryString } from '../../../Store/State';
import { winterIntern } from '../../../Utils/Translation';
import { companyStatus, winterIntern } from '../../../Utils/Translation';
import { getValueByKey } from '../../../Utils/useGetPropertyKey';

interface PropsType {
Expand Down Expand Up @@ -102,11 +102,16 @@ export function RecruitmentFormSearch({ refetchRecruitmentForm }: PropsType) {
'종료',
'접수요청',
]}
value={recruitmentFormQueryString.status || '전체'}
value={
getValueByKey(
companyStatus,
recruitmentFormQueryString.status
) || '전체'
}
onChange={(statusData) =>
recruitmentFormQueryStringDropDown(
'status',
statusData
companyStatus[statusData]
)
}
/>
Expand Down
6 changes: 3 additions & 3 deletions src/Utils/Translation.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const companyType: { [key: string]: string } = {
LEAD: '선도',
PARTICIPATING: '참여',
CONTRACTING: '협약',
LEAD: '선도기업',
PARTICIPATING: '참여기업',
CONTRACTING: '협약기업',
DEFAULT: '기본',
};

Expand Down

0 comments on commit b0eb29b

Please sign in to comment.