fix: Grid excel download rename

mpower
minuk926 2 years ago
parent d760c5ebff
commit a18cd21cae

@ -17,7 +17,7 @@ import xitCmm, { ErrorToast, saveAlert } from 'commons/XitCmm';
import CmmModal from 'views/cmm/CmmModal'; import CmmModal from 'views/cmm/CmmModal';
import JudgeTargetSaveForm from 'views/biz/admin/judge/JudgeTargetSaveForm'; import JudgeTargetSaveForm from 'views/biz/admin/judge/JudgeTargetSaveForm';
import NumberFormat from 'react-number-format'; import NumberFormat from 'react-number-format';
import ExcelDownload from 'views/cmm/file-ctl/ExcelDownload'; import ExcelDownloadGrid from 'views/cmm/file-ctl/ExcelDownloadGrid';
import { findJudgeTargets, saveJudgeTargets } from 'apis/judge'; import { findJudgeTargets, saveJudgeTargets } from 'apis/judge';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import getYear from 'date-fns/getYear'; import getYear from 'date-fns/getYear';
@ -204,7 +204,7 @@ const JudgeRegistReview = ({ scDatagb, menuName }) => {
</Button> </Button>
</Grid> </Grid>
<Grid item> <Grid item>
<ExcelDownload <ExcelDownloadGrid
fileName={`${menuName} 의견진술 심의목록`} fileName={`${menuName} 의견진술 심의목록`}
gridColumns={columns} gridColumns={columns}
excelDatas={rowsState.rows} excelDatas={rowsState.rows}

@ -17,7 +17,7 @@ import xitCmm, { ErrorToast, saveAlert } from 'commons/XitCmm';
import CmmModal from 'views/cmm/CmmModal'; import CmmModal from 'views/cmm/CmmModal';
import SaveParkingTargetForm from './SaveParkingTargetForm'; import SaveParkingTargetForm from './SaveParkingTargetForm';
import NumberFormat from 'react-number-format'; import NumberFormat from 'react-number-format';
import ExcelDownload from 'views/cmm/file-ctl/ExcelDownload'; import ExcelDownloadGrid from 'views/cmm/file-ctl/ExcelDownloadGrid';
import { findParkingJudgeTargets, saveParkingJudgeTargets } from 'apis/parking'; import { findParkingJudgeTargets, saveParkingJudgeTargets } from 'apis/parking';
import getYear from 'date-fns/getYear'; import getYear from 'date-fns/getYear';
import { useAlert } from 'react-alert'; import { useAlert } from 'react-alert';
@ -205,7 +205,7 @@ const ParkingRegister = () => {
</Button> </Button>
</Grid> </Grid>
<Grid item> <Grid item>
<ExcelDownload fileName="심사등록대상" gridColumns={columns} excelDatas={rowsState.rows} isDisabled={totalCount === 0} /> <ExcelDownloadGrid fileName="심사등록대상" gridColumns={columns} excelDatas={rowsState.rows} isDisabled={totalCount === 0} />
</Grid> </Grid>
</Grid> </Grid>
</Grid> </Grid>

@ -5,7 +5,7 @@ import * as Excel from 'exceljs';
import saveAs from 'file-saver'; import saveAs from 'file-saver';
import { useAlert } from 'react-alert'; import { useAlert } from 'react-alert';
const ExcelDownload = ({ fileName, gridColumns, excelDatas, isDisabled = true }) => { const ExcelDownloadGrid = ({ fileName, gridColumns, excelDatas, isDisabled = true }) => {
const alert = useAlert(); const alert = useAlert();
const handleExcelDownload = () => { const handleExcelDownload = () => {
@ -101,11 +101,11 @@ const ExcelDownload = ({ fileName, gridColumns, excelDatas, isDisabled = true })
); );
}; };
ExcelDownload.propTypes = { ExcelDownloadGrid.propTypes = {
fileName: PropTypes.string.isRequired, fileName: PropTypes.string.isRequired,
gridColumns: PropTypes.array.isRequired, gridColumns: PropTypes.array.isRequired,
excelDatas: PropTypes.array.isRequired, excelDatas: PropTypes.array.isRequired,
isDisabled: PropTypes.bool.isRequired isDisabled: PropTypes.bool.isRequired
}; };
export default ExcelDownload; export default ExcelDownloadGrid;

Loading…
Cancel
Save