Browse Source

비행계획서 - 상세 -> 상세보기 동일하게 수정

pull/2/head
이학준 2 years ago
parent
commit
0f37321946
  1. 2
      src/components/basis/flight/aprv/FlightPlanAprvGrid.js
  2. 59
      src/components/basis/flight/plan/FlightPlanGrid.js

2
src/components/basis/flight/aprv/FlightPlanAprvGrid.js

@ -93,7 +93,7 @@ const FlightPlanAprvGrid = ({
cell: row => { cell: row => {
return ( return (
<Link to={`/basis/flight/plan/detail/${row.planSno}`} size='sm'> <Link to={`/basis/flight/plan/detail/${row.planSno}`} size='sm'>
상세 상세보기
</Link> </Link>
); );
} }

59
src/components/basis/flight/plan/FlightPlanGrid.js

@ -4,25 +4,41 @@ import { GridDatabase } from '../../../crud/grid/GridDatatable';
import { Redirect } from 'react-router-dom'; import { Redirect } from 'react-router-dom';
import { Link, useHistory } from 'react-router-dom'; import { Link, useHistory } from 'react-router-dom';
const FlightPlanGrid = ({ movePage, planListData }) => { const FlightPlanGrid = ({ movePage, planListData }) => {
const columns = [ const columns = [
{ id: 'planSno', name: '번호', cell: (row, i) => (<div>{i + 1}</div>) }, { id: 'planSno', name: '번호', cell: (row, i) => <div>{i + 1}</div> },
{ id: 'fltPurpose', name: '비행목적', cell: row => (<div>{row.fltPurpose}</div>) }, {
id: 'fltPurpose',
name: '비행목적',
cell: row => <div>{row.fltPurpose}</div>
},
{ {
id: 'fltMethod', name: '비행방식', cell: row => { id: 'fltMethod',
const displayName = row.areaList && row.areaList.length > 0 && row.areaList[0].fltMethod || '-'; name: '비행방식',
return <div>{displayName}</div> cell: row => {
const displayName =
(row.areaList &&
row.areaList.length > 0 &&
row.areaList[0].fltMethod) ||
'-';
return <div>{displayName}</div>;
} }
}, },
{ id: 'schFltStDt', name: '출발일', cell: row => (<div>{row.schFltStDt}</div>) },
{ id: 'aprvlYn', name: '승인여부', cell: row => (<div>{row.aprvlYn}</div>) },
{ {
id: 'moveDetail', name: '상세보기', cell: row => { id: 'schFltStDt',
return <Link name: '출발일',
to={`/basis/flight/plan/detail/${row.planSno}`} cell: row => <div>{row.schFltStDt}</div>
size='sm'>상세</Link>; },
{ id: 'aprvlYn', name: '승인여부', cell: row => <div>{row.aprvlYn}</div> },
{
id: 'moveDetail',
name: '상세보기',
cell: row => {
return (
<Link to={`/basis/flight/plan/detail/${row.planSno}`} size='sm'>
상세보기
</Link>
);
} }
} }
]; ];
@ -31,18 +47,15 @@ const FlightPlanGrid = ({ movePage, planListData }) => {
<div className='mt-2'> <div className='mt-2'>
<Row> <Row>
<Col> <Col>
<div <div className='cont-ti d-flex justify-content-between align-items-sm-center align-items-start flex-sm-row'>
className='cont-ti d-flex justify-content-between align-items-sm-center align-items-start flex-sm-row'>
<div> <div>
<h4>비행계획서 신청 목록</h4> <h4>비행계획서 신청 목록</h4>
<span className='search-case'>검색결과 {!!planListData ? planListData.length : 0}</span> <span className='search-case'>
검색결과 {!!planListData ? planListData.length : 0}
</span>
</div> </div>
<div className='d-flex align-items-center'> <div className='d-flex align-items-center'>
<Button.Ripple <Button.Ripple color='primary' size='sm' onClick={movePage}>
color='primary'
size='sm'
onClick={movePage}
>
{/* 계획서 생성 */} {/* 계획서 생성 */}
비행계획서 신청 비행계획서 신청
</Button.Ripple> </Button.Ripple>
@ -65,7 +78,7 @@ const FlightPlanGrid = ({ movePage, planListData }) => {
</Col> </Col>
</Row> </Row>
</div> </div>
) );
} };
export default FlightPlanGrid; export default FlightPlanGrid;

Loading…
Cancel
Save