feat: add edit mode for locked 'LUNAS' orders and comment out action columns in ReportByPersonGrid

This commit is contained in:
Firman Ramdhani
2026-09-11 13:21:20 +07:00
parent be343f375a
commit 44466f1566
2 changed files with 36 additions and 14 deletions
+6 -6
View File
@@ -144,7 +144,7 @@ export default function ReportByPersonGrid({ data, balancesData = [], creatorId,
<th className="px-6 py-4 font-bold">Nama Pemesan</th>
<th className="px-6 py-4 font-bold text-center">Total PO</th>
<th className="px-6 py-4 font-bold text-right">Total Piutang</th>
<th className="px-6 py-4 font-bold text-center">Aksi</th>
{/* <th className="px-6 py-4 font-bold text-center">Aksi</th> */}
</tr>
</thead>
<tbody className="divide-y divide-slate-100 dark:divide-slate-800">
@@ -191,7 +191,7 @@ export default function ReportByPersonGrid({ data, balancesData = [], creatorId,
<p className="text-[10px] text-slate-500 font-semibold mt-0.5">Lunas: {formatRupiah(userObj.totalPaid)}</p>
)}
</td>
<td className="px-6 py-4 text-center">
{/* <td className="px-6 py-4 text-center">
{unpaid.length > 0 ? (
<Button
onClick={(e) => openModal(e, unpaid.map((s: any) => s.id), `Semua tagihan ${userObj.user.name}`, userObj.totalPiutang, userObj.user.id)}
@@ -201,7 +201,7 @@ export default function ReportByPersonGrid({ data, balancesData = [], creatorId,
<CheckCircle2 className="w-3.5 h-3.5" /> Lunasi Semua
</Button>
):( <span className="text-[10px] font-bold text-slate-400">Selesai</span>)}
</td>
</td> */}
</tr>
{isExpanded && (
@@ -219,7 +219,7 @@ export default function ReportByPersonGrid({ data, balancesData = [], creatorId,
<th className="px-4 py-2.5 text-left">Tgl Order</th>
<th className="px-4 py-2.5 text-left">Status</th>
<th className="px-4 py-2.5 text-right">Tagihan</th>
<th className="px-4 py-2.5 text-center">Aksi</th>
{/* <th className="px-4 py-2.5 text-center">Aksi</th> */}
</tr>
</thead>
<tbody className="divide-y divide-slate-100 dark:divide-slate-700/50">
@@ -244,7 +244,7 @@ export default function ReportByPersonGrid({ data, balancesData = [], creatorId,
<td className={cn('px-4 py-2.5 text-right font-black', isUnpaid ? 'text-rose-600 dark:text-rose-400' : 'text-emerald-600 dark:text-emerald-400')}>
{sub.bill ? formatRupiah(sub.bill) : 'Rp0'}
</td>
<td className="px-4 py-2.5 text-center">
{/* <td className="px-4 py-2.5 text-center">
{isUnpaid ? (
<Button
onClick={(e) => openModal(e, [sub.id], `PO: ${sub.orderTitle}`, Number(sub.bill) || 0, sub.user.id)}
@@ -257,7 +257,7 @@ export default function ReportByPersonGrid({ data, balancesData = [], creatorId,
) : (
<span className="text-[10px] font-bold text-slate-400">Selesai</span>
)}
</td>
</td> */}
</tr>
)
})}