Add IP address validation to CARD confirm/decline/redirect actions
Show clear error message when a queue item has no IP address instead of sending null to the backend. Items without IPs cannot be resolved to CARD asset IDs.
This commit is contained in:
@@ -1650,6 +1650,10 @@ function QueuePanel({ open, items, onClose, onUpdate, onDelete, onDeleteMany, on
|
||||
|
||||
const handleCardConfirmDecline = async (item, actionType) => {
|
||||
if (!cardFormTeam) return;
|
||||
if (!item.ip_address) {
|
||||
setCardActionError('No IP address on this queue item — cannot resolve CARD asset.');
|
||||
return;
|
||||
}
|
||||
setCardActionLoading(true);
|
||||
setCardActionError(null);
|
||||
try {
|
||||
@@ -1680,6 +1684,10 @@ function QueuePanel({ open, items, onClose, onUpdate, onDelete, onDeleteMany, on
|
||||
|
||||
const handleCardRedirect = async (item) => {
|
||||
if (!cardFormFromTeam || !cardFormToTeam) return;
|
||||
if (!item.ip_address) {
|
||||
setCardActionError('No IP address on this queue item — cannot resolve CARD asset.');
|
||||
return;
|
||||
}
|
||||
setCardActionLoading(true);
|
||||
setCardActionError(null);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user