feat: filter by only requested media items in request list

feat/request-list-requested-filter
Brandon 2 years ago
parent d954328911
commit 92c7ac3906

@ -4900,6 +4900,7 @@ paths:
approved, approved,
available, available,
pending, pending,
requested,
processing, processing,
unavailable, unavailable,
failed, failed,

@ -70,6 +70,9 @@ requestRoutes.get<Record<string, unknown>, RequestResultsResponse>(
case 'available': case 'available':
mediaStatusFilter = [MediaStatus.AVAILABLE]; mediaStatusFilter = [MediaStatus.AVAILABLE];
break; break;
case 'requested':
mediaStatusFilter = [MediaStatus.PROCESSING];
break;
case 'processing': case 'processing':
case 'unavailable': case 'unavailable':
mediaStatusFilter = [ mediaStatusFilter = [

@ -31,6 +31,7 @@ enum Filter {
PENDING = 'pending', PENDING = 'pending',
APPROVED = 'approved', APPROVED = 'approved',
PROCESSING = 'processing', PROCESSING = 'processing',
REQUESTED = 'requested',
AVAILABLE = 'available', AVAILABLE = 'available',
UNAVAILABLE = 'unavailable', UNAVAILABLE = 'unavailable',
FAILED = 'failed', FAILED = 'failed',
@ -165,6 +166,9 @@ const RequestList = () => {
<option value="approved"> <option value="approved">
{intl.formatMessage(globalMessages.approved)} {intl.formatMessage(globalMessages.approved)}
</option> </option>
<option value="requested">
{intl.formatMessage(globalMessages.requested)}
</option>
<option value="processing"> <option value="processing">
{intl.formatMessage(globalMessages.processing)} {intl.formatMessage(globalMessages.processing)}
</option> </option>

Loading…
Cancel
Save