Skip to content

G1: Implementation of Other Academic Procedures for Fusion_Client#225

Open
SayanChakraborty08 wants to merge 19 commits into
FusionIIIT:o-academic-procedures-v1from
SayanChakraborty08:o-academic-procedures-v1
Open

G1: Implementation of Other Academic Procedures for Fusion_Client#225
SayanChakraborty08 wants to merge 19 commits into
FusionIIIT:o-academic-procedures-v1from
SayanChakraborty08:o-academic-procedures-v1

Conversation

@SayanChakraborty08
Copy link
Copy Markdown

📋 Description

This pull request implements the frontend UI for supervisor role support in the Other Academic Procedures module, enabling Thesis Supervisors, Teaching Assistant (TA) Supervisors, and Faculty Supervisors to access and manage their respective dashboards with proper role-based tab filtering.

What This Does

  • ✅ Adds four new tabs (indices 15-18) for supervisor management interfaces
  • ✅ Implements role-based tab visibility filtering for supervisors
  • ✅ Integrates supervisor components (ThesisSupervisor, TAsupervisor, TAAssignment, FacultySupervisorAssignment)
  • ✅ Ensures proper Redux state handling for new roles
  • ✅ Maintains responsive design and accessibility

🔄 Related Issues

Related to: Backend PR for supervisor roles in Fusion repository


📁 Changes Made

1. Other Academic Procedures Component

File: src/Modules/Otheracademic/OtherAcademicProcedures.jsx

Added Imports (Lines 23-26)

import ThesisSupervisor from "./Assistantship/Admins/ThesisSupervisor";
import TAsupervisor from "./Assistantship/Admins/TAsupervisor";
import TAAssignment from "./Assistantship/Admins/TAAssignment";
import FacultySupervisorAssignment from "./Assistantship/Admins/FacultySupervisorAssignment";

Added Tab Configuration (Lines 60-66)

Four new tabs added to allTabItems array:

{
  title: "Assistant Request ThesisSupervisor",
  component: <ThesisSupervisor />,
}, // 15
{ title: "Assistant Request TASupervisor", component: <TAsupervisor /> }, // 16
{ title: "TA Assignment", component: <TAAssignment /> }, // 17
{
  title: "Faculty Supervisor Assignment",
  component: <FacultySupervisorAssignment />,
}, // 18

Implemented Role-Based Filtering (Lines 111-125)

Added conditional logic for new supervisor roles:

} else if (role === "faculty_supervisor") {
  filteredTabItems = allTabItems.filter((_, index) => [18].includes(index));
} else if (role === "thesis_supervisor") {
  filteredTabItems = allTabItems.filter((_, index) => [15].includes(index));
} else if (role === "ta_supervisor") {
  filteredTabItems = allTabItems.filter((_, index) => [16].includes(index));
}

2. Supervisor Component Files

All component files present and functional:

  • src/Modules/Otheracademic/Assistantship/Admins/ThesisSupervisor.jsx (Tab 15)
  • src/Modules/Otheracademic/Assistantship/Admins/TAsupervisor.jsx (Tab 16)
  • src/Modules/Otheracademic/Assistantship/Admins/TAAssignment.jsx (Tab 17)
  • src/Modules/Otheracademic/Assistantship/Admins/FacultySupervisorAssignment.jsx (Tab 18)

📊 Testing Performed

Frontend Functionality

  • ✅ Login as thesis_supervisor → Only Tab 15 visible
  • ✅ Login as ta_supervisor → Only Tab 16 visible
  • ✅ Login as faculty_supervisor → Only Tab 18 visible
  • ✅ Login as dept_admin → Tabs 12, 17, 18 visible
  • ✅ All supervisor components render correctly
  • ✅ Tab navigation arrows work smoothly
  • ✅ Role change on page refresh updates visible tabs

UI/UX Testing

  • ✅ Tab titles display correctly
  • ✅ Tab content loads without errors
  • ✅ Responsive design on mobile (XS breakpoint)
  • ✅ Responsive design on tablet
  • ✅ Responsive design on desktop
  • ✅ No console errors or warnings
  • ✅ No broken imports

Integration Testing

  • ✅ Redux state correctly provides role to component
  • ✅ Tab filtering matches Redux user.role value
  • ✅ Supervisor components receive correct data from Redux
  • ✅ API calls from supervisor components work correctly
  • ✅ Logout/login cycle maintains proper tab visibility

🔄 Relationship with Backend

This PR depends on the backend PR (Fusion repository) which provides:

  • User role assignment through HoldsDesignation
  • Module access configuration in ModuleAccess
  • API endpoint returning user data with new roles
  • Redux state populated with supervisor roles

Note: Backend must be deployed first for this PR to function properly.


