Skip to content

Commit

Permalink
🔧 chore: 고용주 작성 서류 관련 타입, 맵 분리 #77
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMirror21 committed Oct 30, 2024
1 parent 8f38c27 commit af40cf8
Showing 1 changed file with 173 additions and 5 deletions.
178 changes: 173 additions & 5 deletions src/constants/documents.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import {
DayOfWeek,
PartTimeEmployeeInfoProperty,
Insurance,
IntegratedApplicationData,
LaborContractEmployerInfo,
LaborContractEmployerInfoProperty,
PaymentMethod,
WorkPeriod,
} from '@/types/api/document';
import {
DocumentType,
Expand All @@ -31,6 +33,21 @@ export const DocumentTypeInfo = {
},
} as const;

export const EmployerDocumentTypeInfo = {
[DocumentType.PART_TIME_PERMIT]: {
name: '시간제취업허가서',
key: 'part_time_employment_permits',
},
[DocumentType.LABOR_CONTRACT]: {
name: '표준근로계약서',
key: 'standard_labor_contract',
},
[DocumentType.INTEGRATED_APPLICATION]: {
name: 'Integrated Application Form',
key: 'integrated_application',
},
} as const;

export const DocumentSubTitleContent = {
[DocumentType.PART_TIME_PERMIT]: {
name: 'Part-Time Employment Permit',
Expand All @@ -52,6 +69,27 @@ export const DocumentSubTitleContent = {
},
} as const;

export const EmployerDocumentSubTitleContent = {
[DocumentType.PART_TIME_PERMIT]: {
name: '시간제 취업허가서',
key: 'part_time_employment_permits',
content:
'유학생이 아르바이트나 시간제 근무를 하기 위해서는 반드시 해당 허가서를 소지해야 합니다. 허가를 받지 않은 유학생을 고용할 경우, 고용주에게 불이익이 발생할 수 있습니다.',
},
[DocumentType.LABOR_CONTRACT]: {
name: '단시간근로자 표준근로계약서',
key: 'standard_labor_contract',
content:
'고용 형태와 관계없이 모든 근로자는 근로계약서를 작성해야하며, 이를 통해 합법적이고 투명한 고용 관계를 유지할 수 있습니다.',
},
[DocumentType.INTEGRATED_APPLICATION]: {
name: 'Application Form',
key: 'integrated_application',
content:
'The Application Form is a required document that international students must submit to legally work part-time in Korea. This form reports the workplace and working conditions, allowing the student to obtain employment approval.',
},
} as const;

// 시간제 근무 enum 정의
export enum PartTimePermitFormProperty {
FIRST_NAME = 'first_name',
Expand All @@ -62,6 +100,13 @@ export enum PartTimePermitFormProperty {
EMAIL = 'email',
}

export const enum DocumentStatusEmployer {
TEMPORARY_SAVE = 'TEMPORARY_SAVE',
SUBMITTED = 'SUBMITTED',
REWRITING = 'REWRITING',
CONFIRMATION = 'CONFIRMATION',
}

// 시간제 근무 매핑 객체
export const PartTimePermitFormInfo = {
[PartTimePermitFormProperty.FIRST_NAME]: {
Expand Down Expand Up @@ -107,7 +152,7 @@ export const mockPartTimePermitForm: PartTimePermitFormRequest = {
term_of_completion: 4,
phone_number: '010-1234-5678',
email: '[email protected]',
};
};

// 시간제 근무 허가서 내 고용주 입력 정보 속성과 이름 mapping
export const PartTimeEmployPermitEmployerInfo = {
Expand All @@ -116,23 +161,42 @@ export const PartTimeEmployPermitEmployerInfo = {
key: 'company_name',
},
[EmployerInfoProperty.COMPANY_REGISTRATION_NUMBER]: {
name: 'Business registration number',
name: 'Business registration number',
key: 'company_registration_number',
},
[EmployerInfoProperty.JOB_TYPE]: {
name: 'Industry',
key: 'job_type',
},
[EmployerInfoProperty.PHONE_NUMBER]: {
name: 'Phone number',
key: 'phone_number',
},
[EmployerInfoProperty.SIGNATURE_BASE64]: {
name: "Representative's signature",
key: 'signature_base64',
},
[EmployerInfoProperty.WORK_PERIOD]: {
name: 'Work period',
key: 'work_period',
},
[EmployerInfoProperty.HOURLY_RATE]: {
name: 'Hourly rate',
key: 'hourly_rate',
},
[EmployerInfoProperty.WORK_DAYS_WEEKDAYS]: {
name: 'Weekday work hours',
key: 'work_days_weekdays',
},
[EmployerInfoProperty.WORK_DAYS_WEEKENDS]: {
name: 'Weekend work hours',
key: 'work_days_weekends',
},
[EmployerInfoProperty.ADDRESS]: {
name: 'Address in Korea',
key: 'address',
},
} as const;

} as const;
// 표준 근로계약서 내 고용주 입력 정보 속성과 이름 mapping
export const LaborContractEmployerInfoNameMap = {
[LaborContractEmployerInfoProperty.COMPANY_NAME]: {
Expand Down Expand Up @@ -206,7 +270,13 @@ export const mockEmployerInformation: EmployerInformation = {
company_name: '테크스타트 주식회사',
company_registration_number: '123-45-67890',
job_type: '정보통신업',
name: '홍길동',
phone_number: '010-1111-1111',
signature_base64: '',
work_period: WorkPeriod.ONE_MONTH_TO_THREE_MONTHS,
hourly_rate: 10000,
work_days_weekdays: null,
work_days_weekends: null,
address: {
address_name: '서울 강남구 테헤란로 401 팁스타운',
region_1depth_name: '서울',
Expand Down Expand Up @@ -299,7 +369,7 @@ export const sampleLaborContract: LaborContractEmployerInfo = {
region_1depth_name: '서울특별시',
region_2depth_name: '강남구',
region_3depth_name: '테헤란로',
region_4depth_name: undefined,
region_4depth_name: null,
address_detail: 'ABC빌딩 5층',
longitude: 127.0495556,
latitude: 37.5048122,
Expand Down Expand Up @@ -442,3 +512,101 @@ export const schoolMockData = [
phone_number: '02-820-5114',
},
];

// 고용주 시간제 근무 허가서 작성 시 유학생 정보 name 매핑
export const EmployeePropertyInfo = {
[PartTimeEmployeeInfoProperty.FIRST_NAME]: {
name: '이름',
},
[PartTimeEmployeeInfoProperty.LAST_NAME]: {
name: '성',
},
[PartTimeEmployeeInfoProperty.MAJOR]: {
name: '학과(전공)',
},
[PartTimeEmployeeInfoProperty.TERM_OF_COMPLETION]: {
name: '이수학기',
},
[PartTimeEmployeeInfoProperty.PHONE_NUMBER]: {
name: '전화번호',
},
[PartTimeEmployeeInfoProperty.EMAIL]: {
name: '이메일',
},
} as const;

// 고용주 근로계약서 작성 시 유학생 정보 name 매핑
export const LaborContractEmployeePropertyInfo = {
[LaborContractEmployeeInfoProperty.FIRST_NAME]: {
name: '이름',
},
[LaborContractEmployeeInfoProperty.LAST_NAME]: {
name: '성',
},
[LaborContractEmployeeInfoProperty.ADDRESS]: {
name: '한국 주소',
},
[LaborContractEmployeeInfoProperty.PHONE_NUMBER]: {
name: '휴대전화',
},
[LaborContractEmployeeInfoProperty.SIGNATURE_BASE64]: {
name: '서명',
},
} as const;

export const initialPartTimePermitEmployerForm = {
company_name: '',
company_registration_number: '',
job_type: '',
name: '',
phone_number: '',
signature_base64: '',
work_period: WorkPeriod.ONE_DAY,
hourly_rate: 0,
work_days_weekdays: null,
work_days_weekends: null,
address: {
address_name: '',
region_1depth_name: '',
region_2depth_name: '',
region_3depth_name: '',
region_4depth_name: '',
address_detail: '',
longitude: 0,
latitude: 0,
},
};

export const WorkPeriodInfo = {
[WorkPeriod.ONE_DAY]: {
name: '하루',
},
[WorkPeriod.LESS_THAN_ONE_WEEK]: {
name: '1주 미만',
},
[WorkPeriod.ONE_WEEK_TO_ONE_MONTH]: {
name: '1주 ~ 1개월',
},
[WorkPeriod.ONE_MONTH_TO_THREE_MONTHS]: {
name: '1개월 ~ 3개월',
},
[WorkPeriod.THREE_MONTHS_TO_SIX_MONTHS]: {
name: '3개월 ~ 6개월',
},
[WorkPeriod.SIX_MONTHS_TO_ONE_YEAR]: {
name: '6개월 ~ 1년',
},
[WorkPeriod.MORE_THAN_ONE_YEAR]: {
name: '1년 이상',
},
} as const;

export const WorkPeriodNames = [
'하루',
'1주 미만',
'1주 ~ 1개월',
'1개월 ~ 3개월',
'3개월 ~ 6개월',
'6개월 ~ 1년',
'1년 이상',
];

0 comments on commit af40cf8

Please sign in to comment.