알람루트 추가
This commit is contained in:
@@ -4,6 +4,8 @@ import { useEffect, useState } from 'react';
|
|||||||
import { QnaDetail } from '@/entities/support/ui/detail/qna-detail';
|
import { QnaDetail } from '@/entities/support/ui/detail/qna-detail';
|
||||||
import { SettlementDetail } from '@/entities/settlement/ui/detail/settlement-detail';
|
import { SettlementDetail } from '@/entities/settlement/ui/detail/settlement-detail';
|
||||||
import { SettlementPeriodType } from '@/entities/settlement/model/types';
|
import { SettlementPeriodType } from '@/entities/settlement/model/types';
|
||||||
|
import { useNavigate } from '@/shared/lib/hooks';
|
||||||
|
import { PATHS } from '@/shared/constants/paths';
|
||||||
|
|
||||||
export interface AlarmRoutesProps {
|
export interface AlarmRoutesProps {
|
||||||
options?: AlarmLinkOptions;
|
options?: AlarmLinkOptions;
|
||||||
@@ -12,6 +14,8 @@ export interface AlarmRoutesProps {
|
|||||||
export const AlarmRoutes = ({
|
export const AlarmRoutes = ({
|
||||||
options
|
options
|
||||||
}: AlarmRoutesProps) => {
|
}: AlarmRoutesProps) => {
|
||||||
|
const { navigate } = useNavigate();
|
||||||
|
|
||||||
const [noticeDetailOn, setNoticeDetailOn] = useState<boolean>(false);
|
const [noticeDetailOn, setNoticeDetailOn] = useState<boolean>(false);
|
||||||
const [qnaDetailOn, setQnaDetailOn] = useState<boolean>(false);
|
const [qnaDetailOn, setQnaDetailOn] = useState<boolean>(false);
|
||||||
const [settlementDetailOn, setSettlementDetailOn] = useState<boolean>(false);
|
const [settlementDetailOn, setSettlementDetailOn] = useState<boolean>(false);
|
||||||
@@ -41,6 +45,9 @@ export const AlarmRoutes = ({
|
|||||||
setQnaDetailOn(true);
|
setQnaDetailOn(true);
|
||||||
setSettlementDetailOn(false);
|
setSettlementDetailOn(false);
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
navigate(PATHS.support.qna.list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(linkUrl.indexOf('/settlement/list/') > -1){
|
else if(linkUrl.indexOf('/settlement/list/') > -1){
|
||||||
const id = linkUrl.replace('/settlement/list/', '').trim();
|
const id = linkUrl.replace('/settlement/list/', '').trim();
|
||||||
@@ -51,6 +58,9 @@ export const AlarmRoutes = ({
|
|||||||
setSettlementDetailOn(true);
|
setSettlementDetailOn(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(linkUrl.indexOf('/home/') > -1){
|
||||||
|
navigate(PATHS.home);
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
if(linkUrl.indexOf('http') > -1){
|
if(linkUrl.indexOf('http') > -1){
|
||||||
window.open(linkUrl);
|
window.open(linkUrl);
|
||||||
|
|||||||
@@ -1,17 +1,11 @@
|
|||||||
import { PATHS } from '@/shared/constants/paths';
|
|
||||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
|
||||||
import { CashReceiptListProps } from '../model/types';
|
import { CashReceiptListProps } from '../model/types';
|
||||||
import { ListDateGroup } from './list-date-group';
|
import { ListDateGroup } from './list-date-group';
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
export const CashReceiptList = ({
|
export const CashReceiptList = ({
|
||||||
transactionCategory,
|
transactionCategory,
|
||||||
listItems,
|
listItems,
|
||||||
setDetailData
|
setDetailData
|
||||||
}: CashReceiptListProps) => {
|
}: CashReceiptListProps) => {
|
||||||
const { navigate } = useNavigate();
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const getListDateGroup = () => {
|
const getListDateGroup = () => {
|
||||||
let rs = [];
|
let rs = [];
|
||||||
let date = '';
|
let date = '';
|
||||||
@@ -62,7 +56,6 @@ export const CashReceiptList = ({
|
|||||||
<div className="transaction-list">
|
<div className="transaction-list">
|
||||||
{ getListDateGroup() }
|
{ getListDateGroup() }
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user