diff --git a/src/screens/Inbox.tsx b/src/screens/Inbox.tsx index d03230a..ecd86fb 100644 --- a/src/screens/Inbox.tsx +++ b/src/screens/Inbox.tsx @@ -8,9 +8,10 @@ import { Badge, Empty, ErrorNote, StateBadge, qtyText } from '../components/ui'; /** Which enquiries are waiting on THIS user. */ function needsMe(e: Enquiry, has: (...r: string[]) => boolean): boolean { + // A customer question waits for a trader whatever the state, so it is checked first. + if (e.awaiting_trader_reply === 'yes') return has('bunker_trader', 'trading_head'); if (e.current_state_name === 'Awaiting Ops Input') return has('bunker_ops', 'trading_head'); if (e.current_state_name === 'Awaiting Offer') return has('bunker_trader', 'trading_head'); - if (e.awaiting_trader_reply === 'yes') return has('bunker_trader', 'trading_head'); if (e.current_state_name === 'Offer Sent' && e.customer_decision === 'query') return has('bunker_trader', 'trading_head'); if (e.current_state_name === 'Confirmed') return has('bunker_ops', 'trading_head'); return false;