Seth commited on
Commit ·
bb17080
1
Parent(s): 4191766
update
Browse files- frontend/src/pages/Deals.jsx +19 -9
frontend/src/pages/Deals.jsx
CHANGED
|
@@ -207,17 +207,17 @@ function PipelineDealCard({ deal, openDeal }) {
|
|
| 207 |
}
|
| 208 |
}}
|
| 209 |
className={cn(
|
| 210 |
-
'w-full cursor-grab rounded-lg border border-slate-200 bg-white p-
|
| 211 |
'transition hover:border-violet-300 hover:shadow-md active:cursor-grabbing'
|
| 212 |
)}
|
| 213 |
>
|
| 214 |
<div className="line-clamp-2 text-sm font-semibold leading-snug text-slate-900">
|
| 215 |
{deal.name || 'Untitled'}
|
| 216 |
</div>
|
| 217 |
-
<div className="mt-
|
| 218 |
{fmtMoney(deal.deal_value)}
|
| 219 |
</div>
|
| 220 |
-
<div className="mt-
|
| 221 |
<div className="min-w-0 flex flex-1 flex-wrap items-center gap-2">
|
| 222 |
<div
|
| 223 |
className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-violet-200 bg-violet-100 text-xs font-bold text-violet-800"
|
|
@@ -242,14 +242,24 @@ function PipelineDealCard({ deal, openDeal }) {
|
|
| 242 |
|
| 243 |
function PipelineBoard({ columns, openDeal, patchDeal, createDeal, createBusy }) {
|
| 244 |
return (
|
| 245 |
-
<div
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 246 |
{columns.map((col) => {
|
| 247 |
const sumDeal = sumNumeric(col.deals, 'deal_value');
|
| 248 |
const headerBg = PIPELINE_HEADER_BG[col.value] || 'bg-slate-600';
|
| 249 |
return (
|
| 250 |
<div
|
| 251 |
key={col.value}
|
| 252 |
-
className=
|
|
|
|
|
|
|
|
|
|
|
|
|
| 253 |
onDragOver={(e) => {
|
| 254 |
e.preventDefault();
|
| 255 |
e.dataTransfer.dropEffect = 'move';
|
|
@@ -266,13 +276,13 @@ function PipelineBoard({ columns, openDeal, patchDeal, createDeal, createBusy })
|
|
| 266 |
>
|
| 267 |
<div
|
| 268 |
className={cn(
|
| 269 |
-
'relative shrink-0 px-
|
| 270 |
headerBg
|
| 271 |
)}
|
| 272 |
style={pipelineHeaderClip}
|
| 273 |
>
|
| 274 |
-
<div className="flex items-start justify-between gap-2 pr-5">
|
| 275 |
-
<span className="text-[
|
| 276 |
{col.label}
|
| 277 |
</span>
|
| 278 |
<span className="shrink-0 rounded-full bg-black/15 px-2 py-0.5 text-xs font-bold tabular-nums">
|
|
@@ -283,7 +293,7 @@ function PipelineBoard({ columns, openDeal, patchDeal, createDeal, createBusy })
|
|
| 283 |
{fmtMoney(sumDeal)}
|
| 284 |
</div>
|
| 285 |
</div>
|
| 286 |
-
<div className="flex max-h-[min(62vh,560px)] min-h-[120px] flex-1 flex-col gap-
|
| 287 |
{col.deals.map((deal) => (
|
| 288 |
<PipelineDealCard key={deal.id} deal={deal} openDeal={openDeal} />
|
| 289 |
))}
|
|
|
|
| 207 |
}
|
| 208 |
}}
|
| 209 |
className={cn(
|
| 210 |
+
'w-full cursor-grab rounded-lg border border-slate-200 bg-white p-2 text-left shadow-sm outline-none sm:p-2.5',
|
| 211 |
'transition hover:border-violet-300 hover:shadow-md active:cursor-grabbing'
|
| 212 |
)}
|
| 213 |
>
|
| 214 |
<div className="line-clamp-2 text-sm font-semibold leading-snug text-slate-900">
|
| 215 |
{deal.name || 'Untitled'}
|
| 216 |
</div>
|
| 217 |
+
<div className="mt-1.5 break-words text-sm font-semibold tabular-nums leading-tight text-slate-800 sm:text-base">
|
| 218 |
{fmtMoney(deal.deal_value)}
|
| 219 |
</div>
|
| 220 |
+
<div className="mt-2 flex items-end justify-between gap-1.5 sm:mt-3 sm:gap-2">
|
| 221 |
<div className="min-w-0 flex flex-1 flex-wrap items-center gap-2">
|
| 222 |
<div
|
| 223 |
className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-violet-200 bg-violet-100 text-xs font-bold text-violet-800"
|
|
|
|
| 242 |
|
| 243 |
function PipelineBoard({ columns, openDeal, patchDeal, createDeal, createBusy }) {
|
| 244 |
return (
|
| 245 |
+
<div
|
| 246 |
+
className={cn(
|
| 247 |
+
'min-h-[min(75vh,720px)] w-full min-w-0 gap-2 pb-2 pt-1 [scrollbar-gutter:stable]',
|
| 248 |
+
/* Equal-width columns on lg+ so all stages fit; below lg: narrower columns + horizontal scroll */
|
| 249 |
+
'flex overflow-x-auto lg:grid lg:grid-cols-6 lg:overflow-visible lg:gap-2'
|
| 250 |
+
)}
|
| 251 |
+
>
|
| 252 |
{columns.map((col) => {
|
| 253 |
const sumDeal = sumNumeric(col.deals, 'deal_value');
|
| 254 |
const headerBg = PIPELINE_HEADER_BG[col.value] || 'bg-slate-600';
|
| 255 |
return (
|
| 256 |
<div
|
| 257 |
key={col.value}
|
| 258 |
+
className={cn(
|
| 259 |
+
'flex shrink-0 flex-col rounded-xl border border-slate-200 bg-slate-100/90 shadow-sm',
|
| 260 |
+
'min-w-[200px] w-[200px] max-w-[220px]',
|
| 261 |
+
'lg:min-w-0 lg:w-auto lg:max-w-none'
|
| 262 |
+
)}
|
| 263 |
onDragOver={(e) => {
|
| 264 |
e.preventDefault();
|
| 265 |
e.dataTransfer.dropEffect = 'move';
|
|
|
|
| 276 |
>
|
| 277 |
<div
|
| 278 |
className={cn(
|
| 279 |
+
'relative shrink-0 px-2 pb-2.5 pt-2 text-white shadow-sm sm:px-2.5 sm:pb-3 sm:pt-2.5',
|
| 280 |
headerBg
|
| 281 |
)}
|
| 282 |
style={pipelineHeaderClip}
|
| 283 |
>
|
| 284 |
+
<div className="flex items-start justify-between gap-1 pr-4 sm:gap-2 sm:pr-5">
|
| 285 |
+
<span className="text-[11px] font-bold leading-tight tracking-wide sm:text-[13px]">
|
| 286 |
{col.label}
|
| 287 |
</span>
|
| 288 |
<span className="shrink-0 rounded-full bg-black/15 px-2 py-0.5 text-xs font-bold tabular-nums">
|
|
|
|
| 293 |
{fmtMoney(sumDeal)}
|
| 294 |
</div>
|
| 295 |
</div>
|
| 296 |
+
<div className="flex max-h-[min(62vh,560px)] min-h-[120px] flex-1 flex-col gap-1.5 overflow-y-auto p-1.5 sm:gap-2 sm:p-2">
|
| 297 |
{col.deals.map((deal) => (
|
| 298 |
<PipelineDealCard key={deal.id} deal={deal} openDeal={openDeal} />
|
| 299 |
))}
|