매니저 권한의 테넌트/상품 수정 및 삭제 버튼 제거 (권한 강화)

This commit is contained in:
2026-01-04 19:41:44 +09:00
parent 6341d70f36
commit ef1ae8bc17

View File

@@ -3417,7 +3417,7 @@
</button> </button>
)} )}
{!(t.register_role === 'operator' && currentRole !== '운영자') && ( {(currentRole === '영업관리' || currentRole === '운영자') && !(t.register_role === 'operator' && currentRole !== '운영자') && (
<div className="flex items-center gap-1 ml-2 border-l border-slate-200 pl-2"> <div className="flex items-center gap-1 ml-2 border-l border-slate-200 pl-2">
<button <button
onClick={() => handleOpenEditTenant(t)} onClick={() => handleOpenEditTenant(t)}
@@ -3435,7 +3435,7 @@
</button> </button>
</div> </div>
)} )}
{t.register_role === 'operator' && currentRole !== '운영자' && ( {(currentRole === '영업관리' || currentRole === '운영자') && t.register_role === 'operator' && currentRole !== '운영자' && (
<div className="flex items-center gap-1 ml-2 border-l border-slate-200 pl-2"> <div className="flex items-center gap-1 ml-2 border-l border-slate-200 pl-2">
<div className="p-1.5 text-slate-300 cursor-help" title="운영팀 등록 테넌트는 수정/삭제가 제약됩니다."> <div className="p-1.5 text-slate-300 cursor-help" title="운영팀 등록 테넌트는 수정/삭제가 제약됩니다.">
<LucideIcon name="lock" className="w-4 h-4" /> <LucideIcon name="lock" className="w-4 h-4" />
@@ -3488,27 +3488,27 @@
)} )}
</td> </td>
<td className="px-4 py-3 text-center"> <td className="px-4 py-3 text-center">
{p.operator_confirmed == 0 && ( {(currentRole === '영업관리' || currentRole === '운영자') && p.operator_confirmed == 0 && (
<div className="flex items-center justify-center gap-1"> <div className="flex items-center justify-center gap-1">
<button <button
onClick={() => handleOpenEditProduct(t, p)} onClick={() => handleOpenEditProduct(t, p)}
className="p-1.5 text-blue-500 hover:bg-blue-50 rounded-lg transition-colors group relative" className="p-1.5 text-blue-500 hover:bg-blue-50 rounded-lg transition-colors group relative"
title="계약 수정" title="계약 수정"
> >
<LucideIcon name="edit" className="w-4 h-4" /> <LucideIcon name="edit" className="w-4 h-4" />
<span className="absolute -top-8 left-1/2 -translate-x-1/2 bg-slate-800 text-white text-[10px] px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap pointer-events-none z-50">수정</span> <span className="absolute -top-8 left-1/2 -translate-x-1/2 bg-slate-800 text-white text-[10px] px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap pointer-events-none z-50">수정</span>
</button> </button>
<button <button
onClick={() => handleDeleteProduct(t.id, p.id)} onClick={() => handleDeleteProduct(t.id, p.id)}
className="p-1.5 text-rose-500 hover:bg-rose-50 rounded-lg transition-colors group relative" className="p-1.5 text-rose-500 hover:bg-rose-50 rounded-lg transition-colors group relative"
title="계약 삭제" title="계약 삭제"
> >
<LucideIcon name="trash-2" className="w-4 h-4" /> <LucideIcon name="trash-2" className="w-4 h-4" />
<span className="absolute -top-8 left-1/2 -translate-x-1/2 bg-slate-800 text-white text-[10px] px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap pointer-events-none z-50">삭제</span> <span className="absolute -top-8 left-1/2 -translate-x-1/2 bg-slate-800 text-white text-[10px] px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap pointer-events-none z-50">삭제</span>
</button> </button>
</div> </div>
)} )}
</td> </td>
</tr> </tr>
))} ))}
</tbody> </tbody>