@daeryun/dr_components 0.9.45 → 0.9.47

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.
@@ -5,6 +5,7 @@ import Image from 'next/image';
5
5
  import { useMutation } from '@tanstack/react-query';
6
6
  import { getCookie } from '../../../lib';
7
7
  import ConfirmModal from './LoginComp/Modal/ConfirmModal';
8
+ import Loader from '../../../components/Loader/Loader';
8
9
 
9
10
  const Box = ({
10
11
  type_idx,
@@ -215,10 +216,8 @@ const StepTwo = () => {
215
216
  [key: string]: { result: boolean; data: { type_idx: number; tag_title: string }[] };
216
217
  }>({});
217
218
 
218
- console.log('centerCodes :', centerCodes);
219
+ const [isLoading, setIsLoading] = useState(false);
219
220
 
220
- const center_code = 'CT0001';
221
- const center_code2 = 'CT0025';
222
221
  const categories = [
223
222
  { code: 'CT0004', code_name: '기업법무' },
224
223
  { code: 'CT0014', code_name: '지식재산권' },
@@ -264,289 +263,6 @@ const StepTwo = () => {
264
263
  }
265
264
  };
266
265
 
267
- const data1 = {
268
- result: true,
269
- data: [
270
- {
271
- type_idx: 1713,
272
- tag_title: '뇌물수수'
273
- },
274
- {
275
- type_idx: 1937,
276
- tag_title: '업무상과실치사상'
277
- },
278
- {
279
- type_idx: 1914,
280
- tag_title: '데이트폭력처벌'
281
- },
282
- {
283
- type_idx: 6662,
284
- tag_title: '명의도용죄'
285
- },
286
- {
287
- type_idx: 2131,
288
- tag_title: '횡령·횡령죄'
289
- },
290
- {
291
- type_idx: 1967,
292
- tag_title: '음주운전범죄'
293
- },
294
- {
295
- type_idx: 1873,
296
- tag_title: '유사수신행위'
297
- },
298
- {
299
- type_idx: 1649,
300
- tag_title: '강도죄'
301
- },
302
- {
303
- type_idx: 1836,
304
- tag_title: '보이스피싱'
305
- },
306
- {
307
- type_idx: 8947,
308
- tag_title: '주민등록법위반'
309
- },
310
- {
311
- type_idx: 1954,
312
- tag_title: '영업비밀보호법'
313
- },
314
- {
315
- type_idx: 1694,
316
- tag_title: '공직선거법위반'
317
- },
318
- {
319
- type_idx: 2809,
320
- tag_title: '통신비밀보호법위반'
321
- },
322
- {
323
- type_idx: 2594,
324
- tag_title: '위증죄/증거인멸죄'
325
- },
326
- {
327
- type_idx: 1858,
328
- tag_title: '사기죄'
329
- },
330
- {
331
- type_idx: 6664,
332
- tag_title: '아동복지법위반'
333
- },
334
- {
335
- type_idx: 6600,
336
- tag_title: '감금죄'
337
- },
338
- {
339
- type_idx: 1746,
340
- tag_title: '도박죄'
341
- },
342
- {
343
- type_idx: 1927,
344
- tag_title: '업무방해죄'
345
- },
346
- {
347
- type_idx: 1684,
348
- tag_title: '교통사고범죄'
349
- },
350
- {
351
- type_idx: 2801,
352
- tag_title: '장애인복지법위반'
353
- },
354
- {
355
- type_idx: 6623,
356
- tag_title: '경찰사칭죄 '
357
- },
358
- {
359
- type_idx: 2138,
360
- tag_title: '학교폭력'
361
- },
362
- {
363
- type_idx: 3398,
364
- tag_title: '대부업법위반'
365
- },
366
- {
367
- type_idx: 8199,
368
- tag_title: '배임·배임죄'
369
- },
370
- {
371
- type_idx: 1829,
372
- tag_title: '보복운전/난폭운전'
373
- },
374
- {
375
- type_idx: 7547,
376
- tag_title: '가상화폐사기'
377
- },
378
- {
379
- type_idx: 1753,
380
- tag_title: '마약류관리법위반'
381
- },
382
- {
383
- type_idx: 6627,
384
- tag_title: '공무상비밀누설죄'
385
- },
386
- {
387
- type_idx: 2077,
388
- tag_title: '정치자금법위반'
389
- },
390
- {
391
- type_idx: 6630,
392
- tag_title: '공중위생관리법'
393
- },
394
- {
395
- type_idx: 6659,
396
- tag_title: '기물파손죄'
397
- },
398
- {
399
- type_idx: 6602,
400
- tag_title: '강제집행면탈죄'
401
- },
402
- {
403
- type_idx: 2125,
404
- tag_title: '강요죄'
405
- },
406
- {
407
- type_idx: 2815,
408
- tag_title: '보험사기죄'
409
- },
410
- {
411
- type_idx: 8204,
412
- tag_title: '상해'
413
- },
414
- {
415
- type_idx: 1983,
416
- tag_title: '절도죄'
417
- },
418
- {
419
- type_idx: 6633,
420
- tag_title: '국민체육진흥법위반 '
421
- },
422
- {
423
- type_idx: 1771,
424
- tag_title: '명예훼손/허위사실유포'
425
- },
426
- {
427
- type_idx: 1825,
428
- tag_title: '방화죄'
429
- },
430
- {
431
- type_idx: 1902,
432
- tag_title: '스토킹처벌법'
433
- },
434
- {
435
- type_idx: 2101,
436
- tag_title: '폭행·폭행죄'
437
- },
438
- {
439
- type_idx: 1804,
440
- tag_title: '무고죄'
441
- },
442
- {
443
- type_idx: 1971,
444
- tag_title: '재물손괴죄'
445
- },
446
- {
447
- type_idx: 1706,
448
- tag_title: '교육감선거'
449
- },
450
- {
451
- type_idx: 1997,
452
- tag_title: '주거침입죄'
453
- },
454
- {
455
- type_idx: 1817,
456
- tag_title: '문서위조/변조'
457
- },
458
- {
459
- type_idx: 1779,
460
- tag_title: '사이버명예훼손'
461
- },
462
- {
463
- type_idx: 2931,
464
- tag_title: '특경법'
465
- },
466
- {
467
- type_idx: 1992,
468
- tag_title: '특정범죄가중처벌법'
469
- },
470
- {
471
- type_idx: 1918,
472
- tag_title: '아동학대'
473
- },
474
- {
475
- type_idx: 1961,
476
- tag_title: '음주운전동승자처벌'
477
- },
478
- {
479
- type_idx: 2116,
480
- tag_title: '협박죄'
481
- },
482
- {
483
- type_idx: 1661,
484
- tag_title: '개인정보보호법위반'
485
- },
486
- {
487
- type_idx: 1786,
488
- tag_title: '모욕죄'
489
- },
490
- {
491
- type_idx: 1729,
492
- tag_title: '뇌물알선수재죄'
493
- },
494
- {
495
- type_idx: 1680,
496
- tag_title: '공갈죄'
497
- },
498
- {
499
- type_idx: 2094,
500
- tag_title: '부정청탁금지법'
501
- },
502
- {
503
- type_idx: 1843,
504
- tag_title: '전자금융거래법위반'
505
- },
506
- {
507
- type_idx: 1886,
508
- tag_title: '살인죄'
509
- },
510
- {
511
- type_idx: 1690,
512
- tag_title: '공무집행방해죄'
513
- }
514
- ]
515
- };
516
- const data2 = {
517
- result: true,
518
- data: [
519
- {
520
- type_idx: 2615,
521
- tag_title: '엔터테인먼트'
522
- },
523
- {
524
- type_idx: 2634,
525
- tag_title: '게임산업'
526
- },
527
- {
528
- type_idx: 2649,
529
- tag_title: '저작권'
530
- },
531
- {
532
- type_idx: 2717,
533
- tag_title: '상표/디자인'
534
- },
535
- {
536
- type_idx: 2662,
537
- tag_title: '전속계약'
538
- },
539
- {
540
- type_idx: 2620,
541
- tag_title: '스포츠산업'
542
- },
543
- {
544
- type_idx: 2693,
545
- tag_title: '특허/실용신안'
546
- }
547
- ]
548
- };
549
-
550
266
  const modalHandleClose = () => {
551
267
  setIsModal(false);
552
268
  setModalObj({ title: '', subTitle: '' });
@@ -609,10 +325,22 @@ const StepTwo = () => {
609
325
  });
610
326
 
611
327
  const handlePrev = () => {
328
+ try {
329
+ const existingLogin = sessionStorage.getItem('login');
330
+ if (existingLogin) {
331
+ const loginData = JSON.parse(existingLogin);
332
+ delete loginData.selectedFields; // selectedFields 제거
333
+ sessionStorage.setItem('login', JSON.stringify(loginData));
334
+ }
335
+ } catch (error) {
336
+ console.error('SessionStorage 업데이트 실패:', error);
337
+ }
338
+
612
339
  window.location.href = '/login/sign/step_one';
613
340
  };
614
341
 
615
342
  const handleDone = async () => {
343
+ setIsLoading(true);
616
344
  if (selectedList.length === 0) {
617
345
  return;
618
346
  }
@@ -647,6 +375,8 @@ const StepTwo = () => {
647
375
  });
648
376
  } catch (error) {
649
377
  console.error('Session storage parsing error:', error);
378
+ } finally {
379
+ setIsLoading(false);
650
380
  }
651
381
  };
