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">
|
||||
{ticket.category.name} › {ticket.type.name} › {ticket.item.name}
|
||||
</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>
|
||||
|
||||
{editing ? (
|
||||
@@ -574,16 +581,8 @@ export default function TicketDetail() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Actions */}
|
||||
<div className="bg-gray-900 border border-gray-800 rounded-xl px-4 py-3 space-y-2">
|
||||
<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 && (
|
||||
{isAdmin && (
|
||||
<div className="bg-gray-900 border border-gray-800 rounded-xl px-4 py-3">
|
||||
<button
|
||||
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"
|
||||
@@ -591,8 +590,8 @@ export default function TicketDetail() {
|
||||
<Trash2 size={13} />
|
||||
Delete ticket
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{editingStatus && (
|
||||
|
||||
Reference in New Issue
Block a user