Seth commited on
Commit ·
164612a
1
Parent(s): 55cb193
update
Browse files- frontend/src/pages/Deals.jsx +19 -22
frontend/src/pages/Deals.jsx
CHANGED
|
@@ -564,28 +564,25 @@ function DealRow({
|
|
| 564 |
</Select>
|
| 565 |
)}
|
| 566 |
</td>
|
| 567 |
-
<td
|
| 568 |
-
|
| 569 |
-
|
| 570 |
-
|
| 571 |
-
|
| 572 |
-
|
| 573 |
-
|
| 574 |
-
|
| 575 |
-
|
| 576 |
-
}
|
| 577 |
-
|
| 578 |
-
|
| 579 |
-
|
| 580 |
-
|
| 581 |
-
|
| 582 |
-
|
| 583 |
-
|
| 584 |
-
|
| 585 |
-
|
| 586 |
-
{fmtMoney(deal.deal_value)}
|
| 587 |
-
</div>
|
| 588 |
-
)}
|
| 589 |
</td>
|
| 590 |
<td className="px-3 py-2 align-top max-w-[180px]">
|
| 591 |
{tableEditRowId === deal.id ? (
|
|
|
|
| 564 |
</Select>
|
| 565 |
)}
|
| 566 |
</td>
|
| 567 |
+
<td
|
| 568 |
+
className="px-3 py-2 align-top tabular-nums min-w-[10rem] w-40 max-w-[16rem]"
|
| 569 |
+
onClick={(e) => e.stopPropagation()}
|
| 570 |
+
>
|
| 571 |
+
<EditableCell
|
| 572 |
+
type="number"
|
| 573 |
+
value={deal.deal_value != null ? String(deal.deal_value) : ''}
|
| 574 |
+
onCommit={(v) => {
|
| 575 |
+
if (v.trim() === '') {
|
| 576 |
+
patchDeal(deal.id, { deal_value: null });
|
| 577 |
+
return;
|
| 578 |
+
}
|
| 579 |
+
const n = Math.round(Number(v));
|
| 580 |
+
if (!Number.isFinite(n)) return;
|
| 581 |
+
patchDeal(deal.id, { deal_value: n });
|
| 582 |
+
}}
|
| 583 |
+
className="w-full"
|
| 584 |
+
inputClassName="min-w-[9rem] w-full max-w-full tabular-nums text-right text-sm py-1"
|
| 585 |
+
/>
|
|
|
|
|
|
|
|
|
|
| 586 |
</td>
|
| 587 |
<td className="px-3 py-2 align-top max-w-[180px]">
|
| 588 |
{tableEditRowId === deal.id ? (
|