diff --git a/app/(business)/business/job-posting/[jobPostId]/update/page.ts b/app/(business)/business/job-posting/[jobPostId]/update/page.ts new file mode 100644 index 00000000..c62aed02 --- /dev/null +++ b/app/(business)/business/job-posting/[jobPostId]/update/page.ts @@ -0,0 +1 @@ +export { UpdateJobPostingPage as default } from 'pages/business-job-posting' diff --git a/app/(business)/business/job-posting/create/page.ts b/app/(business)/business/job-posting/create/page.ts new file mode 100644 index 00000000..847a9376 --- /dev/null +++ b/app/(business)/business/job-posting/create/page.ts @@ -0,0 +1 @@ +export { CreateJobPostingPage as default } from 'pages/business-job-posting' diff --git a/src/features/job-posting-form/index.ts b/src/features/job-posting-form/index.ts new file mode 100644 index 00000000..de87618b --- /dev/null +++ b/src/features/job-posting-form/index.ts @@ -0,0 +1,2 @@ +export { JobPostingForm } from './ui/job-posting-form' +export { SidePanel } from './ui/side-panel' diff --git a/src/features/job-posting-form/ui/job-posting-form.tsx b/src/features/job-posting-form/ui/job-posting-form.tsx new file mode 100644 index 00000000..75836e73 --- /dev/null +++ b/src/features/job-posting-form/ui/job-posting-form.tsx @@ -0,0 +1,131 @@ +import { fieldCss, Form } from 'shared/form' +import { cn, Slot } from 'shared/lib' +import { Checkbox, Label } from 'shared/ui' + +type Props = { + className?: string +} + +export const JobPostingForm = ({ className }: Props) => { + const studentTypeOptions = [ + 'All', + 'Kindergarten', + 'Elementary', + 'MiddleSchool', + 'HighSchool', + 'Adult', + ] + + return ( +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + KRW + + + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+
+ +
+ + + + + +
+ +
+ + + + + + +
+
+ ) +} diff --git a/src/features/job-posting-form/ui/side-panel.tsx b/src/features/job-posting-form/ui/side-panel.tsx new file mode 100644 index 00000000..f7379e69 --- /dev/null +++ b/src/features/job-posting-form/ui/side-panel.tsx @@ -0,0 +1,35 @@ +import { Button } from 'shared/ui' + +type Props = { + type: 'register' | 'update' + onRegister?: () => void + onSave?: () => void +} + +export const SidePanel = ({ type }: Props) => { + return ( +
+

+ 공고 내용은 영어로 작성해주세요. +

+
+

+ 입력한 정보는 검색에 반영돼요. +

+

+ 중요한 정보를 빠뜨리지 않았는지 확인해 주세요. +

+
+
+ + {type === 'register' && ( + + )} +
+
+ ) +} diff --git a/src/features/preview-job-posting/ui/preview-job-posting-button.tsx b/src/features/preview-job-posting/ui/preview-job-posting-button.tsx index 6c379869..61d597bc 100644 --- a/src/features/preview-job-posting/ui/preview-job-posting-button.tsx +++ b/src/features/preview-job-posting/ui/preview-job-posting-button.tsx @@ -3,15 +3,17 @@ import { MouseEvent } from 'react' import { getJobPost } from 'entities/job-post' import { JobPostDetail } from 'entities/job-post' import { colors } from 'shared/config' +import { cn } from 'shared/lib' import { Button, Icon } from 'shared/ui' import { setPreviewJobPosting } from '../lib/storage' type Props = { - type: 'icon' | 'button' + type: 'icon' | 'button' | 'text-button' jobPostId?: number onLoad?: () => Promise disabled?: boolean + className?: string } export const PreviewJobPostingButton = ({ @@ -19,6 +21,7 @@ export const PreviewJobPostingButton = ({ jobPostId, onLoad, disabled, + className, }: Props) => { const handlePreviewButtonClick = async ( event: MouseEvent, @@ -40,7 +43,7 @@ export const PreviewJobPostingButton = ({ if (type === 'icon') { return ( + ) + } + return ( diff --git a/src/pages/business-job-posting/ui/update-job-posting-page.tsx b/src/pages/business-job-posting/ui/update-job-posting-page.tsx new file mode 100644 index 00000000..00fe82ef --- /dev/null +++ b/src/pages/business-job-posting/ui/update-job-posting-page.tsx @@ -0,0 +1,30 @@ +'use client' + +import { useForm } from 'react-hook-form' + +import { JobPostingForm, SidePanel } from 'features/job-posting-form' +import { PreviewJobPostingButton } from 'features/preview-job-posting' +import { Form } from 'shared/form' +import { Layout } from 'shared/ui' + +export const UpdateJobPostingPage = () => { + const form = useForm() + + return ( + +

+ 공고 수정 +

+
+ +
+ + +
+ +
+ ) +} diff --git a/src/shared/form/ui/checkbox/checkbox.tsx b/src/shared/form/ui/checkbox/checkbox.tsx index 17c6f868..62f31898 100644 --- a/src/shared/form/ui/checkbox/checkbox.tsx +++ b/src/shared/form/ui/checkbox/checkbox.tsx @@ -52,12 +52,14 @@ type FormCheckboxProps = { label?: string value?: CheckboxValue indeterminate?: boolean + className?: string } const FormCheckboxItem = ({ label, value, indeterminate = false, + className, }: FormCheckboxProps) => { const { clearErrors } = useFormContext() const { @@ -101,6 +103,7 @@ const FormCheckboxItem = ({ error={!isEmpty(error)} onChange={handleCheckboxChange} value={field.value} + className={className} /> ) } diff --git a/src/shared/ui/text-area/variants.ts b/src/shared/ui/text-area/variants.ts index 371a6ad3..38969952 100644 --- a/src/shared/ui/text-area/variants.ts +++ b/src/shared/ui/text-area/variants.ts @@ -1,7 +1,10 @@ import { cva, VariantProps } from 'class-variance-authority' export const textarea = cva( - 'body-large resize-none rounded-[10px] border border-gray-300 p-4 text-gray-900 transition-all', + [ + 'body-large resize-none rounded-[10px] border border-gray-300 p-4 text-gray-900 transition-all', + 'placeholder:text-gray-500', + ], { variants: { fullWidth: {