TaskAndUserFilters - IEEE-Team-3/map GitHub Wiki

Overview

Task and user filters allow users to filter data displayed on boards, task lists, and other interfaces. Filters help users quickly find tasks, users, or teams based on specific criteria like task status, user roles, or priority.

Key Filters

Task Filters

  • Status: Filter tasks by status (e.g., In Progress, Completed, Pending).
  • Priority: Filter tasks by priority (e.g., High, Medium, Low).
  • Due Date: Filter tasks by their due date (e.g., Past Due, Due Today, Upcoming).
  • Assigned User: Filter tasks based on who is assigned to them.

User Filters

  • Role: Filter users based on their roles within teams (e.g., Admin, Member, Manager).
  • Team Membership: Filter users based on the teams they belong to.
  • Status: Filter users based on their activity status (e.g., Active, Inactive).

Example Task Filter Configuration

const TaskFilterSchema = new Schema({
  status: { type: String, enum: ['In Progress', 'Completed', 'Pending'], required: true },
  priority: { type: String, enum: ['High', 'Medium', 'Low'], required: true },
  dueDate: { type: Date },
  assignedUser: { type: Schema.Types.ObjectId, ref: 'User' },
});

Example User Filter Configuration

const UserFilterSchema = new Schema({
  role: { type: String, enum: ['Admin', 'Member', 'Manager'], required: true },
  teamMembership: { type: Schema.Types.ObjectId, ref: 'Team' },
  status: { type: String, enum: ['Active', 'Inactive'] },
});

Example UI for Filtering

Users can apply filters to task boards, user lists, and other data displays. Filters should be clearly visible, with a dropdown for each filter option.

+-----------------------------------------------+
| Filter by:                                   |
| [ ] Status: [In Progress] [Completed] [Pending] |
| [ ] Priority: [High] [Medium] [Low]           |
| [ ] Assigned to: [John Doe]                   |
+-----------------------------------------------+

Filters can be applied or reset with a button that refreshes the displayed data based on the selected filters.

⚠️ **GitHub.com Fallback** ⚠️