Skip to content

Implement Patent Application Dashboards, Multi-Step Forms, and Status Tracking#237

Open
Mohithreddy70 wants to merge 5 commits into
FusionIIIT:patent-management-v2from
Mohithreddy70:patent-management-v2
Open

Implement Patent Application Dashboards, Multi-Step Forms, and Status Tracking#237
Mohithreddy70 wants to merge 5 commits into
FusionIIIT:patent-management-v2from
Mohithreddy70:patent-management-v2

Conversation

@Mohithreddy70

Copy link
Copy Markdown

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

  • Patent Application Form: Developed a multi-step submission interface (PMS-UC-001) featuring dynamic field validation and document upload components.
  • Status Tracking Dashboard: Created a "My Applications" view (PMS-UC-005) providing users with a real-time timeline, feedback history, and visibility into current application status.
  • Reviewer Interface: Built specialized dashboards for Directors to review application details, document feedback, and issue formal decisions with mandatory justification text (BR-PMS-005).
  • Document Versioning UI: Implemented a document management interface (PMS-UC-020) that allows users to track version history and view previous iterations of application files.
  • Financial & Assignment Tools: Added administrative views for PCC_ADMIN to manage attorney assignments and for Directors to review and approve budget estimates.

UI/UX Enhancements

  • Dynamic Validation: Implemented highlighting for missing fields during incomplete application submissions (Flow A2: Incomplete Application).
  • Role-Based Views: Configured navigation and visibility based on authorized user permissions (Applicant vs. Admin).

@vikrantwiz02 vikrantwiz02 self-requested a review May 27, 2026 20:29

@vikrantwiz02 vikrantwiz02 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/App.jsx.backup
@@ -0,0 +1,562 @@
import { MantineProvider, createTheme } from "@mantine/core";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: "alumini" should be "alumni". This will fail role matching if the backend sends "alumni".

},
);
alert(
`Application submitted successfully! Token: ${response.data.token}`,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/App.jsx
const Examination = lazy(() => import("./Modules/Examination/examination"));
const ProgrammeCurriculumRoutes = lazy(
() => import("./Modules/Program_curriculum/programmCurriculum"),
);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Comment thread src/App.jsx
return <Profile connectionRoute={`${host}/dep/api/profile/${username}/`} />;
}

export default function App() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants