Move edit pencil to title card top-right; hide Actions card for non-admins
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -227,6 +227,13 @@ export default function TicketDetail() {
|
|||||||
<span className="text-xs text-gray-500 ml-1">
|
<span className="text-xs text-gray-500 ml-1">
|
||||||
{ticket.category.name} › {ticket.type.name} › {ticket.item.name}
|
{ticket.category.name} › {ticket.type.name} › {ticket.item.name}
|
||||||
</span>
|
</span>
|
||||||
|
<button
|
||||||
|
onClick={startEdit}
|
||||||
|
className="ml-auto text-gray-500 hover:text-gray-300 transition-colors"
|
||||||
|
title="Edit title & overview"
|
||||||
|
>
|
||||||
|
<Pencil size={14} />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{editing ? (
|
{editing ? (
|
||||||
@@ -574,16 +581,8 @@ export default function TicketDetail() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Actions */}
|
{isAdmin && (
|
||||||
<div className="bg-gray-900 border border-gray-800 rounded-xl px-4 py-3 space-y-2">
|
<div className="bg-gray-900 border border-gray-800 rounded-xl px-4 py-3">
|
||||||
<button
|
|
||||||
onClick={startEdit}
|
|
||||||
className="w-full flex items-center justify-center gap-2 py-2 text-sm text-gray-300 border border-gray-700 rounded-lg hover:bg-gray-800 transition-colors"
|
|
||||||
>
|
|
||||||
<Pencil size={13} />
|
|
||||||
Edit title & overview
|
|
||||||
</button>
|
|
||||||
{isAdmin && (
|
|
||||||
<button
|
<button
|
||||||
onClick={deleteTicket}
|
onClick={deleteTicket}
|
||||||
className="w-full flex items-center justify-center gap-2 py-2 text-sm text-red-400 border border-red-500/30 rounded-lg hover:bg-red-500/10 transition-colors"
|
className="w-full flex items-center justify-center gap-2 py-2 text-sm text-red-400 border border-red-500/30 rounded-lg hover:bg-red-500/10 transition-colors"
|
||||||
@@ -591,8 +590,8 @@ export default function TicketDetail() {
|
|||||||
<Trash2 size={13} />
|
<Trash2 size={13} />
|
||||||
Delete ticket
|
Delete ticket
|
||||||
</button>
|
</button>
|
||||||
)}
|
</div>
|
||||||
</div>
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{editingStatus && (
|
{editingStatus && (
|
||||||
|
|||||||
Reference in New Issue
Block a user