박권수

feat. 나이 -> 생년월일

......@@ -33,7 +33,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => {
const [info, setInfo] = useState<any>({
infoType : 'DOCTOR',
userNm : '',
userAge : 0,
birth : '',
contact : '',
doctorType : '',
patientInfo : '',
......@@ -69,7 +69,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => {
userNm : doctorInfo.doctorNm,
doctorType : doctorInfo.doctorType,
contact : doctorInfo.contact,
userAge : null,
birth : null,
patientInfo : '',
});
......@@ -94,10 +94,12 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => {
setLoading(true);
await doctorApi.getPatientDetail(token, patientId).then(res => {
setPatientDetail(res.data);
const birth = res.data.profile.birth.split('/');
setInfo({
infoType : 'PATIENT',
userNm : res.data.profile.userNm,
userAge : res.data.profile.userAge,
birth : `${birth[0]}년 ${birth[1]}월 ${birth[2]}일`,
contact : res.data.profile.contact,
doctorType : null,
patientInfo : res.data.info,
......@@ -118,7 +120,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => {
userNm : doctorInfo.doctorNm,
doctorType : doctorInfo.doctorType,
contact : doctorInfo.contact,
userAge : null,
birth : null,
patientInfo : '',
});
setFilteringPatientList([]);
......
......@@ -18,7 +18,7 @@ interface DoctorMenuProps {
userNm : string;
doctorType : string | null;
contact : string;
userAge : number | null;
birth : number | null;
patientInfo : string;
};
searchPatientKeyword : string;
......@@ -287,7 +287,7 @@ const DoctorMenuPresenter = (props : DoctorMenuProps) => {
</styled.InfoEachWrapper>
<styled.InfoEachWrapper>
<styled.InfoEachTopic>생년월일</styled.InfoEachTopic>
<styled.InfoEachText>{props.info.userAge}세</styled.InfoEachText>
<styled.InfoEachText>{props.info.birth}</styled.InfoEachText>
</styled.InfoEachWrapper>
<styled.InfoEachWrapper>
<styled.InfoEachTopic>연락처</styled.InfoEachTopic>
......@@ -351,7 +351,7 @@ const DoctorMenuPresenter = (props : DoctorMenuProps) => {
onClick = {() => props.onFetchPatientDetail(patient.userId)}
>
<styled.SearchResultEachText isLast = {false}>{patient.userNm}</styled.SearchResultEachText>
<styled.SearchResultEachText isLast = {false}>{patient.userAge}세</styled.SearchResultEachText>
<styled.SearchResultEachText isLast = {false}>{patient.birth}</styled.SearchResultEachText>
<styled.SearchResultEachText isLast = {true}>{patient.contact}</styled.SearchResultEachText>
</styled.SearchResultEach>
)
......