|
|
@ -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;
|
|
|
|