히스토리 조회 관련 수정

This commit is contained in:
2025-09-15 16:24:41 +09:00
parent f78a4912a6
commit 63b3704e89
5 changed files with 10 additions and 117 deletions

View File

@@ -12,7 +12,7 @@ export const LogViewList = async (token, searchType, searchKey, historyType, sta
},
);
return res.data.data;
return res.data;
} catch (e) {
if (e instanceof Error) {
throw new Error('LogViewList Error', e);

View File

@@ -4,7 +4,7 @@
"LogViewList": {
"method": "GET",
"url": "/list",
"dataPath": "data.data",
"dataPath": "data",
"paramFormat": "query"
},
"LogviewDetail": {

View File

@@ -3,8 +3,8 @@
"searchType": "ID",
"searchData": "",
"historyType": "",
"startDate": "",
"endDate": "",
"startDate": "today",
"endDate": "today",
"orderBy": "DESC",
"pageSize": 50,
"currentPage": 1
@@ -37,7 +37,10 @@
"startDateId": "startDate",
"endDateId": "endDate",
"label": "기간",
"col": 2
"col": 2,
"width": "500px",
"format": "YYYY-MM-DD HH:mm:ss",
"showTime": true
}
],

View File

@@ -1,111 +0,0 @@
import { styled } from 'styled-components';
import { Fragment, useState } from 'react';
import { Title, TableStyle, ButtonClose, ModalText, BtnWrapper } from '../../styles/Components';
import UserSearchBar from '../../components/searchBar/UserSearchBar';
import Modal from '../../components/common/modal/Modal';
import Button from '../../components/common/button/Button';
import { useNavigate } from 'react-router-dom';
import { authList } from '../../store/authList';
import { useRecoilValue } from 'recoil';
const CryptView = () => {
const navigate = useNavigate();
const userInfo = useRecoilValue(authList);
const mokupData = [
{
getDate: '2023-08-06 18:50:03',
getLocation: '유저 거래',
itemName: '빛나는 가죽 장갑',
serialNo: 'Serial_number',
itemCode: 'Item_code',
tradeKey: 'User_trade_key',
},
];
return (
<>
{userInfo.auth_list && !userInfo.auth_list.some(auth => auth.id === 15) ? (
<Modal min="440px" $padding="40px" $bgcolor="transparent" $view={'view'}>
<BtnWrapper $justify="flex-end">
<ButtonClose onClick={() => navigate(-1)} />
</BtnWrapper>
<ModalText $align="center">
해당 메뉴에 대한 조회 권한이 없습니다.
<br />
권한 등급을 변경 다시 이용해주세요.
</ModalText>
<BtnWrapper $gap="10px">
<Button text="확인" theme="primary" type="submit" size="large" width="100%" handleClick={() => navigate(-1)} />
</BtnWrapper>
</Modal>
) : (
<>
<Title>크립토조회</Title>
<UserSearchBar />
<TableWrapper>
<TableStyle>
<thead>
<tr>
<th width="170">획득일자</th>
<th width="170">획득처</th>
<th width="200">아이템명</th>
<th width="250">시리얼 넘버</th>
<th width="250">고유 코드</th>
<th width="250">거래 key</th>
</tr>
</thead>
<tbody>
{mokupData.map((data, index) => (
<Fragment key={index}>
<tr>
<td>{new Date(data.getDate).toLocaleString()}</td>
<td>{data.getLocation}</td>
<td>{data.itemName}</td>
<td>{data.serialNo}</td>
<td>{data.itemCode}</td>
<td>{data.tradeKey}</td>
</tr>
</Fragment>
))}
</tbody>
</TableStyle>
</TableWrapper>
</>
)}
</>
);
};
export default CryptView;
const TableWrapper = styled.div`
max-height: calc(100vh - 287px);
overflow: auto;
border-top: 1px solid #000;
&::-webkit-scrollbar {
width: 4px;
height: 4px;
}
&::-webkit-scrollbar-thumb {
background: #666666;
}
&::-webkit-scrollbar-track {
background: #d9d9d9;
}
thead {
th {
position: sticky;
top: 0;
z-index: 10;
}
}
${TableStyle} {
th {
position: sticky;
top: 0;
}
}
`;

View File

@@ -6,12 +6,13 @@ import { Title, FormWrapper } from '../../styles/Components';
import { authType } from '../../assets/data';
import { useModal, withAuth } from '../../hooks/hook';
import { CaliTable } from '../../components/common';
import tableInfo from '../../assets/data/pages/historyTable.json';
import useEnhancedCommonSearch from '../../hooks/useEnhancedCommonSearch';
import FrontPagination from '../../components/common/Pagination/FrontPagination';
import { INITIAL_CURRENT_PAGE, INITIAL_PAGE_LIMIT, INITIAL_PAGE_SIZE } from '../../assets/data/adminConstants';
import LogDetailModal from '../../components/common/modal/LogDetailModal';
import tableInfo from '../../assets/data/pages/historyTable.json';
const LogView = () => {
const [detailData, setDetailData] = useState({});
const [currentPage, setCurrentPage] = useState(INITIAL_CURRENT_PAGE);