braid-ui 1.0.32 → 1.0.34

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/index.cjs CHANGED
@@ -3378,30 +3378,30 @@ zod.z.object({
3378
3378
 
3379
3379
  // src/lib/mock-data/business-data.ts
3380
3380
  var defaultBusinessProfile = {
3381
- legalName: "Acme Corporation",
3382
- dbaName: "ACME Tech",
3383
- businessType: "corporation",
3384
- taxId: "12-3456789",
3385
- formationDate: "2020-01-15",
3386
- idType: "EIN",
3381
+ name: "Acme Corporation",
3382
+ productId: 1,
3383
+ businessIdType: "EIN",
3384
+ idNumber: "12-3456789",
3385
+ dba: "ACME Tech",
3386
+ businessEntityType: "CORPORATION",
3387
3387
  incorporationState: "Delaware",
3388
+ formationDate: "2020-01-15",
3388
3389
  website: "https://acme.com",
3389
- email: "contact@acme.com",
3390
- mobilePhone: "+1 (555) 234-5678",
3391
3390
  mcc: "1234",
3392
3391
  naics: "123456",
3392
+ mobilePhone: "+1 (555) 234-5678",
3393
3393
  achCompanyId: "1234567890",
3394
- achCompanyName: "Acme Corporation",
3395
- externalId: "c48c9834-ccdd-42df-bd56-1022df37341b",
3396
- productId: 1,
3394
+ contactPersonFirstName: "John",
3395
+ contactPersonLastName: "Smith",
3396
+ contactPersonEmail: "contact@acme.com",
3397
+ contactPersonPhone: "+1 (555) 123-4567",
3397
3398
  address: {
3398
- streetAddress: "123 Business Avenue",
3399
- apartment: "Suite 100",
3399
+ line1: "123 Business Avenue",
3400
+ line2: "Suite 100",
3400
3401
  city: "New York",
3401
3402
  state: "NY",
3402
3403
  postalCode: "10001",
3403
- country: "US",
3404
- addressType: "business"
3404
+ countryCode: "US"
3405
3405
  }
3406
3406
  };
3407
3407
  var BusinessProfileCard = ({
@@ -3693,7 +3693,19 @@ var BusinessProfileCard = ({
3693
3693
  InfoField,
3694
3694
  {
3695
3695
  label: "Address",
3696
- value: formValues?.address ? `${formValues.address.line1 || ""}${formValues.address.line2 ? ", " + formValues.address.line2 : ""}, ${formValues.address.city || ""}, ${formValues.address.state || ""} ${formValues.address.postalCode || ""}, ${formValues.address.countryCode || ""}` : "-",
3696
+ value: formValues?.address ? (() => {
3697
+ const parts = [];
3698
+ if (formValues.address.line1) parts.push(formValues.address.line1);
3699
+ if (formValues.address.line2) parts.push(formValues.address.line2);
3700
+ const cityStateZip = [
3701
+ formValues.address.city,
3702
+ formValues.address.state,
3703
+ formValues.address.postalCode
3704
+ ].filter(Boolean).join(" ");
3705
+ if (cityStateZip) parts.push(cityStateZip);
3706
+ if (formValues.address.countryCode) parts.push(formValues.address.countryCode);
3707
+ return parts.length > 0 ? parts.join(", ") : "-";
3708
+ })() : "-",
3697
3709
  layout: "horizontal"
3698
3710
  }
3699
3711
  ),
@@ -4276,7 +4288,7 @@ var PageLayout = React15__namespace.forwardRef(
4276
4288
  }
4277
4289
  );
4278
4290
  PageLayout.displayName = "PageLayout";
4279
- var UBOCard = ({ ubos }) => {
4291
+ var UBOCard = ({ ubos, onUBOClick }) => {
4280
4292
  const columns3 = [
4281
4293
  {
4282
4294
  key: "name",
@@ -4284,10 +4296,10 @@ var UBOCard = ({ ubos }) => {
4284
4296
  sortable: true,
4285
4297
  width: "40%",
4286
4298
  render: (value, row) => /* @__PURE__ */ jsxRuntime.jsx(
4287
- reactRouterDom.Link,
4299
+ "button",
4288
4300
  {
4289
- to: `/customer/${row.customerId}`,
4290
- className: "text-primary hover:underline font-medium",
4301
+ onClick: () => onUBOClick(row.customerId),
4302
+ className: "text-primary hover:underline font-medium text-left",
4291
4303
  children: value
4292
4304
  }
4293
4305
  )
@@ -4648,7 +4660,8 @@ var BusinessDetailView = ({
4648
4660
  onToggleProfileEdit,
4649
4661
  onNavigateToAccounts,
4650
4662
  onNavigateToCounterparty,
4651
- onAddAccount
4663
+ onAddAccount,
4664
+ onUBOClick
4652
4665
  }) => {
4653
4666
  return /* @__PURE__ */ jsxRuntime.jsx(
4654
4667
  PageLayout,
@@ -4701,7 +4714,7 @@ var BusinessDetailView = ({
4701
4714
  onDataChange: onProfileDataChange
4702
4715
  }
4703
4716
  ),
4704
- /* @__PURE__ */ jsxRuntime.jsx(UBOCard, { ubos: businessUBOs }),
4717
+ /* @__PURE__ */ jsxRuntime.jsx(UBOCard, { ubos: businessUBOs, onUBOClick }),
4705
4718
  /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
4706
4719
  /* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
4707
4720
  /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "External Accounts" }),
@@ -10410,6 +10423,9 @@ var BusinessDetail = () => {
10410
10423
  const handleAddAccount = () => {
10411
10424
  console.log("Add account clicked");
10412
10425
  };
10426
+ const handleUBOClick = (customerId) => {
10427
+ navigate(`/customer/${customerId}`);
10428
+ };
10413
10429
  if (!business) {
10414
10430
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
10415
10431
  /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-bold mb-2", children: "Business Not Found" }),
@@ -10432,7 +10448,8 @@ var BusinessDetail = () => {
10432
10448
  onToggleProfileEdit: handleToggleProfileEdit,
10433
10449
  onNavigateToAccounts: handleNavigateToAccounts,
10434
10450
  onNavigateToCounterparty: handleNavigateToCounterparty,
10435
- onAddAccount: handleAddAccount
10451
+ onAddAccount: handleAddAccount,
10452
+ onUBOClick: handleUBOClick
10436
10453
  }
10437
10454
  );
10438
10455
  };