- 부가서비스 스크롤 중 필터 체크 마크 추가
- 자금이체,알림톡 스크롤 중 DateGroup 누락 수정
This commit is contained in:
@@ -10,34 +10,35 @@ export const PayoutList = ({
|
||||
searchDateType,
|
||||
mid,
|
||||
setDetailData,
|
||||
onClickToOpenFilter,
|
||||
onClickToOpenDownloadBottomSheet
|
||||
filterUsed,
|
||||
onClickToOpenFilter,
|
||||
onClickToOpenDownloadBottomSheet
|
||||
}: PayoutListProps) => {
|
||||
const { t, i18n } = useTranslation();
|
||||
|
||||
|
||||
const [groupDate, setGroupDate] = useState<string>('');
|
||||
const [groupDateOn, setGroupDateOn] = useState<boolean>(false);
|
||||
|
||||
const [groupDateOn, setGroupDateOn] = useState<boolean>(false);
|
||||
|
||||
const [listHeight, setListHeight] = useState<number>(0);
|
||||
|
||||
const getListDateGroup = () => {
|
||||
let rs = [];
|
||||
let date = '';
|
||||
let list = [];
|
||||
for (let i=0;i<listItems.length;i++){
|
||||
for (let i = 0; i < listItems.length; i++) {
|
||||
let itemDateStr = '';
|
||||
if(searchDateType === PayoutSearchDateType.REQUEST_DATE){
|
||||
if (searchDateType === PayoutSearchDateType.REQUEST_DATE) {
|
||||
itemDateStr = listItems[i]?.requestDate || '';
|
||||
}
|
||||
else if(searchDateType === PayoutSearchDateType.SETTLEMENT_DATE){
|
||||
else if (searchDateType === PayoutSearchDateType.SETTLEMENT_DATE) {
|
||||
itemDateStr = listItems[i]?.settlementDate || '';
|
||||
}
|
||||
let itemDate = itemDateStr.substring(0, 8);
|
||||
if(i === 0){
|
||||
if (i === 0) {
|
||||
date = itemDate;
|
||||
}
|
||||
if(date !== itemDate){
|
||||
if(list.length > 0){
|
||||
if (date !== itemDate) {
|
||||
if (list.length > 0) {
|
||||
rs.push(
|
||||
<ListDateGroup
|
||||
additionalServiceCategory={additionalServiceCategory}
|
||||
@@ -54,7 +55,7 @@ export const PayoutList = ({
|
||||
}
|
||||
list.push(listItems[i] as any);
|
||||
}
|
||||
if(list.length > 0){
|
||||
if (list.length > 0) {
|
||||
rs.push(
|
||||
<ListDateGroup
|
||||
additionalServiceCategory={additionalServiceCategory}
|
||||
@@ -78,7 +79,7 @@ export const PayoutList = ({
|
||||
tabContent?.addEventListener('scroll', (e: Event) => {
|
||||
setScrollAction(e, setGroupDate, setGroupDateOn);
|
||||
});
|
||||
|
||||
|
||||
return () => {
|
||||
ListScrollOn(false);
|
||||
tabContent?.removeEventListener('scroll', (e: Event) => {
|
||||
@@ -89,30 +90,32 @@ export const PayoutList = ({
|
||||
|
||||
return (
|
||||
<>
|
||||
{ groupDateOn &&
|
||||
<div className="summary-amount scroll-group-date">
|
||||
<span className="amount-text">{ groupDate }</span>
|
||||
<div className="summary-actions">
|
||||
<button className="filter-btn">
|
||||
<img
|
||||
src={ IMAGE_ROOT + '/ico_setting.svg' }
|
||||
alt={t('transaction.searchOptions')}
|
||||
onClick={ onClickToOpenFilter }
|
||||
/>
|
||||
</button>
|
||||
<button className="download-btn">
|
||||
<img
|
||||
src={ IMAGE_ROOT + '/ico_download.svg' }
|
||||
alt={t('transaction.download')}
|
||||
onClick={ onClickToOpenDownloadBottomSheet }
|
||||
/>
|
||||
</button>
|
||||
{groupDateOn &&
|
||||
<div className="summary-amount scroll-group-date">
|
||||
<span className="amount-text">{groupDate}</span>
|
||||
<div className="summary-actions">
|
||||
<button className="filter-btn">
|
||||
<img
|
||||
src={IMAGE_ROOT + '/ico_setting.svg'}
|
||||
alt={t('transaction.searchOptions')}
|
||||
onClick={onClickToOpenFilter}
|
||||
/>
|
||||
{filterUsed &&
|
||||
<span className="notification-badge2"></span>
|
||||
}
|
||||
</button>
|
||||
<button className="download-btn">
|
||||
<img
|
||||
src={IMAGE_ROOT + '/ico_download.svg'}
|
||||
alt={t('transaction.download')}
|
||||
onClick={onClickToOpenDownloadBottomSheet}
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<section
|
||||
<section
|
||||
className="transaction-list"
|
||||
style={{ height: (listHeight > 0)? listHeight + 'px': 'unset' }}
|
||||
>
|
||||
{getListDateGroup()}
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user