Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design1
/
RIT_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박권수
2021-09-15 20:16:35 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
245eba24de7d0653fe4b6d30b994f95048b71ef7
245eba24
1 parent
b0f485c0
feat. 나이 -> 생년월일
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
web/src/views/main/doctor/DoctorMenuContainer.tsx
web/src/views/main/doctor/DoctorMenuPresenter.tsx
web/src/views/main/doctor/DoctorMenuContainer.tsx
View file @
245eba2
...
...
@@ -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([]);
...
...
web/src/views/main/doctor/DoctorMenuPresenter.tsx
View file @
245eba2
...
...
@@ -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>
)
...
...
Please
register
or
login
to post a comment