랜드 소유권 변경 예약 처리 및 취소 처리

This commit is contained in:
2025-03-13 14:45:31 +09:00
parent 3efd663f0d
commit 5d9b6871fb
7 changed files with 160 additions and 81 deletions

View File

@@ -2,7 +2,15 @@ import { styled } from 'styled-components';
import { Link } from 'react-router-dom';
import React, { Fragment, useRef, useState } from 'react';
import { Title, TableStyle, BtnWrapper, ButtonClose, ModalText, FormWrapper } from '../../styles/Components';
import {
Title,
TableStyle,
BtnWrapper,
ButtonClose,
ModalText,
FormWrapper,
TableWrapper,
} from '../../styles/Components';
import Button from '../../components/common/button/Button';
@@ -19,7 +27,7 @@ import {
opLandOwnedType,
} from '../../assets/data';
import { useLandAuctionSearch } from '../../components/ServiceManage/searchBar/LandAuctionSearchBar';
import { INITIAL_PAGE_LIMIT, INITIAL_PAGE_SIZE } from '../../assets/data/adminConstants';
import { INITIAL_PAGE_LIMIT, INITIAL_PAGE_SIZE, TYPE_MODIFY } from '../../assets/data/adminConstants';
import { useTranslation } from 'react-i18next';
import { CheckBox, DynamicModal, ExcelDownButton, Pagination, ViewTableInfo } from '../../components/common';
import { LandAuctionSearchBar } from '../../components/ServiceManage';
@@ -29,6 +37,7 @@ import Loading from '../../components/common/Loading';
import { TableSkeleton } from '../../components/Skeleton/TableSkeleton';
import OwnerChangeModal from '../../components/ServiceManage/modal/OwnerChangeModal';
import { StatusLabel, StatusWapper } from '../../styles/ModuleComponents';
import { opLandInfoStatusType } from '../../assets/data/options';
const LandInfoView = () => {
const token = sessionStorage.getItem('token');
@@ -82,6 +91,10 @@ const LandInfoView = () => {
setAlertMsg(t('LAND_OWNED_CHANGES_WARNING'))
return;
}
const owner_changes = selectRow.owner_changes;
if(owner_changes.length > 0){
setModalType(TYPE_MODIFY);
}
setDetailData(selectRow);
handleModalView('detail');
break;
@@ -147,7 +160,6 @@ const LandInfoView = () => {
break;
}
}
console.log(dataList?.land_info_list)
return (
<>
@@ -205,12 +217,7 @@ const LandInfoView = () => {
</td>
<td>{data.land_id}</td>
<td>{data.land_name}</td>
<td>{data.status}</td>
{/*<StatusWapper>*/}
{/* <StatusLabel $status={data.status}>*/}
{/* {landAuctionStatus.find(option => option.value === data.status)?.name}*/}
{/* </StatusLabel>*/}
{/*</StatusWapper>*/}
<td>{opLandInfoStatusType.find(option => option.value === data.status)?.name}</td>
<td>{opLandCategoryType.find(option => option.value === data.category)?.name}</td>
<td>{landSize.find(option => option.value === data.land_size)?.name}</td>
<td>{data.socket}</td>
@@ -229,7 +236,7 @@ const LandInfoView = () => {
<Pagination postsPerPage={searchParams.pageSize} totalPosts={dataList?.total_all} setCurrentPage={handlePageChange} currentPage={searchParams.currentPage} pageLimit={INITIAL_PAGE_LIMIT} />
<OwnerChangeModal modalType={modalType} detailView={modalState.detailModal} handleDetailView={() => handleModalClose('detail')} content={detailData} setDetailData={setDetailData} />
<OwnerChangeModal modalType={modalType} detailView={modalState.detailModal} handleDetailView={() => {handleModalClose('detail');handleSearch()}} content={detailData} setDetailData={setDetailData} />
<DynamicModal
modalType={modalTypes.completed}
@@ -243,33 +250,34 @@ const LandInfoView = () => {
export default withAuth(authType.landRead)(LandInfoView);
const TableWrapper = styled.div`
overflow: auto;
border-top: 1px solid #000;
&::-webkit-scrollbar {
height: 4px;
}
&::-webkit-scrollbar-thumb {
background: #666666;
}
&::-webkit-scrollbar-track {
background: #d9d9d9;
}
thead {
th {
position: sticky;
top: 0;
z-index: 10;
}
}
${TableStyle} {
min-width: 1000px;
th {
position: sticky;
top: 0;
}
}
`;
// const TableWrapper = styled.div`
// overflow: auto;
// border-top: 1px solid #000;
// z-index: 1;
// &::-webkit-scrollbar {
// height: 4px;
// }
// &::-webkit-scrollbar-thumb {
// background: #666666;
// }
// &::-webkit-scrollbar-track {
// background: #d9d9d9;
// }
// thead {
// th {
// position: sticky;
// top: 0;
// z-index: 10;
// }
// }
// ${TableStyle} {
// min-width: 1000px;
// th {
// position: sticky;
// top: 0;
// }
// }
// `;
const LandLink = styled(Link)`
color: #61a2d0;