652
382
 
@@ -697,6 +427,8 @@ const StepTwo = () => {
697
427
 
698
428
  return (
699
429
  <>
430
+ {isLoading && <Loader fullScreen />}
431
+
700
432
  <div className="relative mx-[200px] mt-[150px] max-[1498px]:mx-[120px] max-lg:mx-[60px] max-sm:mx-[20px] sm:mt-[240px] lg:mt-[200px] ">
701
433
  <div className="">
702
434
  <p className="title_large_mo sm:title_large_tb lg:title_large">STEP 2</p>
@@ -725,7 +457,7 @@ const StepTwo = () => {
725
457
  </div>
726
458
  </div>
727
459
 
728
- <div className="mt-[28px] flex flex-col gap-[40px] sm:mt-[61px] lg:mt-[66px] ">
460
+ <div className="mt-[28px] flex flex-col gap-[40px] sm:mt-[61px] lg:mt-[66px] ">
729
461
  {/* {data1?.data?.length > 0 && (
730
462
  <div className="sm:flex sm:flex-row sm:rounded-[16px] sm:border sm:border-solid sm:border-grayScale5 sm:p-[40px] lg:rounded-[20px]">
731
463
  <p className="body_large1_mo sm:body_large1_tb lg:body_large1 sm:w-[150px] sm:sm:flex-shrink-0">