diff --git a/src/components/laanc/LaancGrid.js b/src/components/laanc/LaancGrid.js new file mode 100644 index 00000000..363a4b8c --- /dev/null +++ b/src/components/laanc/LaancGrid.js @@ -0,0 +1,170 @@ +import { useState } from 'react'; +import { GridDatabase } from '@src/components/crud/grid/GridDatatable'; +import { Row, Col, Card, Spinner, Button } from 'reactstrap'; + +import { useSelector } from 'react-redux'; +import moment from 'moment'; + +const data = [ + { + name: '김장현', + flightStart: '2023-09-26', + flightEnd: '2023-09-26', + apploveType: '승인', + weight: '2kg', + altitude: '100' + } +]; + +function LaancGrid() { + const { scheduleList } = useSelector(state => state.flightState); + const { loading } = useSelector(state => state.loadingReducer); + + const fillZero = (width, str) => { + return str.length >= width + ? str + : new Array(width - str.length + 1).join('0') + str; //남는 길이만큼 0으로 채움 + }; + + const columns = [ + { + name: '조종사 성명', + selector: row => row.name, + minWidth: '150px', + sortable: true, + cell: row => { + return row.name; + } + }, + + { + name: '비행시작일시', + selector: row => row.flightStart, + minWidth: '150px', + sortable: true, + cell: row => { + return moment(row.flightStart).format('YYYY-MM-DD'); + } + }, + + { + name: '비행종료일시', + selector: row => row.flightEnd, + minWidth: '150px', + sortable: true, + cell: row => { + return moment(row.flightEnd).format('YYYY-MM-DD'); + } + }, + + { + name: '승인유형', + selector: row => row.apploveType, + minWidth: '150px', + sortable: true, + cell: row => { + return row.apploveType; + } + }, + { + name: '기체중량', + selector: row => row.weight, + minWidth: '150px', + sortable: true, + cell: row => { + return row.weight; + } + }, + { + name: '고도', + selector: row => row.altitude, + minWidth: '150px', + sortable: true, + cell: row => { + return row.altitude; + } + }, + { + name: '신청기관', + // selector: row => row.altitude, + minWidth: '150px', + sortable: true, + cell: row => { + return '원스톱'; + } + }, + { + name: '', + // selector: row => row.altitude, + minWidth: '150px', + sortable: true, + cell: row => { + return ( + {}}> + 상세보기 + + ); + } + }, + { + name: '', + // selector: row => row.altitude, + minWidth: '150px', + sortable: true, + cell: row => { + return ( + {}}> + 공문 다운로드 + + ); + } + } + ]; + + return ( +
+ + +
+
+
+

LAANC 승인 신청 목록

+ 검색결과 총 {data.length}건 +
+
+
+
+ +
+ {loading ? ( +
+
+ + Loading... +
+
+ ) : null} + +
+
+
+ +
+
+ ); +} + +export default LaancGrid; diff --git a/src/components/laanc/LaancSearch.js b/src/components/laanc/LaancSearch.js new file mode 100644 index 00000000..df3862db --- /dev/null +++ b/src/components/laanc/LaancSearch.js @@ -0,0 +1,71 @@ +import { useState } from 'react'; +import { Row, Col, Button, Card, CardBody } from 'reactstrap'; +import { Search, Calendar } from 'react-feather'; +import Flatpickr from 'react-flatpickr'; +import moment from 'moment'; + +function LaancSearch() { + const [date, setDate] = useState( + moment().subtract('day').format('YYYY-MM-DD') + ); + + const handlerChangeDate = val => { + setDate(moment(val[0]).format('YYYY-MM-DD')); + }; + + return ( +
+ + +
+
+

검색조건

+
+
+ {}}> + + 검색 + +
+
+ + +
+
+
+
+
신청일
+
+
+ + +
+ + +
+ +
+
+
+
+
+
+
+
+
+ +
+
+ ); +} + +export default LaancSearch; diff --git a/src/containers/laanc/LaancContainer.js b/src/containers/laanc/LaancContainer.js index f04c5a6d..660cd825 100644 --- a/src/containers/laanc/LaancContainer.js +++ b/src/containers/laanc/LaancContainer.js @@ -1,18 +1,18 @@ -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { useHistory, useLocation } from 'react-router-dom'; +import { Row, Col, Button, Badge } from 'reactstrap'; import moment from 'moment'; -import FlightPlanGrid from '../../components/basis/flight/plan/FlightPlanGrid'; -import { CustomMainLayout } from '../../components/layout/CustomMainLayout'; -import FlightPlanSearch from '../../components/basis/flight/plan/FlightPlanSearch'; import { useDispatch, useSelector, shallowEqual } from 'react-redux'; +import { CustomMainLayout } from '../../components/layout/CustomMainLayout'; import * as FlightAction from '../../modules/basis/flight/actions/basisFlightAction'; -import { Row, Col, Button } from 'reactstrap'; import { JOIN_LIST, GROUP_LIST } from '../../modules/basis/group/actions/basisGroupAction'; -import FlightPlanGroupGrid from '../../components/basis/flight/plan/FlightPlanGroupGrid'; import LaancPlanContainer from './LaancPlanContainer'; +import LaancSearch from '../../../src/components/laanc/LaancSearch'; +import LaancGrid from '../../../src/components/laanc/LaancGrid'; + const initSearchData = { schFltStDt: moment() .set({ date: 1, h: 0, m: 0, s: 0 }) @@ -30,7 +30,7 @@ export default function LaancContainer() { const history = useHistory(); const [open, setOpen] = useState(false); const [currentParm, setCurrentParm] = useState(false); - const [disabledAnimation, setDisabledAnimation] = useState(true); + const [disabledAnimation, setDisabledAnimation] = useState(false); const [searchData, setSerchData] = useState(initSearchData); const { list: planListData, @@ -57,8 +57,7 @@ export default function LaancContainer() { useEffect(() => { // URL 쿼리 파라미터 중 'map' 값을 가져옵니다. - setOpen(mapParam); - console.log('여기타니????????'); + setDisabledAnimation(mapParam); }, [location]); useEffect(() => { @@ -197,6 +196,13 @@ export default function LaancContainer() { return ( +
+ 상업용 또는 비 상업용이며, 기체최대이륙중량이 2KG 초과 시 기체등록은 + 필수입니다.{' '} + + 기체신고대상 및 기준 자세히보기 + +