Skip to content

feat: Complete Subject Management System with Validation and Sub-Details (#412)#455

Open
Parmarprashant wants to merge 1 commit into
Charushi06:mainfrom
Parmarprashant:feat-subject-management
Open

feat: Complete Subject Management System with Validation and Sub-Details (#412)#455
Parmarprashant wants to merge 1 commit into
Charushi06:mainfrom
Parmarprashant:feat-subject-management

Conversation

@Parmarprashant
Copy link
Copy Markdown

Summary

This PR transforms the basic "Subjects" section into a fully functional learning management layer. It introduces robust management features (CRUD), strict input validation, and an expandable detail view for tracking topics, resources, and notes per subject.

Key Enhancements

  • Full Subject CRUD :
    • Edit : Users can now rename subjects and change their associated colors.
    • Delete : Subjects can be removed, with a cascade effect that cleans up associated tasks and resources.
  • Subject Detail View (Learning Containers) :
    • Each subject now acts as a container that can be expanded into a dedicated modal.
    • Users can add Topics , Resource Links , and Notes specifically for that subject.
    • Topics include completion tracking (checkboxes) to monitor study progress at a granular level.
  • Data Integrity & Validation :
    • Duplicate Prevention : Both frontend and backend now block the creation of duplicate subject names (case-insensitive).
    • Input Sanitization : Minimum length requirements (2+ characters) and trimming ensure high-quality data.
    • Relational Integrity : New subject_details table in database.js linked via foreign keys.
  • Improved UI/UX :
    • Hover actions in the sidebar for quick editing/deletion.
    • Modal-based detail management for a focused workflow.
    • Dynamic badge updates reflecting only pending tasks per subject.

Technical Changes

  • Backend : Added API endpoints in server.js for subject updates, deletions, and detail management.
  • Store : Expanded store.js with async methods to handle the new subject-specific data operations.
  • Frontend : Updated app.js to handle the new modal interactions and sidebar event listeners.

Verification Results

  • Duplicate subjects are blocked with a user-friendly alert.
  • Subject name edits reflect immediately across the app (Sidebar and Tasks).
  • Deleting a subject successfully removes all its linked tasks and resources.
  • Topics added to a subject are saved correctly and can be toggled as completed.

Fixes

Fixes #412

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.

bug: Subject Management System is Incomplete and Lacks Core Functionalities

1 participant