This PR allows admins to bulk archive all unavailable items older than a specified number of days. Specifically, the archiveByDays API function is altered to allow filtering on availability. This allows admins to easily archive unavailable items, which reduces the number of active items on the front page of the website.
Closes #178
Type of change
[x] New feature (non-breaking change which adds functionality)
How Has This Been Tested?
[x] Add items with different availabilities
[x] Check that the bulk archive button only archives unavailable items
[x] Check that string inputs and negative numbers for the days prompt an error
Test Configuration:
Node.js version: 14.18.0
Desktop/Mobile: Desktop
Browser: Chrome
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my code
[x] I have commented on my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
Description
This PR allows admins to bulk archive all unavailable items older than a specified number of days. Specifically, the
archiveByDays
API function is altered to allow filtering on availability. This allows admins to easily archive unavailable items, which reduces the number of active items on the front page of the website.Closes #178
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: