From 737dc47d6060ac5d59f7a39a531f5421b40d8a5c Mon Sep 17 00:00:00 2001 From: Senthamilselvi Date: Wed, 5 Nov 2025 12:30:44 +0530 Subject: [PATCH] establishment user view details navigation done --- ipi-survey-platform/src/App.jsx | 4 +-- .../dashboard/SubmissionHistory.jsx | 26 ++++++++++++++----- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/ipi-survey-platform/src/App.jsx b/ipi-survey-platform/src/App.jsx index 22550aa..aac0ee5 100644 --- a/ipi-survey-platform/src/App.jsx +++ b/ipi-survey-platform/src/App.jsx @@ -213,7 +213,7 @@ function App() { + } @@ -221,7 +221,7 @@ function App() { + } diff --git a/ipi-survey-platform/src/components/dashboard/SubmissionHistory.jsx b/ipi-survey-platform/src/components/dashboard/SubmissionHistory.jsx index af066ea..10cdd5f 100644 --- a/ipi-survey-platform/src/components/dashboard/SubmissionHistory.jsx +++ b/ipi-survey-platform/src/components/dashboard/SubmissionHistory.jsx @@ -2,6 +2,8 @@ import React from 'react'; import { useNavigate } from 'react-router-dom'; import Table from '@/components/common/Table'; import Footer from '../common/Footer'; +import HeaderBar from '@/components/layout/HeaderBar'; +import DetailedOverview from '@/components/overview/DetailedOverview'; const searchIconSrc = '/assets/images/material-symbols_search-rounded.svg'; @@ -59,6 +61,7 @@ const downloadCsv = (rows) => { export const SubmissionHistory = ({ history = [], loading = false, error = '' }) => { const [searchTerm, setSearchTerm] = React.useState(''); + const [selectedSubmission, setSelectedSubmission] = React.useState(null); const navigate = useNavigate(); const normalizedHistory = React.useMemo(() => { @@ -84,11 +87,8 @@ export const SubmissionHistory = ({ history = [], loading = false, error = '' }) ); }); - // ✅ Updated navigation to match SubmissionTable pattern - const navigateToView = (id) => { - navigate(`/admin/validations/${id}`, { - state: { actionType: 'view' } - }); + const handleViewDetails = (rowData) => { + setSelectedSubmission(rowData); }; const rowsData = filteredRows.map((item) => { @@ -103,7 +103,7 @@ export const SubmissionHistory = ({ history = [], loading = false, error = '' }) {item.submission_on}, productLabel,