Treasury & Bank Transfer Management System — سامانه مدیریت خزانه‌داری و حواله‌های بانکی

1 import type {PaymentState} from '../../domain/payments/payment-state';
2 export type SafeDispatchDecision='QUEUE'|'MANUAL_REVIEW'|'BLOCK';
3 export function safeDispatchDecision(state:PaymentState):SafeDispatchDecision{
4 if(state==='UNKNOWN'||state==='NEEDS_REVIEW') return 'MANUAL_REVIEW';
5 if(state==='APPROVED') return 'QUEUE';
6 return 'BLOCK';
7 }