diff --git a/ipi-survey-platform/src/App.jsx b/ipi-survey-platform/src/App.jsx index 6aa0c60..50c2289 100644 --- a/ipi-survey-platform/src/App.jsx +++ b/ipi-survey-platform/src/App.jsx @@ -64,7 +64,7 @@ function App() { + )} @@ -72,7 +72,7 @@ function App() { + )} diff --git a/ipi-survey-platform/src/components/dashboard/SubmissionHistory.jsx b/ipi-survey-platform/src/components/dashboard/SubmissionHistory.jsx index 036d2b8..af066ea 100644 --- a/ipi-survey-platform/src/components/dashboard/SubmissionHistory.jsx +++ b/ipi-survey-platform/src/components/dashboard/SubmissionHistory.jsx @@ -65,7 +65,7 @@ export const SubmissionHistory = ({ history = [], loading = false, error = '' }) if (!Array.isArray(history)) return []; return history.map((entry, index) => ({ id: entry?.id ?? index, - survey_name: 'Industrial Producation Survey', + survey_name: 'Industrial Production Survey', year: entry?.year || '—', quarter: entry?.quarter || '—', status: entry?.status || 'Pending', @@ -84,7 +84,12 @@ export const SubmissionHistory = ({ history = [], loading = false, error = '' }) ); }); - const navigateToView = (id) => navigate(`/history/${id}`); + // ✅ Updated navigation to match SubmissionTable pattern + const navigateToView = (id) => { + navigate(`/admin/validations/${id}`, { + state: { actionType: 'view' } + }); + }; const rowsData = filteredRows.map((item) => { const productCount = Number(item.products) || 0; @@ -95,10 +100,10 @@ export const SubmissionHistory = ({ history = [], loading = false, error = '' }) item.year, item.quarter, {item.status}, - {item.submission_on}, + {item.submission_on}, productLabel,