-
Notifications
You must be signed in to change notification settings - Fork 0
Export Filters Enhancement
Adrian Darian edited this page Oct 28, 2025
·
1 revision
Enhanced the Export Page with comprehensive filtering options and an improved date picker UI to address the two main issues:
- โ Not enough filtering options
- โ Date filter enhanced with mini calendar picker
src/components/export/ExportPage.tsx
- Before: Plain text input fields (mm/dd/yyyy format)
-
After: Interactive calendar picker with visual date selection
- Uses the existing
DateRangePickercomponent - Shows dual-month calendar view for easy range selection
- Displays formatted date range with clear visual feedback
- Better UX with calendar icon and hover states
- Uses the existing
- Filter exports by application status
- Multi-select checkboxes for all statuses:
- Target
- Hunting
- Applied
- Interviewing
- Offer
- Accepted
- Rejected
- Withdrawn
- Filter by work arrangement:
- Remote
- Hybrid
- Onsite
- Filter by employment type:
- Full-time
- Part-time
- Contract
- Internship
- Filter by application priority:
- Low
- Medium
- High
- Shows count of filtered vs total applications
- Visual indicator with blue accent when filters are active
- Example: "Showing 15 of 50 applications (35 filtered out)"
- One-click button to reset all filters
- Only appears when filters are active
- Located in card header for easy access
- Stats cards at the top update based on active filters
- Shows filtered counts for applications and interviews
- Provides immediate visual feedback on filter impact
// Date range using react-day-picker DateRange type
const [dateRange, setDateRange] = useState<DateRange | undefined>();
// Multiple filter states
const [selectedStatuses, setSelectedStatuses] = useState<ApplicationStatus[]>([]);
const [selectedWorkTypes, setSelectedWorkTypes] = useState<string[]>([]);
const [selectedEmploymentTypes, setSelectedEmploymentTypes] = useState<string[]>([]);
const [selectedPriorities, setSelectedPriorities] = useState<string[]>([]);- Efficient filtering using
useMemohook - Prevents unnecessary re-calculations
- Applies all filters in sequence:
- Date range
- Status
- Work type
- Employment type
- Priority
const filteredApplications = useMemo(() => {
let filtered = [...applications];
// Apply date range filter
if (dateRange?.from || dateRange?.to) {
filtered = filterApplicationsByDateRange(filtered, {
startDate: dateRange.from,
endDate: dateRange.to,
});
}
// Apply other filters (status, work type, etc.)
// ...
return filtered;
}, [applications, dateRange, selectedStatuses, ...]);- More Control: Fine-grained control over what data to export
- Better UX: Visual calendar picker is more intuitive than text inputs
- Time Savings: Multi-select filters allow complex queries quickly
- Clarity: Active filter summary shows exactly what's being exported
- Flexibility: Can combine multiple filters for precise data selection
-
Reusable Components: Uses existing UI components (
DateRangePicker,Checkbox) -
Performance: Optimized with
useMemofor efficient filtering - Type Safety: Fully typed with TypeScript
- Maintainable: Clean separation of filter logic and UI
- Scalable: Easy to add more filter options in the future
- Open Export page
- Click on Date Range picker
- Select date range (e.g., last month)
- Check "Remote" in Work Type filter
- Click Export button
- Result: Only remote job applications from last month are exported
- Select "Interviewing" status checkbox
- Select "High" priority checkbox
- View summary: "Showing 8 of 50 applications (42 filtered out)"
- Export with confidence knowing exactly what's included
- Check "Offer" status
- Check "Full-time" employment type
- Export to compare offers
- Save Filter Presets: Allow users to save commonly used filter combinations
- Interview Filters: Add similar filtering for interviews (type, status)
- Company Filters: Add filters for company-specific exports
- Document Filters: Filter documents by type, tags, or usage
- Advanced Date Presets: Quick shortcuts like "Last 7 days", "This month", "Last quarter"
- Tag Filter: Filter applications by custom tags
- Salary Range Filter: Filter by salary range (min/max)
- Location Filter: Filter by job location
- Date range picker opens and closes properly
- Calendar selection updates date range display
- Individual filters work correctly
- Multiple filters can be combined
- Filter count updates in real-time
- Clear all filters resets everything
- Exported data matches filtered results
- Stats cards update with filtered counts
- UI is responsive on mobile devices
- No TypeScript errors
- Performance is smooth with large datasets
-
src/components/export/ExportPage.tsx- Main export page (modified) -
src/components/ui/date-range-picker.tsx- Calendar picker component (existing) -
src/components/ui/checkbox.tsx- Checkbox component (existing) -
src/lib/export.ts- Export utility functions (existing) -
src/lib/constants.ts- Status and type constants (existing)
- All filters are optional - leaving them empty exports all data
- Filters only affect Applications and Interviews exports
- Documents and Companies exports are not filtered (future enhancement)
- The date range filter applies to
appliedDatefor applications andscheduledAtfor interviews - Filter state is not persisted - resets on page refresh