IMGIITRoorkee / IMGIITRoorkee/placement-flutter

Make Date Added sorting work in results, or remove the option

Open
#53 0 comments 0 reactions 0 assignees View on GitHub
bug P1
Dominant language
Dart
Stars
3
Forks
10
Avg merge
8d 21h
Merged PRs (30d)
4

Description

**Problem**

Raised in the placement meeting as "companies aren't sorted by date by default".

The Apply lists are fine: the backend already orders profiles by `-id`, so they are newest-first.

The results lists are not. The filter sheet offers "Date Added" and "Alphabetically", but only alphabetical does anything. Option 0 is a no-op, because the sort only runs when the switch is 1. Neither results model carries a date field at all, so sorting by date is impossible client-side today.

**Where**

- `lib/resources/modelResources.dart:41-44` (the two sort options)
- `lib/viewmodels/ResultsCompanyWiseViewModel.dart:35` (sort guarded on `sortSwitch == 1`)
- `lib/viewmodels/ResultsBranchWiseViewModel.dart:35-39`
- `lib/models/companyConciseModel.dart:1-11` (no date field)
- Apply side, already correct: `omniport-app-placement-and-internship/views/company_profile.py:56`

**Expected**

Either the option sorts by date, or it does not exist. A control that silently does nothing is worse than no control.

**Fix sketch**

- Add a date to the results JSON generator, parse it into the concise models, and sort on it.
- If the generator change is not happening this cycle, relabel option 0 to "Default" and make the behaviour honest.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with lib/resources/modelResources.dart, the two results viewmodels, and lib/models/companyConciseModel.dart to trace the sort options, guard, and available fields. Check the results JSON generator before choosing the implementation path. Done means Date Added sorts newest-first, or option 0 is relabeled to match its actual behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.