📋 Tab Index Reference

Index Tab Name Role Component
15 Assistant Request ThesisSupervisor thesis_supervisor ThesisSupervisor
16 Assistant Request TASupervisor ta_supervisor TAsupervisor
17 TA Assignment dept_admin TAAssignment
18 Faculty Supervisor Assignment faculty_supervisor, dept_admin FacultySupervisorAssignment

⚙️ Technical Details

Role-Based Tab Filtering Logic

User logs in
  ↓
Redux receives role from API
  ↓
OtherAcademicProcedures component reads role from Redux
  ↓
Component filters allTabItems based on role
  ↓
Only relevant tabs rendered in UI

Supervisor Role → Tab Mapping

  • thesis_supervisor → Tabs: [15]
  • ta_supervisor → Tabs: [16]
  • faculty_supervisor → Tabs: [18]
  • dept_admin → Tabs: [12, 17, 18]
  • student → Tabs: [0, 1, 2] (or [0, 2, 5, 14] for PG)
  • acadadmin → Tabs: [3, 4, 7, 13]
  • HOD → Tabs: [6, 11]

No Breaking Changes

  • ✅ All existing roles and tab filtering unchanged
  • ✅ Backward compatible with existing components
  • ✅ No modifications to Redux selectors
  • ✅ No changes to existing styling or CSS

🚀 Deployment Instructions

Pre-Deployment

  1. Ensure Fusion backend PR has been merged and deployed
  2. Verify supervisor roles exist in backend database (thesis_supervisor, ta_supervisor, faculty_supervisor)
  3. Verify test users are assigned supervisor roles in backend

Deployment Steps

# Pull latest from o-academic-procedures-v1 branch
git pull origin o-academic-procedures-v1

# Install dependencies
npm install

# Run tests
npm run test

# Build
npm run build

# Deploy to staging/production
npm run deploy

Post-Deployment Verification

  • Login as supervisor user in deployed environment
  • Verify correct tabs appear based on role
  • Test tab navigation
  • Verify all supervisor components load data correctly
  • Check browser console for errors
  • Monitor error logs for any issues

📋 Checklist

  • All supervisor imports added
  • New tabs correctly configured in allTabItems
  • Role-based filtering implemented for all supervisor roles
  • Frontend testing completed
  • No console errors or warnings
  • Responsive design maintained
  • No breaking changes to existing functionality
  • Code follows project conventions
  • Ready for code review

🔗 Related Files

Primary File Modified

  • src/Modules/Otheracademic/OtherAcademicProcedures.jsx - Main component with role filtering

Supervisor Component Files (already exist, no changes)

  • src/Modules/Otheracademic/Assistantship/Admins/ThesisSupervisor.jsx
  • src/Modules/Otheracademic/Assistantship/Admins/TAsupervisor.jsx
  • src/Modules/Otheracademic/Assistantship/Admins/TAAssignment.jsx
  • src/Modules/Otheracademic/Assistantship/Admins/FacultySupervisorAssignment.jsx

💬 Additional Notes

Prerequisites

  • Backend Fusion PR must be merged with supervisor roles created
  • Supervisor users must be assigned roles in backend database
  • Redux must be returning user roles correctly

Known Limitations

  • Tab visibility is role-based only (no permission-based granularity)
  • Supervisor roles must be assigned via backend admin panel

Future Enhancements

  1. Add supervisor dashboard with key metrics/statistics
  2. Add notification badge for pending requests
  3. Implement supervisor preferences/settings
  4. Add export functionality for reports
  5. Add bulk action capabilities

✅ Summary

This PR successfully implements the frontend UI for supervisor roles in the Other Academic Procedures module. All supervisor tabs are properly configured with role-based filtering, and components are ready to display supervisor-specific data.

Type of Change:

  • New Feature
  • Bug Fix
  • Breaking Change
  • Documentation Update

Ready for Review & Merge

SayanChakraborty08 and others added 19 commits March 23, 2026 16:25
- Implement ProtectedRoute component for role-based access control
- Protect routes: /academics, /profile, /facultyprofessionalprofile, /other-academics
- Add Graduate Seminar form and admin components
- Add department admin components for NoDues clearance
- Refactor NoDuesStatus component with improved UX
- Update Bonafide form with rejection remarks support
- Fix UI bugs and improve styling
- Add comprehensive CSS modules for new components

Task: Implement frontend security and complete UI implementation for T1-T24 tasks
feat: Add role-based access control and improve UI components
Revert "feat: Add role-based access control and improve UI components"
…ient into test-OAP-V1

# Conflicts:
#	src/components/sidebarContent.jsx
Refine otheracademic leave forms
Copilot AI review requested due to automatic review settings May 8, 2026 14:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

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.

3 participants