@daeryun/dr_components 0.2.24 → 0.2.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/asset/images/consulting/choice_lock.webp +0 -0
- package/dist/asset/images/consulting/new_choice_consulting.webp +0 -0
- package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/components/SelectBox/SelectBox.d.ts +19 -0
- package/dist/components/SelectBox/SelectBox.jsx +44 -0
- package/dist/components/SelectBox/SelectBox.tsx +78 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.ts +1 -0
- package/dist/components/page/Consulting/Consulting.d.ts +5 -0
- package/dist/components/page/Consulting/Consulting.jsx +448 -0
- package/dist/components/page/Consulting/Consulting.stories.d.ts +6 -0
- package/dist/components/page/Consulting/Consulting.stories.jsx +13 -0
- package/dist/components/page/Consulting/Consulting.stories.tsx +21 -0
- package/dist/components/page/Consulting/Consulting.tsx +728 -0
- package/dist/components/page/Consulting/IConsultingTypes.d.ts +22 -0
- package/dist/components/page/Consulting/IConsultingTypes.jsx +1 -0
- package/dist/components/page/Consulting/IConsultingTypes.tsx +24 -0
- package/dist/components/page/index.d.ts +1 -0
- package/dist/components/page/index.js +1 -0
- package/dist/components/page/index.ts +1 -0
- package/dist/styles/globals.css +499 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,728 @@
|
|
|
1
|
+
import React, { InputHTMLAttributes, useEffect, useState } from 'react';
|
|
2
|
+
import Image from 'next/image';
|
|
3
|
+
import IconMt from '../../../asset/images/choice/mt_icon.svg';
|
|
4
|
+
import { IConsulting, IDetail, IField } from './IConsultingTypes';
|
|
5
|
+
import { bodyFetch, formatPhoneNumber, insert, savePowerLinkConversion } from '../../../lib';
|
|
6
|
+
import { SelectBox } from '../../SelectBox/SelectBox';
|
|
7
|
+
import axios from 'axios';
|
|
8
|
+
import mobile from 'is-mobile';
|
|
9
|
+
import { useRouter } from 'next/router';
|
|
10
|
+
import ChoiceLock from '../../../asset/images/consulting/choice_lock.webp';
|
|
11
|
+
import NewChoiceConsulting from '../../../asset/images/consulting/new_choice_consulting.webp';
|
|
12
|
+
|
|
13
|
+
const Index = (props: { ace_Click?: () => void }) => {
|
|
14
|
+
const conversionType = 'consult';
|
|
15
|
+
const router = useRouter();
|
|
16
|
+
|
|
17
|
+
//폼데이터
|
|
18
|
+
const [consulting, setConsulting] = useState<IConsulting>({
|
|
19
|
+
cc_name: '',
|
|
20
|
+
cc_tel: '',
|
|
21
|
+
law_type_code: '',
|
|
22
|
+
contents: '',
|
|
23
|
+
c_type: '',
|
|
24
|
+
detail: null,
|
|
25
|
+
isCheck: false
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
//detail
|
|
29
|
+
const [detail, setDetail] = useState<IDetail>({
|
|
30
|
+
comp_name: '',
|
|
31
|
+
comp_address: '',
|
|
32
|
+
comp_business: '',
|
|
33
|
+
comp_size: '',
|
|
34
|
+
comp_managerName: '',
|
|
35
|
+
comp_managerPos: '',
|
|
36
|
+
comp_email: ''
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// 사건분야 data
|
|
40
|
+
const [fields, setFields] = useState<IField[]>([]);
|
|
41
|
+
|
|
42
|
+
//로딩
|
|
43
|
+
const [isLoading, setIsLoading] = useState<boolean>(false);
|
|
44
|
+
|
|
45
|
+
//모바일
|
|
46
|
+
const [isMobile, setIsMobile] = useState<boolean>(false);
|
|
47
|
+
|
|
48
|
+
const detailNameMap = new Map([
|
|
49
|
+
['comp_name', '기업명'],
|
|
50
|
+
['comp_address', '기업주소'],
|
|
51
|
+
['comp_business', '업종'],
|
|
52
|
+
['comp_size', '규모'],
|
|
53
|
+
['comp_managerName', '담당자명'],
|
|
54
|
+
['comp_managerPos', '부서/직급'],
|
|
55
|
+
['comp_email', '이메일']
|
|
56
|
+
]);
|
|
57
|
+
|
|
58
|
+
const consultPost = async () => {
|
|
59
|
+
setIsLoading(true);
|
|
60
|
+
if (!consulting.isCheck) {
|
|
61
|
+
alert('개인정보 제공에 동의해주세요');
|
|
62
|
+
setIsLoading(false);
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
if (consulting.c_type === '') {
|
|
66
|
+
alert('문의 유형을 선택해주세요.');
|
|
67
|
+
setIsLoading(false);
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
if (consulting.cc_name === '') {
|
|
71
|
+
alert('기업명을 입력해주세요.');
|
|
72
|
+
setIsLoading(false);
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
if (detail.comp_managerName === '') {
|
|
76
|
+
alert('담당자 명을 입력해주세요.');
|
|
77
|
+
setIsLoading(false);
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
if (consulting.cc_tel === '') {
|
|
81
|
+
alert('연락처를 입력해주세요.');
|
|
82
|
+
setIsLoading(false);
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
insert(conversionType, isMobile);
|
|
87
|
+
|
|
88
|
+
if (props.ace_Click) {
|
|
89
|
+
props.ace_Click();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
bodyFetch(
|
|
93
|
+
'/api/consulting',
|
|
94
|
+
{
|
|
95
|
+
...consulting,
|
|
96
|
+
detail: Object.fromEntries(
|
|
97
|
+
// 한글로 변경
|
|
98
|
+
Object.entries(detail).map(([key, value]) => [detailNameMap.get(key) || key, value])
|
|
99
|
+
)
|
|
100
|
+
},
|
|
101
|
+
(obj: any) => {
|
|
102
|
+
if (obj.result) {
|
|
103
|
+
setConsulting({
|
|
104
|
+
cc_name: '',
|
|
105
|
+
cc_tel: '',
|
|
106
|
+
law_type_code: '',
|
|
107
|
+
contents: '',
|
|
108
|
+
c_type: '',
|
|
109
|
+
detail: null,
|
|
110
|
+
isCheck: false
|
|
111
|
+
});
|
|
112
|
+
setDetail({
|
|
113
|
+
comp_name: '',
|
|
114
|
+
comp_address: '',
|
|
115
|
+
comp_business: '',
|
|
116
|
+
comp_size: '',
|
|
117
|
+
comp_managerName: '',
|
|
118
|
+
comp_managerPos: '',
|
|
119
|
+
comp_email: ''
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
if (obj.msg) {
|
|
123
|
+
alert(obj.msg);
|
|
124
|
+
setIsLoading(false);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (!obj.isNotComplete) {
|
|
128
|
+
savePowerLinkConversion('online', isMobile);
|
|
129
|
+
router.push({ pathname: '/complete', query: { isConsult: true } }, '/complete');
|
|
130
|
+
}
|
|
131
|
+
} else {
|
|
132
|
+
alert('상담 신청에 실패했습니다. 잠시후 다시 시도해주세요.');
|
|
133
|
+
setIsLoading(false);
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
'POST'
|
|
137
|
+
);
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
//사건분야 데이터 가져오기
|
|
141
|
+
useEffect(() => {
|
|
142
|
+
axios.get('/api/field/list?code=corporation').then(response => {
|
|
143
|
+
const compFieldData = response.data.list;
|
|
144
|
+
setFields(compFieldData);
|
|
145
|
+
});
|
|
146
|
+
setIsMobile(mobile());
|
|
147
|
+
}, []);
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
<>
|
|
151
|
+
<div
|
|
152
|
+
className={
|
|
153
|
+
'mt-[150px] flex h-[270px] w-full flex-col justify-between rounded-[15px] border-[2px] border-solid border-[#285EA7] px-[40px] py-[30px] ' +
|
|
154
|
+
//1500px
|
|
155
|
+
'max-3xl:mt-[100px] ' +
|
|
156
|
+
//1024px
|
|
157
|
+
'max-lg:mt-[60px] max-lg:h-[230px] ' +
|
|
158
|
+
//768px
|
|
159
|
+
'max-md:h-auto max-md:p-[35px] ' +
|
|
160
|
+
//480px
|
|
161
|
+
'max-xs:p-[25px] ' +
|
|
162
|
+
//325px
|
|
163
|
+
'max-3xs:p-[20px]'
|
|
164
|
+
}
|
|
165
|
+
>
|
|
166
|
+
<span
|
|
167
|
+
className={
|
|
168
|
+
'relative flex items-end gap-[50px] p-[20px] ' +
|
|
169
|
+
//1500px
|
|
170
|
+
'max-3xl:gap-[40px] ' +
|
|
171
|
+
//1024px
|
|
172
|
+
'max-lg:gap-[30px] max-lg:p-[10px] ' +
|
|
173
|
+
//768px
|
|
174
|
+
'max-md:mb-[20px] max-md:flex-col max-md:items-start max-md:gap-[15px] max-md:p-0 ' +
|
|
175
|
+
//480px
|
|
176
|
+
'max-xs:gap-[10px] max-xs:pt-[5px]'
|
|
177
|
+
}
|
|
178
|
+
>
|
|
179
|
+
<Image
|
|
180
|
+
src={NewChoiceConsulting}
|
|
181
|
+
alt={'consulting icon'}
|
|
182
|
+
width={216}
|
|
183
|
+
height={183}
|
|
184
|
+
className={
|
|
185
|
+
'h-auto w-[96px] object-contain object-top ' +
|
|
186
|
+
//1024px
|
|
187
|
+
'max-lg:w-[75px] ' +
|
|
188
|
+
//768px
|
|
189
|
+
'max-md:w-[65px] ' +
|
|
190
|
+
//480px
|
|
191
|
+
'max-xs:w-[55px] '
|
|
192
|
+
}
|
|
193
|
+
/>
|
|
194
|
+
<span>
|
|
195
|
+
<h2
|
|
196
|
+
className={
|
|
197
|
+
'text-[38px] font-[800] leading-[48px] tracking-[-1.9px] text-[#285EA7] ' +
|
|
198
|
+
//1500px
|
|
199
|
+
'max-3xl:text-[36px] max-3xl:leading-[46px] ' +
|
|
200
|
+
//1024px
|
|
201
|
+
'max-lg:text-[30px] max-lg:leading-[40px] ' +
|
|
202
|
+
//480px
|
|
203
|
+
'max-xs:text-[26px] ' +
|
|
204
|
+
//325px
|
|
205
|
+
'max-3xs:text-[24px]'
|
|
206
|
+
}
|
|
207
|
+
>
|
|
208
|
+
기업고객
|
|
209
|
+
</h2>
|
|
210
|
+
<p
|
|
211
|
+
className={
|
|
212
|
+
'mt-[10px] text-[22px] leading-[30px] tracking-[-0.55px] text-[#343434] ' +
|
|
213
|
+
//1500px
|
|
214
|
+
'max-3xl:mt-[5px] max-3xl:text-[20px] max-3xl:leading-[30px] ' +
|
|
215
|
+
//1024px
|
|
216
|
+
'max-lg:mt-[3px] max-lg:text-[16px] max-lg:leading-[22px] '
|
|
217
|
+
}
|
|
218
|
+
>
|
|
219
|
+
기업법무자문 · 일반소송대응 등 <br className={'md:hidden'} />
|
|
220
|
+
기업고객 맞춤 법률서비스를 제공합니다.
|
|
221
|
+
</p>
|
|
222
|
+
</span>
|
|
223
|
+
</span>
|
|
224
|
+
<div
|
|
225
|
+
className={
|
|
226
|
+
'flex w-full items-center justify-start gap-[15px] rounded-[15px] bg-[#285EA7] bg-opacity-5 px-[30px] py-[14px] tracking-[-0.35px] ' +
|
|
227
|
+
//480px
|
|
228
|
+
'max-xs:px-[20px]'
|
|
229
|
+
}
|
|
230
|
+
>
|
|
231
|
+
<Image
|
|
232
|
+
src={ChoiceLock}
|
|
233
|
+
alt={'choice_lock'}
|
|
234
|
+
width={39}
|
|
235
|
+
height={52}
|
|
236
|
+
className={
|
|
237
|
+
'h-auto w-[17px] translate-y-[-1px] ' +
|
|
238
|
+
//1024px
|
|
239
|
+
'max-lg:w-[15px]'
|
|
240
|
+
}
|
|
241
|
+
/>
|
|
242
|
+
<p
|
|
243
|
+
className={
|
|
244
|
+
'break-keep text-lg leading-none tracking-[-0.45px] text-[#3C3C3C] ' +
|
|
245
|
+
//1024px
|
|
246
|
+
'max-lg:text-base max-lg:leading-[20px] ' +
|
|
247
|
+
//480px
|
|
248
|
+
'max-xs:text-[14px] max-xs:leading-[18px] '
|
|
249
|
+
}
|
|
250
|
+
>
|
|
251
|
+
안심하세요! 의뢰인의 상담 내용에 대한 비밀유지를 약속합니다.
|
|
252
|
+
</p>
|
|
253
|
+
</div>
|
|
254
|
+
</div>
|
|
255
|
+
<div className={'relative mb-[60px] mt-[40px] h-auto w-[100%] '}>
|
|
256
|
+
<span
|
|
257
|
+
className={
|
|
258
|
+
'block h-[1px] w-full bg-[#CECECE] ' +
|
|
259
|
+
'after:absolute after:right-0 after:top-0 after:block after:h-[10px] after:w-[10px] after:-translate-y-[50%] after:rounded-full after:bg-[#CECECE] after:content-[""] ' +
|
|
260
|
+
'before:absolute before:left-0 before:top-0 before:block before:h-[10px] before:w-[10px] before:-translate-y-[50%] before:rounded-full before:bg-[#285FA2] before:content-[""]'
|
|
261
|
+
}
|
|
262
|
+
></span>
|
|
263
|
+
<span className={'flex h-auto w-full flex-col px-[26px] py-[22px]'}>
|
|
264
|
+
<div className={'relative mb-[10px] h-auto w-[37px]'}>
|
|
265
|
+
<IconMt />
|
|
266
|
+
</div>
|
|
267
|
+
<p
|
|
268
|
+
className={
|
|
269
|
+
'mb-[10px] break-keep text-[18px] leading-[1.35] tracking-[-0.72px] text-[#6C6C6C] ' +
|
|
270
|
+
//1500px
|
|
271
|
+
'max-3xl:text-[16px] ' +
|
|
272
|
+
//1024px
|
|
273
|
+
'max-lg:text-[18px] max-lg:leading-[1.5] ' +
|
|
274
|
+
//480px
|
|
275
|
+
'max-xs:text-[16px] ' +
|
|
276
|
+
//325px
|
|
277
|
+
'max-3xs:text-[14px]'
|
|
278
|
+
}
|
|
279
|
+
>
|
|
280
|
+
퀄리티 높은 상담 제공을 위해 하루 상담 수에 제한을 두고 있어{' '}
|
|
281
|
+
<span className={'font-bold'}>상담 예약이 빠르게 마감되고 있습니다.</span>
|
|
282
|
+
<br />
|
|
283
|
+
<br className={''} />
|
|
284
|
+
모든 상담은 전문변호사가 사건 검토를 마친 뒤{' '}
|
|
285
|
+
<span className={'font-bold'}>전문적으로 진행하기에 예약제로 실시됩니다.</span>
|
|
286
|
+
<br />
|
|
287
|
+
<br className={''} />
|
|
288
|
+
가급적 빠른 상담 예약을 권유드리며, 예약 시간 준수를 부탁드립니다. 만족스러운 상담을 위해 최선을
|
|
289
|
+
다하겠습니다.
|
|
290
|
+
<br className={''} />
|
|
291
|
+
<br className={''} />※ 단, 상담 예약이 확정된 경우라도 동시간에 긴급한 우선 상담 사안이
|
|
292
|
+
발생하거나 회사 내부사정에 따라 상담 일정이 조정되거나 취소될 수 있습니다.
|
|
293
|
+
</p>
|
|
294
|
+
</span>
|
|
295
|
+
<span
|
|
296
|
+
className={
|
|
297
|
+
'block h-[1px] w-full bg-[#CECECE] ' +
|
|
298
|
+
'after:absolute after:bottom-0 after:right-0 after:block after:h-[10px] after:w-[10px] after:translate-y-[50%] after:rounded-full after:bg-[#285FA2] after:content-[""] ' +
|
|
299
|
+
'before:absolute before:bottom-0 before:left-0 before:block before:h-[10px] before:w-[10px] before:translate-y-[50%] before:rounded-full before:bg-[#CECECE] before:content-[""]'
|
|
300
|
+
}
|
|
301
|
+
></span>
|
|
302
|
+
</div>
|
|
303
|
+
{/*문의 폼*/}
|
|
304
|
+
<div
|
|
305
|
+
className={
|
|
306
|
+
'mx-auto mb-[80px] mt-[30px] ' +
|
|
307
|
+
//1024px
|
|
308
|
+
'max-lg:w-full'
|
|
309
|
+
}
|
|
310
|
+
>
|
|
311
|
+
<span
|
|
312
|
+
className={
|
|
313
|
+
'flex items-start justify-between border-b-[1px] border-solid border-b-[#D5D5D5] py-[40px] ' +
|
|
314
|
+
//1024px
|
|
315
|
+
'max-lg:flex-col max-lg:gap-[30px] max-lg:py-[30px]'
|
|
316
|
+
}
|
|
317
|
+
>
|
|
318
|
+
<FormTitle text={'문의 유형'} />
|
|
319
|
+
<span
|
|
320
|
+
className={
|
|
321
|
+
'flex w-full max-w-[800px] gap-[30px] pl-[80px] ' +
|
|
322
|
+
//1024px
|
|
323
|
+
'max-lg:max-w-[unset] max-lg:px-[20px]'
|
|
324
|
+
}
|
|
325
|
+
>
|
|
326
|
+
<label
|
|
327
|
+
className={
|
|
328
|
+
'flex w-fit cursor-pointer items-start gap-[10px] text-[20px] font-[600] leading-none tracking-[-1px] ' +
|
|
329
|
+
//768px
|
|
330
|
+
'max-md:text-[18px] max-md:leading-[20px]'
|
|
331
|
+
}
|
|
332
|
+
>
|
|
333
|
+
<input
|
|
334
|
+
type="radio"
|
|
335
|
+
name={'type'}
|
|
336
|
+
className={
|
|
337
|
+
'h-[18px] w-[18px] cursor-pointer outline-none ' +
|
|
338
|
+
'after:pointer-events-none after:box-border after:block after:h-full after:w-full after:rounded-full after:bg-white after:outline after:outline-[1px] after:outline-[#B4B4B4] after:content-[""] ' +
|
|
339
|
+
'checked:after:border-[3px] checked:after:border-solid checked:after:border-[#fff] checked:after:bg-[#285FA7] checked:after:outline-[#285FA7]'
|
|
340
|
+
}
|
|
341
|
+
value={'comp_consult'}
|
|
342
|
+
onChange={e => {
|
|
343
|
+
setConsulting({ ...consulting, c_type: e.target.value });
|
|
344
|
+
}}
|
|
345
|
+
/>
|
|
346
|
+
기업법무자문
|
|
347
|
+
</label>
|
|
348
|
+
<label
|
|
349
|
+
className={
|
|
350
|
+
'flex w-fit cursor-pointer items-start gap-[10px] text-[20px] font-[600] leading-none tracking-[-1px] ' +
|
|
351
|
+
//768px
|
|
352
|
+
'max-md:text-[18px] max-md:leading-[20px]'
|
|
353
|
+
}
|
|
354
|
+
>
|
|
355
|
+
<input
|
|
356
|
+
type="radio"
|
|
357
|
+
name={'type'}
|
|
358
|
+
className={
|
|
359
|
+
'h-[18px] w-[18px] cursor-pointer outline-none ' +
|
|
360
|
+
'after:pointer-events-none after:box-border after:block after:h-full after:w-full after:rounded-full after:bg-white after:outline after:outline-[1px] after:outline-[#B4B4B4] after:content-[""] ' +
|
|
361
|
+
'checked:after:border-[3px] checked:after:border-solid checked:after:border-[#fff] checked:after:bg-[#285FA7] checked:after:outline-[#285FA7]'
|
|
362
|
+
}
|
|
363
|
+
value={'comp_suit'}
|
|
364
|
+
onChange={e => {
|
|
365
|
+
setConsulting({ ...consulting, c_type: e.target.value });
|
|
366
|
+
}}
|
|
367
|
+
/>
|
|
368
|
+
기업소송
|
|
369
|
+
</label>
|
|
370
|
+
</span>
|
|
371
|
+
</span>
|
|
372
|
+
<span
|
|
373
|
+
className={
|
|
374
|
+
'flex items-start justify-between border-b-[1px] border-solid border-b-[#D5D5D5] py-[40px] ' +
|
|
375
|
+
//1024px
|
|
376
|
+
'max-lg:flex-col max-lg:gap-[30px] max-lg:py-[30px]'
|
|
377
|
+
}
|
|
378
|
+
>
|
|
379
|
+
<FormTitle text={'기업 정보'} />
|
|
380
|
+
<span
|
|
381
|
+
className={
|
|
382
|
+
'flex w-full max-w-[800px] flex-col gap-[30px] pl-[80px] ' +
|
|
383
|
+
//1024px
|
|
384
|
+
'max-lg:max-w-[unset] max-lg:px-[20px] '
|
|
385
|
+
}
|
|
386
|
+
>
|
|
387
|
+
<span
|
|
388
|
+
className={
|
|
389
|
+
'flex w-full items-center justify-between ' +
|
|
390
|
+
//768px
|
|
391
|
+
'max-md:flex-col max-md:items-start max-md:gap-[10px]'
|
|
392
|
+
}
|
|
393
|
+
>
|
|
394
|
+
<InputTitle text={'기업명'} isRequired={true} />
|
|
395
|
+
<InputStyleBox
|
|
396
|
+
value={consulting.cc_name}
|
|
397
|
+
onChange={e => {
|
|
398
|
+
setConsulting({ ...consulting, cc_name: e.target.value });
|
|
399
|
+
setDetail({ ...detail, comp_name: e.target.value });
|
|
400
|
+
}}
|
|
401
|
+
placeholder={'예시) (주) 000'}
|
|
402
|
+
/>
|
|
403
|
+
</span>
|
|
404
|
+
<span
|
|
405
|
+
className={
|
|
406
|
+
'flex w-full items-center justify-between ' +
|
|
407
|
+
//768px
|
|
408
|
+
'max-md:flex-col max-md:items-start max-md:gap-[10px]'
|
|
409
|
+
}
|
|
410
|
+
>
|
|
411
|
+
<InputTitle text={'기업주소(구까지 기재)'} />
|
|
412
|
+
<InputStyleBox
|
|
413
|
+
value={detail.comp_address}
|
|
414
|
+
onChange={e => {
|
|
415
|
+
setDetail({ ...detail, comp_address: e.target.value });
|
|
416
|
+
}}
|
|
417
|
+
placeholder={'예시) 서울시 중구'}
|
|
418
|
+
/>
|
|
419
|
+
</span>
|
|
420
|
+
<span
|
|
421
|
+
className={
|
|
422
|
+
'flex w-full items-center justify-between ' +
|
|
423
|
+
//768px
|
|
424
|
+
'max-md:flex-col max-md:items-start max-md:gap-[10px]'
|
|
425
|
+
}
|
|
426
|
+
>
|
|
427
|
+
<InputTitle text={'업종'} />
|
|
428
|
+
<InputStyleBox
|
|
429
|
+
value={detail.comp_business}
|
|
430
|
+
onChange={e => {
|
|
431
|
+
setDetail({ ...detail, comp_business: e.target.value });
|
|
432
|
+
}}
|
|
433
|
+
placeholder={'예시) 금융업'}
|
|
434
|
+
/>
|
|
435
|
+
</span>{' '}
|
|
436
|
+
<span
|
|
437
|
+
className={
|
|
438
|
+
'flex w-full items-center justify-between ' +
|
|
439
|
+
//768px
|
|
440
|
+
'max-md:flex-col max-md:items-start max-md:gap-[10px]'
|
|
441
|
+
}
|
|
442
|
+
>
|
|
443
|
+
<InputTitle text={'규모(연 매출액, 직원수)'} />
|
|
444
|
+
<InputStyleBox
|
|
445
|
+
value={detail.comp_size}
|
|
446
|
+
onChange={e => {
|
|
447
|
+
setDetail({ ...detail, comp_size: e.target.value });
|
|
448
|
+
}}
|
|
449
|
+
placeholder={'입력해주세요'}
|
|
450
|
+
/>
|
|
451
|
+
</span>
|
|
452
|
+
</span>
|
|
453
|
+
</span>
|
|
454
|
+
<span
|
|
455
|
+
className={
|
|
456
|
+
'flex items-start justify-between border-b-[1px] border-solid border-b-[#D5D5D5] py-[40px] ' +
|
|
457
|
+
//1024px
|
|
458
|
+
'max-lg:flex-col max-lg:gap-[30px] max-lg:py-[30px]'
|
|
459
|
+
}
|
|
460
|
+
>
|
|
461
|
+
<FormTitle text={'담당자 정보'} />
|
|
462
|
+
<span
|
|
463
|
+
className={
|
|
464
|
+
'flex w-full max-w-[800px] flex-col gap-[30px] pl-[80px] ' +
|
|
465
|
+
//1024px
|
|
466
|
+
'max-lg:max-w-[unset] max-lg:px-[20px]'
|
|
467
|
+
}
|
|
468
|
+
>
|
|
469
|
+
<span
|
|
470
|
+
className={
|
|
471
|
+
'flex w-full items-center justify-between ' +
|
|
472
|
+
//768px
|
|
473
|
+
'max-md:flex-col max-md:items-start max-md:gap-[10px]'
|
|
474
|
+
}
|
|
475
|
+
>
|
|
476
|
+
<InputTitle text={'담당자명'} isRequired={true} />
|
|
477
|
+
<InputStyleBox
|
|
478
|
+
value={detail.comp_managerName}
|
|
479
|
+
onChange={e => {
|
|
480
|
+
setDetail({ ...detail, comp_managerName: e.target.value });
|
|
481
|
+
}}
|
|
482
|
+
placeholder={'입력해주세요'}
|
|
483
|
+
/>
|
|
484
|
+
</span>
|
|
485
|
+
<span
|
|
486
|
+
className={
|
|
487
|
+
'flex w-full items-center justify-between ' +
|
|
488
|
+
//768px
|
|
489
|
+
'max-md:flex-col max-md:items-start max-md:gap-[10px]'
|
|
490
|
+
}
|
|
491
|
+
>
|
|
492
|
+
<InputTitle text={'부서/직급'} />
|
|
493
|
+
<InputStyleBox
|
|
494
|
+
value={detail.comp_managerPos}
|
|
495
|
+
onChange={e => {
|
|
496
|
+
setDetail({ ...detail, comp_managerPos: e.target.value });
|
|
497
|
+
}}
|
|
498
|
+
placeholder={'입력해주세요'}
|
|
499
|
+
/>
|
|
500
|
+
</span>
|
|
501
|
+
<span
|
|
502
|
+
className={
|
|
503
|
+
'flex w-full items-center justify-between ' +
|
|
504
|
+
//768px
|
|
505
|
+
'max-md:flex-col max-md:items-start max-md:gap-[10px]'
|
|
506
|
+
}
|
|
507
|
+
>
|
|
508
|
+
<InputTitle text={'연락처'} isRequired={true} />
|
|
509
|
+
<InputStyleBox
|
|
510
|
+
value={consulting.cc_tel}
|
|
511
|
+
onChange={e => {
|
|
512
|
+
setConsulting({ ...consulting, cc_tel: formatPhoneNumber(e.target.value) });
|
|
513
|
+
}}
|
|
514
|
+
placeholder={'-없이 입력해주세요'}
|
|
515
|
+
/>
|
|
516
|
+
</span>{' '}
|
|
517
|
+
<span
|
|
518
|
+
className={
|
|
519
|
+
'flex w-full items-center justify-between ' +
|
|
520
|
+
//768px
|
|
521
|
+
'max-md:flex-col max-md:items-start max-md:gap-[10px]'
|
|
522
|
+
}
|
|
523
|
+
>
|
|
524
|
+
<InputTitle text={'이메일'} />
|
|
525
|
+
<InputStyleBox
|
|
526
|
+
value={detail.comp_email}
|
|
527
|
+
onChange={e => {
|
|
528
|
+
setDetail({ ...detail, comp_email: e.target.value });
|
|
529
|
+
}}
|
|
530
|
+
placeholder={'입력해주세요'}
|
|
531
|
+
/>
|
|
532
|
+
</span>
|
|
533
|
+
</span>
|
|
534
|
+
</span>
|
|
535
|
+
<span
|
|
536
|
+
className={
|
|
537
|
+
'flex items-start justify-between border-b-[1px] border-solid border-b-[#D5D5D5] py-[40px] ' +
|
|
538
|
+
//1024px
|
|
539
|
+
'max-lg:flex-col max-lg:gap-[30px] max-lg:py-[30px]'
|
|
540
|
+
}
|
|
541
|
+
>
|
|
542
|
+
<FormTitle text={'문의 내용'} />
|
|
543
|
+
<span
|
|
544
|
+
className={
|
|
545
|
+
'flex w-full max-w-[800px] flex-col gap-[30px] pl-[80px] ' +
|
|
546
|
+
//1024px
|
|
547
|
+
'max-lg:max-w-[unset] max-lg:px-[20px] ' +
|
|
548
|
+
//768px
|
|
549
|
+
'max-md:gap-[20px]'
|
|
550
|
+
}
|
|
551
|
+
>
|
|
552
|
+
<span
|
|
553
|
+
className={
|
|
554
|
+
'flex gap-[10px] ' +
|
|
555
|
+
//768px
|
|
556
|
+
'max-md:w-full max-md:flex-col max-md:items-start max-md:gap-[10px]'
|
|
557
|
+
}
|
|
558
|
+
>
|
|
559
|
+
<SelectBox
|
|
560
|
+
items={fields}
|
|
561
|
+
id={'사건분야'}
|
|
562
|
+
value={consulting.law_type_code}
|
|
563
|
+
onSelect={(codename, code) => {
|
|
564
|
+
setConsulting({ ...consulting, law_type_code: code });
|
|
565
|
+
}}
|
|
566
|
+
icon={
|
|
567
|
+
<Image
|
|
568
|
+
src={
|
|
569
|
+
process.env.NEXT_PUBLIC_S3_URL +
|
|
570
|
+
'/consult/main/section6/icon_arrow_gray.webp'
|
|
571
|
+
}
|
|
572
|
+
alt={'select icon'}
|
|
573
|
+
width={28}
|
|
574
|
+
height={15}
|
|
575
|
+
className={
|
|
576
|
+
'absolute right-[24px] top-[50%] w-[15px] translate-y-[-50%] max-xs:w-[11px]'
|
|
577
|
+
}
|
|
578
|
+
/>
|
|
579
|
+
}
|
|
580
|
+
style={
|
|
581
|
+
'h-[60px] w-full px-[20px] border-solid border-[1px] border-[#D0D0D0] text-[18px] cursor-pointer transition-[border] ' +
|
|
582
|
+
'focus-visible:outline-none focus-visible:border-[#285FA7] ' +
|
|
583
|
+
'max-sm:w-full max-xs:h-[50px] max-xs:flex-none max-xs:text-[14px] max-xs:px-[15px] max-xs:py-0'
|
|
584
|
+
}
|
|
585
|
+
parentStyle={'flex-1 w-full'}
|
|
586
|
+
placeholderOptions={'사건분야'}
|
|
587
|
+
/>
|
|
588
|
+
{/*<SelectBox*/}
|
|
589
|
+
{/* items={[{ code: '', codename: '' }]}*/}
|
|
590
|
+
{/* id={'사건유형'}*/}
|
|
591
|
+
{/* value={''}*/}
|
|
592
|
+
{/* onSelect={() => {}}*/}
|
|
593
|
+
{/* icon={*/}
|
|
594
|
+
{/* <Image*/}
|
|
595
|
+
{/* src={'/images/main/section6/icon_arrow_gray.webp'}*/}
|
|
596
|
+
{/* alt={'select icon'}*/}
|
|
597
|
+
{/* width={28}*/}
|
|
598
|
+
{/* height={15}*/}
|
|
599
|
+
{/* className={*/}
|
|
600
|
+
{/* 'absolute top-[50%] translate-y-[-50%] right-[24px] w-[15px] max-xs:w-[11px]'*/}
|
|
601
|
+
{/* }*/}
|
|
602
|
+
{/* />*/}
|
|
603
|
+
{/* }*/}
|
|
604
|
+
{/* style={*/}
|
|
605
|
+
{/* 'h-[60px] w-full px-[20px] border-solid border-[1px] border-[#D0D0D0] text-[18px] cursor-pointer transition-[border] ' +*/}
|
|
606
|
+
{/* 'focus-visible:outline-none focus-visible:border-[#285FA7] ' +*/}
|
|
607
|
+
{/* 'max-sm:w-full max-xs:h-[50px] max-xs:flex-none max-xs:text-[14px] max-xs:px-[15px] max-xs:py-0'*/}
|
|
608
|
+
{/* }*/}
|
|
609
|
+
{/* parentStyle={'flex-1 w-full'}*/}
|
|
610
|
+
{/* placeholderOptions={'사건유형'}*/}
|
|
611
|
+
{/*/>*/}
|
|
612
|
+
</span>
|
|
613
|
+
<textarea
|
|
614
|
+
placeholder={'내용을 입력해주세요'}
|
|
615
|
+
spellCheck={false}
|
|
616
|
+
maxLength={500}
|
|
617
|
+
className={
|
|
618
|
+
'h-[350px] w-full resize-none border-[1px] border-solid border-[#D0D0D0] p-[20px] text-[18px] leading-[24px] transition-[border] placeholder:text-[#848484] ' +
|
|
619
|
+
'focus-visible:border-[#285FA7] focus-visible:outline-none ' +
|
|
620
|
+
//1024px
|
|
621
|
+
'max-lg:h-[280px] max-lg:p-[20px]'
|
|
622
|
+
}
|
|
623
|
+
onChange={e => {
|
|
624
|
+
setConsulting({ ...consulting, contents: e.target.value });
|
|
625
|
+
}}
|
|
626
|
+
value={consulting.contents}
|
|
627
|
+
/>
|
|
628
|
+
</span>
|
|
629
|
+
</span>
|
|
630
|
+
<span
|
|
631
|
+
className={
|
|
632
|
+
'mx-auto mt-[50px] block max-w-[570px] ' +
|
|
633
|
+
//768px
|
|
634
|
+
'max-md:mt-[30px] ' +
|
|
635
|
+
//480px
|
|
636
|
+
'max-xs:max-w-[240px]'
|
|
637
|
+
}
|
|
638
|
+
>
|
|
639
|
+
{/*-- 동의 체크박스 --*/}
|
|
640
|
+
<label
|
|
641
|
+
className={
|
|
642
|
+
'mb-[30px] block w-full cursor-pointer text-[16px] leading-[16px] text-[#5F5F5F] ' +
|
|
643
|
+
'flex items-center justify-center gap-[10px] ' +
|
|
644
|
+
'max-sm:justify-center max-xs:text-base'
|
|
645
|
+
}
|
|
646
|
+
>
|
|
647
|
+
<input
|
|
648
|
+
type="checkbox"
|
|
649
|
+
name="consultCheck"
|
|
650
|
+
id="consultCk"
|
|
651
|
+
className={
|
|
652
|
+
'h-[17px] w-[17px] cursor-pointer outline-none ' +
|
|
653
|
+
'after:pointer-events-none after:block after:h-full after:w-full after:border-[1px] after:border-solid after:border-[#B4B4B4] after:bg-white after:font-[SUIT] after:font-[800] after:content-[""] ' +
|
|
654
|
+
'checked:after:border-[#285FA7] checked:after:bg-[#285FA7] checked:after:text-center checked:after:text-[17px] checked:after:leading-[15px] checked:after:text-white checked:after:content-["✓"] '
|
|
655
|
+
}
|
|
656
|
+
onChange={e => {
|
|
657
|
+
setConsulting({ ...consulting, isCheck: !consulting.isCheck });
|
|
658
|
+
}}
|
|
659
|
+
checked={consulting.isCheck}
|
|
660
|
+
/>
|
|
661
|
+
개인정보수집에 동의합니다.
|
|
662
|
+
</label>
|
|
663
|
+
{/*-- 제출 submit 버튼 --*/}
|
|
664
|
+
<button
|
|
665
|
+
type="button"
|
|
666
|
+
id={'submitBtn'}
|
|
667
|
+
className={
|
|
668
|
+
'h-[70px] w-full cursor-pointer bg-[#285FA7] text-xl tracking-[-0.5px] text-white ' +
|
|
669
|
+
'max-xs:h-[50px] max-xs:text-base'
|
|
670
|
+
}
|
|
671
|
+
onClick={consultPost}
|
|
672
|
+
disabled={isLoading}
|
|
673
|
+
>
|
|
674
|
+
상담신청서 제출
|
|
675
|
+
</button>
|
|
676
|
+
</span>
|
|
677
|
+
</div>
|
|
678
|
+
</>
|
|
679
|
+
);
|
|
680
|
+
};
|
|
681
|
+
|
|
682
|
+
export default Index;
|
|
683
|
+
|
|
684
|
+
const FormTitle = (props: { text: string }) => {
|
|
685
|
+
return (
|
|
686
|
+
<p
|
|
687
|
+
className={
|
|
688
|
+
'flex w-[130px] flex-shrink-0 items-center gap-[12px] text-[24px] font-[600] leading-none tracking-[-1.2px] text-[#285EA7] ' +
|
|
689
|
+
'before:block before:h-[6px] before:w-[6px] before:rounded-full before:bg-[#285EA7] before:content-[""] ' +
|
|
690
|
+
//1024px
|
|
691
|
+
'max-lg:text-[22px]'
|
|
692
|
+
}
|
|
693
|
+
>
|
|
694
|
+
{props.text}
|
|
695
|
+
</p>
|
|
696
|
+
);
|
|
697
|
+
};
|
|
698
|
+
|
|
699
|
+
const InputTitle = (props: { text: string; isRequired?: boolean }) => {
|
|
700
|
+
return (
|
|
701
|
+
<p
|
|
702
|
+
className={
|
|
703
|
+
'relative w-[220px] flex-shrink-0 text-[20px] font-[600] tracking-[-0.5px] ' +
|
|
704
|
+
//768px
|
|
705
|
+
'max-md:text-[18px] ' +
|
|
706
|
+
`${
|
|
707
|
+
props.isRequired &&
|
|
708
|
+
'before:absolute before:left-[-12px] before:text-[16px] before:leading-none before:text-[#dc143c] before:content-["*"]'
|
|
709
|
+
}`
|
|
710
|
+
}
|
|
711
|
+
>
|
|
712
|
+
{props.text}
|
|
713
|
+
</p>
|
|
714
|
+
);
|
|
715
|
+
};
|
|
716
|
+
|
|
717
|
+
const InputStyleBox = (props: InputHTMLAttributes<HTMLInputElement>) => {
|
|
718
|
+
return (
|
|
719
|
+
<input
|
|
720
|
+
className={
|
|
721
|
+
'h-[50px] w-full max-w-[580px] border-[1px] border-solid border-[#D0D0D0] px-[20px] text-lg tracking-[-0.45px] transition-[border] placeholder:text-[#848484] ' +
|
|
722
|
+
'focus-visible:border-[#285FA7] focus-visible:outline-none '
|
|
723
|
+
}
|
|
724
|
+
{...props}
|
|
725
|
+
spellCheck={false}
|
|
726
|
+
/>
|
|
727
|
+
);
|
|
728
|
+
};
|