칼리움 요청 실패 표시 및 클릭시 페이지 이동 처리

This commit is contained in:
2025-05-23 15:58:04 +09:00
parent 1532793cc1
commit 9d06246aba
8 changed files with 109 additions and 11 deletions

View File

@@ -8,5 +8,8 @@ export const ONE_MINUTE_MS = 60000;
export const ONE_MINUTE_SECOND = 60;
export const AUCTION_MIN_MINUTE_TIME = 15; // 15분
export const IMAGE_MAX_SIZE = 5242880;
export const STORAGE_MAIL_COPY = 'copyMailData';
export const STORAGE_BUSINESS_LOG_SEARCH = 'businessLogSearchParam';
export const LOG_ACTION_FAIL_CALIUM_ECHO = 'FailCaliumEchoSystem';
export { INITIAL_PAGE_SIZE, INITIAL_CURRENT_PAGE, INITIAL_PAGE_LIMIT };

View File

@@ -732,6 +732,14 @@ export const logAction = [
{ value: "BeaconCreate", name: "BeaconCreate" },
{ value: "BeaconEdit", name: "BeaconEdit" },
{ value: "BeaconSell", name: "BeaconSell" },
{ value: "BeaconShopRegisterItem", name: "BeaconShopRegisterItem" },
{ value: "BeaconShopReturnItem", name: "BeaconShopReturnItem" },
{ value: "BeaconShopPurchaseItem", name: "BeaconShopPurchaseItem" },
{ value: "BeaconShopReceivePaymentForSales", name: "BeaconShopReceivePaymentForSales" },
{ value: "BeaconShopSearchItem", name: "BeaconShopSearchItem" },
{ value: "BeaconShopUpdateDailyCount", name: "BeaconShopUpdateDailyCount" },
{ value: "BeaconShopDeleteRecord", name: "BeaconShopDeleteRecord" },
{ value: "BeaconShopDeactiveItems", name: "BeaconShopDeactiveItems" },
{ value: "BrokerApiAdmin", name: "BrokerApiAdmin" },
{ value: "BrokerApiPlanetAuth", name: "BrokerApiPlanetAuth" },
{ value: "BrokerApiUserExchangeOrderCompleted", name: "BrokerApiUserExchangeOrderCompleted" },
@@ -782,6 +790,8 @@ export const logAction = [
{ value: "CheatCommandSendMail", name: "CheatCommandSendMail" },
{ value: "CheatCommandShopProductInit", name: "CheatCommandShopProductInit" },
{ value: "CheatCommandShopProductRenewal", name: "CheatCommandShopProductRenewal" },
{ value: "CheatCommandBeaconShopItemTimeChange", name: "CheatCommandBeaconShopItemTimeChange" },
{ value: "CheatCommandDailyLimitInit", name: "CheatCommandDailyLimitInit" },
{ value: "ClaimReward", name: "ClaimReward" },
{ value: "ConvertCalium", name: "ConvertCalium" },
{ value: "ConvertExchangeCalium", name: "ConvertExchangeCalium" },
@@ -818,6 +828,8 @@ export const logAction = [
{ value: "ItemTattooChangeAttribute", name: "ItemTattooChangeAttribute" },
{ value: "ItemTattooLevelUp", name: "ItemTattooLevelUp" },
{ value: "ItemUse", name: "ItemUse" },
{ value: "ItemDestroyByUser", name: "ItemDestroyByUser" },
{ value: "ItemDestoryByExpiration", name: "ItemDestoryByExpiration" },
{ value: "JoinInstance", name: "JoinInstance" },
{ value: "JoinParty", name: "JoinParty" },
{ value: "JoinPartyInstance", name: "JoinPartyInstance" },
@@ -844,7 +856,7 @@ export const logAction = [
{ value: "ProductGive", name: "ProductGive" },
{ value: "ProductOpenFailed", name: "ProductOpenFailed" },
{ value: "ProductOpenSuccess", name: "ProductOpenSuccess" },
{ value: "QuestMailSend", name: "QuestMailSend" },
{ value: "QuestMainAssign", name: "QuestMainAssign" },
{ value: "QuestMainAbort", name: "QuestMainAbort" },
{ value: "QuestMainAssignByDialogue", name: "QuestMainAssignByDialogue" },
{ value: "QuestMainAssignForce", name: "QuestMainAssignForce" },
@@ -852,6 +864,7 @@ export const logAction = [
{ value: "QuestMainRepeatTimeInit", name: "QuestMainRepeatTimeInit" },
{ value: "QuestMainRepeatTimeRefresh", name: "QuestMainRepeatTimeRefresh" },
{ value: "QuestMainReward", name: "QuestMainReward" },
{ value: "QuestMailSend", name: "QuestMailSend" },
{ value: "QuestMainTask", name: "QuestMainTask" },
{ value: "QuestTaskUpdate", name: "QuestTaskUpdate" },
{ value: "RefuseFriendRequest", name: "RefuseFriendRequest" },
@@ -939,6 +952,9 @@ export const logDomain = [
{ value: "BattleSnapshot", name: "BattleSnapshot" },
{ value: "BeaconCreate", name: "BeaconCreate" },
{ value: "Beacon", name: "Beacon" },
{ value: "BeaconShop", name: "BeaconShop" },
{ value: "BeaconShopSoldRecord", name: "BeaconShopSoldRecord" },
{ value: "BeaconShopSoldPrice", name: "BeaconShopSoldPrice" },
{ value: "BrokerApi", name: "BrokerApi" },
{ value: "Buff", name: "Buff" },
{ value: "Building", name: "Building" },
@@ -962,6 +978,7 @@ export const logDomain = [
{ value: "FarmingReward", name: "FarmingReward" },
{ value: "GameLogInOut", name: "GameLogInOut" },
{ value: "Item", name: "Item" },
{ value: "IgmApi", name: "IgmApi" },
{ value: "MyHome", name: "MyHome" },
{ value: "Land", name: "Land" },
{ value: "LandAuction", name: "LandAuction" },
@@ -979,6 +996,9 @@ export const logDomain = [
{ value: "PackageLastOrderRecode", name: "PackageLastOrderRecode" },
{ value: "PackageRepeat", name: "PackageRepeat" },
{ value: "PackageState", name: "PackageState" },
{ value: "PlanetProviderAuth", name: "PlanetProviderAuth" },
{ value: "PlanetUserAuth", name: "PlanetUserAuth" },
{ value: "PlanetItemExchange", name: "PlanetItemExchange" },
{ value: "QuestMain", name: "QuestMain" },
{ value: "QuestUgq", name: "QuestUgq" },
{ value: "QuestMail", name: "QuestMail" },

View File

@@ -31,6 +31,7 @@ import { useAlert } from '../../../context/AlertProvider';
import { useLoading } from '../../../context/LoadingProvider';
import { alertTypes, currencyCodeTypes } from '../../../assets/data/types';
import { userType2 } from '../../../assets/data/options';
import { STORAGE_MAIL_COPY } from '../../../assets/data/adminConstants';
const MailDetailModal = ({ detailView, handleDetailView, content }) => {
const userInfo = useRecoilValue(authList);
@@ -285,7 +286,7 @@ const MailDetailModal = ({ detailView, handleDetailView, content }) => {
};
// 복사한 데이터를 세션 스토리지에 저장
sessionStorage.setItem('copyMailData', JSON.stringify(mailData));
sessionStorage.setItem(STORAGE_MAIL_COPY, JSON.stringify(mailData));
navigate('/servicemanage/mail/mailregist');
};

View File

@@ -6,7 +6,7 @@ import {
TableInfo,
} from '../../../styles/Components';
import { ORDER_OPTIONS, PAGE_SIZE_OPTIONS, ViewTitleCountType } from '../../../assets/data';
import { TitleItem, TitleItemLabel, TitleItemValue } from '../../../styles/ModuleComponents';
import { TitleItem, TitleItemLabel, TitleItemLink, TitleItemValue } from '../../../styles/ModuleComponents';
import { DynamoPagination } from '../index';
import React from 'react';
@@ -14,6 +14,8 @@ const ViewTableInfo = ({
children,
total,
total_all,
fail_count,
onFailCountClick,
orderType = 'desc',
handleOrderBy,
pageType = 'default',
@@ -28,7 +30,7 @@ const ViewTableInfo = ({
{total !== undefined && total_all !== undefined &&
<ListCount>
{COUNT_TYPE_RENDERERS[countType] ?
COUNT_TYPE_RENDERERS[countType](total, total_all) :
COUNT_TYPE_RENDERERS[countType](total, total_all, fail_count, onFailCountClick) :
COUNT_TYPE_RENDERERS[ViewTitleCountType.total](total, total_all)}
</ListCount>
}
@@ -52,7 +54,7 @@ const ViewTableInfo = ({
const COUNT_TYPE_RENDERERS = {
[ViewTitleCountType.total]: (total, total_all) => `총 : ${total ?? 0} 건 / ${total_all ?? 0}`,
[ViewTitleCountType.calium]: (total, total_all) => (
[ViewTitleCountType.calium]: (total, total_all, fail_count, onFailCountClick) => (
<>
<TitleItem>
<TitleItemLabel>누적 충전</TitleItemLabel>
@@ -62,6 +64,10 @@ const COUNT_TYPE_RENDERERS = {
<TitleItemLabel>잔여 수량</TitleItemLabel>
<TitleItemValue color='#B39063' fontWeight='bold'>{total ?? 0}</TitleItemValue>
</TitleItem>
<TitleItem>
<TitleItemLabel>에코시스템 실패</TitleItemLabel>
<TitleItemLink color='#D33B27' fontWeight='bold' onClick={onFailCountClick}>{fail_count ?? 0}</TitleItemLink>
</TitleItem>
</>
),
};

View File

@@ -32,7 +32,11 @@ import FrontPagination from '../../components/common/Pagination/FrontPagination'
import CircularProgress from '../../components/common/CircularProgress';
// import MessageInput from '../../components/common/input/MessageInput';
// import { AnalyzeAI } from '../../apis';
import { INITIAL_CURRENT_PAGE, INITIAL_PAGE_LIMIT } from '../../assets/data/adminConstants';
import {
INITIAL_CURRENT_PAGE,
INITIAL_PAGE_LIMIT,
STORAGE_BUSINESS_LOG_SEARCH,
} from '../../assets/data/adminConstants';
const BusinessLogView = () => {
const token = sessionStorage.getItem('token');
@@ -60,6 +64,24 @@ const BusinessLogView = () => {
updateSearchParams
} = useBusinessLogSearch(token, 500);
useEffect(() => {
// 세션 스토리지에서 복사된 메일 데이터 가져오기
const paramsData = sessionStorage.getItem(STORAGE_BUSINESS_LOG_SEARCH);
if (paramsData) {
const searchData = JSON.parse(paramsData);
handleSearch({
log_action: searchData.action,
start_dt: searchData.start_dt,
end_dt: searchData.end_dt
});
// 사용 후 세션 스토리지 데이터 삭제
sessionStorage.removeItem(STORAGE_BUSINESS_LOG_SEARCH);
}
}, []);
const handlePageSizeChange = (newSize) => {
setItemsPerPage(newSize);
setCurrentPage(1);

View File

@@ -36,6 +36,7 @@ import { alertTypes, currencyCodeTypes } from '../../assets/data/types';
import { useLoading } from '../../context/LoadingProvider';
import { useAlert } from '../../context/AlertProvider';
import { userType2 } from '../../assets/data/options';
import { STORAGE_MAIL_COPY } from '../../assets/data/adminConstants';
const MailRegist = () => {
const navigate = useNavigate();
@@ -95,7 +96,7 @@ const MailRegist = () => {
useEffect(() => {
// 세션 스토리지에서 복사된 메일 데이터 가져오기
const copiedMailData = sessionStorage.getItem('copyMailData');
const copiedMailData = sessionStorage.getItem(STORAGE_MAIL_COPY);
if (copiedMailData) {
const mailData = JSON.parse(copiedMailData);
@@ -118,7 +119,7 @@ const MailRegist = () => {
}
// 사용 후 세션 스토리지 데이터 삭제
sessionStorage.removeItem('copyMailData');
sessionStorage.removeItem(STORAGE_MAIL_COPY);
}
}, []);

View File

@@ -14,7 +14,7 @@ import { Title, FormWrapper, TableStyle, TableWrapper, PopupMessage } from '../.
import {
StatusWapper,
ChargeBtn,
StatusLabel,
StatusLabel, TitleItemLabel, TitleItemValue, TitleItem,
} from '../../styles/ModuleComponents';
import {Button, ExcelDownButton, Pagination, ViewTableInfo} from '../../components/common';
import { convertKTC, truncateText } from '../../utils';
@@ -22,13 +22,19 @@ import { CaliumRequestRegistModal } from '../../components/UserManage';
import { CaliumCharge, LogHistory } from '../../apis';
import { useModal, withAuth } from '../../hooks/hook';
import { CommonSearchBar, useCommonSearch } from '../../components/ServiceManage';
import { INITIAL_PAGE_LIMIT } from '../../assets/data/adminConstants';
import {
INITIAL_PAGE_LIMIT,
LOG_ACTION_FAIL_CALIUM_ECHO,
STORAGE_BUSINESS_LOG_SEARCH,
} from '../../assets/data/adminConstants';
import { useAlert } from '../../context/AlertProvider';
import { useLoading } from '../../context/LoadingProvider';
import { alertTypes } from '../../assets/data/types';
import useCommonSearchOld from '../../hooks/useCommonSearchOld';
import LogDetailModal from '../../components/common/modal/LogDetailModal';
import { historyTables } from '../../assets/data/data';
import { useNavigate } from 'react-router-dom';
import { logAction } from '../../assets/data/options';
const CaliumRequest = () => {
const token = sessionStorage.getItem('token');
@@ -36,6 +42,7 @@ const CaliumRequest = () => {
const { t } = useTranslation();
const { showModal, showToast } = useAlert();
const {withLoading} = useLoading();
const navigate = useNavigate();
const tableRef = useRef(null);
const [selectCharge, setSelectCharge] = useState({});
@@ -106,6 +113,25 @@ const CaliumRequest = () => {
handleSearch(updateSearchParams);
});
break;
case "logMove":
const searchParams = {
action: LOG_ACTION_FAIL_CALIUM_ECHO,
start_dt: (() => {
const date = new Date();
date.setDate(date.getDate() - 1);
return date;
})(),
end_dt: (() => {
const date = new Date();
date.setDate(date.getDate() - 1);
return date;
})(),
};
// 복사한 데이터를 세션 스토리지에 저장
sessionStorage.setItem(STORAGE_BUSINESS_LOG_SEARCH, JSON.stringify(searchParams));
navigate('/datamanage/businesslogview');
break;
}
}
@@ -126,7 +152,15 @@ const CaliumRequest = () => {
onReset={handleReset}
/>
</FormWrapper>
<ViewTableInfo total={dataList?.total} total_all={dataList?.total_all} handleOrderBy={handleOrderByChange} handlePageSize={handlePageSizeChange} countType={ViewTitleCountType.calium}>
<ViewTableInfo
total={dataList?.total}
total_all={dataList?.total_all}
fail_count={dataList?.failCount}
handleOrderBy={handleOrderByChange}
handlePageSize={handlePageSizeChange}
countType={ViewTitleCountType.calium}
onFailCountClick={() => handleSubmit('logMove')}
>
<ExcelDownButton tableRef={tableRef} fileName={t('FILE_CALIUM_REQUEST')} />
{userInfo.auth_list && userInfo.auth_list.some(auth => auth.id === authType.eventUpdate) && (
<Button

View File

@@ -735,6 +735,17 @@ export const TitleItemValue = styled.div`
color: ${props => props.color || 'black'};
`;
export const TitleItemLink = styled.a`
font-weight: ${props => props.fontWeight || 500};
color: ${props => props.color || 'black'};
text-decoration: none;
cursor: pointer;
&:hover {
text-decoration: underline;
}
`;
export const ChargeBtn = styled.button`
&&{
width: 60px;