customer-module-frontend 1.0.0-beta.16 → 1.0.0-beta.18
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/customer-module.js +25 -14
- package/dist/customer-module.js.map +1 -1
- package/package.json +1 -1
package/dist/customer-module.js
CHANGED
|
@@ -25639,14 +25639,25 @@ ir.interceptors.request.use(
|
|
|
25639
25639
|
const n = la.getState().config;
|
|
25640
25640
|
n?.baseUrl && n?.accountId && (e.baseURL = `${n.baseUrl}/api/v1/accounts/${n.accountId}/customer-module`);
|
|
25641
25641
|
const t = $h();
|
|
25642
|
-
|
|
25643
|
-
|
|
25644
|
-
|
|
25645
|
-
|
|
25646
|
-
|
|
25647
|
-
|
|
25648
|
-
|
|
25649
|
-
|
|
25642
|
+
if (console.log("customer-module authCookie", t), t) {
|
|
25643
|
+
let a;
|
|
25644
|
+
if (typeof t == "string")
|
|
25645
|
+
try {
|
|
25646
|
+
a = JSON.parse(t);
|
|
25647
|
+
} catch {
|
|
25648
|
+
try {
|
|
25649
|
+
a = JSON.parse(decodeURIComponent(t));
|
|
25650
|
+
} catch {
|
|
25651
|
+
console.error("Failed to parse auth cookie"), a = {};
|
|
25652
|
+
}
|
|
25653
|
+
}
|
|
25654
|
+
else
|
|
25655
|
+
a = t;
|
|
25656
|
+
(a["access-token"] || a.access_token) && (e.headers["access-token"] = a["access-token"] || a.access_token), (a["token-type"] || a.token_type) && (e.headers["token-type"] = a["token-type"] || a.token_type), a.client && (e.headers.client = a.client), a.expiry && (e.headers.expiry = a.expiry), a.uid && (e.headers.uid = a.uid);
|
|
25657
|
+
const r = Gh();
|
|
25658
|
+
r && (e.headers.cookie = r), console.log("customer-module headers", e.headers);
|
|
25659
|
+
}
|
|
25660
|
+
return console.log("customer-module config", e), e;
|
|
25650
25661
|
},
|
|
25651
25662
|
(e) => Promise.reject(e)
|
|
25652
25663
|
);
|
|
@@ -26534,14 +26545,14 @@ function bb() {
|
|
|
26534
26545
|
const f = parseInt(d, 10);
|
|
26535
26546
|
if (isNaN(f)) return "Account";
|
|
26536
26547
|
const h = a[f];
|
|
26537
|
-
return h?.company?.name ? h.company.name : t?.
|
|
26548
|
+
return h?.company?.name ? h.company.name : t?.companies?.find(
|
|
26538
26549
|
(v) => v.id === f
|
|
26539
26550
|
)?.name || "Account";
|
|
26540
26551
|
}, u = (d) => {
|
|
26541
26552
|
const f = parseInt(d, 10);
|
|
26542
26553
|
if (isNaN(f)) return "Contact";
|
|
26543
26554
|
const h = o[f];
|
|
26544
|
-
return h?.contact?.name ? h.contact.name : r?.
|
|
26555
|
+
return h?.contact?.name ? h.contact.name : r?.contacts?.find(
|
|
26545
26556
|
(v) => v.id === f
|
|
26546
26557
|
)?.name || "Contact";
|
|
26547
26558
|
};
|
|
@@ -26622,13 +26633,13 @@ function xb() {
|
|
|
26622
26633
|
Xn(() => {
|
|
26623
26634
|
a();
|
|
26624
26635
|
}, [a]);
|
|
26625
|
-
const r = er(() => !t && (!n?.
|
|
26636
|
+
const r = er(() => !t && (!n?.companies || n.companies.length === 0) ? [{
|
|
26626
26637
|
id: "no-data",
|
|
26627
26638
|
name: "No account exist",
|
|
26628
26639
|
domain: "",
|
|
26629
26640
|
isNoDataRow: !0
|
|
26630
26641
|
// Flag to identify this as a non-clickable row
|
|
26631
|
-
}] : n?.
|
|
26642
|
+
}] : n?.companies ? n.companies.map((i) => ({
|
|
26632
26643
|
id: i.id,
|
|
26633
26644
|
name: i.name,
|
|
26634
26645
|
domain: i.domains[0]?.name || i.generated_name,
|
|
@@ -26679,7 +26690,7 @@ function Ob() {
|
|
|
26679
26690
|
Xn(() => {
|
|
26680
26691
|
a();
|
|
26681
26692
|
}, [a]);
|
|
26682
|
-
const r = er(() => !t && (!n?.
|
|
26693
|
+
const r = er(() => !t && (!n?.contacts || n.contacts.length === 0) ? [{
|
|
26683
26694
|
id: "no-data",
|
|
26684
26695
|
name: "No contact exist",
|
|
26685
26696
|
email: "",
|
|
@@ -26691,7 +26702,7 @@ function Ob() {
|
|
|
26691
26702
|
accountDisplay: /* @__PURE__ */ P(Lu, { account: "" }),
|
|
26692
26703
|
isNoDataRow: !0
|
|
26693
26704
|
// Flag to identify this as a non-clickable row
|
|
26694
|
-
}] : n?.
|
|
26705
|
+
}] : n?.contacts ? n.contacts.map((i) => ({
|
|
26695
26706
|
...i,
|
|
26696
26707
|
nameDisplay: /* @__PURE__ */ P(Mu, { name: i.name }),
|
|
26697
26708
|
emailDisplay: /* @__PURE__ */ P(Au, { email: i.email }),
|