CR: Implement sort order on host dashboard
- Dominant language
- Python
- Stars
- 2
- Forks
- 22
- Avg merge
- 2d 35m
- Merged PRs (30d)
- 11
Description
**Current Behavior**
Currently, there is no sort order on the list of 'My Short-Term Rentals' on the host dashboard:

**Desired Behavior**

• The following sort order should be applied for the Short-Term Rental table "MY short-term rentals" from top to bottom:
- Expired (red)
- Expiring soon (orange) (40 days for hosts, 60 days for strata and platforrms)
- The rest of the registrations with the oldest registrations on top
• The following sort order should be applied for the Short-Term Rental table "My Applications in Progess" from top to bottom:
**TO BE DETERMINED**
**Reason for Change**
To have the host dashboard sorted for users by what registrations need action from highest to lowest.
## Acceptance Criteria
> Generated by [Zenhub AI](https://www.zenhub.com/ai)
### Acceptance Criteria
- [ ] **Scenario: Primary sort order by registration status**
- Given the host dashboard contains multiple short-term rental registrations with different statuses
- When the "My Short-Term Rentals" table is loaded
- Then the registrations should be sorted in the following priority:
1. **Expired** (Red)
2. **Expiring soon** (Orange)
3. All other registrations
- [ ] **Scenario: Secondary sort order for active registrations**
- Given there are multiple registrations that are neither "Expired" nor "Expiring soon"
- When the table is displayed
- Then these registrations should be sorted by the registration date in ascending order (oldest registrations at the top)
- [ ] **Scenario: Logic for "Expiring soon" status for Hosts**
- Given the user is logged in as a **Host**
- When a registration is within **40 days** of its expiry date
- Then the registration should be categorized as "Expiring soon" and appear in the second tier of the sort order
- [ ] **Scenario: Logic for "Expiring soon" status for Strata and Platforms**
- Given the user is logged in as a **Strata** or **Platform** user
- When a registration is within **60 days** of its expiry date
- Then the registration should be categorized as "Expiring soon" and appear in the second tier of the sort order
- [ ] **Scenario: Visual representation of statuses**
- Given the sorted list is displayed on the dashboard
- Then "Expired" registrations must be visually indicated with **Red**
- And "Expiring soon" registrations must be visually indicated with **Orange**
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the host dashboard and locate the "My Short-Term Rentals" table and its existing registration-status display. Implement the stated priority and date ordering, including the role-specific expiry windows, then verify that expired and expiring-soon registrations retain their red and orange indicators; the ordering for "My Applications in Progress" remains undetermined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100