Browse Source

Merge branch 'master' of http://gitea.palntour.com/pav/pav-home

pull/2/head
sanguu 2 years ago
parent
commit
31fdfa8af4
  1. 26
      src/components/basis/flight/schedule/FlightScheduleGrid.js
  2. 1
      src/components/crud/grid/GridDatatable.js
  3. 15
      src/components/crud/grid/selectableRowsComponent.js

26
src/components/basis/flight/schedule/FlightScheduleGrid.js

@ -30,7 +30,7 @@ function FlightScheduleGrid() {
const columns = [
{
name: '그룹 명',
selector: 'groupNm',
selector: row => row.groupNm,
minWidth: '150px',
sortable: true,
cell: row => {
@ -57,7 +57,7 @@ function FlightScheduleGrid() {
},
{
name: '기체 소유자',
selector: 'ownerNm',
selector: row => row.ownerNm,
minWidth: '150px',
sortable: true,
cell: row => {
@ -66,7 +66,7 @@ function FlightScheduleGrid() {
},
{
name: '기체 식별번호',
selector: 'idntfNum',
selector: row => row.idntfNum,
minWidth: '150px',
sortable: true,
cell: row => {
@ -75,7 +75,7 @@ function FlightScheduleGrid() {
},
{
name: '출발지',
selector: 'startAddress',
selector: row => row.startAddress,
minWidth: '150px',
sortable: true,
cell: row => {
@ -84,7 +84,7 @@ function FlightScheduleGrid() {
},
{
name: '비행 시작 시간',
selector: 'schFltStDt ',
selector: row => row.schFltStDt,
minWidth: '150px',
sortable: true,
cell: row => {
@ -93,7 +93,7 @@ function FlightScheduleGrid() {
},
{
name: '도착지',
selector: 'endAddress',
selector: row => row.endAddress,
minWidth: '150px',
sortable: true,
cell: row => {
@ -102,7 +102,7 @@ function FlightScheduleGrid() {
},
{
name: '비행 종료 시간',
selector: 'schFltEndDt',
selector: row => row.schFltEndDt,
minWidth: '150px',
sortable: true,
cell: row => {
@ -111,7 +111,7 @@ function FlightScheduleGrid() {
},
{
name: '총 예상 비행시간',
selector: 'groupNm',
selector: row => row.groupNm,
minWidth: '150px',
sortable: true,
cell: row => {
@ -133,7 +133,7 @@ function FlightScheduleGrid() {
},
{
name: '상태',
selector: 'statusCd',
selector: row => row.statusCd,
minWidth: '150px',
sortable: true,
cell: row => {
@ -151,10 +151,10 @@ function FlightScheduleGrid() {
const conditionalRowStyles = [
{
when: row => true,
style: {
backgroundColor: 'red'
}
when: row => {
return true;
},
classNames: ['primary']
}
];

1
src/components/crud/grid/GridDatatable.js

@ -41,6 +41,7 @@ export const GridDatabase = props => {
{...(props.onSelectedRowsChange
? { onSelectedRowsChange: props.onSelectedRowsChange }
: {})}
conditionalRowStyles={props.conditionalRowStyles}
/>
</div>
</>

15
src/components/crud/grid/selectableRowsComponent.js

@ -3,15 +3,22 @@ import React from 'react';
export const selectableRowsComponent = React.forwardRef(
({ onClick, ...rest }, ref) => {
let c = new Date().getTime() + Math.random();
return (
<>
<CustomInput
id={new Date().getTime() + Math.random()}
<div
className='custom-checkbox custom-control'
style={{ paddingLeft: 0 }}
>
<input
className='custom-control-input'
id={c}
type='checkbox'
ref={ref}
onClick={onClick}
{...rest}
/>
</>
<label className='custom-control-label' for={c} />
</div>
);
}
);

Loading…
Cancel
Save