@daeryun/dr_components 0.4.81 → 0.4.83

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.
@@ -10,7 +10,7 @@ import DetailInfo from './../_component/DetailInfo';
10
10
  import { useParams, usePathname, useRouter, useSearchParams } from 'next/navigation';
11
11
  import { useQuery } from 'react-query';
12
12
  import getCase from '../../_fetchers/getCase';
13
- import { DetailList, FetchType, FileList, Question, TimeLineType } from '../../_type/type';
13
+ import { DetailList, FetchType, FileList, Question, TimeLineData } from '../../_type/type';
14
14
  import {
15
15
  useActionGetCourtFileList,
16
16
  useActionGetDetailList,
@@ -133,7 +133,7 @@ const MyCaseDetailPageContainer = ({ jwt }: { jwt?: string }) => {
133
133
  )}
134
134
  {selected === '사건 타임라인' && (
135
135
  <TimeLine
136
- timeLine={timeLine?.list as unknown as TimeLineType[][]}
136
+ timeLine={timeLine?.list as unknown as TimeLineData}
137
137
  isLoading={timeLineLoading}
138
138
  />
139
139
  )}
@@ -1,6 +1,6 @@
1
- import { TimeLineType } from '../../_type/type';
1
+ import { TimeLineData } from '../../_type/type';
2
2
  declare const TimeLine: ({ timeLine, isLoading }: {
3
- timeLine: TimeLineType[][];
3
+ timeLine: TimeLineData;
4
4
  isLoading: boolean;
5
5
  }) => import("react").JSX.Element;
6
6
  export default TimeLine;
@@ -1,28 +1,27 @@
1
1
  import dayjs from 'dayjs';
2
2
  import CaseLayout from '../../_component/_layout/CaseLayout';
3
3
  import Image from 'next/image';
4
- import checkCircle from '../../../../../asset/images/myCase/icon/check_circle.webp';
5
- import checkCircle2 from '../../../../../asset/images/myCase/icon/check_circle2.webp';
6
4
  const TimeBox = ({ item }) => {
7
5
  return (<div className="rounded-[4px] bg-grayScale7 px-[20px] py-[16px] sm-top:rounded-[8px] sm-top:px-[28px] sm-top:py-[20px] lg:rounded-[12px] lg:px-[28px] lg:py-[20px]">
8
6
  <div className="body_small2_mo sm-top:body_small2_tb lg:body_small2 text-grayScale2">
9
- {dayjs(item.progress_time).format('YYYY.MM.DD HH:mm')}
7
+ {dayjs(item.progress_time).format('HH:mm')}
10
8
  </div>
11
9
  <div className="body_medium2_mo sm-top:body_medium2_tb lg:body_medium2 mt-[8px] sm-top:mt-[6px] lg:mt-[8px]">
12
- {item.title}
10
+ {item.content}
13
11
  </div>
14
12
  </div>);
15
13
  };
