Skip to content

Commit

Permalink
EDSC-4246: Use aggregatedOrderStatus for check if completed
Browse files Browse the repository at this point in the history
  • Loading branch information
macrouch committed Nov 12, 2024
1 parent c4e9fd2 commit 0f5d735
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions static/src/js/components/OrderStatus/OrderStatusItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,15 @@ export class OrderStatusItem extends PureComponent {
retrieval_collection_id: retrievalCollectionId
} = collection

const orderStatus = aggregatedOrderStatus(orders)

const [firstOrder = {}] = orders
const {
state,
type = ''
} = firstOrder

// If the order is Harmony and is still running or has no files, don't show the EDD link
const isDone = ['successful', 'complete_with_errors'].includes(state)
const isDone = !['creating', 'in progress'].includes(orderStatus)
const notDoneOrEmpty = !isDone || downloadUrls.length === 0
if (type.toLowerCase() === 'harmony' && notDoneOrEmpty) {
return null
Expand Down

0 comments on commit 0f5d735

Please sign in to comment.