fix: canClaim logic - must be unassigned AND pending, not OR

This commit is contained in:
2026-07-12 13:07:31 +08:00
parent c69ad2c36e
commit 34e821ff1d

View File

@@ -15,7 +15,7 @@ const TicketDetail = {
const isOwner = Auth.isOwner(); const isOwner = Auth.isOwner();
const isRep = t.type === 'report'; const isRep = t.type === 'report';
const isAppeal = t.type === 'appeal'; const isAppeal = t.type === 'appeal';
const canClaim = isStaff && (!t.assigned_to || t.status === 'pending'); const canClaim = isStaff && !t.assigned_to && t.status === 'pending';
const canTransfer = isStaff && t.assigned_to === Auth.user().id && t.status === 'processing'; const canTransfer = isStaff && t.assigned_to === Auth.user().id && t.status === 'processing';
const isMyTicket = t.assigned_to === Auth.user().id; const isMyTicket = t.assigned_to === Auth.user().id;