mirror of
https://github.com/FranP-code/inbox-negotiator.git
synced 2025-10-13 00:42:26 +00:00
Hides edit button for debts needing manual review
Prevents users from editing or viewing responses when a debt's status requires manual review, reducing confusion and enforcing workflow restrictions.
This commit is contained in:
@@ -259,14 +259,16 @@ export function DebtCard({ debt, onUpdate, debts, setDebts }: DebtCardProps) {
|
|||||||
return (
|
return (
|
||||||
<Dialog>
|
<Dialog>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<Button variant="outline" size="sm" className="flex-1">
|
{debt.status !== "requires_manual_review" && (
|
||||||
{isReadOnly ? (
|
<Button variant="outline" size="sm" className="flex-1">
|
||||||
<Eye className="h-4 w-4 mr-2" />
|
{isReadOnly ? (
|
||||||
) : (
|
<Eye className="h-4 w-4 mr-2" />
|
||||||
<Edit3 className="h-4 w-4 mr-2" />
|
) : (
|
||||||
)}
|
<Edit3 className="h-4 w-4 mr-2" />
|
||||||
{isReadOnly ? "See Response" : "Edit Response"}
|
)}
|
||||||
</Button>
|
{isReadOnly ? "See Response" : "Edit Response"}
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
<DialogContent className="max-w-4xl max-h-[90vh] overflow-y-auto">
|
<DialogContent className="max-w-4xl max-h-[90vh] overflow-y-auto">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
|
|||||||
Reference in New Issue
Block a user