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";
|
"use client";
|
||||||
|
|
||||||
|
import * as React from "react";
|
||||||
import { useActionState, useEffect, useState, useTransition } from "react";
|
import { useActionState, useEffect, useState, useTransition } from "react";
|
||||||
import { Loader2, Trash2 } from "lucide-react";
|
import { Loader2, Trash2 } from "lucide-react";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
@@ -141,9 +142,10 @@ function ApprovedRow({
|
|||||||
{pricing.length === 0 ? (
|
{pricing.length === 0 ? (
|
||||||
<span>Katalog fiyatı</span>
|
<span>Katalog fiyatı</span>
|
||||||
) : (
|
) : (
|
||||||
<ul className="space-y-0.5">
|
<span>
|
||||||
{pricing.slice(0, 3).map((p) => (
|
{pricing.slice(0, 3).map((p, idx) => (
|
||||||
<li key={p.$id}>
|
<React.Fragment key={p.$id}>
|
||||||
|
{idx > 0 && ", "}
|
||||||
<span className="text-foreground">
|
<span className="text-foreground">
|
||||||
{TYPE_LABELS[p.prostheticType] ?? p.prostheticType}
|
{TYPE_LABELS[p.prostheticType] ?? p.prostheticType}
|
||||||
</span>
|
</span>
|
||||||
@@ -153,10 +155,10 @@ function ApprovedRow({
|
|||||||
: p.discountPercent
|
: p.discountPercent
|
||||||
? `%${p.discountPercent} indirim`
|
? `%${p.discountPercent} indirim`
|
||||||
: "—"}
|
: "—"}
|
||||||
</li>
|
</React.Fragment>
|
||||||
))}
|
))}
|
||||||
{pricing.length > 3 && <li>+ {pricing.length - 3} kural</li>}
|
{pricing.length > 3 && `, +${pricing.length - 3} kural`}
|
||||||
</ul>
|
</span>
|
||||||
)}
|
)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell className="text-right">
|
<TableCell className="text-right">
|
||||||
|
|||||||
Reference in New Issue
Block a user