Skip to content

Commit

Permalink
Allow cancellation if task_id is present, only allow override for mis…
Browse files Browse the repository at this point in the history
…sing carts

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
  • Loading branch information
aaronchongth committed Sep 20, 2023
1 parent b082bdf commit 003a31b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/dashboard/src/components/delivery-alert-store.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,8 @@ export const DeliveryAlertStore = React.memo(() => {
<DeliveryWarningDialog
deliveryAlert={alert.deliveryAlert}
taskState={alert.taskState}
onCancel={alert.taskState ? onCancel : undefined}
onOverride={onOverride}
onCancel={alert.deliveryAlert.task_id ? onCancel : undefined}
onOverride={alert.deliveryAlert.category === 'wrong' ? onOverride : undefined}
onResume={onResume}
onClose={() =>
setAlerts((prev) =>
Expand Down

0 comments on commit 003a31b

Please sign in to comment.