From 23938003b98d2dce5409a7eec6fe47ada7c76821 Mon Sep 17 00:00:00 2001 From: mina-gwak Date: Sun, 27 Apr 2025 03:02:50 +0900 Subject: [PATCH 1/2] =?UTF-8?q?Feat:=20PD-264=20=EA=B3=B5=EA=B3=A0=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=A7=88?= =?UTF-8?q?=ED=81=AC=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/job-posting/create/page.ts | 1 + src/features/job-posting-form/index.ts | 2 + .../job-posting-form/ui/job-posting-form.tsx | 131 ++++++++++++++++++ .../job-posting-form/ui/side-panel.tsx | 27 ++++ .../ui/preview-job-posting-button.tsx | 20 ++- src/pages/business-job-posting/index.ts | 1 + .../ui/create-job-posting-page.tsx | 30 ++++ .../ui/job-posting-list-page.tsx | 7 +- src/shared/form/ui/checkbox/checkbox.tsx | 3 + src/shared/ui/text-area/variants.ts | 5 +- 10 files changed, 223 insertions(+), 4 deletions(-) create mode 100644 app/(business)/business/job-posting/create/page.ts create mode 100644 src/features/job-posting-form/index.ts create mode 100644 src/features/job-posting-form/ui/job-posting-form.tsx create mode 100644 src/features/job-posting-form/ui/side-panel.tsx create mode 100644 src/pages/business-job-posting/ui/create-job-posting-page.tsx 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..09012b4d --- /dev/null +++ b/src/features/job-posting-form/ui/side-panel.tsx @@ -0,0 +1,27 @@ +import { Button } from 'shared/ui' + +export const SidePanel = () => { + return ( +
+

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

+
+

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

+

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

+
+
+ + +
+
+ ) +} 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/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: { From 6ddab1308bb11057053aa28077e628005a7ef60e Mon Sep 17 00:00:00 2001 From: mina-gwak Date: Sun, 27 Apr 2025 03:08:00 +0900 Subject: [PATCH 2/2] =?UTF-8?q?Feat:=20PD-264=20=EA=B3=B5=EA=B3=A0=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../job-posting/[jobPostId]/update/page.ts | 1 + .../job-posting-form/ui/side-panel.tsx | 16 +++++++--- src/pages/business-job-posting/index.ts | 1 + .../ui/create-job-posting-page.tsx | 2 +- .../ui/update-job-posting-page.tsx | 30 +++++++++++++++++++ 5 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 app/(business)/business/job-posting/[jobPostId]/update/page.ts create mode 100644 src/pages/business-job-posting/ui/update-job-posting-page.tsx 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/src/features/job-posting-form/ui/side-panel.tsx b/src/features/job-posting-form/ui/side-panel.tsx index 09012b4d..f7379e69 100644 --- a/src/features/job-posting-form/ui/side-panel.tsx +++ b/src/features/job-posting-form/ui/side-panel.tsx @@ -1,6 +1,12 @@ import { Button } from 'shared/ui' -export const SidePanel = () => { +type Props = { + type: 'register' | 'update' + onRegister?: () => void + onSave?: () => void +} + +export const SidePanel = ({ type }: Props) => { return (

@@ -18,9 +24,11 @@ export const SidePanel = () => { - + {type === 'register' && ( + + )}

) diff --git a/src/pages/business-job-posting/index.ts b/src/pages/business-job-posting/index.ts index 53957200..148caffa 100644 --- a/src/pages/business-job-posting/index.ts +++ b/src/pages/business-job-posting/index.ts @@ -1,2 +1,3 @@ export { CreateJobPostingPage } from './ui/create-job-posting-page' export { BusinessJobPostingListPage } from './ui/job-posting-list-page' +export { UpdateJobPostingPage } from './ui/update-job-posting-page' diff --git a/src/pages/business-job-posting/ui/create-job-posting-page.tsx b/src/pages/business-job-posting/ui/create-job-posting-page.tsx index f0244269..42b69019 100644 --- a/src/pages/business-job-posting/ui/create-job-posting-page.tsx +++ b/src/pages/business-job-posting/ui/create-job-posting-page.tsx @@ -18,7 +18,7 @@ export const CreateJobPostingPage = () => {
- + { + const form = useForm() + + return ( + +

+ 공고 수정 +

+ + +
+ + +
+ +
+ ) +}