Add modal props & update RequestCard/tests

Extend AudiobookDetailsModal props with onStatusChange, onIgnoreChange, hideRequestActions, hasReportedIssue, and aiReason. Stop forcing hideRequestActions when opening the modal from RequestCard so the modal can control whether request actions are shown. Add tests: verify admin sticky footer/status pill in AudiobookDetailsModal for pending requests, and add a RequestCard test that mocks AudiobookDetailsModal to assert the modal receives isOpen, asin and that hideRequestActions is not forced. Reset the new mock between tests.
This commit is contained in:
kikootwo
2026-05-16 11:30:44 -04:00
parent 8bcfadc877
commit e39e44ee44
4 changed files with 57 additions and 1 deletions
-1
View File
@@ -273,7 +273,6 @@ export function RequestCard({ request, showActions = true }: RequestCardProps) {
onClose={() => setShowDetailsModal(false)}
requestStatus={request.status}
isAvailable={COMPLETED_STATUSES.includes(request.status as typeof COMPLETED_STATUSES[number])}
hideRequestActions
/>
)}