16
14
  const TimeContainer = ({ list, isFirst }) => {
17
- const imgUrl = list[0].is_highest_court ? checkCircle : checkCircle2;
18
- const color = list[0].is_highest_court ? 'text-subColor05' : 'text-mycaseMainColor';
19
- const borderColor = list[0].is_highest_court ? 'border-subColor05' : 'border-mycaseMainColor';
15
+ const isCourt = !!list[0].progress_idx;
16
+ const imgUrl = isCourt ? '/images/mycase/icon/check_circle.webp' : '/images/mycase/icon/check_circle2.webp';
17
+ const color = isCourt ? 'text-subColor05' : 'text-mycaseMainColor';
18
+ const borderColor = isCourt ? 'border-subColor05' : 'border-mycaseMainColor';
20
19
  return (<>
21
20
  <div className="flex flex-col gap-[14px] sm-top:gap-[16px] lg:gap-[13px]">
22
21
  <div className="flex flex-row items-center gap-[8px] sm-top:gap-[12px]">
23
22
  <Image unoptimized src={imgUrl} alt="arrow" width={24} height={24} className="h-[16px] w-[16px] sm-top:h-[20px] sm-top:w-[20px] lg:h-[24px] lg:w-[24px]"/>
24
23
  <p className={`body_medium1_mo sm-top:body_medium1_tb lg:body_medium1 ${color}`}>
25
- {list[0].title}
24
+ {dayjs(list[0].progress_time).format('YYYY-MM-DD')}[{isCourt ? '대법원' : '대륜'}]
26
25
  </p>
27
26
  </div>
28
27
  <div className={`ml-[8px] pl-[16px] sm-top:ml-[6px] sm-top:pl-[22px] lg:ml-[12px] lg:pl-[28px] ${borderColor} flex flex-col gap-[16px] ` +
@@ -35,7 +34,7 @@ const TimeContainer = ({ list, isFirst }) => {
35
34
  </>);
36
35
  };
37
36
  const TimeLine = ({ timeLine, isLoading }) => {
38
- return (<CaseLayout isMobilePadding={false} outerClassName="mt-[35px] sm-top:mt-[24px] lg:mt-[40px] " innerClassName={'pt-[32px] px-[20px] 2sm:px-[40px] sm-top:px-[50px] sm-top:pt-[56px] sm-top:pb-[80px] lg:pt-[60px] lg:pb-[80px] lg:px-[60px]'}>
37
+ return (<CaseLayout isMobilePadding={false} outerClassName="mt-[35px] sm-top:mt-[24px] lg:mt-[40px] mb-[50px] " innerClassName={'pt-[32px] px-[20px] 2sm:px-[40px] sm-top:px-[50px] sm-top:pt-[56px] sm-top:pb-[80px] lg:pt-[60px] lg:pb-[80px] lg:px-[60px]'}>
39
38
  <div className="flex flex-col gap-[16px]">
40
39
  {timeLine === null || timeLine === void 0 ? void 0 : timeLine.map((list, index) => {
41
40
  return <TimeContainer key={index} list={list} isFirst={index === timeLine.length - 1}/>;
@@ -1,26 +1,27 @@
1
1
  import dayjs from 'dayjs';
2
2
  import CaseLayout from '../../_component/_layout/CaseLayout';
3
3
  import Image from 'next/image';
4
- import { TimeLineType } from '../../_type/type';
4
+ import { TimeLineData, TimeLineItem } from '../../_type/type';
5
5
  import checkCircle from '../../../../../asset/images/myCase/icon/check_circle.webp';
6
6
  import checkCircle2 from '../../../../../asset/images/myCase/icon/check_circle2.webp';
7
7
 
8
- const TimeBox = ({ item }: { item: any }) => {
8
+ const TimeBox = ({ item }: { item: TimeLineItem }) => {
9
9
  return (
10
10
  <div className="rounded-[4px] bg-grayScale7 px-[20px] py-[16px] sm-top:rounded-[8px] sm-top:px-[28px] sm-top:py-[20px] lg:rounded-[12px] lg:px-[28px] lg:py-[20px]">
11
11
  <div className="body_small2_mo sm-top:body_small2_tb lg:body_small2 text-grayScale2">
12
- {dayjs(item.progress_time).format('YYYY.MM.DD HH:mm')}
12
+ {dayjs(item.progress_time).format('HH:mm')}
13
13
  </div>
14
14
  <div className="body_medium2_mo sm-top:body_medium2_tb lg:body_medium2 mt-[8px] sm-top:mt-[6px] lg:mt-[8px]">
15
- {item.title}
15
+ {item.content}
16
16
  </div>
17
17
  </div>
18
18
  );
19
19
  };
20
- const TimeContainer = ({ list, isFirst }: { list: TimeLineType[]; isFirst: boolean }) => {
21
- const imgUrl = list[0].is_highest_court ? checkCircle : checkCircle2;
22
- const color = list[0].is_highest_court ? 'text-subColor05' : 'text-mycaseMainColor';
23
- const borderColor = list[0].is_highest_court ? 'border-subColor05' : 'border-mycaseMainColor';
20
+ const TimeContainer = ({ list, isFirst }: { list: TimeLineItem[]; isFirst: boolean }) => {
21
+ const isCourt = !!list[0].progress_idx;
22
+ const imgUrl = isCourt ? '/images/mycase/icon/check_circle.webp' : '/images/mycase/icon/check_circle2.webp';
23
+ const color = isCourt ? 'text-subColor05' : 'text-mycaseMainColor';
24
+ const borderColor = isCourt ? 'border-subColor05' : 'border-mycaseMainColor';
24
25
  return (
25
26
  <>
26
27
  <div className="flex flex-col gap-[14px] sm-top:gap-[16px] lg:gap-[13px]">
@@ -34,7 +35,7 @@ const TimeContainer = ({ list, isFirst }: { list: TimeLineType[]; isFirst: boole
34
35
  className="h-[16px] w-[16px] sm-top:h-[20px] sm-top:w-[20px] lg:h-[24px] lg:w-[24px]"
35
36
  />
36
37
  <p className={`body_medium1_mo sm-top:body_medium1_tb lg:body_medium1 ${color}`}>
37
- {list[0].title}
38
+ {dayjs(list[0].progress_time).format('YYYY-MM-DD')}[{isCourt ? '대법원' : '대륜'}]
38
39
  </p>
39
40
  </div>
40
41
  <div
@@ -52,11 +53,11 @@ const TimeContainer = ({ list, isFirst }: { list: TimeLineType[]; isFirst: boole
52
53
  );
53
54
  };
54
55
 
55
- const TimeLine = ({ timeLine, isLoading }: { timeLine: TimeLineType[][]; isLoading: boolean }) => {
56
+ const TimeLine = ({ timeLine, isLoading }: { timeLine: TimeLineData; isLoading: boolean }) => {
56
57
  return (
57
58
  <CaseLayout
58
59
  isMobilePadding={false}
59
- outerClassName="mt-[35px] sm-top:mt-[24px] lg:mt-[40px] "
60
+ outerClassName="mt-[35px] sm-top:mt-[24px] lg:mt-[40px] mb-[50px] "
60
61
  innerClassName={
61
62
  'pt-[32px] px-[20px] 2sm:px-[40px] sm-top:px-[50px] sm-top:pt-[56px] sm-top:pb-[80px] lg:pt-[60px] lg:pb-[80px] lg:px-[60px]'
62
63
  }
@@ -1,4 +1,4 @@
1
- import { FetchType, DetailList, TimeLineType, FileList, Question, PaymentList } from '../_type/type';
1
+ import { FetchType, DetailList, FileList, Question, PaymentList, TimeLineData } from '../_type/type';
2
2
  export declare const useActionGetCaseList: ({ tapState, pageNumber, pageSize }: {
3
3
  tapState: string;
4
4
  pageNumber: number;
@@ -12,7 +12,7 @@ export declare const useActionGetDetailList: (id: string, jwt?: string) => {
12
12
  isLoading: boolean;
13
13
  };
14
14
  export declare const useActionGetTimeLine: (id: string, jwt?: string) => {
15
- data: FetchType<TimeLineType> | undefined;
15
+ data: FetchType<TimeLineData> | undefined;
16
16
  isLoading: boolean;
17
17
  };
18
18
  export declare const useActionGetCourtFileList: (id: string, jwt?: string) => {
@@ -1,5 +1,5 @@
1
1
  import { useMutation, useQuery } from '@tanstack/react-query';
2
- import { FetchType, DetailList, TimeLineType, FileList, Question, PaymentList } from '../_type/type';
2
+ import { FetchType, DetailList, FileList, Question, PaymentList, TimeLineData } from '../_type/type';
3
3
  import getCase from '../_fetchers/getCase';
4
4
  import getTimeLine from '../_fetchers/getTimeLine';
5
5
 
@@ -71,7 +71,7 @@ export const useActionGetDetailList = (id: string, jwt?: string) => {
71
71
  };
72
72
 
73
73
  export const useActionGetTimeLine = (id: string, jwt?: string) => {
74
- const { data, isLoading } = useQuery<FetchType<TimeLineType>>({
74
+ const { data, isLoading } = useQuery<FetchType<TimeLineData>>({
75
75
  queryKey: ['case', 'timeline', id],
76
76
  queryFn: () =>
77
77
  getTimeLine({
@@ -47,13 +47,13 @@ const CaseLine = ({ title, isRefund }) => {
47
47
  </div>
48
48
  <div className="mt-[4px] flex flex-row justify-between">
49
49
  <p className={`body_small2_mo sm-top:body_medium2_tb lg:body_medium2 ${isRefund ? 'text-grayScale4' : number >= 1 ? 'text-subColor01' : 'text-[#B9B9B9]'}`}>
50
- 사건검토
50
+ 담당팀구성
51
51
  </p>
52
52
  <p className={`body_small2_mo sm-top:body_medium2_tb lg:body_medium2 ${number >= 2 ? 'text-subColor01' : 'text-[#B9B9B9]'}`}>
53
- 사건접수
53
+ 사건검토
54
54
  </p>
55
55
  <p className={`body_small2_mo sm-top:body_medium2_tb lg:body_medium2 ${number >= 3 ? 'text-subColor01' : 'text-[#B9B9B9]'}`}>
56
- 소송진행
56
+ 사건진행
57
57
  </p>
58
58
  </div>
59
59
  </div>));
@@ -102,21 +102,21 @@ const CaseLine = ({ title, isRefund }: { title: string; isRefund: boolean }) =>
102
102
  isRefund ? 'text-grayScale4' : number >= 1 ? 'text-subColor01' : 'text-[#B9B9B9]'
103
103
  }`}
104
104
  >
105
- 사건검토
105
+ 담당팀구성
106
106
  </p>
107
107
  <p
108
108
  className={`body_small2_mo sm-top:body_medium2_tb lg:body_medium2 ${
109
109
  number >= 2 ? 'text-subColor01' : 'text-[#B9B9B9]'
110
110
  }`}
111
111
  >
112
- 사건접수
112
+ 사건검토
113
113
  </p>
114
114
  <p
115
115
  className={`body_small2_mo sm-top:body_medium2_tb lg:body_medium2 ${
116
116
  number >= 3 ? 'text-subColor01' : 'text-[#B9B9B9]'
117
117
  }`}
118
118
  >
119
- 소송진행
119
+ 사건진행
120
120
  </p>
121
121
  </div>
122
122
  </div>
@@ -36,18 +36,15 @@ export type FetchType<T> = {
36
36
  totalLength: number;
37
37
  totalPageSize: number;
38
38
  };
39
- export interface TimeLineType {
40
- idx: number;
41
- state: string;
42
- title: string;
39
+ export type TimeLineItem = {
40
+ progress_idx: number | null;
41
+ memo_idx: number | null;
43
42
  content: string;
44
- is_deferred: boolean;
45
43
  progress_time: string;
46
44
  created_at: string;
47
- creator_id: string;
48
- creator: string;
49
- is_highest_court: boolean;
50
- }
45
+ creator: string | null;
46
+ };
47
+ export type TimeLineData = TimeLineItem[][];
51
48
  export interface FileList {
52
49
  name: string;
53
50
  path: string;
@@ -40,18 +40,17 @@ export type FetchType<T> = {
40
40
  totalPageSize: number;
41
41
  };
42
42
 
43
- export interface TimeLineType {
44
- idx: number; // 고유 인덱스
45
- state: string; // 상태 (예: "환불")
46
- title: string; // 제목
47
- content: string; // 내용
48
- is_deferred: boolean; // 연기 여부
49
- progress_time: string; // 진행 시간 (ISO 8601 형식)
50
- created_at: string; // 생성 시간 (ISO 8601 형식)
51
- creator_id: string; // 생성자 ID
52
- creator: string; // 생성자 이름
53
- is_highest_court: boolean; // 최고 법원 여부
54
- }
43
+ export type TimeLineItem = {
44
+ progress_idx: number | null;
45
+ memo_idx: number | null;
46
+ content: string;
47
+ progress_time: string; // ISO 날짜 문자열
48
+ created_at: string; // ISO 날짜 문자열
49
+ creator: string | null;
50
+ };
51
+
52
+ // 최상위는 ProgressItem 배열들의 배열
53
+ export type TimeLineData = TimeLineItem[][];
55
54
 
56
55
  export interface FileList {
57
56
  name: string; // 이미지 이름
@@ -1,6 +1,23 @@
1
1
  export function insert(str, isMobile) {
2
- const sendData = { site_gubun: "regener", location: window.location, userAgent: navigator.userAgent, referrer: document.referrer, conversion: str, isMobile: isMobile };
2
+ const url = String(window.location);
3
+ let gubun = 'localhost';
4
+ const split = url.split('daeryunlaw-');
5
+ if (split.length > 1) {
6
+ gubun = split[1].split('.com')[0];
7
+ }
8
+ const sendData = {
9
+ site_gubun: gubun,
10
+ location: window.location,
11
+ userAgent: navigator.userAgent,
12
+ referrer: document.referrer,
13
+ conversion: str,
14
+ isMobile: isMobile
15
+ };
3
16
  let myHeaders = new Headers();
4
- myHeaders.append("Content-Type", "application/json");
5
- fetch("https://mng.daeryunlaw.com/api/conversion", { method: "POST", body: JSON.stringify(sendData), headers: myHeaders });
17
+ myHeaders.append('Content-Type', 'application/json');
18
+ fetch('https://mng.daeryunlaw.com/api/conversion', {
19
+ method: 'POST',
20
+ body: JSON.stringify(sendData),
21
+ headers: myHeaders
22
+ });
6
23
  }
@@ -1,6 +1,25 @@
1
- export function insert(str:string, isMobile:boolean){
2
- const sendData = { site_gubun: "regener", location: window.location, userAgent: navigator.userAgent, referrer: document.referrer, conversion: str, isMobile: isMobile}
1
+ export function insert(str: string, isMobile: boolean) {
2
+ const url = String(window.location);
3
+ let gubun = 'localhost';
4
+ const split = url.split('daeryunlaw-');
5
+ if (split.length > 1) {
6
+ gubun = split[1].split('.com')[0];
7
+ }
8
+
9
+ const sendData = {
10
+ site_gubun: gubun,
11
+ location: window.location,
12
+ userAgent: navigator.userAgent,
13
+ referrer: document.referrer,
14
+ conversion: str,
15
+ isMobile: isMobile
16
+ };
17
+
3
18
  let myHeaders = new Headers();
4
- myHeaders.append("Content-Type", "application/json");
5
- fetch("https://mng.daeryunlaw.com/api/conversion", {method: "POST", body: JSON.stringify(sendData), headers: myHeaders});
6
- }
19
+ myHeaders.append('Content-Type', 'application/json');
20
+ fetch('https://mng.daeryunlaw.com/api/conversion', {
21
+ method: 'POST',
22
+ body: JSON.stringify(sendData),
23
+ headers: myHeaders
24
+ });
25
+ }
@@ -1194,6 +1194,10 @@ video {
1194
1194
  margin-bottom: 4px;
1195
1195
  }
1196
1196
 
1197
+ .mb-\[50px\] {
1198
+ margin-bottom: 50px;
1199
+ }
1200
+
1197
1201
  .mb-\[54px\] {
1198
1202
  margin-bottom: 54px;
1199
1203
  }