RePrint Detailds if no found data Print Icon Disable
This commit is contained in:
parent
626b3b502a
commit
c01a3baa98
|
|
@ -90,6 +90,8 @@ const ReprintReasonReportList = () => {
|
|||
const [message, setMessage] = useState({ type: null, data: null });
|
||||
const [searchedText, setSearchedText] = useState('');
|
||||
const [tableData, setTableData] = useState([]);
|
||||
console.log(tableData, 'tableData23232');
|
||||
|
||||
const [fromDate, setFromDate] = useState();
|
||||
const [toDate, setToDate] = useState();
|
||||
const [page, setpage] = useState(1);
|
||||
|
|
@ -103,21 +105,21 @@ const ReprintReasonReportList = () => {
|
|||
index: index + 1
|
||||
}));
|
||||
|
||||
const items = [
|
||||
{
|
||||
name: 'Home',
|
||||
link: `${subDirectory}app-page/home`,
|
||||
},
|
||||
|
||||
{
|
||||
name: 'Reprint Details',
|
||||
link: `${subDirectory}report/reprintreasonreport`,
|
||||
},
|
||||
];
|
||||
|
||||
useEffect(() => {
|
||||
dispatch(changeBreadCrumb({ items: items }));
|
||||
}, []);
|
||||
const items = [
|
||||
{
|
||||
name: 'Home',
|
||||
link: `${subDirectory}app-page/home`,
|
||||
},
|
||||
|
||||
{
|
||||
name: 'Reprint Details',
|
||||
link: `${subDirectory}report/reprintreasonreport`,
|
||||
},
|
||||
];
|
||||
|
||||
useEffect(() => {
|
||||
dispatch(changeBreadCrumb({ items: items }));
|
||||
}, []);
|
||||
const columns = [
|
||||
{
|
||||
title: 'Sl.No',
|
||||
|
|
@ -463,11 +465,13 @@ const ReprintReasonReportList = () => {
|
|||
>
|
||||
<BiSolidPrinter
|
||||
onClick={Print}
|
||||
className={
|
||||
tableData?.length > 0
|
||||
? 'ItemWiseReport-printerIcon'
|
||||
: 'ItemWiseReport-printerIcon-disabled'
|
||||
}
|
||||
style={{
|
||||
fontSize: '24px',
|
||||
cursor: tableData?.length > 0 ? 'pointer' : 'not-allowed',
|
||||
opacity: tableData?.length > 0 ? 1 : 0.5,
|
||||
pointerEvents: tableData?.length > 0 ? 'auto' : 'none'
|
||||
}}
|
||||
|
||||
/>
|
||||
{/* <div
|
||||
style={{
|
||||
|
|
@ -501,20 +505,20 @@ const ReprintReasonReportList = () => {
|
|||
</Form.Item>
|
||||
</div>
|
||||
</div> */}
|
||||
<div style={{paddingTop:'15px'}}>
|
||||
<Form.Item name="DateRange">
|
||||
<DatePicker.RangePicker
|
||||
format={'DD/MM/YYYY'}
|
||||
value={
|
||||
fromDate && toDate
|
||||
? [dayjs(fromDate, 'DD-MM-YYYY HH:mm:ss'), dayjs(toDate, 'DD-MM-YYYY HH:mm:ss')]
|
||||
: null
|
||||
}
|
||||
onChange={onChange_Pending_DateRange}
|
||||
disabledDate={(current) => current && current > dayjs()}
|
||||
/>
|
||||
</Form.Item>
|
||||
</div>
|
||||
<div style={{ paddingTop: '15px' }}>
|
||||
<Form.Item name="DateRange">
|
||||
<DatePicker.RangePicker
|
||||
format={'DD/MM/YYYY'}
|
||||
value={
|
||||
fromDate && toDate
|
||||
? [dayjs(fromDate, 'DD-MM-YYYY HH:mm:ss'), dayjs(toDate, 'DD-MM-YYYY HH:mm:ss')]
|
||||
: null
|
||||
}
|
||||
onChange={onChange_Pending_DateRange}
|
||||
disabledDate={(current) => current && current > dayjs()}
|
||||
/>
|
||||
</Form.Item>
|
||||
</div>
|
||||
|
||||
</Form>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue