박권수

feat. 나이 -> 생년월일

...@@ -33,7 +33,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => { ...@@ -33,7 +33,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => {
33 const [info, setInfo] = useState<any>({ 33 const [info, setInfo] = useState<any>({
34 infoType : 'DOCTOR', 34 infoType : 'DOCTOR',
35 userNm : '', 35 userNm : '',
36 - userAge : 0, 36 + birth : '',
37 contact : '', 37 contact : '',
38 doctorType : '', 38 doctorType : '',
39 patientInfo : '', 39 patientInfo : '',
...@@ -69,7 +69,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => { ...@@ -69,7 +69,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => {
69 userNm : doctorInfo.doctorNm, 69 userNm : doctorInfo.doctorNm,
70 doctorType : doctorInfo.doctorType, 70 doctorType : doctorInfo.doctorType,
71 contact : doctorInfo.contact, 71 contact : doctorInfo.contact,
72 - userAge : null, 72 + birth : null,
73 patientInfo : '', 73 patientInfo : '',
74 }); 74 });
75 75
...@@ -94,10 +94,12 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => { ...@@ -94,10 +94,12 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => {
94 setLoading(true); 94 setLoading(true);
95 await doctorApi.getPatientDetail(token, patientId).then(res => { 95 await doctorApi.getPatientDetail(token, patientId).then(res => {
96 setPatientDetail(res.data); 96 setPatientDetail(res.data);
97 +
98 + const birth = res.data.profile.birth.split('/');
97 setInfo({ 99 setInfo({
98 infoType : 'PATIENT', 100 infoType : 'PATIENT',
99 userNm : res.data.profile.userNm, 101 userNm : res.data.profile.userNm,
100 - userAge : res.data.profile.userAge, 102 + birth : `${birth[0]}년 ${birth[1]}월 ${birth[2]}일`,
101 contact : res.data.profile.contact, 103 contact : res.data.profile.contact,
102 doctorType : null, 104 doctorType : null,
103 patientInfo : res.data.info, 105 patientInfo : res.data.info,
...@@ -118,7 +120,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => { ...@@ -118,7 +120,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => {
118 userNm : doctorInfo.doctorNm, 120 userNm : doctorInfo.doctorNm,
119 doctorType : doctorInfo.doctorType, 121 doctorType : doctorInfo.doctorType,
120 contact : doctorInfo.contact, 122 contact : doctorInfo.contact,
121 - userAge : null, 123 + birth : null,
122 patientInfo : '', 124 patientInfo : '',
123 }); 125 });
124 setFilteringPatientList([]); 126 setFilteringPatientList([]);
......
...@@ -18,7 +18,7 @@ interface DoctorMenuProps { ...@@ -18,7 +18,7 @@ interface DoctorMenuProps {
18 userNm : string; 18 userNm : string;
19 doctorType : string | null; 19 doctorType : string | null;
20 contact : string; 20 contact : string;
21 - userAge : number | null; 21 + birth : number | null;
22 patientInfo : string; 22 patientInfo : string;
23 }; 23 };
24 searchPatientKeyword : string; 24 searchPatientKeyword : string;
...@@ -287,7 +287,7 @@ const DoctorMenuPresenter = (props : DoctorMenuProps) => { ...@@ -287,7 +287,7 @@ const DoctorMenuPresenter = (props : DoctorMenuProps) => {
287 </styled.InfoEachWrapper> 287 </styled.InfoEachWrapper>
288 <styled.InfoEachWrapper> 288 <styled.InfoEachWrapper>
289 <styled.InfoEachTopic>생년월일</styled.InfoEachTopic> 289 <styled.InfoEachTopic>생년월일</styled.InfoEachTopic>
290 - <styled.InfoEachText>{props.info.userAge}세</styled.InfoEachText> 290 + <styled.InfoEachText>{props.info.birth}</styled.InfoEachText>
291 </styled.InfoEachWrapper> 291 </styled.InfoEachWrapper>
292 <styled.InfoEachWrapper> 292 <styled.InfoEachWrapper>
293 <styled.InfoEachTopic>연락처</styled.InfoEachTopic> 293 <styled.InfoEachTopic>연락처</styled.InfoEachTopic>
...@@ -351,7 +351,7 @@ const DoctorMenuPresenter = (props : DoctorMenuProps) => { ...@@ -351,7 +351,7 @@ const DoctorMenuPresenter = (props : DoctorMenuProps) => {
351 onClick = {() => props.onFetchPatientDetail(patient.userId)} 351 onClick = {() => props.onFetchPatientDetail(patient.userId)}
352 > 352 >
353 <styled.SearchResultEachText isLast = {false}>{patient.userNm}</styled.SearchResultEachText> 353 <styled.SearchResultEachText isLast = {false}>{patient.userNm}</styled.SearchResultEachText>
354 - <styled.SearchResultEachText isLast = {false}>{patient.userAge}세</styled.SearchResultEachText> 354 + <styled.SearchResultEachText isLast = {false}>{patient.birth}</styled.SearchResultEachText>
355 <styled.SearchResultEachText isLast = {true}>{patient.contact}</styled.SearchResultEachText> 355 <styled.SearchResultEachText isLast = {true}>{patient.contact}</styled.SearchResultEachText>
356 </styled.SearchResultEach> 356 </styled.SearchResultEach>
357 ) 357 )
......