Skip to content

Enhance Subject Creation with Days, Timing, and Attendance RequirementΒ #13

@rakshitjain23

Description

@rakshitjain23

🧩 Description
Currently, in our Subject Management UI, we can:

βž• Add a subject

πŸ–ŠοΈ Edit subject name

❌ Delete subject

Now, we want to extend this functionality to make subject creation more meaningful by allowing users to configure the class schedule, optional timing, and desired attendance percentage when adding a subject.

βœ… What Needs to Be Done
When adding a new subject, include these fields:

πŸ—“οΈ Class Days β€” Allow selecting multiple days like Mon, Tue, Wed...

Use checkboxes or a multi-select dropdown

Save this as part of the subject data

⏰ Class Timing (Optional) β€” Allow entering start and end time (e.g., 10:30 AM - 11:30 AM)

Make it optional

Simple time input is fine for now

🎯 Required Attendance % (Optional) β€” e.g., user sets target as 75%

Use a number input (0–100)

Store this value for future attendance tracking logic

πŸ’» Tech Stack & Guidelines
Use Tailwind CSS and keep UI consistent with the dark theme and gradient used in the landing page.

You may use Framer Motion to animate modal/form if needed.

Keep the UI responsive.

Store the subject data using useState (and optionally localStorage for temp persistence).

πŸ“ Suggested File Changes
Modify the existing form in /pages/subjects.tsx or /components/AddSubjectForm.tsx

You may update the /components/SubjectCard.tsx to display the added info (like days/timing) later, but it's optional for this issue

πŸ”₯ Bonus (Not Required Now)
If you want to go the extra mile:

Preview the selected days as tags/chips

Validate that attendance % is a number between 0–100

🀝 Contribution Notes
Feel free to ask questions if anything is unclear. Once you comment here, we’ll assign the issue to you. Please ensure your PR:

Has clean UI

Follows the existing structure

Is properly responsive

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions