filter fixed

This commit is contained in:
naveen prabhu 2026-06-10 16:52:45 +05:30
parent 10df4cb741
commit 01be34ae6f

View File

@ -354,9 +354,12 @@ const ManufacturingIndex = () => {
response?.data?.message || 'Survey auto-submit request sent successfully.'
);
// After auto-submit, fetch the filtered manufacturing index for selected year/quarter
// After auto-submit, fetch the filtered manufacturing index for selected year and quarter/all
try {
const filteredResp = await getManufacturingIndexFiltered(parseInt(year, 10), quarter);
const filteredResp = await getManufacturingIndexFiltered(
parseInt(year, 10),
quarter === 'All' ? undefined : quarter
);
// Extract array similar to initial fetch
let dataArray = [];
@ -736,7 +739,7 @@ const ManufacturingIndex = () => {
onChange={handleQuarterChange}
className="w-auto h-[40px]"
size="small"
options={['Q1', 'Q2', 'Q3', 'Q4'].map(q => ({ value: q, label: q }))}
options={['All', 'Q1', 'Q2', 'Q3', 'Q4'].map(q => ({ value: q, label: q }))}
/>
</div>
<button