박권수

feat. 매니저 상세정보 뷰 수정

......@@ -38,7 +38,7 @@ const ManagerMenuContainer = (props : ManagerMenuProps) => {
}).catch(err => {
Alert.onError(err.response.data.error, () => null);
})
} catch(e) {
} catch(e : any) {
Alert.onError(e.response.data.error, () => null);
}
};
......@@ -55,11 +55,16 @@ const ManagerMenuContainer = (props : ManagerMenuProps) => {
setModalUp(true);
}
})
} catch(e) {
} catch(e : any) {
Alert.onError(e.response.data.error, () => setModalUp(false));
}
};
const onViewLicenseDetail = async (url : string) => {
const licensePage : any = window.open(url);
licensePage.focus();
};
//회원 가입 수락
const onAcceptRequest = () => {
if(validate === 'W') {
......@@ -78,7 +83,7 @@ const ManagerMenuContainer = (props : ManagerMenuProps) => {
Alert.onSuccess('회원 등록이 완료되었습니다.', fetchData);
}
})
} catch(e) {
} catch(e : any) {
Alert.onError(e.response.data.error, () => setModalUp(false));
}
};
......@@ -96,7 +101,7 @@ const ManagerMenuContainer = (props : ManagerMenuProps) => {
Alert.onSuccess('회원 등록이 취소되었습니다.', fetchData);
}
})
} catch(e) {
} catch(e : any) {
Alert.onError(e.response.data.error, () => setModalUp(false));
}
};
......@@ -118,7 +123,7 @@ const ManagerMenuContainer = (props : ManagerMenuProps) => {
setValidate('W');
});
})
} catch(e) {
} catch(e : any) {
Alert.onError(e.response.data, () => {
setModalUp(false);
setValidate('W');
......@@ -138,6 +143,8 @@ const ManagerMenuContainer = (props : ManagerMenuProps) => {
modalUp = {modalUp}
setModalUp = {setModalUp}
onViewDetailReq = {onViewDetailReq}
onViewLicenseDetail = {onViewLicenseDetail}
validate = {validate}
onValidate = {onValidate}
......
......@@ -11,6 +11,8 @@ interface ManagerMenuProps {
modalUp : boolean;
setModalUp : any;
onViewDetailReq : (arg0 : string) => void;
onViewLicenseDetail : (arg0 : string) => void;
validate : string;
onValidate : () => void;
......@@ -32,13 +34,27 @@ const ManagerMenuPresenter = (props : ManagerMenuProps) => {
<styled.ModalBodyWrapper>
<styled.ModalBodyLeftAndRight>
<styled.ModalInfoWrapper>
<styled.ModalInfoExplain>의사 자격 번호</styled.ModalInfoExplain>
<styled.DoctorLicenseViewWrapper>
<styled.ModalInfoExplain>
의사 자격 번호
</styled.ModalInfoExplain>
<styled.DoctorLicenseViewButton onClick = {() => props.onViewLicenseDetail(props.doctorDetail.info.doctorLicense)}>
자격정보 확인
</styled.DoctorLicenseViewButton>
</styled.DoctorLicenseViewWrapper>
<styled.ModalInfoNotice>
* 자격 정보 확인 버튼을 눌러 정보를 확인하세요.
<br/>* 정보 확인은 15분간 유효합니다.
<br/>* 확인한 면허 번호를 입력 후 검증하세요.
</styled.ModalInfoNotice>
<styled.ModalInfo>
{props.doctorDetail.info.doctorLicense}
<styled.DoctorLicenseViewInput
placeholder = '의사 면허 번호'
/>
<styled.ValidateButton
onClick = {props.onValidate}
disabled = {props.validate !== 'W'}
validate = {props.validate}
validate = {props.validate}
>
{
props.validate === 'Y' ?
......
......@@ -75,25 +75,96 @@ export const ModalInfoExplain = styled.div `
letter-spacing : 1px;
display : flex;
flex-direction : row;
justify-content : center;
align-items : center;
border : none;
border-bottom : 1px solid #337DFF;
color : #337DFF;
padding : 2px 5px;
padding : 2px 1px;
`;
export const ModalInfo = styled.div `
margin : 5px 0 20px 0;
font-size : 20px;
font-weight : 700;
margin : 5px 0 10px 0;
font-size : 13px;
font-weight : 600;
letter-spacing : 1px;
display : flex;
flex-direction : row;
align-items : center;
`;
export const ModalInfoNotice = styled.div `
font-size : 11px;
color : #bbb;
font-weight : 400;
letter-spacing : 0px;
margin : 5px 0 0px 0;
`;
export const DoctorLicenseViewWrapper = styled.div `
display : flex;
flex-direction : row;
justify-content : center;
align-items : center;
border : none;
background-color : transparent;
`;
export const DoctorLicenseViewButton = styled.button `
margin : 5px 0 0 7px;
border : 1px solid #343434;
border-radius : 3px;
background-color : #EAF2FF;
padding : 2px 5px;
display : flex;
flex-direction : row;
justify-content : center;
align-items : center;
cursor : pointer;
transition : .25s all;
&:hover {
border : 1px solid #337DFF;
background-color : #337DFF;
color : #fff;
}
font-size : 11px;
`;
export const DoctorLicenseViewInput = styled.input `
padding : 2px 1px;
font-size : 11px;
letter-spacing : 1px;
color : #343434;
border : none;
border-bottom : 1px solid #343434;
&::placeholder {
color : #ccc;
}
`;
export const ValidateButton = styled.button<{validate : string}> `
margin : 0 0 0 15px;
font-size : 11px;
margin : 0 0 0 5px;
padding : 2px 5px;
border-radius : 3px;
......