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