fix(ui): connections pricing rules inline with commas instead of stacking
The Bağlantılarım table rendered the pricing summary cell as a vertical <ul> — one rule per line — which doubled or tripled the row height for labs that priced multiple prosthetic types. User asked for the rules to sit on a single line, separated by commas. Switched to an inline <span> with React.Fragment-joined rules, comma separator, and the truncation suffix stays in the same line. Truncation rule unchanged: show first 3, then ', +N kural'.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import * as React from "react";
|
||||
import { useActionState, useEffect, useState, useTransition } from "react";
|
||||
import { Loader2, Trash2 } from "lucide-react";
|
||||
import { toast } from "sonner";
|
||||
@@ -141,9 +142,10 @@ function ApprovedRow({
|
||||
{pricing.length === 0 ? (
|
||||
<span>Katalog fiyatı</span>
|
||||
) : (
|
||||
<ul className="space-y-0.5">
|
||||
{pricing.slice(0, 3).map((p) => (
|
||||
<li key={p.$id}>
|
||||
<span>
|
||||
{pricing.slice(0, 3).map((p, idx) => (
|
||||
<React.Fragment key={p.$id}>
|
||||
{idx > 0 && ", "}
|
||||
<span className="text-foreground">
|
||||
{TYPE_LABELS[p.prostheticType] ?? p.prostheticType}
|
||||
</span>
|
||||
@@ -153,10 +155,10 @@ function ApprovedRow({
|
||||
: p.discountPercent
|
||||
? `%${p.discountPercent} indirim`
|
||||
: "—"}
|
||||
</li>
|
||||
</React.Fragment>
|
||||
))}
|
||||
{pricing.length > 3 && <li>+ {pricing.length - 3} kural</li>}
|
||||
</ul>
|
||||
{pricing.length > 3 && `, +${pricing.length - 3} kural`}
|
||||
</span>
|
||||
)}
|
||||
</TableCell>
|
||||
<TableCell className="text-right">
|
||||
|
||||
Reference in New Issue
Block a user