fix: canClaim logic - must be unassigned AND pending, not OR
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user