기타 수정
This commit is contained in:
@@ -17,6 +17,7 @@ import { useRecoilValue } from 'recoil';
|
||||
import { authList } from '../../store/authList';
|
||||
import { convertKTC } from '../../utils';
|
||||
import { TableSkeleton } from '../Skeleton/TableSkeleton';
|
||||
import { opPickupType, opReadType, opYNType } from '../../assets/data/options';
|
||||
|
||||
const UserMailInfo = ({ userInfo }) => {
|
||||
const token = sessionStorage.getItem('token');
|
||||
@@ -52,6 +53,7 @@ const UserMailInfo = ({ userInfo }) => {
|
||||
}, [authInfo]);
|
||||
|
||||
const fetchData = async option => {
|
||||
setLoading(true);
|
||||
await UserMailView(token, userInfo.guid, option).then(data =>{
|
||||
setDataList(data);
|
||||
setLoading(false);
|
||||
@@ -211,10 +213,10 @@ const UserMailInfo = ({ userInfo }) => {
|
||||
{mail.title}
|
||||
</MailLink>
|
||||
</td>
|
||||
<td>{mail.status === true ? '확인' : '미확인'}</td>
|
||||
<td>{mail.item_list.length > 0 ? 'Y' : 'N'}</td>
|
||||
<td>{mail.is_get_item === true ? '수령함' : '미수령함'}</td>
|
||||
<td>{mail.is_system_mail === true ? 'Y' : 'N'}</td>
|
||||
<td>{opReadType.find(type => type.value === mail.status).name}</td>
|
||||
<td>{opYNType.find(type => type.value === (mail.item_list.length > 0)).name}</td>
|
||||
<td>{opPickupType.find(type => type.value === mail.is_get_item).name}</td>
|
||||
<td>{opYNType.find(type => type.value === mail.is_system_mail).name}</td>
|
||||
{/* <td>
|
||||
{mail.is_get_item_dt && String(new Date(new Date(mail.is_get_item_dt).setHours(new Date(mail.is_get_item_dt).getHours() + 9)).toLocaleString())}
|
||||
</td> */}
|
||||
@@ -365,6 +367,7 @@ const UserTableWrapper = styled.div`
|
||||
const MailLink = styled.div`
|
||||
color: #61a2d0;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
`;
|
||||
|
||||
const SelectWrapper = styled.div`
|
||||
|
||||
@@ -56,7 +56,7 @@ const DataInitView = () => {
|
||||
handleSearch,
|
||||
handleReset,
|
||||
updateSearchParams
|
||||
} = useDataInitSearch(token, 500, setAlertMsg);
|
||||
} = useDataInitSearch(token, setAlertMsg);
|
||||
|
||||
const toggleRowExpand = (index) => {
|
||||
setExpandedRows(prev => ({
|
||||
@@ -114,7 +114,6 @@ const DataInitView = () => {
|
||||
setLoading(true);
|
||||
|
||||
await InitData(token, resultData).then(data => {
|
||||
setLoading(false);
|
||||
handleModalClose('registConfirm');
|
||||
if(data.result === "SUCCESS") {
|
||||
handleModalView('registComplete');
|
||||
@@ -122,9 +121,10 @@ const DataInitView = () => {
|
||||
setAlertMsg(t('REGIST_FAIL'));
|
||||
}
|
||||
}).catch(reason => {
|
||||
setLoading(false);
|
||||
handleModalClose('registConfirm');
|
||||
setAlertMsg(t('API_FAIL'));
|
||||
}).finally(() => {
|
||||
setLoading(false);
|
||||
});
|
||||
|
||||
break;
|
||||
@@ -244,7 +244,7 @@ const DataInitView = () => {
|
||||
modalText={alertMsg}
|
||||
handleSubmit={() => setAlertMsg('')}
|
||||
/>
|
||||
{loading && <Loading/>}
|
||||
{(loading || dataLoading) && <Loading/>}
|
||||
<TopButton />
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user