@nukleus-sports/ui-patterns 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/marketing.cjs +399 -249
- package/dist/marketing.cjs.map +1 -1
- package/dist/marketing.d.cts +105 -7
- package/dist/marketing.d.ts +105 -7
- package/dist/marketing.js +388 -234
- package/dist/marketing.js.map +1 -1
- package/package.json +2 -2
package/dist/marketing.js
CHANGED
|
@@ -318,12 +318,154 @@ function DealEmptyState({ message, className, messageClassName }) {
|
|
|
318
318
|
) });
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
+
// src/marketing/contract-details-card.tsx
|
|
322
|
+
import { cn as cn4 } from "@nukleus-sports/ui-web";
|
|
323
|
+
import { formatDealDate } from "@nukleus-sports/core";
|
|
324
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
325
|
+
function Row({ label, children }) {
|
|
326
|
+
return /* @__PURE__ */ jsxs3("div", { className: "flex min-w-0 flex-col gap-2", children: [
|
|
327
|
+
/* @__PURE__ */ jsx4("span", { className: "label-base-medium text-text-secondary font-ss02-ss05", children: label }),
|
|
328
|
+
/* @__PURE__ */ jsx4("div", { className: "body-text text-text-primary whitespace-pre-wrap break-words font-ss02-ss05", children })
|
|
329
|
+
] });
|
|
330
|
+
}
|
|
331
|
+
function usageAfterTerm({
|
|
332
|
+
usage_after_term_days: days
|
|
333
|
+
}) {
|
|
334
|
+
if (days == null) return null;
|
|
335
|
+
return days === 1 ? "1 day after the term" : `${days} days after the term`;
|
|
336
|
+
}
|
|
337
|
+
function ContractDetailsCard({
|
|
338
|
+
details,
|
|
339
|
+
title = "Contract Details",
|
|
340
|
+
caption,
|
|
341
|
+
className
|
|
342
|
+
}) {
|
|
343
|
+
const usage = usageAfterTerm(details);
|
|
344
|
+
const exclusive = details.is_exclusive == null ? null : details.is_exclusive ? "Exclusive" : "Not exclusive";
|
|
345
|
+
return /* @__PURE__ */ jsxs3(
|
|
346
|
+
"div",
|
|
347
|
+
{
|
|
348
|
+
className: cn4(
|
|
349
|
+
"flex w-full flex-col gap-4 rounded-[10px] border border-grey-strokes-tables bg-card px-4 py-3",
|
|
350
|
+
className
|
|
351
|
+
),
|
|
352
|
+
children: [
|
|
353
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-1", children: [
|
|
354
|
+
/* @__PURE__ */ jsx4("h3", { className: "header-xl-medium-card text-text-primary font-ss02-ss05", children: title }),
|
|
355
|
+
caption && /* @__PURE__ */ jsx4("p", { className: "label-xs-text text-text-secondary", children: caption })
|
|
356
|
+
] }),
|
|
357
|
+
details.warnings.length > 0 && /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-2 rounded-[10px] bg-semantic-color-status-priority-in-progress-warm-fill px-3 py-2", children: [
|
|
358
|
+
/* @__PURE__ */ jsxs3("span", { className: "label-base-medium text-semantic-color-status-priority-in-progress-warm-copy", children: [
|
|
359
|
+
"Worth checking (",
|
|
360
|
+
details.warnings.length,
|
|
361
|
+
")"
|
|
362
|
+
] }),
|
|
363
|
+
details.warnings.map((warning, index) => /* @__PURE__ */ jsxs3(
|
|
364
|
+
"p",
|
|
365
|
+
{
|
|
366
|
+
className: "body-text text-semantic-color-status-priority-in-progress-warm-copy break-words",
|
|
367
|
+
children: [
|
|
368
|
+
/* @__PURE__ */ jsx4("span", { className: "font-medium", children: warning.issue }),
|
|
369
|
+
warning.detail && /* @__PURE__ */ jsxs3("span", { children: [
|
|
370
|
+
": ",
|
|
371
|
+
warning.detail
|
|
372
|
+
] })
|
|
373
|
+
]
|
|
374
|
+
},
|
|
375
|
+
`${warning.issue}-${index}`
|
|
376
|
+
))
|
|
377
|
+
] }),
|
|
378
|
+
/* @__PURE__ */ jsxs3("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
379
|
+
details.territory && /* @__PURE__ */ jsx4(Row, { label: "Territory", children: details.territory }),
|
|
380
|
+
details.contracting_entity && /* @__PURE__ */ jsx4(Row, { label: "Contracting Entity", children: details.contracting_entity }),
|
|
381
|
+
exclusive && /* @__PURE__ */ jsx4(Row, { label: "Exclusivity", children: exclusive }),
|
|
382
|
+
usage && /* @__PURE__ */ jsx4(Row, { label: "Usage After Term", children: usage })
|
|
383
|
+
] }),
|
|
384
|
+
details.exclusivity && /* @__PURE__ */ jsx4(Row, { label: "Exclusivity Terms", children: details.exclusivity }),
|
|
385
|
+
details.payment_terms && /* @__PURE__ */ jsx4(Row, { label: "Payment Terms", children: details.payment_terms }),
|
|
386
|
+
details.usage_after_term && /* @__PURE__ */ jsx4(Row, { label: "Usage Rights", children: details.usage_after_term }),
|
|
387
|
+
details.deliverables.length > 0 && /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-2", children: [
|
|
388
|
+
/* @__PURE__ */ jsxs3("span", { className: "label-base-medium text-text-secondary font-ss02-ss05", children: [
|
|
389
|
+
"Deliverables (",
|
|
390
|
+
details.deliverables.length,
|
|
391
|
+
")"
|
|
392
|
+
] }),
|
|
393
|
+
/* @__PURE__ */ jsx4("ul", { className: "flex flex-col divide-y divide-greys-grey-strokes-tables rounded-[10px] border border-greys-grey-strokes-tables", children: details.deliverables.map((deliverable, index) => /* @__PURE__ */ jsxs3(
|
|
394
|
+
"li",
|
|
395
|
+
{
|
|
396
|
+
className: "flex flex-col gap-1 px-3 py-2 sm:flex-row sm:items-start sm:justify-between sm:gap-4",
|
|
397
|
+
children: [
|
|
398
|
+
/* @__PURE__ */ jsxs3("span", { className: "min-w-0 body-text text-text-primary break-words", children: [
|
|
399
|
+
deliverable.units != null && deliverable.units > 1 && /* @__PURE__ */ jsxs3("span", { className: "font-medium", children: [
|
|
400
|
+
deliverable.units,
|
|
401
|
+
" \xD7 "
|
|
402
|
+
] }),
|
|
403
|
+
deliverable.description
|
|
404
|
+
] }),
|
|
405
|
+
deliverable.due_date && /* @__PURE__ */ jsxs3("span", { className: "label-xs-text text-text-secondary whitespace-nowrap", children: [
|
|
406
|
+
"Due ",
|
|
407
|
+
formatDealDate(deliverable.due_date)
|
|
408
|
+
] })
|
|
409
|
+
]
|
|
410
|
+
},
|
|
411
|
+
`${deliverable.description}-${index}`
|
|
412
|
+
)) })
|
|
413
|
+
] })
|
|
414
|
+
]
|
|
415
|
+
}
|
|
416
|
+
);
|
|
417
|
+
}
|
|
418
|
+
|
|
321
419
|
// src/marketing/manual-deal-card.tsx
|
|
322
420
|
import { useState } from "react";
|
|
323
|
-
import { Button as Button2, cn as
|
|
421
|
+
import { Button as Button2, cn as cn6 } from "@nukleus-sports/ui-web";
|
|
324
422
|
import { ArrowDownFormIcon, XsViewInvoiceIcon } from "@nukleus-sports/icons";
|
|
325
|
-
import { fmtUSDWhole, formatDealDate } from "@nukleus-sports/core";
|
|
326
|
-
|
|
423
|
+
import { fmtUSD, fmtUSDWhole, formatDealDate as formatDealDate2 } from "@nukleus-sports/core";
|
|
424
|
+
|
|
425
|
+
// src/marketing/deal-card-parts.tsx
|
|
426
|
+
import { cn as cn5 } from "@nukleus-sports/ui-web";
|
|
427
|
+
import { CheckRingRoundIcon } from "@nukleus-sports/icons";
|
|
428
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
429
|
+
var STATUS_STYLES = {
|
|
430
|
+
Active: "bg-semantic-color-status-priority-cold-fill text-semantic-color-status-priority-cold-copy",
|
|
431
|
+
Upcoming: "bg-semantic-color-status-priority-in-progress-warm-fill text-semantic-color-status-priority-in-progress-warm-copy",
|
|
432
|
+
Complete: "bg-semantic-color-status-priority-completed-fill text-semantic-color-status-priority-completed-copy"
|
|
433
|
+
};
|
|
434
|
+
function TrackingItem({ label, done }) {
|
|
435
|
+
return (
|
|
436
|
+
// `min-w-0` lets `truncate` below actually engage instead of overflowing
|
|
437
|
+
// the card; `lg:flex-initial` + `max-lg:whitespace-normal` let a label
|
|
438
|
+
// like "Deliverables met - 0/4" wrap in the grid instead of being
|
|
439
|
+
// squeezed to an equal share. (clientapp's version — see ProjectDealCard's
|
|
440
|
+
// module doc.)
|
|
441
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex min-w-0 flex-1 gap-2 items-center lg:flex-initial", children: [
|
|
442
|
+
/* @__PURE__ */ jsx5(
|
|
443
|
+
CheckRingRoundIcon,
|
|
444
|
+
{
|
|
445
|
+
width: 12,
|
|
446
|
+
height: 12,
|
|
447
|
+
className: cn5(
|
|
448
|
+
"shrink-0 transition-opacity",
|
|
449
|
+
done ? "text-primary-color-nuk-ui-elem" : "opacity-0"
|
|
450
|
+
)
|
|
451
|
+
}
|
|
452
|
+
),
|
|
453
|
+
/* @__PURE__ */ jsx5(
|
|
454
|
+
"span",
|
|
455
|
+
{
|
|
456
|
+
className: cn5(
|
|
457
|
+
"label-xs-table truncate max-lg:whitespace-normal",
|
|
458
|
+
done ? "text-primary-color-nuk-text" : "text-text-secondary"
|
|
459
|
+
),
|
|
460
|
+
children: label
|
|
461
|
+
}
|
|
462
|
+
)
|
|
463
|
+
] })
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
// src/marketing/manual-deal-card.tsx
|
|
468
|
+
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
327
469
|
function resolveDealDocument(meta) {
|
|
328
470
|
const url = meta.uploaded_document?.url ?? meta.document_url ?? null;
|
|
329
471
|
if (!url) return null;
|
|
@@ -336,17 +478,18 @@ function ManualDealCard({
|
|
|
336
478
|
onDelete,
|
|
337
479
|
onOpenDocument,
|
|
338
480
|
resolveImageUrl,
|
|
481
|
+
asideFooter,
|
|
339
482
|
className
|
|
340
483
|
}) {
|
|
341
484
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
342
485
|
const meta = deal.metadata;
|
|
343
486
|
const brandName = meta.brand_name;
|
|
344
|
-
const startDate =
|
|
345
|
-
const endDate =
|
|
487
|
+
const startDate = formatDealDate2(meta.start_date);
|
|
488
|
+
const endDate = formatDealDate2(meta.end_date);
|
|
346
489
|
const dateRange = [startDate, endDate].filter((d) => Boolean(d) && d !== "\u2014").join(" - ");
|
|
347
490
|
const metaLine = [meta.deal_category, dateRange].filter(Boolean).join(" \u2022 ");
|
|
348
491
|
const doc = resolveDealDocument(meta);
|
|
349
|
-
const previewDocButton = doc && onOpenDocument && /* @__PURE__ */
|
|
492
|
+
const previewDocButton = doc && onOpenDocument && /* @__PURE__ */ jsxs5(
|
|
350
493
|
Button2,
|
|
351
494
|
{
|
|
352
495
|
variant: "unstyled",
|
|
@@ -359,7 +502,7 @@ function ManualDealCard({
|
|
|
359
502
|
},
|
|
360
503
|
children: [
|
|
361
504
|
"Preview Doc",
|
|
362
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ jsx6(XsViewInvoiceIcon, { className: "size-[18px] p-[1px] flex justify-center items-center" })
|
|
363
506
|
]
|
|
364
507
|
}
|
|
365
508
|
);
|
|
@@ -373,18 +516,18 @@ function ManualDealCard({
|
|
|
373
516
|
when: Boolean(onDelete)
|
|
374
517
|
}
|
|
375
518
|
];
|
|
376
|
-
return /* @__PURE__ */
|
|
519
|
+
return /* @__PURE__ */ jsxs5(
|
|
377
520
|
"div",
|
|
378
521
|
{
|
|
379
|
-
className:
|
|
522
|
+
className: cn6(
|
|
380
523
|
"bg-card border-b last:border-b-0 border-grey-strokes-tables w-full font-ss02",
|
|
381
524
|
className
|
|
382
525
|
),
|
|
383
526
|
children: [
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
-
/* @__PURE__ */
|
|
387
|
-
/* @__PURE__ */
|
|
527
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex flex-col sm:hidden", children: [
|
|
528
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex items-start p-2 justify-between flex-[1_0_0]", children: [
|
|
529
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex gap-1 items-start", children: [
|
|
530
|
+
/* @__PURE__ */ jsx6(
|
|
388
531
|
Button2,
|
|
389
532
|
{
|
|
390
533
|
variant: "unstyled",
|
|
@@ -393,12 +536,12 @@ function ManualDealCard({
|
|
|
393
536
|
onClick: () => setIsExpanded((v) => !v),
|
|
394
537
|
className: "flex p-[6px] items-center justify-center gap-[10px]",
|
|
395
538
|
"aria-label": isExpanded ? "Collapse deal details" : "Expand deal details",
|
|
396
|
-
children: /* @__PURE__ */
|
|
539
|
+
children: /* @__PURE__ */ jsx6(
|
|
397
540
|
ArrowDownFormIcon,
|
|
398
541
|
{
|
|
399
542
|
width: 12.004,
|
|
400
543
|
height: 5.999,
|
|
401
|
-
className:
|
|
544
|
+
className: cn6(
|
|
402
545
|
"text-greys-icons transition-transform duration-200",
|
|
403
546
|
isExpanded && "rotate-180"
|
|
404
547
|
)
|
|
@@ -406,14 +549,14 @@ function ManualDealCard({
|
|
|
406
549
|
)
|
|
407
550
|
}
|
|
408
551
|
),
|
|
409
|
-
/* @__PURE__ */
|
|
552
|
+
/* @__PURE__ */ jsx6("span", { className: "header-xl-medium-card text-text-primary", children: brandName })
|
|
410
553
|
] }),
|
|
411
|
-
/* @__PURE__ */
|
|
554
|
+
/* @__PURE__ */ jsx6("span", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: fmtUSDWhole(meta.total_deal_amount) })
|
|
412
555
|
] }),
|
|
413
|
-
isExpanded && /* @__PURE__ */
|
|
414
|
-
/* @__PURE__ */
|
|
415
|
-
/* @__PURE__ */
|
|
416
|
-
/* @__PURE__ */
|
|
556
|
+
isExpanded && /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
557
|
+
/* @__PURE__ */ jsx6("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
|
|
558
|
+
/* @__PURE__ */ jsxs5("div", { className: "p-2 flex items-start justify-between gap-1 bg-greys-table-hover rounded-[0_0_10px_10px]", children: [
|
|
559
|
+
/* @__PURE__ */ jsx6(
|
|
417
560
|
Button2,
|
|
418
561
|
{
|
|
419
562
|
variant: "unstyled",
|
|
@@ -428,46 +571,80 @@ function ManualDealCard({
|
|
|
428
571
|
] })
|
|
429
572
|
] })
|
|
430
573
|
] }),
|
|
431
|
-
/* @__PURE__ */
|
|
432
|
-
/* @__PURE__ */
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
/* @__PURE__ */
|
|
446
|
-
/* @__PURE__ */
|
|
574
|
+
/* @__PURE__ */ jsxs5("div", { className: "group hidden sm:flex flex-col gap-3 p-3", children: [
|
|
575
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex gap-3 items-start w-full", children: [
|
|
576
|
+
/* @__PURE__ */ jsx6(
|
|
577
|
+
EntityAvatar,
|
|
578
|
+
{
|
|
579
|
+
entityType: "company",
|
|
580
|
+
imageUrl: deal.company_avatar_url,
|
|
581
|
+
name: deal.company_name ?? brandName,
|
|
582
|
+
resolveImageUrl,
|
|
583
|
+
size: "sm",
|
|
584
|
+
className: "shrink-0 rounded-[34px]"
|
|
585
|
+
}
|
|
586
|
+
),
|
|
587
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex flex-1 flex-col gap-2 justify-center min-w-0", children: [
|
|
588
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex gap-2 items-center min-w-0", children: [
|
|
589
|
+
/* @__PURE__ */ jsx6("span", { className: "text-text-primary header-xl-medium-card truncate", children: brandName }),
|
|
447
590
|
previewDocButton
|
|
448
591
|
] }),
|
|
449
|
-
/* @__PURE__ */
|
|
450
|
-
|
|
451
|
-
/* @__PURE__ */
|
|
592
|
+
metaLine && /* @__PURE__ */ jsx6("div", { className: "label-xs-text text-text-secondary break-words", children: metaLine }),
|
|
593
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex gap-3 items-center min-w-0", children: [
|
|
594
|
+
/* @__PURE__ */ jsx6("span", { className: "label-xs-text text-text-secondary shrink-0", children: "Lead" }),
|
|
595
|
+
deal.lead_agent_name ? /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
596
|
+
/* @__PURE__ */ jsx6(
|
|
597
|
+
EntityAvatar,
|
|
598
|
+
{
|
|
599
|
+
entityType: "initials",
|
|
600
|
+
imageUrl: deal.lead_agent_avatar_url,
|
|
601
|
+
name: deal.lead_agent_name,
|
|
602
|
+
resolveImageUrl,
|
|
603
|
+
size: "sm",
|
|
604
|
+
className: "shrink-0"
|
|
605
|
+
}
|
|
606
|
+
),
|
|
607
|
+
/* @__PURE__ */ jsx6("span", { className: "label-xs-text text-text-secondary truncate", children: deal.lead_agent_name })
|
|
608
|
+
] }) : /* @__PURE__ */ jsx6("span", { className: "label-xs-text text-text-secondary truncate", children: "--" })
|
|
452
609
|
] })
|
|
453
610
|
] }),
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
611
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-1 items-end justify-center shrink-0", children: [
|
|
612
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex items-start gap-2", children: [
|
|
613
|
+
/* @__PURE__ */ jsx6("span", { className: "team-stats-card text-text-primary whitespace-nowrap", children: fmtUSDWhole(meta.total_deal_amount) }),
|
|
614
|
+
/* @__PURE__ */ jsx6(RowActionsDropdown, { actions, ariaLabel: "Deal options" })
|
|
615
|
+
] }),
|
|
616
|
+
/* @__PURE__ */ jsx6(
|
|
617
|
+
"div",
|
|
618
|
+
{
|
|
619
|
+
className: cn6(
|
|
620
|
+
"h-[27px] px-3 py-1.5 rounded-[50px] flex items-center justify-center whitespace-nowrap",
|
|
621
|
+
STATUS_STYLES.Complete
|
|
622
|
+
),
|
|
623
|
+
children: /* @__PURE__ */ jsx6("span", { className: "label-xs-medium", children: "Complete" })
|
|
624
|
+
}
|
|
625
|
+
),
|
|
626
|
+
asideFooter
|
|
627
|
+
] })
|
|
628
|
+
] }),
|
|
629
|
+
/* @__PURE__ */ jsxs5("div", { className: "grid w-full grid-cols-2 items-center gap-x-3 gap-y-2 md:grid-cols-3 lg:flex lg:justify-between lg:gap-0", children: [
|
|
630
|
+
/* @__PURE__ */ jsx6(TrackingItem, { label: "Client paid", done: true }),
|
|
631
|
+
/* @__PURE__ */ jsx6(TrackingItem, { label: "Agency paid", done: true }),
|
|
632
|
+
meta.has_third_party && /* @__PURE__ */ jsx6(TrackingItem, { label: "Third Party paid", done: true })
|
|
633
|
+
] }),
|
|
634
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-2 w-full", children: [
|
|
635
|
+
/* @__PURE__ */ jsx6("div", { className: "relative w-full h-2 bg-greys-nav-text rounded-[10px] overflow-hidden", children: /* @__PURE__ */ jsx6("div", { className: "absolute left-0 top-0 h-2 bg-primary-color-nuk-ui-elem rounded-[10px] w-full" }) }),
|
|
636
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex gap-3 items-start text-[13px] font-medium w-full", children: [
|
|
637
|
+
/* @__PURE__ */ jsx6(
|
|
638
|
+
"span",
|
|
639
|
+
{
|
|
640
|
+
className: cn6(
|
|
641
|
+
"min-w-0 flex-1 label-xs-table",
|
|
642
|
+
meta.total_deal_amount > 0 ? "text-primary-color-nuk-text" : "text-text-secondary"
|
|
643
|
+
),
|
|
644
|
+
children: `${fmtUSD(meta.total_deal_amount)}${meta.total_deal_amount > 0 ? " collected" : ""}`
|
|
645
|
+
}
|
|
646
|
+
),
|
|
647
|
+
/* @__PURE__ */ jsx6("span", { className: "shrink-0 text-primary-color-nuk-text label-xs-table whitespace-nowrap", children: "Fully Paid" })
|
|
471
648
|
] })
|
|
472
649
|
] })
|
|
473
650
|
] })
|
|
@@ -480,7 +657,7 @@ function ManualDealCard({
|
|
|
480
657
|
import { useEffect, useState as useState2 } from "react";
|
|
481
658
|
import {
|
|
482
659
|
Button as Button3,
|
|
483
|
-
cn as
|
|
660
|
+
cn as cn7,
|
|
484
661
|
Dialog,
|
|
485
662
|
DialogContent,
|
|
486
663
|
DialogHeader,
|
|
@@ -489,7 +666,7 @@ import {
|
|
|
489
666
|
} from "@nukleus-sports/ui-web";
|
|
490
667
|
import { DownloadIcon } from "@nukleus-sports/icons";
|
|
491
668
|
import { fmt, fmtCurrency, fmtDate } from "@nukleus-sports/core";
|
|
492
|
-
import { jsx as
|
|
669
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
493
670
|
var DESKTOP_BREAKPOINT_QUERY = "(min-width: 640px)";
|
|
494
671
|
function useIsDesktopViewport() {
|
|
495
672
|
const [isDesktop, setIsDesktop] = useState2(
|
|
@@ -505,22 +682,22 @@ function useIsDesktopViewport() {
|
|
|
505
682
|
return isDesktop;
|
|
506
683
|
}
|
|
507
684
|
function ReadOnlyField({ label, value }) {
|
|
508
|
-
return /* @__PURE__ */
|
|
509
|
-
/* @__PURE__ */
|
|
510
|
-
/* @__PURE__ */
|
|
685
|
+
return /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
|
|
686
|
+
/* @__PURE__ */ jsx7("span", { className: "label-xs-medium text-text-secondary", children: label }),
|
|
687
|
+
/* @__PURE__ */ jsx7("div", { className: "flex items-center px-[0px] py-[6px]", children: /* @__PURE__ */ jsx7("span", { className: "body-text text-text-primary whitespace-nowrap", children: value || "--" }) })
|
|
511
688
|
] });
|
|
512
689
|
}
|
|
513
690
|
function ReadOnlyPartyCard({ title, children, className }) {
|
|
514
|
-
return /* @__PURE__ */
|
|
691
|
+
return /* @__PURE__ */ jsxs6(
|
|
515
692
|
"div",
|
|
516
693
|
{
|
|
517
|
-
className:
|
|
694
|
+
className: cn7(
|
|
518
695
|
"flex flex-col gap-4 rounded-[10px] border border-grey-strokes-tables bg-card px-6 py-4",
|
|
519
696
|
className
|
|
520
697
|
),
|
|
521
698
|
children: [
|
|
522
|
-
/* @__PURE__ */
|
|
523
|
-
/* @__PURE__ */
|
|
699
|
+
/* @__PURE__ */ jsx7("h3", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: title }),
|
|
700
|
+
/* @__PURE__ */ jsx7("div", { className: "flex flex-col gap-4", children })
|
|
524
701
|
]
|
|
525
702
|
}
|
|
526
703
|
);
|
|
@@ -539,20 +716,20 @@ function ManualDealPreviewDialog({
|
|
|
539
716
|
const meta = deal.metadata;
|
|
540
717
|
const doc = resolveDealDocument(meta);
|
|
541
718
|
const cardCls = isDesktop ? "flex-1 min-w-0 h-[479px]" : "w-full h-auto";
|
|
542
|
-
const cards = /* @__PURE__ */
|
|
543
|
-
/* @__PURE__ */
|
|
544
|
-
/* @__PURE__ */
|
|
545
|
-
/* @__PURE__ */
|
|
546
|
-
/* @__PURE__ */
|
|
547
|
-
/* @__PURE__ */
|
|
548
|
-
/* @__PURE__ */
|
|
549
|
-
/* @__PURE__ */
|
|
719
|
+
const cards = /* @__PURE__ */ jsxs6("div", { className: cn7("flex gap-4 sm:gap-[12px]", !isDesktop && "flex-col"), children: [
|
|
720
|
+
/* @__PURE__ */ jsxs6(ReadOnlyPartyCard, { title: "Brand", className: cardCls, children: [
|
|
721
|
+
/* @__PURE__ */ jsx7(ReadOnlyField, { label: "Brand Name", value: fmt(meta.brand_name) }),
|
|
722
|
+
/* @__PURE__ */ jsx7(ReadOnlyField, { label: "Deal Category", value: fmt(meta.deal_category) }),
|
|
723
|
+
/* @__PURE__ */ jsx7(ReadOnlyField, { label: "Total Deal Amount", value: fmtCurrency(meta.total_deal_amount) }),
|
|
724
|
+
/* @__PURE__ */ jsx7(ReadOnlyField, { label: "Payment Due Date", value: fmtDate(meta.brand_payment_due_date) }),
|
|
725
|
+
/* @__PURE__ */ jsx7(ReadOnlyField, { label: "Deal Start Date", value: fmtDate(meta.start_date) }),
|
|
726
|
+
/* @__PURE__ */ jsx7(ReadOnlyField, { label: "Deal End Date", value: fmtDate(meta.end_date) })
|
|
550
727
|
] }),
|
|
551
|
-
/* @__PURE__ */
|
|
552
|
-
/* @__PURE__ */
|
|
553
|
-
/* @__PURE__ */
|
|
554
|
-
/* @__PURE__ */
|
|
555
|
-
meta.client_name?.trim() && clientImageUrl && /* @__PURE__ */
|
|
728
|
+
/* @__PURE__ */ jsxs6(ReadOnlyPartyCard, { title: "Client", className: cardCls, children: [
|
|
729
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
|
|
730
|
+
/* @__PURE__ */ jsx7("span", { className: "label-xs-medium text-text-secondary", children: "Client Name" }),
|
|
731
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex min-h-[32px] items-center gap-2 py-[6px]", children: [
|
|
732
|
+
meta.client_name?.trim() && clientImageUrl && /* @__PURE__ */ jsx7(
|
|
556
733
|
EntityAvatar,
|
|
557
734
|
{
|
|
558
735
|
entityType: "player",
|
|
@@ -563,23 +740,23 @@ function ManualDealPreviewDialog({
|
|
|
563
740
|
className: "shrink-0"
|
|
564
741
|
}
|
|
565
742
|
),
|
|
566
|
-
/* @__PURE__ */
|
|
743
|
+
/* @__PURE__ */ jsx7("span", { className: "body-text text-text-primary whitespace-nowrap", children: fmt(meta.client_name) })
|
|
567
744
|
] })
|
|
568
745
|
] }),
|
|
569
|
-
/* @__PURE__ */
|
|
746
|
+
/* @__PURE__ */ jsx7(ReadOnlyField, { label: "Client's Invoice Name", value: fmt(meta.client_invoice_name) })
|
|
570
747
|
] }),
|
|
571
|
-
/* @__PURE__ */
|
|
572
|
-
/* @__PURE__ */
|
|
573
|
-
/* @__PURE__ */
|
|
748
|
+
/* @__PURE__ */ jsxs6(ReadOnlyPartyCard, { title: "Agency", className: cardCls, children: [
|
|
749
|
+
/* @__PURE__ */ jsx7(ReadOnlyField, { label: "Agency Name", value: fmt(meta.agency_name) }),
|
|
750
|
+
/* @__PURE__ */ jsx7(
|
|
574
751
|
ReadOnlyField,
|
|
575
752
|
{
|
|
576
753
|
label: "Commission %",
|
|
577
754
|
value: meta.agency_commission ? `${meta.agency_commission}%` : "--"
|
|
578
755
|
}
|
|
579
756
|
),
|
|
580
|
-
/* @__PURE__ */
|
|
581
|
-
/* @__PURE__ */
|
|
582
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ jsx7(ReadOnlyField, { label: "Payment Due Date", value: fmtDate(meta.agency_payment_due_date) }),
|
|
758
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
|
|
759
|
+
/* @__PURE__ */ jsx7(
|
|
583
760
|
"span",
|
|
584
761
|
{
|
|
585
762
|
className: "text-[13px] font-medium leading-normal text-text-secondary",
|
|
@@ -587,8 +764,8 @@ function ManualDealPreviewDialog({
|
|
|
587
764
|
children: "Lead Agent"
|
|
588
765
|
}
|
|
589
766
|
),
|
|
590
|
-
/* @__PURE__ */
|
|
591
|
-
/* @__PURE__ */
|
|
767
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex min-h-[32px] items-center gap-2 py-[6px]", children: [
|
|
768
|
+
/* @__PURE__ */ jsx7(
|
|
592
769
|
EntityAvatar,
|
|
593
770
|
{
|
|
594
771
|
entityType: "initials",
|
|
@@ -599,7 +776,7 @@ function ManualDealPreviewDialog({
|
|
|
599
776
|
className: "shrink-0"
|
|
600
777
|
}
|
|
601
778
|
),
|
|
602
|
-
/* @__PURE__ */
|
|
779
|
+
/* @__PURE__ */ jsx7(
|
|
603
780
|
"span",
|
|
604
781
|
{
|
|
605
782
|
className: "overflow-hidden text-ellipsis text-[14px] leading-[15px] text-text-secondary whitespace-nowrap",
|
|
@@ -610,23 +787,23 @@ function ManualDealPreviewDialog({
|
|
|
610
787
|
] })
|
|
611
788
|
] })
|
|
612
789
|
] }),
|
|
613
|
-
meta.has_third_party && /* @__PURE__ */
|
|
614
|
-
/* @__PURE__ */
|
|
615
|
-
/* @__PURE__ */
|
|
790
|
+
meta.has_third_party && /* @__PURE__ */ jsxs6(ReadOnlyPartyCard, { title: "Third Party", className: cardCls, children: [
|
|
791
|
+
/* @__PURE__ */ jsx7(ReadOnlyField, { label: "Third Party Name", value: fmt(meta.third_party_name) }),
|
|
792
|
+
/* @__PURE__ */ jsx7(
|
|
616
793
|
ReadOnlyField,
|
|
617
794
|
{
|
|
618
795
|
label: "Third Party Invoice Name",
|
|
619
796
|
value: fmt(meta.third_party_invoice_name)
|
|
620
797
|
}
|
|
621
798
|
),
|
|
622
|
-
/* @__PURE__ */
|
|
799
|
+
/* @__PURE__ */ jsx7(
|
|
623
800
|
ReadOnlyField,
|
|
624
801
|
{
|
|
625
802
|
label: "Commission %",
|
|
626
803
|
value: meta.third_party_commission ? `${meta.third_party_commission}%` : "--"
|
|
627
804
|
}
|
|
628
805
|
),
|
|
629
|
-
/* @__PURE__ */
|
|
806
|
+
/* @__PURE__ */ jsx7(
|
|
630
807
|
ReadOnlyField,
|
|
631
808
|
{
|
|
632
809
|
label: "Payment Due Date",
|
|
@@ -635,28 +812,30 @@ function ManualDealPreviewDialog({
|
|
|
635
812
|
)
|
|
636
813
|
] })
|
|
637
814
|
] });
|
|
638
|
-
const
|
|
639
|
-
|
|
815
|
+
const summary = meta.summary || meta.notes || null;
|
|
816
|
+
const notes = /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-[12px] rounded-[10px] border border-grey-strokes-tables bg-card px-[16px] py-[12px] shrink-0 w-full", children: [
|
|
817
|
+
/* @__PURE__ */ jsx7(
|
|
640
818
|
"h3",
|
|
641
819
|
{
|
|
642
820
|
className: "header-xl-medium-card text-text-primary whitespace-nowrap",
|
|
643
821
|
style: { fontFeatureSettings: "'ss02', 'ss05'" },
|
|
644
|
-
children: "
|
|
822
|
+
children: "Contract Summary"
|
|
645
823
|
}
|
|
646
824
|
),
|
|
647
|
-
/* @__PURE__ */
|
|
825
|
+
/* @__PURE__ */ jsx7("div", { className: "flex min-h-[70px] items-start rounded-[5px] bg-greys-background-hover px-[12px] py-[6px]", children: /* @__PURE__ */ jsx7(
|
|
648
826
|
"p",
|
|
649
827
|
{
|
|
650
|
-
className:
|
|
651
|
-
"flex-1 body-text
|
|
652
|
-
|
|
828
|
+
className: cn7(
|
|
829
|
+
"flex-1 min-w-0 body-text whitespace-pre-wrap break-words",
|
|
830
|
+
summary ? "text-text-primary" : "text-text-secondary"
|
|
653
831
|
),
|
|
654
832
|
style: { fontFeatureSettings: "'ss02', 'ss05'" },
|
|
655
|
-
children:
|
|
833
|
+
children: summary || "--"
|
|
656
834
|
}
|
|
657
835
|
) })
|
|
658
836
|
] });
|
|
659
|
-
const
|
|
837
|
+
const contractDetailsCard = meta.contract_details ? /* @__PURE__ */ jsx7(ContractDetailsCard, { details: meta.contract_details }) : null;
|
|
838
|
+
const documentButton = doc && /* @__PURE__ */ jsxs6(
|
|
660
839
|
Button3,
|
|
661
840
|
{
|
|
662
841
|
variant: "ghost",
|
|
@@ -664,8 +843,8 @@ function ManualDealPreviewDialog({
|
|
|
664
843
|
className: "flex h-full p-0 bg-transparent hover:bg-transparent items-center gap-[12px] hover:opacity-80 transition-opacity",
|
|
665
844
|
onClick: () => onOpenDocument(doc),
|
|
666
845
|
children: [
|
|
667
|
-
/* @__PURE__ */
|
|
668
|
-
/* @__PURE__ */
|
|
846
|
+
/* @__PURE__ */ jsx7(DownloadIcon, { className: "size-5 shrink-0 text-primary-color-nuk-ui-elem" }),
|
|
847
|
+
/* @__PURE__ */ jsx7(
|
|
669
848
|
"span",
|
|
670
849
|
{
|
|
671
850
|
className: "text-[14px] font-normal leading-[15px] text-primary-color-nuk-text overflow-hidden text-ellipsis whitespace-nowrap max-w-[200px]",
|
|
@@ -676,8 +855,8 @@ function ManualDealPreviewDialog({
|
|
|
676
855
|
]
|
|
677
856
|
}
|
|
678
857
|
);
|
|
679
|
-
const footerButtons = /* @__PURE__ */
|
|
680
|
-
onEdit && /* @__PURE__ */
|
|
858
|
+
const footerButtons = /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-[12px]", children: [
|
|
859
|
+
onEdit && /* @__PURE__ */ jsx7(
|
|
681
860
|
Button3,
|
|
682
861
|
{
|
|
683
862
|
variant: "outline",
|
|
@@ -686,7 +865,7 @@ function ManualDealPreviewDialog({
|
|
|
686
865
|
children: "Edit Deal"
|
|
687
866
|
}
|
|
688
867
|
),
|
|
689
|
-
/* @__PURE__ */
|
|
868
|
+
/* @__PURE__ */ jsx7(
|
|
690
869
|
Button3,
|
|
691
870
|
{
|
|
692
871
|
onClick: () => onOpenChange(false),
|
|
@@ -696,19 +875,20 @@ function ManualDealPreviewDialog({
|
|
|
696
875
|
)
|
|
697
876
|
] });
|
|
698
877
|
if (isDesktop) {
|
|
699
|
-
return /* @__PURE__ */
|
|
700
|
-
/* @__PURE__ */
|
|
701
|
-
/* @__PURE__ */
|
|
878
|
+
return /* @__PURE__ */ jsx7(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs6(DialogContent, { className: "flex h-screen sm:h-[800px] flex-col gap-0 overflow-hidden rounded-none sm:rounded-[10px] bg-card p-0 max-w-[1140px] max-[1024px]:max-w-[940px]", children: [
|
|
879
|
+
/* @__PURE__ */ jsx7(DialogHeader, { className: "shrink-0 mt-4 pb-0 space-y-0 px-6", children: /* @__PURE__ */ jsx7(DialogTitle, { children: "Preview Details" }) }),
|
|
880
|
+
/* @__PURE__ */ jsx7("div", { className: "flex-1 overflow-y-auto px-6 pt-6 pb-4", children: /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-[12px]", children: [
|
|
702
881
|
cards,
|
|
703
|
-
notes
|
|
882
|
+
notes,
|
|
883
|
+
contractDetailsCard
|
|
704
884
|
] }) }),
|
|
705
|
-
/* @__PURE__ */
|
|
706
|
-
/* @__PURE__ */
|
|
885
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between bg-card pb-6 pt-3 px-9 shadow-[0px_0px_4px_0px_rgba(0,0,0,0.25)] shrink-0 rounded-bl-[10px] rounded-br-[10px]", children: [
|
|
886
|
+
/* @__PURE__ */ jsx7("div", { className: "flex h-[32px] items-center bg-card px-2", children: documentButton ?? /* @__PURE__ */ jsx7("div", {}) }),
|
|
707
887
|
footerButtons
|
|
708
888
|
] })
|
|
709
889
|
] }) });
|
|
710
890
|
}
|
|
711
|
-
return /* @__PURE__ */
|
|
891
|
+
return /* @__PURE__ */ jsx7(
|
|
712
892
|
MobileModalLayout,
|
|
713
893
|
{
|
|
714
894
|
onCancel: () => onOpenChange(false),
|
|
@@ -718,10 +898,11 @@ function ManualDealPreviewDialog({
|
|
|
718
898
|
cancelButtonName: "Cancel",
|
|
719
899
|
actionBottomContext: false,
|
|
720
900
|
childClassName: "max-h-[calc(100dvh-50px)]",
|
|
721
|
-
children: /* @__PURE__ */
|
|
722
|
-
doc && /* @__PURE__ */
|
|
901
|
+
children: /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-4 px-4 pb-4", children: [
|
|
902
|
+
doc && /* @__PURE__ */ jsx7("div", { className: "flex h-[32px] justify-end items-center bg-card py-0 px-2", children: documentButton }),
|
|
723
903
|
cards,
|
|
724
|
-
notes
|
|
904
|
+
notes,
|
|
905
|
+
contractDetailsCard
|
|
725
906
|
] })
|
|
726
907
|
}
|
|
727
908
|
);
|
|
@@ -729,54 +910,23 @@ function ManualDealPreviewDialog({
|
|
|
729
910
|
|
|
730
911
|
// src/marketing/project-deal-card.tsx
|
|
731
912
|
import { useState as useState3 } from "react";
|
|
732
|
-
import { Button as Button4, cn as
|
|
733
|
-
import { ArrowDownFormIcon as ArrowDownFormIcon2,
|
|
734
|
-
import {
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
// squeezed to an equal share. (clientapp's version — see module doc.)
|
|
742
|
-
/* @__PURE__ */ jsxs5("div", { className: "flex min-w-0 flex-1 gap-2 items-center lg:flex-initial", children: [
|
|
743
|
-
/* @__PURE__ */ jsx6(
|
|
744
|
-
CheckRingRoundIcon,
|
|
745
|
-
{
|
|
746
|
-
width: 12,
|
|
747
|
-
height: 12,
|
|
748
|
-
className: cn6(
|
|
749
|
-
"shrink-0 transition-opacity",
|
|
750
|
-
done ? "text-primary-color-nuk-ui-elem" : "opacity-0"
|
|
751
|
-
)
|
|
752
|
-
}
|
|
753
|
-
),
|
|
754
|
-
/* @__PURE__ */ jsx6(
|
|
755
|
-
"span",
|
|
756
|
-
{
|
|
757
|
-
className: cn6(
|
|
758
|
-
"label-xs-table truncate max-lg:whitespace-normal",
|
|
759
|
-
done ? "text-primary-color-nuk-text" : "text-text-secondary"
|
|
760
|
-
),
|
|
761
|
-
children: label
|
|
762
|
-
}
|
|
763
|
-
)
|
|
764
|
-
] })
|
|
765
|
-
);
|
|
766
|
-
}
|
|
767
|
-
var STATUS_STYLES = {
|
|
768
|
-
Active: "bg-semantic-color-status-priority-cold-fill text-semantic-color-status-priority-cold-copy",
|
|
769
|
-
Upcoming: "bg-semantic-color-status-priority-in-progress-warm-fill text-semantic-color-status-priority-in-progress-warm-copy",
|
|
770
|
-
Complete: "bg-semantic-color-status-priority-completed-fill text-semantic-color-status-priority-completed-copy"
|
|
771
|
-
};
|
|
913
|
+
import { Button as Button4, cn as cn8 } from "@nukleus-sports/ui-web";
|
|
914
|
+
import { ArrowDownFormIcon as ArrowDownFormIcon2, XsViewInvoiceIcon as XsViewInvoiceIcon2 } from "@nukleus-sports/icons";
|
|
915
|
+
import {
|
|
916
|
+
abbreviatePersonName,
|
|
917
|
+
getDealStatus,
|
|
918
|
+
formatDealDate as formatDealDate3,
|
|
919
|
+
fmtUSD as fmtUSD2
|
|
920
|
+
} from "@nukleus-sports/core";
|
|
921
|
+
import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
772
922
|
function statusLabel(status) {
|
|
773
923
|
return status === "Complete" ? "Completed" : status;
|
|
774
924
|
}
|
|
775
925
|
function CollabAffordance({ href, onClick, className, children }) {
|
|
776
926
|
if (onClick) {
|
|
777
|
-
return /* @__PURE__ */
|
|
927
|
+
return /* @__PURE__ */ jsx8(Button4, { variant: "unstyled", size: "none", type: "button", onClick, className, children });
|
|
778
928
|
}
|
|
779
|
-
return /* @__PURE__ */
|
|
929
|
+
return /* @__PURE__ */ jsx8("a", { href, className, children });
|
|
780
930
|
}
|
|
781
931
|
function ProjectDealCard({
|
|
782
932
|
deal,
|
|
@@ -785,6 +935,7 @@ function ProjectDealCard({
|
|
|
785
935
|
collabHref,
|
|
786
936
|
onCollabClick,
|
|
787
937
|
resolveImageUrl,
|
|
938
|
+
asideFooter,
|
|
788
939
|
className
|
|
789
940
|
}) {
|
|
790
941
|
const [isExpanded, setIsExpanded] = useState3(false);
|
|
@@ -792,17 +943,17 @@ function ProjectDealCard({
|
|
|
792
943
|
const status = getDealStatus(deal, isCompleted);
|
|
793
944
|
const brandName = deal.brand_name ?? deal.company_name ?? deal.project_title;
|
|
794
945
|
const category = deal.deal_terms?.category;
|
|
795
|
-
const startDate =
|
|
796
|
-
const endDate =
|
|
946
|
+
const startDate = formatDealDate3(deal.deal_terms?.startDate);
|
|
947
|
+
const endDate = formatDealDate3(deal.deal_terms?.endDate);
|
|
797
948
|
const progressPct = deal.total_contracted > 0 ? Math.min(100, deal.total_collected / deal.total_contracted * 100) : 0;
|
|
798
949
|
const outstanding = Math.max(0, deal.total_contracted - deal.total_collected);
|
|
799
950
|
const isFullyPaid = deal.total_contracted > 0 && outstanding === 0;
|
|
800
951
|
const hasPaymentsCount = deal.payments_total !== void 0 && deal.payments_paid !== void 0;
|
|
801
|
-
return /* @__PURE__ */
|
|
802
|
-
/* @__PURE__ */
|
|
803
|
-
/* @__PURE__ */
|
|
804
|
-
/* @__PURE__ */
|
|
805
|
-
/* @__PURE__ */
|
|
952
|
+
return /* @__PURE__ */ jsxs7("div", { className: cn8("w-full", className), children: [
|
|
953
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col sm:hidden overflow-hidden bg-card border border-greys-grey-strokes-tables rounded-[10px]", children: [
|
|
954
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-start justify-between gap-1 p-2", children: [
|
|
955
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-1 min-w-0 gap-1 items-start", children: [
|
|
956
|
+
/* @__PURE__ */ jsx8(
|
|
806
957
|
Button4,
|
|
807
958
|
{
|
|
808
959
|
variant: "unstyled",
|
|
@@ -811,12 +962,12 @@ function ProjectDealCard({
|
|
|
811
962
|
onClick: () => setIsExpanded((v) => !v),
|
|
812
963
|
className: "flex size-8 shrink-0 items-center justify-center p-1.5 rounded-[5px]",
|
|
813
964
|
"aria-label": isExpanded ? "Collapse deal details" : "Expand deal details",
|
|
814
|
-
children: /* @__PURE__ */
|
|
965
|
+
children: /* @__PURE__ */ jsx8(
|
|
815
966
|
ArrowDownFormIcon2,
|
|
816
967
|
{
|
|
817
968
|
width: 12.004,
|
|
818
969
|
height: 5.999,
|
|
819
|
-
className:
|
|
970
|
+
className: cn8(
|
|
820
971
|
"text-greys-icons transition-transform duration-200",
|
|
821
972
|
isExpanded && "rotate-180"
|
|
822
973
|
)
|
|
@@ -824,48 +975,49 @@ function ProjectDealCard({
|
|
|
824
975
|
)
|
|
825
976
|
}
|
|
826
977
|
),
|
|
827
|
-
/* @__PURE__ */
|
|
828
|
-
/* @__PURE__ */
|
|
829
|
-
/* @__PURE__ */
|
|
978
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-1 min-w-0 flex-col gap-2 justify-center items-start", children: [
|
|
979
|
+
/* @__PURE__ */ jsx8("span", { className: "header-xl-medium-card text-text-primary", children: brandName }),
|
|
980
|
+
/* @__PURE__ */ jsxs7("span", { className: "label-xs-text text-text-secondary", children: [
|
|
830
981
|
startDate,
|
|
831
982
|
" - ",
|
|
832
983
|
endDate
|
|
833
984
|
] })
|
|
834
985
|
] })
|
|
835
986
|
] }),
|
|
836
|
-
/* @__PURE__ */
|
|
837
|
-
/* @__PURE__ */
|
|
838
|
-
deal.total_equity_shares > 0 && /* @__PURE__ */
|
|
987
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col shrink-0 justify-center items-end gap-1", children: [
|
|
988
|
+
/* @__PURE__ */ jsx8("span", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: fmtUSD2(deal.total_contracted) }),
|
|
989
|
+
deal.total_equity_shares > 0 && /* @__PURE__ */ jsxs7("span", { className: "label-xs-text text-text-secondary whitespace-nowrap", children: [
|
|
839
990
|
"+ ",
|
|
840
991
|
deal.total_equity_shares.toLocaleString(),
|
|
841
992
|
" shares"
|
|
842
993
|
] }),
|
|
843
|
-
/* @__PURE__ */
|
|
994
|
+
/* @__PURE__ */ jsx8(
|
|
844
995
|
"div",
|
|
845
996
|
{
|
|
846
|
-
className:
|
|
997
|
+
className: cn8(
|
|
847
998
|
"h-[27px] px-3 py-1.5 rounded-[50px] flex items-center justify-center label-xs-medium whitespace-nowrap",
|
|
848
999
|
STATUS_STYLES[status]
|
|
849
1000
|
),
|
|
850
1001
|
children: statusLabel(status)
|
|
851
1002
|
}
|
|
852
|
-
)
|
|
1003
|
+
),
|
|
1004
|
+
asideFooter
|
|
853
1005
|
] })
|
|
854
1006
|
] }),
|
|
855
|
-
isExpanded && /* @__PURE__ */
|
|
856
|
-
/* @__PURE__ */
|
|
857
|
-
/* @__PURE__ */
|
|
858
|
-
/* @__PURE__ */
|
|
859
|
-
/* @__PURE__ */
|
|
860
|
-
/* @__PURE__ */
|
|
1007
|
+
isExpanded && /* @__PURE__ */ jsxs7(Fragment3, { children: [
|
|
1008
|
+
/* @__PURE__ */ jsx8("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
|
|
1009
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-start gap-1 p-2 bg-greys-table-hover", children: [
|
|
1010
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
|
|
1011
|
+
/* @__PURE__ */ jsx8("span", { className: "label-xs-text text-text-secondary", children: "Collected" }),
|
|
1012
|
+
/* @__PURE__ */ jsx8("span", { className: "body-text-semibold text-primary-color-nuk-text truncate", children: fmtUSD2(deal.total_collected) })
|
|
861
1013
|
] }),
|
|
862
|
-
/* @__PURE__ */
|
|
863
|
-
/* @__PURE__ */
|
|
864
|
-
/* @__PURE__ */
|
|
1014
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
|
|
1015
|
+
/* @__PURE__ */ jsx8("span", { className: "label-xs-text text-text-secondary", children: "Outstanding" }),
|
|
1016
|
+
/* @__PURE__ */ jsx8("span", { className: "body-text-semibold text-semantic-color-status-priority-priority-2 truncate", children: fmtUSD2(outstanding) })
|
|
865
1017
|
] }),
|
|
866
|
-
hasPaymentsCount && /* @__PURE__ */
|
|
867
|
-
/* @__PURE__ */
|
|
868
|
-
/* @__PURE__ */
|
|
1018
|
+
hasPaymentsCount && /* @__PURE__ */ jsxs7("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
|
|
1019
|
+
/* @__PURE__ */ jsx8("span", { className: "label-xs-text text-text-secondary", children: "Payments" }),
|
|
1020
|
+
/* @__PURE__ */ jsxs7("span", { className: "body-text-semibold text-text-primary truncate", children: [
|
|
869
1021
|
deal.payments_paid,
|
|
870
1022
|
" of ",
|
|
871
1023
|
deal.payments_total,
|
|
@@ -873,20 +1025,20 @@ function ProjectDealCard({
|
|
|
873
1025
|
] })
|
|
874
1026
|
] })
|
|
875
1027
|
] }),
|
|
876
|
-
/* @__PURE__ */
|
|
877
|
-
/* @__PURE__ */
|
|
878
|
-
/* @__PURE__ */
|
|
879
|
-
/* @__PURE__ */
|
|
1028
|
+
/* @__PURE__ */ jsx8("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
|
|
1029
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-2 min-w-0 p-2 bg-greys-table-hover", children: [
|
|
1030
|
+
/* @__PURE__ */ jsx8("span", { className: "w-[58px] shrink-0 text-[11px] leading-none text-text-secondary font-normal", children: "Payment" }),
|
|
1031
|
+
/* @__PURE__ */ jsx8("div", { className: "relative flex-1 min-w-0 h-1 bg-greys-nav-text rounded-full overflow-hidden", children: /* @__PURE__ */ jsx8(
|
|
880
1032
|
"div",
|
|
881
1033
|
{
|
|
882
1034
|
className: "absolute inset-y-0 left-0 bg-primary-color-nuk-ui-elem rounded-full",
|
|
883
1035
|
style: { width: `${progressPct}%` }
|
|
884
1036
|
}
|
|
885
1037
|
) }),
|
|
886
|
-
/* @__PURE__ */
|
|
1038
|
+
/* @__PURE__ */ jsxs7(
|
|
887
1039
|
"span",
|
|
888
1040
|
{
|
|
889
|
-
className:
|
|
1041
|
+
className: cn8(
|
|
890
1042
|
"w-9 shrink-0 text-right text-[11px] leading-none font-normal",
|
|
891
1043
|
isFullyPaid ? "text-primary-color-nuk-text" : "text-text-secondary"
|
|
892
1044
|
),
|
|
@@ -897,8 +1049,8 @@ function ProjectDealCard({
|
|
|
897
1049
|
}
|
|
898
1050
|
)
|
|
899
1051
|
] }),
|
|
900
|
-
showCollab && /* @__PURE__ */
|
|
901
|
-
showCollab && /* @__PURE__ */
|
|
1052
|
+
showCollab && /* @__PURE__ */ jsx8("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
|
|
1053
|
+
showCollab && /* @__PURE__ */ jsx8("div", { className: "flex gap-1 p-2 bg-greys-table-hover rounded-[0_0_10px_10px] justify-end", children: /* @__PURE__ */ jsxs7(
|
|
902
1054
|
CollabAffordance,
|
|
903
1055
|
{
|
|
904
1056
|
href: collabHref,
|
|
@@ -906,15 +1058,15 @@ function ProjectDealCard({
|
|
|
906
1058
|
className: "flex gap-2 items-center text-primary-color-nuk-text text-[11px] font-normal shrink-0",
|
|
907
1059
|
children: [
|
|
908
1060
|
"Collab",
|
|
909
|
-
/* @__PURE__ */
|
|
1061
|
+
/* @__PURE__ */ jsx8(XsViewInvoiceIcon2, { className: "size-[18px] p-[1px] flex justify-center items-center" })
|
|
910
1062
|
]
|
|
911
1063
|
}
|
|
912
1064
|
) })
|
|
913
1065
|
] })
|
|
914
1066
|
] }),
|
|
915
|
-
/* @__PURE__ */
|
|
916
|
-
/* @__PURE__ */
|
|
917
|
-
/* @__PURE__ */
|
|
1067
|
+
/* @__PURE__ */ jsxs7("div", { className: "hidden sm:flex flex-col gap-3 p-3 bg-card border-b border-greys-grey-strokes-tables font-ss02", children: [
|
|
1068
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex gap-3 items-start w-full", children: [
|
|
1069
|
+
/* @__PURE__ */ jsx8(
|
|
918
1070
|
EntityAvatar,
|
|
919
1071
|
{
|
|
920
1072
|
entityType: "company",
|
|
@@ -925,10 +1077,10 @@ function ProjectDealCard({
|
|
|
925
1077
|
className: "shrink-0 rounded-[34px]"
|
|
926
1078
|
}
|
|
927
1079
|
),
|
|
928
|
-
/* @__PURE__ */
|
|
929
|
-
/* @__PURE__ */
|
|
930
|
-
/* @__PURE__ */
|
|
931
|
-
showCollab && /* @__PURE__ */
|
|
1080
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-1 min-w-0 flex-col gap-2 justify-center", children: [
|
|
1081
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex gap-2 items-center", children: [
|
|
1082
|
+
/* @__PURE__ */ jsx8("span", { className: "header-xl-medium-card text-text-primary", children: brandName }),
|
|
1083
|
+
showCollab && /* @__PURE__ */ jsxs7(
|
|
932
1084
|
CollabAffordance,
|
|
933
1085
|
{
|
|
934
1086
|
href: collabHref,
|
|
@@ -936,15 +1088,15 @@ function ProjectDealCard({
|
|
|
936
1088
|
className: "flex gap-1.5 items-center text-primary-color-nuk-text label-xs-text shrink-0",
|
|
937
1089
|
children: [
|
|
938
1090
|
"Collab Hub",
|
|
939
|
-
/* @__PURE__ */
|
|
1091
|
+
/* @__PURE__ */ jsx8(XsViewInvoiceIcon2, { className: "size-[18px] p-[1px] flex justify-center items-center" })
|
|
940
1092
|
]
|
|
941
1093
|
}
|
|
942
1094
|
)
|
|
943
1095
|
] }),
|
|
944
|
-
/* @__PURE__ */
|
|
945
|
-
/* @__PURE__ */
|
|
946
|
-
/* @__PURE__ */
|
|
947
|
-
/* @__PURE__ */
|
|
1096
|
+
/* @__PURE__ */ jsx8("div", { className: "label-xs-text text-text-secondary break-words sm:whitespace-nowrap", children: [category, `${startDate} - ${endDate}`].filter(Boolean).join(" \u2022 ") }),
|
|
1097
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex gap-3 items-center min-w-0", children: [
|
|
1098
|
+
/* @__PURE__ */ jsx8("span", { className: "label-xs-text text-text-secondary shrink-0", children: "Owner" }),
|
|
1099
|
+
/* @__PURE__ */ jsx8(
|
|
948
1100
|
EntityAvatar,
|
|
949
1101
|
{
|
|
950
1102
|
entityType: "initials",
|
|
@@ -955,60 +1107,61 @@ function ProjectDealCard({
|
|
|
955
1107
|
className: "shrink-0"
|
|
956
1108
|
}
|
|
957
1109
|
),
|
|
958
|
-
/* @__PURE__ */
|
|
1110
|
+
/* @__PURE__ */ jsx8("span", { className: "label-xs-text text-text-secondary truncate", children: abbreviatePersonName(deal.owner_name) ?? "\u2014" })
|
|
959
1111
|
] })
|
|
960
1112
|
] }),
|
|
961
|
-
/* @__PURE__ */
|
|
962
|
-
/* @__PURE__ */
|
|
963
|
-
deal.total_equity_shares > 0 && /* @__PURE__ */
|
|
1113
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-1 items-end justify-center shrink-0", children: [
|
|
1114
|
+
/* @__PURE__ */ jsx8("span", { className: "team-stats-card text-text-primary whitespace-nowrap", children: fmtUSD2(deal.total_contracted) }),
|
|
1115
|
+
deal.total_equity_shares > 0 && /* @__PURE__ */ jsxs7("span", { className: "label-xs-text text-text-secondary whitespace-nowrap", children: [
|
|
964
1116
|
"+ ",
|
|
965
1117
|
deal.total_equity_shares.toLocaleString(),
|
|
966
1118
|
" shares"
|
|
967
1119
|
] }),
|
|
968
|
-
/* @__PURE__ */
|
|
1120
|
+
/* @__PURE__ */ jsx8(
|
|
969
1121
|
"div",
|
|
970
1122
|
{
|
|
971
|
-
className:
|
|
1123
|
+
className: cn8(
|
|
972
1124
|
"h-[27px] px-3 py-1.5 rounded-[50px] flex items-center justify-center whitespace-nowrap",
|
|
973
1125
|
STATUS_STYLES[status]
|
|
974
1126
|
),
|
|
975
|
-
children: /* @__PURE__ */
|
|
1127
|
+
children: /* @__PURE__ */ jsx8("span", { className: "label-xs-medium", children: statusLabel(status) })
|
|
976
1128
|
}
|
|
977
|
-
)
|
|
1129
|
+
),
|
|
1130
|
+
asideFooter
|
|
978
1131
|
] })
|
|
979
1132
|
] }),
|
|
980
|
-
/* @__PURE__ */
|
|
981
|
-
/* @__PURE__ */
|
|
1133
|
+
/* @__PURE__ */ jsxs7("div", { className: "grid w-full grid-cols-2 items-center gap-x-3 gap-y-2 md:grid-cols-3 lg:flex lg:justify-between lg:gap-0", children: [
|
|
1134
|
+
/* @__PURE__ */ jsx8(
|
|
982
1135
|
TrackingItem,
|
|
983
1136
|
{
|
|
984
1137
|
label: `Deliverables met - ${deal.deliverables_met}/${deal.deliverables_total}`,
|
|
985
1138
|
done: deal.deliverables_total > 0 && deal.deliverables_met >= deal.deliverables_total
|
|
986
1139
|
}
|
|
987
1140
|
),
|
|
988
|
-
/* @__PURE__ */
|
|
989
|
-
/* @__PURE__ */
|
|
990
|
-
deal.has_third_party && /* @__PURE__ */
|
|
1141
|
+
/* @__PURE__ */ jsx8(TrackingItem, { label: "Client paid", done: deal.client_paid && isFullyPaid }),
|
|
1142
|
+
/* @__PURE__ */ jsx8(TrackingItem, { label: "Agency paid", done: deal.agency_paid && isFullyPaid }),
|
|
1143
|
+
deal.has_third_party && /* @__PURE__ */ jsx8(TrackingItem, { label: "Third Party paid", done: deal.third_party_paid && isFullyPaid })
|
|
991
1144
|
] }),
|
|
992
|
-
/* @__PURE__ */
|
|
993
|
-
/* @__PURE__ */
|
|
1145
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-2 w-full", children: [
|
|
1146
|
+
/* @__PURE__ */ jsx8("div", { className: "relative w-full h-2 bg-greys-nav-text rounded-[10px] overflow-hidden", children: /* @__PURE__ */ jsx8(
|
|
994
1147
|
"div",
|
|
995
1148
|
{
|
|
996
1149
|
className: "absolute left-0 top-0 h-2 bg-primary-color-nuk-ui-elem rounded-[10px]",
|
|
997
1150
|
style: { width: `${progressPct}%` }
|
|
998
1151
|
}
|
|
999
1152
|
) }),
|
|
1000
|
-
/* @__PURE__ */
|
|
1001
|
-
/* @__PURE__ */
|
|
1153
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex gap-3 items-start text-[13px] font-medium w-full", children: [
|
|
1154
|
+
/* @__PURE__ */ jsx8(
|
|
1002
1155
|
"span",
|
|
1003
1156
|
{
|
|
1004
|
-
className:
|
|
1157
|
+
className: cn8(
|
|
1005
1158
|
"min-w-0 flex-1 label-xs-table",
|
|
1006
1159
|
deal.total_collected > 0 ? "text-primary-color-nuk-text" : "text-text-secondary"
|
|
1007
1160
|
),
|
|
1008
|
-
children: `${
|
|
1161
|
+
children: `${fmtUSD2(deal.total_collected)}${deal.total_collected > 0 ? " collected" : ""}`
|
|
1009
1162
|
}
|
|
1010
1163
|
),
|
|
1011
|
-
hasPaymentsCount && /* @__PURE__ */
|
|
1164
|
+
hasPaymentsCount && /* @__PURE__ */ jsxs7("span", { className: "flex-1 label-xs-table text-text-secondary", children: [
|
|
1012
1165
|
deal.payments_paid,
|
|
1013
1166
|
" of ",
|
|
1014
1167
|
deal.payments_total,
|
|
@@ -1016,8 +1169,8 @@ function ProjectDealCard({
|
|
|
1016
1169
|
" ",
|
|
1017
1170
|
status === "Active" ? "collected" : "paid"
|
|
1018
1171
|
] }),
|
|
1019
|
-
isFullyPaid ? /* @__PURE__ */
|
|
1020
|
-
|
|
1172
|
+
isFullyPaid ? /* @__PURE__ */ jsx8("span", { className: "shrink-0 text-primary-color-nuk-text label-xs-table whitespace-nowrap", children: "Fully Paid" }) : /* @__PURE__ */ jsxs7("span", { className: "shrink-0 text-semantic-color-status-priority-priority-2 label-xs-table whitespace-nowrap", children: [
|
|
1173
|
+
fmtUSD2(outstanding),
|
|
1021
1174
|
" outstanding"
|
|
1022
1175
|
] })
|
|
1023
1176
|
] })
|
|
@@ -1026,6 +1179,7 @@ function ProjectDealCard({
|
|
|
1026
1179
|
] });
|
|
1027
1180
|
}
|
|
1028
1181
|
export {
|
|
1182
|
+
ContractDetailsCard,
|
|
1029
1183
|
DealEmptyState,
|
|
1030
1184
|
ENTITY_AVATAR_SIZE_PX,
|
|
1031
1185
|
EntityAvatar,
|