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