Implement Patent Application Dashboards, Multi-Step Forms, and Status Tracking#237
Implement Patent Application Dashboards, Multi-Step Forms, and Status Tracking#237Mohithreddy70 wants to merge 5 commits into
Conversation
patent: show backend COI error in PCC forward modal
…ionLogs, update status index logic in PCCAStatusView
Patent management v2
There was a problem hiding this comment.
The overall structure is solid — role-based routing, document version control, and multi-step forms all follow reasonable patterns. There are a few critical issues (token leak in an alert, backup files and Python debug scripts committed) that must be fixed before merge. See inline comments.
| @@ -0,0 +1,562 @@ | |||
| import { MantineProvider, createTheme } from "@mantine/core"; | |||
There was a problem hiding this comment.
Editor backup file committed — must be removed. App.jsx.backup and App.jsx.full_backup are local editor artifacts (562+ lines each) and should never be in the repository. Delete both files and add *.backup to .gitignore.
| import os | ||
| import re | ||
|
|
||
| backend_path = r"C:\Users\tanay\OneDrive\Desktop\Fusion1\Fusioncode\Fusion\FusionIIIT\applications\patent_system\services.py" |
There was a problem hiding this comment.
Debug script with a hardcoded personal file path committed to the repo. This file (and find_front.py, fix_comm.py, fix_pcca.py) are local dev scripts containing a Windows path C:\Users\tanay\OneDrive\... that only works on one specific developer's machine. All four Python files should be deleted from this PR — they have no place in a JavaScript frontend module.
| const role = useSelector((state) => state.user.role); | ||
|
|
||
| // Debug: Log the role to console | ||
| console.log("Patent Routes - Current Role:", role); |
There was a problem hiding this comment.
Remove console.log before merge. console.log("Patent Routes - Current Role:", role) is a debug statement in the production routing component. It will flood the browser console for every user on every page navigation within the patent module.
| "alumini", | ||
| "Professor", | ||
| "Associate Professor", | ||
| "Assistant Professor", |
There was a problem hiding this comment.
Typo: "alumini" should be "alumni". This will fail role matching if the backend sends "alumni".
| }, | ||
| ); | ||
| alert( | ||
| `Application submitted successfully! Token: ${response.data.token}`, |
There was a problem hiding this comment.
Security: auth token leaked in a success alert.
`Application submitted successfully! Token: ${response.data.token}`This displays the auth token to the user in a visible alert — leaking it to anyone looking at the screen, browser history, or accessibility tools. Remove the token from this string entirely:
`Application submitted successfully! Your application ID is ${response.data.application_id}.`| form_iii: null | ||
| }); | ||
|
|
||
| const authToken = localStorage.getItem("authToken"); |
There was a problem hiding this comment.
Remove console.log before merge. console.log("Populating edit form with existing application data:", application) logs the full application object (including potentially sensitive data) to the browser console on every edit modal open.
| const Examination = lazy(() => import("./Modules/Examination/examination")); | ||
| const ProgrammeCurriculumRoutes = lazy( | ||
| () => import("./Modules/Program_curriculum/programmCurriculum"), | ||
| ); |
There was a problem hiding this comment.
ValidateAuth and InactivityHandler are lazy-loaded but rendered without a <Suspense> boundary. They are imported with lazy() but used directly outside of <Routes> with no <Suspense fallback={...}> wrapper. If their chunks haven't loaded yet, React will throw an error at runtime. Wrap them:
<Suspense fallback={null}>
{!isLoginPage && <ValidateAuth />}
{!isLoginPage && <InactivityHandler />}
</Suspense>| return <Profile connectionRoute={`${host}/dep/api/profile/${username}/`} />; | ||
| } | ||
|
|
||
| export default function App() { |
There was a problem hiding this comment.
Custom breakpoints removed — may break existing components. The previous breakpoints (xxs: '300px', xs: '375px', etc. with px values) are replaced with Mantine's default em-based values. Any existing component that was responsive to the old custom breakpoints (especially xxs) will silently stop working at those widths. Verify this doesn't regress existing modules.
Frontend Implementation: Patent Dashboards & Application Workflow
Description
This PR introduces the user interface components required for applicants and administrators to interact with the patent lifecycle. The focus is on providing a clear, guided experience while adhering to system-defined workflows.
Key Changes
PMS-UC-001) featuring dynamic field validation and document upload components.PMS-UC-005) providing users with a real-time timeline, feedback history, and visibility into current application status.BR-PMS-005).PMS-UC-020) that allows users to track version history and view previous iterations of application files.PCC_ADMINto manage attorney assignments and for Directors to review and approve budget estimates.UI/UX Enhancements
A2: Incomplete Application).