|
|
|
|
@@ -75,7 +75,8 @@ const LandInfoView = () => {
|
|
|
|
|
const {
|
|
|
|
|
selectedRows,
|
|
|
|
|
handleSelectRow,
|
|
|
|
|
isRowSelected
|
|
|
|
|
isRowSelected,
|
|
|
|
|
removeSelectedRows
|
|
|
|
|
} = useTable(dataList?.land_info_list || [], {mode: 'single'});
|
|
|
|
|
|
|
|
|
|
// const {
|
|
|
|
|
@@ -161,6 +162,13 @@ const LandInfoView = () => {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const handleDetailView = () => {
|
|
|
|
|
handleModalClose('detail');
|
|
|
|
|
handleSearch();
|
|
|
|
|
removeSelectedRows();
|
|
|
|
|
}
|
|
|
|
|
!loading && console.log(dataList?.land_info_list)
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Title>랜드 정보 조회</Title>
|
|
|
|
|
@@ -189,54 +197,56 @@ const LandInfoView = () => {
|
|
|
|
|
)}
|
|
|
|
|
</ViewTableInfo>
|
|
|
|
|
{loading ? <TableSkeleton width='100%' count={15} /> :
|
|
|
|
|
<TableWrapper>
|
|
|
|
|
<TableStyle ref={tableRef}>
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th width="40"></th>
|
|
|
|
|
<th width="150">랜드 ID</th>
|
|
|
|
|
<th>랜드 이름</th>
|
|
|
|
|
<th>랜드 상태</th>
|
|
|
|
|
<th>카테고리</th>
|
|
|
|
|
<th>랜드 크기</th>
|
|
|
|
|
<th>인스턴스 수</th>
|
|
|
|
|
<th>유저 소유 여부</th>
|
|
|
|
|
<th>보유자</th>
|
|
|
|
|
<th>보유시작일</th>
|
|
|
|
|
<th>낙찰 가격</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{dataList?.land_info_list?.map((data, index) => (
|
|
|
|
|
<Fragment key={index}>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<CheckBox name={'select'} id={data.id}
|
|
|
|
|
setData={(e) => handleSelectRow(e, data)}
|
|
|
|
|
checked={isRowSelected(data.id)} />
|
|
|
|
|
</td>
|
|
|
|
|
<td>{data.land_id}</td>
|
|
|
|
|
<td>{data.land_name}</td>
|
|
|
|
|
<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>
|
|
|
|
|
<td>{opLandOwnedType.find(option => option.value === data.owned)?.name}</td>
|
|
|
|
|
<td>{data.owner_user_nickname}</td>
|
|
|
|
|
{/*<td>{convertKTCDate(data.owner_user_create_date)}</td>*/}
|
|
|
|
|
<td>{data.owner_user_create_date}</td>
|
|
|
|
|
<td>{Number(data.owner_price) > 0 ? data.owner_price : ''}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</Fragment>
|
|
|
|
|
))}
|
|
|
|
|
</tbody>
|
|
|
|
|
</TableStyle>
|
|
|
|
|
</TableWrapper>
|
|
|
|
|
<>
|
|
|
|
|
<TableWrapper>
|
|
|
|
|
<TableStyle ref={tableRef}>
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th width="40"></th>
|
|
|
|
|
<th width="150">랜드 ID</th>
|
|
|
|
|
<th>랜드 이름</th>
|
|
|
|
|
<th>랜드 상태</th>
|
|
|
|
|
<th>카테고리</th>
|
|
|
|
|
<th>랜드 크기</th>
|
|
|
|
|
<th>인스턴스 수</th>
|
|
|
|
|
<th>유저 소유 여부</th>
|
|
|
|
|
<th>보유자</th>
|
|
|
|
|
<th>보유시작일</th>
|
|
|
|
|
<th>낙찰 가격</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{dataList?.land_info_list?.map((data, index) => (
|
|
|
|
|
<Fragment key={index}>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<CheckBox name={'select'} id={data.id}
|
|
|
|
|
setData={(e) => handleSelectRow(e, data)}
|
|
|
|
|
checked={isRowSelected(data.id)} />
|
|
|
|
|
</td>
|
|
|
|
|
<td>{data.land_id}</td>
|
|
|
|
|
<td>{data.land_name}</td>
|
|
|
|
|
<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>
|
|
|
|
|
<td>{opLandOwnedType.find(option => option.value === data.owned)?.name}</td>
|
|
|
|
|
<td>{data.owner_user_nickname}</td>
|
|
|
|
|
{/*<td>{convertKTCDate(data.owner_user_create_date)}</td>*/}
|
|
|
|
|
<td>{data.owner_user_create_date}</td>
|
|
|
|
|
<td>{Number(data.owner_price) > 0 ? data.owner_price : ''}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</Fragment>
|
|
|
|
|
))}
|
|
|
|
|
</tbody>
|
|
|
|
|
</TableStyle>
|
|
|
|
|
</TableWrapper>
|
|
|
|
|
<Pagination postsPerPage={searchParams.pageSize} totalPosts={dataList?.total_all} setCurrentPage={handlePageChange} currentPage={searchParams.currentPage} pageLimit={INITIAL_PAGE_LIMIT} />
|
|
|
|
|
</>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<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');handleSearch()}} content={detailData} setDetailData={setDetailData} />
|
|
|
|
|
<OwnerChangeModal modalType={modalType} detailView={modalState.detailModal} handleDetailView={() => handleDetailView()} content={detailData} setDetailData={setDetailData} />
|
|
|
|
|
|
|
|
|
|
<DynamicModal
|
|
|
|
|
modalType={modalTypes.completed}
|
|
|
|
|
|