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:
Jordan Ramos
2026-05-27 19:34:22 -06:00
parent 8fc7c33cff
commit 5e95e35d26

View File

@@ -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 {