ahs-cti 1.0.1-beta.76 → 1.0.1-beta.78
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.js +482 -383
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{managementDashboard-7JPQ2H76.mjs → managementDashboard-QZQ2WRPE.mjs} +111 -21
- package/dist/managementDashboard-QZQ2WRPE.mjs.map +1 -0
- package/dist-react/index.js +106 -21
- package/dist-react/index.js.map +1 -1
- package/dist-react/index.mjs +1 -1
- package/dist-react/{managementDashboard-BI2RWIKE.mjs → managementDashboard-F3HLPLHF.mjs} +106 -21
- package/dist-react/managementDashboard-F3HLPLHF.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/managementDashboard-7JPQ2H76.mjs.map +0 -1
- package/dist-react/managementDashboard-BI2RWIKE.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -13333,10 +13333,10 @@ var init_emotion_react_browser_esm = __esm({
|
|
|
13333
13333
|
}
|
|
13334
13334
|
return React3.createElement.apply(null, createElementArgArray);
|
|
13335
13335
|
};
|
|
13336
|
-
(function(
|
|
13336
|
+
(function(_jsx266) {
|
|
13337
13337
|
var JSX;
|
|
13338
13338
|
/* @__PURE__ */ (function(_JSX) {
|
|
13339
|
-
})(JSX || (JSX =
|
|
13339
|
+
})(JSX || (JSX = _jsx266.JSX || (_jsx266.JSX = {})));
|
|
13340
13340
|
})(jsx || (jsx = {}));
|
|
13341
13341
|
Global = /* @__PURE__ */ withEmotionCache(function(props, cache) {
|
|
13342
13342
|
var styles5 = props.styles;
|
|
@@ -134315,6 +134315,20 @@ var init_PhoneForwarded = __esm({
|
|
|
134315
134315
|
}
|
|
134316
134316
|
});
|
|
134317
134317
|
|
|
134318
|
+
// node_modules/@mui/icons-material/PhoneMissed.mjs
|
|
134319
|
+
var import_jsx_runtime293, PhoneMissed_default;
|
|
134320
|
+
var init_PhoneMissed = __esm({
|
|
134321
|
+
"node_modules/@mui/icons-material/PhoneMissed.mjs"() {
|
|
134322
|
+
"use strict";
|
|
134323
|
+
"use client";
|
|
134324
|
+
init_createSvgIcon3();
|
|
134325
|
+
import_jsx_runtime293 = require("react/jsx-runtime");
|
|
134326
|
+
PhoneMissed_default = createSvgIcon(/* @__PURE__ */ (0, import_jsx_runtime293.jsx)("path", {
|
|
134327
|
+
d: "M6.5 5.5 12 11l7-7-1-1-6 6-4.5-4.5H11V3H5v6h1.5zm17.21 11.17C20.66 13.78 16.54 12 12 12S3.34 13.78.29 16.67c-.18.18-.29.43-.29.71s.11.53.29.71l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.11.7-.28.79-.74 1.69-1.36 2.66-1.85.33-.16.56-.5.56-.9v-3.1c1.45-.48 3-.73 4.6-.73s3.15.25 4.6.72v3.1c0 .39.23.74.56.9.98.49 1.87 1.12 2.67 1.85.18.18.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.12-.52-.3-.7"
|
|
134328
|
+
}), "PhoneMissed");
|
|
134329
|
+
}
|
|
134330
|
+
});
|
|
134331
|
+
|
|
134318
134332
|
// call-control-sdk/lib/pages/managementDashboard/useManagementDashboard.ts
|
|
134319
134333
|
function buildQs(params) {
|
|
134320
134334
|
const qs = new URLSearchParams();
|
|
@@ -134343,23 +134357,26 @@ var managementDashboard_exports = {};
|
|
|
134343
134357
|
__export(managementDashboard_exports, {
|
|
134344
134358
|
default: () => managementDashboard_default
|
|
134345
134359
|
});
|
|
134346
|
-
function DirectionCard({ title, data, icon }) {
|
|
134347
|
-
|
|
134348
|
-
|
|
134349
|
-
|
|
134350
|
-
|
|
134360
|
+
function DirectionCard({ title, data, icon, droppedLabel }) {
|
|
134361
|
+
var _a2, _b, _c, _d, _e, _f, _g;
|
|
134362
|
+
const dropped = (_b = (_a2 = data.abandoned) != null ? _a2 : data.unanswered) != null ? _b : 0;
|
|
134363
|
+
const droppedPct = (_d = (_c = data.abandoned_pct) != null ? _c : data.unanswered_pct) != null ? _d : 0;
|
|
134364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Paper_default, { sx: cardPaper, children: [
|
|
134365
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: labelSx2, children: title }) }),
|
|
134366
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { p: 1.5 }, children: [
|
|
134367
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "flex", alignItems: "center", justifyContent: "center", gap: 1, mb: 1.2 }, children: [
|
|
134351
134368
|
icon,
|
|
134352
|
-
/* @__PURE__ */ (0,
|
|
134369
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: bigNumSx, children: ((_e = data.total) != null ? _e : 0).toLocaleString() })
|
|
134353
134370
|
] }),
|
|
134354
|
-
/* @__PURE__ */ (0,
|
|
134355
|
-
{ label: "ANSWERED", value: data.answered, pct: data.answered_pct },
|
|
134356
|
-
{ label:
|
|
134357
|
-
].map(({ label, value, pct }, idx) => /* @__PURE__ */ (0,
|
|
134358
|
-
/* @__PURE__ */ (0,
|
|
134359
|
-
/* @__PURE__ */ (0,
|
|
134360
|
-
/* @__PURE__ */ (0,
|
|
134361
|
-
/* @__PURE__ */ (0,
|
|
134362
|
-
/* @__PURE__ */ (0,
|
|
134371
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { display: "grid", gridTemplateColumns: "1fr 1fr", borderTop: `2px solid ${C6.s3}`, pt: 1 }, children: [
|
|
134372
|
+
{ label: "ANSWERED", value: (_f = data.answered) != null ? _f : 0, pct: (_g = data.answered_pct) != null ? _g : 0 },
|
|
134373
|
+
{ label: droppedLabel, value: dropped, pct: droppedPct }
|
|
134374
|
+
].map(({ label, value, pct }, idx) => /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: __spreadValues({ textAlign: "center" }, idx === 0 && { borderRight: `1px solid ${C6.b1}` }), children: [
|
|
134375
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 10, fontWeight: 700, letterSpacing: 0.5, color: C6.t3, mb: 0.3 }, children: label }),
|
|
134376
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "flex", alignItems: "baseline", justifyContent: "center", gap: 0.5 }, children: [
|
|
134377
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 15, fontWeight: 700, color: C6.blue }, children: value.toLocaleString() }),
|
|
134378
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t3 }, children: "|" }),
|
|
134379
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Typography_default, { sx: { fontSize: 12, fontWeight: 600, color: C6.blue }, children: [
|
|
134363
134380
|
pct.toFixed(1),
|
|
134364
134381
|
"%"
|
|
134365
134382
|
] })
|
|
@@ -134370,18 +134387,18 @@ function DirectionCard({ title, data, icon }) {
|
|
|
134370
134387
|
}
|
|
134371
134388
|
function QueueCallsCard({ data }) {
|
|
134372
134389
|
const maxCount = data.reduce((m, q) => Math.max(m, q.call_count), 0) || 1;
|
|
134373
|
-
return /* @__PURE__ */ (0,
|
|
134374
|
-
/* @__PURE__ */ (0,
|
|
134375
|
-
/* @__PURE__ */ (0,
|
|
134376
|
-
data.length === 0 && /* @__PURE__ */ (0,
|
|
134390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Paper_default, { sx: cardPaper, children: [
|
|
134391
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: labelSx2, children: "Queue Wise Calls" }) }),
|
|
134392
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { p: 1.5 }, children: [
|
|
134393
|
+
data.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 12, color: C6.t3, textAlign: "center", py: 2 }, children: "No data" }),
|
|
134377
134394
|
data.map((q, i) => {
|
|
134378
134395
|
const pct = Math.max(6, q.call_count / maxCount * 100);
|
|
134379
|
-
return /* @__PURE__ */ (0,
|
|
134380
|
-
/* @__PURE__ */ (0,
|
|
134381
|
-
/* @__PURE__ */ (0,
|
|
134382
|
-
/* @__PURE__ */ (0,
|
|
134396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { mb: 0.7, "&:last-child": { mb: 0 } }, children: [
|
|
134397
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center", mb: 0.3 }, children: [
|
|
134398
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 12, fontWeight: 600, color: C6.t2 }, children: q.queue_name }),
|
|
134399
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 13, fontWeight: 700, color: C6.blue }, children: q.call_count })
|
|
134383
134400
|
] }),
|
|
134384
|
-
/* @__PURE__ */ (0,
|
|
134401
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { height: 6, background: C6.s3, borderRadius: 3, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { height: "100%", width: `${pct}%`, background: i === 0 ? C6.blue : "#7fb3bd", borderRadius: 3 } }) })
|
|
134385
134402
|
] }, q.queue_name);
|
|
134386
134403
|
})
|
|
134387
134404
|
] })
|
|
@@ -134392,28 +134409,28 @@ function AbandonedCallbackCard({ data }) {
|
|
|
134392
134409
|
const subCellSx = { p: 1, textAlign: "center", borderTop: `1px solid ${C6.b1}` };
|
|
134393
134410
|
const subLabelSx = { fontSize: 10, fontWeight: 600, color: C6.t3, mb: 0.3, lineHeight: 1.2 };
|
|
134394
134411
|
const subRowSx = { display: "flex", alignItems: "baseline", justifyContent: "center", gap: 0.5 };
|
|
134395
|
-
return /* @__PURE__ */ (0,
|
|
134396
|
-
/* @__PURE__ */ (0,
|
|
134397
|
-
/* @__PURE__ */ (0,
|
|
134398
|
-
/* @__PURE__ */ (0,
|
|
134399
|
-
/* @__PURE__ */ (0,
|
|
134400
|
-
/* @__PURE__ */ (0,
|
|
134401
|
-
/* @__PURE__ */ (0,
|
|
134402
|
-
/* @__PURE__ */ (0,
|
|
134403
|
-
/* @__PURE__ */ (0,
|
|
134404
|
-
/* @__PURE__ */ (0,
|
|
134405
|
-
/* @__PURE__ */ (0,
|
|
134412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Paper_default, { sx: cardPaper, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "grid", gridTemplateColumns: "1fr 1fr" }, children: [
|
|
134413
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: __spreadProps(__spreadValues({}, cardHeader), { borderRight: `1px solid ${C6.b1}` }), children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: labelSx2, children: "Abandoned" }) }),
|
|
134414
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: labelSx2, children: "Avg Callback Duration" }) }),
|
|
134415
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: __spreadProps(__spreadValues({}, numCellSx), { borderRight: `1px solid ${C6.b1}` }), children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: bigNumSx, children: data.total.toLocaleString() }) }),
|
|
134416
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: numCellSx, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontFamily: "'JetBrains Mono', monospace", fontSize: { xs: 24, lg: 19, xl: 24 }, fontWeight: 700, color: C6.navy, letterSpacing: 1 }, children: data.avg_callback_duration }) }),
|
|
134417
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: __spreadProps(__spreadValues({}, subCellSx), { borderRight: `1px solid ${C6.b1}` }), children: [
|
|
134418
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: subLabelSx, children: "Called Back" }),
|
|
134419
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: subRowSx, children: [
|
|
134420
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 13, fontWeight: 700, color: C6.blue }, children: data.called_back }),
|
|
134421
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t3 }, children: "|" }),
|
|
134422
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Typography_default, { sx: { fontSize: 12, fontWeight: 600, color: C6.blue }, children: [
|
|
134406
134423
|
data.called_back_pct.toFixed(1),
|
|
134407
134424
|
"%"
|
|
134408
134425
|
] })
|
|
134409
134426
|
] })
|
|
134410
134427
|
] }),
|
|
134411
|
-
/* @__PURE__ */ (0,
|
|
134412
|
-
/* @__PURE__ */ (0,
|
|
134413
|
-
/* @__PURE__ */ (0,
|
|
134414
|
-
/* @__PURE__ */ (0,
|
|
134415
|
-
/* @__PURE__ */ (0,
|
|
134416
|
-
/* @__PURE__ */ (0,
|
|
134428
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: subCellSx, children: [
|
|
134429
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: subLabelSx, children: "To be Called" }),
|
|
134430
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: subRowSx, children: [
|
|
134431
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 13, fontWeight: 700, color: C6.blue }, children: data.to_call }),
|
|
134432
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t3 }, children: "|" }),
|
|
134433
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Typography_default, { sx: { fontSize: 12, fontWeight: 600, color: C6.blue }, children: [
|
|
134417
134434
|
data.to_call_pct.toFixed(1),
|
|
134418
134435
|
"%"
|
|
134419
134436
|
] })
|
|
@@ -134421,6 +134438,70 @@ function AbandonedCallbackCard({ data }) {
|
|
|
134421
134438
|
] })
|
|
134422
134439
|
] }) });
|
|
134423
134440
|
}
|
|
134441
|
+
function IvrAbandonedCard({ data }) {
|
|
134442
|
+
const gridCellSx = { p: 1, textAlign: "center", borderTop: `1px solid ${C6.b1}` };
|
|
134443
|
+
const gridLabelSx = { fontSize: 10, fontWeight: 600, color: C6.t3, mb: 0.3, lineHeight: 1.2 };
|
|
134444
|
+
const splitSx = { display: "flex", alignItems: "baseline", justifyContent: "center", gap: 0.5 };
|
|
134445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Paper_default, { sx: cardPaper, children: [
|
|
134446
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: labelSx2, children: "IVR Abandoned" }) }),
|
|
134447
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { py: 1.1, px: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "flex", alignItems: "center", justifyContent: "center", gap: 1 }, children: [
|
|
134448
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(PhoneMissed_default, { sx: numIconSx }),
|
|
134449
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: bigNumSx, children: data.total.toLocaleString() })
|
|
134450
|
+
] }) }),
|
|
134451
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { display: "grid", gridTemplateColumns: "1fr 1fr" }, children: [
|
|
134452
|
+
{ label: "Called Back", value: data.called_back, pct: data.called_back_pct },
|
|
134453
|
+
{ label: "To be Called Back", value: data.to_call, pct: data.to_call_pct }
|
|
134454
|
+
].map(({ label, value, pct }, idx) => /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: __spreadValues(__spreadValues({}, gridCellSx), idx === 0 && { borderRight: `1px solid ${C6.b1}` }), children: [
|
|
134455
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: gridLabelSx, children: label }),
|
|
134456
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: splitSx, children: [
|
|
134457
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 15, fontWeight: 700, color: C6.blue }, children: value.toLocaleString() }),
|
|
134458
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t3 }, children: "|" }),
|
|
134459
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Typography_default, { sx: { fontSize: 12, fontWeight: 600, color: C6.blue }, children: [
|
|
134460
|
+
pct.toFixed(1),
|
|
134461
|
+
"%"
|
|
134462
|
+
] })
|
|
134463
|
+
] })
|
|
134464
|
+
] }, label)) })
|
|
134465
|
+
] });
|
|
134466
|
+
}
|
|
134467
|
+
function HourlyTooltip({ active, payload }) {
|
|
134468
|
+
if (!active || !(payload == null ? void 0 : payload.length)) return null;
|
|
134469
|
+
const row = payload[0].payload;
|
|
134470
|
+
const calls = Number(row.answered) + Number(row.abandoned);
|
|
134471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: {
|
|
134472
|
+
background: C6.surface,
|
|
134473
|
+
border: `1px solid ${C6.b2}`,
|
|
134474
|
+
borderRadius: "8px",
|
|
134475
|
+
boxShadow: "0 6px 18px rgba(20,80,91,.18)",
|
|
134476
|
+
px: 1.25,
|
|
134477
|
+
py: 1,
|
|
134478
|
+
minWidth: 168,
|
|
134479
|
+
pointerEvents: "none"
|
|
134480
|
+
}, children: [
|
|
134481
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { mb: 0.75, pb: 0.6, borderBottom: `1px solid ${C6.b1}` }, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Typography_default, { sx: __spreadProps(__spreadValues({}, monoSx2), { fontSize: 12, color: C6.navy }), children: [
|
|
134482
|
+
row.hour,
|
|
134483
|
+
":00 \u2013 ",
|
|
134484
|
+
row.hour,
|
|
134485
|
+
":59"
|
|
134486
|
+
] }) }),
|
|
134487
|
+
HOURLY_SERIES.map(({ key, label, color: color3, line: line2 }) => /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "flex", alignItems: "center", gap: 0.9, mb: 0.4 }, children: [
|
|
134488
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { width: 10, height: line2 ? 3 : 10, borderRadius: "2px", background: color3, flexShrink: 0 } }),
|
|
134489
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t2, flex: 1 }, children: label }),
|
|
134490
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 12, fontWeight: 700, color: C6.t1, fontVariantNumeric: "tabular-nums" }, children: row[key] })
|
|
134491
|
+
] }, key)),
|
|
134492
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "flex", justifyContent: "space-between", alignItems: "baseline", mt: 0.7, pt: 0.6, borderTop: `1px solid ${C6.b1}` }, children: [
|
|
134493
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t3 }, children: "Total calls" }),
|
|
134494
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "flex", alignItems: "baseline", gap: 0.5 }, children: [
|
|
134495
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 13, fontWeight: 700, color: C6.blue, fontVariantNumeric: "tabular-nums" }, children: calls }),
|
|
134496
|
+
calls > 0 && /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Typography_default, { sx: { fontSize: 10, color: C6.t3 }, children: [
|
|
134497
|
+
"\xB7 ",
|
|
134498
|
+
(Number(row.answered) / calls * 100).toFixed(0),
|
|
134499
|
+
"% answered"
|
|
134500
|
+
] })
|
|
134501
|
+
] })
|
|
134502
|
+
] })
|
|
134503
|
+
] });
|
|
134504
|
+
}
|
|
134424
134505
|
function statusColor(status) {
|
|
134425
134506
|
const s3 = status == null ? void 0 : status.toUpperCase();
|
|
134426
134507
|
if (s3 === "ANSWERED") return C6.green;
|
|
@@ -134499,30 +134580,33 @@ function ManagementDashboardContent() {
|
|
|
134499
134580
|
};
|
|
134500
134581
|
img.src = "data:image/svg+xml;base64," + btoa(unescape(encodeURIComponent(svgData)));
|
|
134501
134582
|
};
|
|
134502
|
-
return /* @__PURE__ */ (0,
|
|
134503
|
-
/* @__PURE__ */ (0,
|
|
134583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(LocalizationProvider, { dateAdapter: AdapterDayjs, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { background: "transparent", minHeight: "100vh" }, children: [
|
|
134584
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
134504
134585
|
PageHeader,
|
|
134505
134586
|
{
|
|
134506
134587
|
title: "Management Dashboard",
|
|
134507
|
-
actions: /* @__PURE__ */ (0,
|
|
134508
|
-
/* @__PURE__ */ (0,
|
|
134588
|
+
actions: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Stack_default, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
134589
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
134509
134590
|
AppButton,
|
|
134510
134591
|
{
|
|
134511
134592
|
variant: "outlined",
|
|
134512
|
-
startIcon: /* @__PURE__ */ (0,
|
|
134593
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Refresh_default, { sx: { fontSize: "0.95rem !important" } }),
|
|
134513
134594
|
onClick: fetchDashboard,
|
|
134514
134595
|
disabled: loading,
|
|
134515
134596
|
children: "Refresh"
|
|
134516
134597
|
}
|
|
134517
134598
|
),
|
|
134518
|
-
/* @__PURE__ */ (0,
|
|
134599
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
134519
134600
|
AppButton,
|
|
134520
134601
|
{
|
|
134521
|
-
startIcon: /* @__PURE__ */ (0,
|
|
134602
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(FileDownload_default, { sx: { fontSize: "0.95rem !important" } }),
|
|
134522
134603
|
disabled: loading || data.totals.total_calls === 0,
|
|
134523
134604
|
onClick: () => {
|
|
134524
|
-
const
|
|
134525
|
-
const
|
|
134605
|
+
const esc = (v) => `"${String(v != null ? v : "").replace(/"/g, '""')}"`;
|
|
134606
|
+
const rows = data.repeated_calls.map(
|
|
134607
|
+
(r2) => [r2.phone_number, r2.date, r2.call_count, r2.latest_status, r2.latest_call_type].map(esc).join(",")
|
|
134608
|
+
);
|
|
134609
|
+
const csv = ["Phone,Date,Count,Status,Type", ...rows].join("\n");
|
|
134526
134610
|
const a2 = document.createElement("a");
|
|
134527
134611
|
a2.href = URL.createObjectURL(new Blob([csv], { type: "text/csv" }));
|
|
134528
134612
|
a2.download = `mgmt_dashboard_${startDate == null ? void 0 : startDate.format("YYYY-MM-DD")}.csv`;
|
|
@@ -134534,7 +134618,7 @@ function ManagementDashboardContent() {
|
|
|
134534
134618
|
] })
|
|
134535
134619
|
}
|
|
134536
134620
|
),
|
|
134537
|
-
/* @__PURE__ */ (0,
|
|
134621
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
134538
134622
|
ReportFilterBar,
|
|
134539
134623
|
{
|
|
134540
134624
|
startDate,
|
|
@@ -134546,110 +134630,119 @@ function ManagementDashboardContent() {
|
|
|
134546
134630
|
onQuickRangeChange: handleQuickRangeChange
|
|
134547
134631
|
}
|
|
134548
134632
|
),
|
|
134549
|
-
error && /* @__PURE__ */ (0,
|
|
134550
|
-
loading && /* @__PURE__ */ (0,
|
|
134551
|
-
!loading && /* @__PURE__ */ (0,
|
|
134552
|
-
/* @__PURE__ */ (0,
|
|
134633
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Alert_default, { severity: "error", sx: { mx: 2.5, mt: 1.5 }, onClose: () => setError(""), children: error }),
|
|
134634
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { display: "flex", justifyContent: "center", py: 5 }, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(CircularProgress_default, { size: 36 }) }),
|
|
134635
|
+
!loading && /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { px: { xs: 1, md: 2 }, py: 1.5 }, children: [
|
|
134636
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: {
|
|
134553
134637
|
display: "grid",
|
|
134554
|
-
gridTemplateColumns: {
|
|
134638
|
+
gridTemplateColumns: {
|
|
134639
|
+
xs: "1fr",
|
|
134640
|
+
sm: "repeat(2, 1fr)",
|
|
134641
|
+
md: "repeat(3, 1fr)",
|
|
134642
|
+
lg: "1.1fr 1fr 1.6fr 1.1fr 1.2fr"
|
|
134643
|
+
},
|
|
134555
134644
|
gap: 1.2,
|
|
134556
|
-
mb: 1.2
|
|
134645
|
+
mb: 1.2,
|
|
134646
|
+
alignItems: "stretch",
|
|
134647
|
+
/* the wide Abandoned card gets a full row of its own while stacked 2-up */
|
|
134648
|
+
"& > :nth-of-type(3)": { gridColumn: { xs: "auto", sm: "span 2", md: "auto" } }
|
|
134557
134649
|
}, children: [
|
|
134558
|
-
/* @__PURE__ */ (0,
|
|
134559
|
-
/* @__PURE__ */ (0,
|
|
134560
|
-
/* @__PURE__ */ (0,
|
|
134561
|
-
/* @__PURE__ */ (0,
|
|
134650
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(DirectionCard, { title: "Inbound Calls", data: data.inbound, icon: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(PhoneCallback_default, { sx: numIconSx }), droppedLabel: "ABANDONED" }),
|
|
134651
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(QueueCallsCard, { data: data.queue_calls }),
|
|
134652
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(AbandonedCallbackCard, { data: data.abandoned }),
|
|
134653
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(DirectionCard, { title: "Outbound Calls", data: data.outbound, icon: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(PhoneForwarded_default, { sx: numIconSx }), droppedLabel: "UNANSWERED" }),
|
|
134654
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(IvrAbandonedCard, { data: data.ivr })
|
|
134562
134655
|
] }),
|
|
134563
|
-
/* @__PURE__ */ (0,
|
|
134656
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: {
|
|
134564
134657
|
display: "grid",
|
|
134565
134658
|
gridTemplateColumns: { xs: "1fr", sm: "repeat(2, 1fr)", lg: "1fr 1fr 1fr 1.6fr" },
|
|
134566
134659
|
gap: 1.2,
|
|
134567
134660
|
mb: 1.2
|
|
134568
134661
|
}, children: [
|
|
134569
|
-
/* @__PURE__ */ (0,
|
|
134570
|
-
/* @__PURE__ */ (0,
|
|
134571
|
-
/* @__PURE__ */ (0,
|
|
134572
|
-
/* @__PURE__ */ (0,
|
|
134573
|
-
/* @__PURE__ */ (0,
|
|
134574
|
-
/* @__PURE__ */ (0,
|
|
134575
|
-
/* @__PURE__ */ (0,
|
|
134662
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Paper_default, { sx: cardPaper, children: [
|
|
134663
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: labelSx2, children: "Summary" }) }),
|
|
134664
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { p: 1.5 }, children: [
|
|
134665
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "flex", alignItems: "baseline", gap: 0.5, mb: 0.5 }, children: [
|
|
134666
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontFamily: "'Barlow Condensed', sans-serif", fontSize: 22, fontWeight: 800, color: C6.navy }, children: data.totals.total_answered.toLocaleString() }),
|
|
134667
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 14, color: C6.t3 }, children: "/" }),
|
|
134668
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontFamily: "'Barlow Condensed', sans-serif", fontSize: 22, fontWeight: 800, color: C6.t3 }, children: data.totals.total_calls.toLocaleString() })
|
|
134576
134669
|
] }),
|
|
134577
|
-
/* @__PURE__ */ (0,
|
|
134578
|
-
/* @__PURE__ */ (0,
|
|
134579
|
-
/* @__PURE__ */ (0,
|
|
134580
|
-
/* @__PURE__ */ (0,
|
|
134581
|
-
/* @__PURE__ */ (0,
|
|
134582
|
-
/* @__PURE__ */ (0,
|
|
134583
|
-
/* @__PURE__ */ (0,
|
|
134670
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t3, mb: 1 }, children: "Total Calls" }),
|
|
134671
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { mt: 1 }, children: [
|
|
134672
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t3, mb: 0.3 }, children: "Call Duration" }),
|
|
134673
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "flex", gap: 2 }, children: [
|
|
134674
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { children: [
|
|
134675
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 10, color: C6.t3 }, children: "Highest" }),
|
|
134676
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: __spreadProps(__spreadValues({}, monoSx2), { color: C6.blue, fontSize: 13 }), children: data.totals.highest_duration })
|
|
134584
134677
|
] }),
|
|
134585
|
-
/* @__PURE__ */ (0,
|
|
134586
|
-
/* @__PURE__ */ (0,
|
|
134587
|
-
/* @__PURE__ */ (0,
|
|
134678
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { children: [
|
|
134679
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 10, color: C6.t3 }, children: "Lowest" }),
|
|
134680
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: __spreadProps(__spreadValues({}, monoSx2), { color: C6.blue, fontSize: 13 }), children: data.totals.lowest_duration })
|
|
134588
134681
|
] })
|
|
134589
134682
|
] })
|
|
134590
134683
|
] }),
|
|
134591
|
-
/* @__PURE__ */ (0,
|
|
134592
|
-
/* @__PURE__ */ (0,
|
|
134593
|
-
/* @__PURE__ */ (0,
|
|
134684
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { mt: 1 }, children: [
|
|
134685
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t3, display: "inline" }, children: "Calls < 30 sec: " }),
|
|
134686
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: __spreadProps(__spreadValues({}, monoSx2), { color: C6.blue, display: "inline", fontSize: 13 }), children: data.totals.calls_lt_30sec.toLocaleString() })
|
|
134594
134687
|
] })
|
|
134595
134688
|
] })
|
|
134596
134689
|
] }),
|
|
134597
|
-
/* @__PURE__ */ (0,
|
|
134598
|
-
/* @__PURE__ */ (0,
|
|
134599
|
-
/* @__PURE__ */ (0,
|
|
134690
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Paper_default, { sx: cardPaper, children: [
|
|
134691
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: labelSx2, children: "Avg Total Calls Duration" }) }),
|
|
134692
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { p: 1.5 }, children: [
|
|
134600
134693
|
{ label: "Inbound", value: data.totals.avg_inbound_duration },
|
|
134601
134694
|
{ label: "Outbound", value: data.totals.avg_outbound_duration }
|
|
134602
|
-
].map(({ label, value }) => /* @__PURE__ */ (0,
|
|
134603
|
-
/* @__PURE__ */ (0,
|
|
134604
|
-
/* @__PURE__ */ (0,
|
|
134695
|
+
].map(({ label, value }) => /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center", py: 1, borderBottom: `1px solid ${C6.b1}`, "&:last-child": { borderBottom: "none" } }, children: [
|
|
134696
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 12, fontWeight: 600, color: C6.t2 }, children: label }),
|
|
134697
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: __spreadProps(__spreadValues({}, monoSx2), { fontSize: 16, color: C6.blue }), children: value })
|
|
134605
134698
|
] }, label)) })
|
|
134606
134699
|
] }),
|
|
134607
|
-
/* @__PURE__ */ (0,
|
|
134608
|
-
/* @__PURE__ */ (0,
|
|
134609
|
-
/* @__PURE__ */ (0,
|
|
134700
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Paper_default, { sx: cardPaper, children: [
|
|
134701
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: labelSx2, children: "Inbound Average Waiting" }) }),
|
|
134702
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { p: 1.5, display: "grid", gridTemplateColumns: "1fr 1fr", mt: 0.5 }, children: [
|
|
134610
134703
|
{ label: "Waiting Time", value: data.waiting.avg_wait_time },
|
|
134611
134704
|
{ label: "Queue Waiting", value: data.waiting.avg_queue_wait }
|
|
134612
|
-
].map(({ label, value }, idx) => /* @__PURE__ */ (0,
|
|
134613
|
-
/* @__PURE__ */ (0,
|
|
134614
|
-
/* @__PURE__ */ (0,
|
|
134705
|
+
].map(({ label, value }, idx) => /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: __spreadValues({ textAlign: "center", px: 0.5 }, idx < 1 && { borderRight: `1px solid ${C6.b1}` }), children: [
|
|
134706
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 10, fontWeight: 600, color: C6.t3, mb: 0.5 }, children: label }),
|
|
134707
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: __spreadProps(__spreadValues({}, monoSx2), { fontSize: 18, color: C6.blue }), children: value })
|
|
134615
134708
|
] }, label)) })
|
|
134616
134709
|
] }),
|
|
134617
|
-
/* @__PURE__ */ (0,
|
|
134618
|
-
/* @__PURE__ */ (0,
|
|
134619
|
-
/* @__PURE__ */ (0,
|
|
134620
|
-
/* @__PURE__ */ (0,
|
|
134621
|
-
/* @__PURE__ */ (0,
|
|
134622
|
-
/* @__PURE__ */ (0,
|
|
134623
|
-
/* @__PURE__ */ (0,
|
|
134624
|
-
/* @__PURE__ */ (0,
|
|
134710
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Paper_default, { sx: cardPaper, children: [
|
|
134711
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: labelSx2, children: "Average CHT" }) }),
|
|
134712
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableContainer_default, { children: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Table_default, { size: "small", children: [
|
|
134713
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableHead_default, { children: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(TableRow_default, { children: [
|
|
134714
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: headSx, children: "Call Type" }),
|
|
134715
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: headSx, children: "Call Handling Time" }),
|
|
134716
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: headSx, children: "Talk Duration" }),
|
|
134717
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: headSx, children: "Hold Duration" })
|
|
134625
134718
|
] }) }),
|
|
134626
|
-
/* @__PURE__ */ (0,
|
|
134627
|
-
data.cht.length === 0 && /* @__PURE__ */ (0,
|
|
134628
|
-
data.cht.map((row) => /* @__PURE__ */ (0,
|
|
134629
|
-
/* @__PURE__ */ (0,
|
|
134630
|
-
/* @__PURE__ */ (0,
|
|
134631
|
-
/* @__PURE__ */ (0,
|
|
134632
|
-
/* @__PURE__ */ (0,
|
|
134719
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(TableBody_default, { children: [
|
|
134720
|
+
data.cht.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableRow_default, { children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { colSpan: 4, sx: { textAlign: "center", py: 2, color: C6.t3, fontSize: 12 }, children: "No data" }) }),
|
|
134721
|
+
data.cht.map((row) => /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(TableRow_default, { hover: true, children: [
|
|
134722
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: __spreadProps(__spreadValues({}, cellSx), { fontWeight: 600, color: C6.t2 }), children: row.call_type }),
|
|
134723
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: __spreadProps(__spreadValues(__spreadValues({}, cellSx), monoSx2), { color: C6.blue }), children: row.call_handling_time }),
|
|
134724
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: __spreadProps(__spreadValues(__spreadValues({}, cellSx), monoSx2), { color: C6.blue }), children: row.talk_duration }),
|
|
134725
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: __spreadProps(__spreadValues(__spreadValues({}, cellSx), monoSx2), { color: C6.blue }), children: row.hold_duration })
|
|
134633
134726
|
] }, row.call_type))
|
|
134634
134727
|
] })
|
|
134635
134728
|
] }) })
|
|
134636
134729
|
] })
|
|
134637
134730
|
] }),
|
|
134638
|
-
/* @__PURE__ */ (0,
|
|
134639
|
-
/* @__PURE__ */ (0,
|
|
134640
|
-
/* @__PURE__ */ (0,
|
|
134641
|
-
/* @__PURE__ */ (0,
|
|
134642
|
-
/* @__PURE__ */ (0,
|
|
134643
|
-
/* @__PURE__ */ (0,
|
|
134731
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", lg: "1fr 1fr" }, gap: 1.2 }, children: [
|
|
134732
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Paper_default, { sx: cardPaper, children: [
|
|
134733
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: __spreadProps(__spreadValues({}, cardHeader), { flexWrap: "wrap", gap: 1, justifyContent: "space-between" }), children: [
|
|
134734
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { children: [
|
|
134735
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: labelSx2, children: "Avg Hour Wise Inbound Calls vs Agents" }),
|
|
134736
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Stack_default, { direction: "row", spacing: 1.5, sx: { mt: 0.5 }, children: [
|
|
134644
134737
|
{ color: "#F2B51D", label: "Answered" },
|
|
134645
134738
|
{ color: "#9fc4cb", label: "Abandoned" },
|
|
134646
134739
|
{ color: "#14505b", label: "Agents" }
|
|
134647
|
-
].map(({ color: color3, label }) => /* @__PURE__ */ (0,
|
|
134648
|
-
/* @__PURE__ */ (0,
|
|
134649
|
-
/* @__PURE__ */ (0,
|
|
134740
|
+
].map(({ color: color3, label }) => /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
134741
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { width: 12, height: 12, borderRadius: "2px", background: color3 } }),
|
|
134742
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t3 }, children: label })
|
|
134650
134743
|
] }, label)) })
|
|
134651
134744
|
] }),
|
|
134652
|
-
/* @__PURE__ */ (0,
|
|
134745
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { display: "flex", flexDirection: "column", alignItems: "flex-end", gap: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
134653
134746
|
Typography_default,
|
|
134654
134747
|
{
|
|
134655
134748
|
onClick: downloadChart,
|
|
@@ -134658,32 +134751,31 @@ function ManagementDashboardContent() {
|
|
|
134658
134751
|
}
|
|
134659
134752
|
) })
|
|
134660
134753
|
] }),
|
|
134661
|
-
/* @__PURE__ */ (0,
|
|
134662
|
-
/* @__PURE__ */ (0,
|
|
134663
|
-
/* @__PURE__ */ (0,
|
|
134664
|
-
/* @__PURE__ */ (0,
|
|
134665
|
-
/* @__PURE__ */ (0,
|
|
134666
|
-
/* @__PURE__ */ (0,
|
|
134754
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { ref: chartRef, sx: { p: 1.5, height: 260 }, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(ComposedChart, { data: hourlyData, margin: { top: 4, right: 30, left: -20, bottom: 0 }, barGap: 1, children: [
|
|
134755
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(CartesianGrid, { strokeDasharray: "3 3", stroke: C6.b2, vertical: false }),
|
|
134756
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(XAxis, { dataKey: "hour", tick: { fontSize: 9, fill: C6.t3 }, interval: 1 }),
|
|
134757
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(YAxis, { yAxisId: "left", tick: { fontSize: 9, fill: C6.t3 } }),
|
|
134758
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(YAxis, { yAxisId: "right", orientation: "right", tick: { fontSize: 9, fill: C6.t3 } }),
|
|
134759
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
134667
134760
|
Tooltip3,
|
|
134668
134761
|
{
|
|
134669
|
-
|
|
134670
|
-
|
|
134671
|
-
|
|
134672
|
-
|
|
134673
|
-
}
|
|
134762
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(HourlyTooltip, {}),
|
|
134763
|
+
cursor: { fill: "rgba(26,95,108,.07)" },
|
|
134764
|
+
animationDuration: 140,
|
|
134765
|
+
wrapperStyle: { outline: "none", zIndex: 2 }
|
|
134674
134766
|
}
|
|
134675
134767
|
),
|
|
134676
|
-
/* @__PURE__ */ (0,
|
|
134677
|
-
/* @__PURE__ */ (0,
|
|
134678
|
-
/* @__PURE__ */ (0,
|
|
134768
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Bar, { yAxisId: "left", dataKey: "answered", fill: "#F2B51D", radius: [2, 2, 0, 0], maxBarSize: 14 }),
|
|
134769
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Bar, { yAxisId: "left", dataKey: "abandoned", fill: "#9fc4cb", radius: [2, 2, 0, 0], maxBarSize: 14 }),
|
|
134770
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Line, { yAxisId: "right", type: "monotone", dataKey: "agents", stroke: "#14505b", strokeWidth: 1.5, dot: { r: 2, fill: "#14505b" } })
|
|
134679
134771
|
] }) }) })
|
|
134680
134772
|
] }),
|
|
134681
|
-
/* @__PURE__ */ (0,
|
|
134682
|
-
/* @__PURE__ */ (0,
|
|
134683
|
-
/* @__PURE__ */ (0,
|
|
134684
|
-
/* @__PURE__ */ (0,
|
|
134773
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Paper_default, { sx: cardPaper, children: [
|
|
134774
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: __spreadProps(__spreadValues({}, cardHeader), { justifyContent: "space-between" }), children: [
|
|
134775
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: labelSx2, children: "Repeated Calls" }),
|
|
134776
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Chip_default, { label: data.repeated_calls.length, size: "small", sx: { background: C6.rlt, color: C6.red, fontWeight: 700, fontSize: 11 } })
|
|
134685
134777
|
] }),
|
|
134686
|
-
/* @__PURE__ */ (0,
|
|
134778
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { px: 1.5, py: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
134687
134779
|
TextField_default,
|
|
134688
134780
|
{
|
|
134689
134781
|
size: "small",
|
|
@@ -134691,26 +134783,26 @@ function ManagementDashboardContent() {
|
|
|
134691
134783
|
value: repeatedSearch,
|
|
134692
134784
|
onChange: (e) => setRepeatedSearch(e.target.value),
|
|
134693
134785
|
fullWidth: true,
|
|
134694
|
-
slotProps: { input: { startAdornment: /* @__PURE__ */ (0,
|
|
134786
|
+
slotProps: { input: { startAdornment: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(InputAdornment_default, { position: "start", children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Search_default, { sx: { fontSize: 16, color: C6.t3 } }) }) } },
|
|
134695
134787
|
sx: { "& .MuiInputBase-root": { fontSize: 12 } }
|
|
134696
134788
|
}
|
|
134697
134789
|
) }),
|
|
134698
|
-
/* @__PURE__ */ (0,
|
|
134699
|
-
/* @__PURE__ */ (0,
|
|
134700
|
-
/* @__PURE__ */ (0,
|
|
134701
|
-
/* @__PURE__ */ (0,
|
|
134702
|
-
/* @__PURE__ */ (0,
|
|
134703
|
-
/* @__PURE__ */ (0,
|
|
134704
|
-
/* @__PURE__ */ (0,
|
|
134790
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableContainer_default, { sx: { maxHeight: 260, overflow: "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Table_default, { size: "small", stickyHeader: true, children: [
|
|
134791
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableHead_default, { children: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(TableRow_default, { children: [
|
|
134792
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: headSx, children: "Phone Number" }),
|
|
134793
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: headSx, children: "Date" }),
|
|
134794
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: headSx, children: "No of Calls" }),
|
|
134795
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: headSx, children: "Latest Status" }),
|
|
134796
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: headSx, children: "Latest Call Type" })
|
|
134705
134797
|
] }) }),
|
|
134706
|
-
/* @__PURE__ */ (0,
|
|
134707
|
-
filteredRepeated.length === 0 && /* @__PURE__ */ (0,
|
|
134708
|
-
filteredRepeated.map((r2) => /* @__PURE__ */ (0,
|
|
134709
|
-
/* @__PURE__ */ (0,
|
|
134710
|
-
/* @__PURE__ */ (0,
|
|
134711
|
-
/* @__PURE__ */ (0,
|
|
134712
|
-
/* @__PURE__ */ (0,
|
|
134713
|
-
/* @__PURE__ */ (0,
|
|
134798
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(TableBody_default, { children: [
|
|
134799
|
+
filteredRepeated.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableRow_default, { children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { colSpan: 5, sx: { textAlign: "center", py: 2, color: C6.t3, fontSize: 12 }, children: "No repeated calls" }) }),
|
|
134800
|
+
filteredRepeated.map((r2) => /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(TableRow_default, { hover: true, children: [
|
|
134801
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: __spreadProps(__spreadValues(__spreadValues({}, cellSx), monoSx2), { fontSize: 11 }), children: r2.phone_number }),
|
|
134802
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: __spreadProps(__spreadValues({}, cellSx), { fontSize: 11 }), children: r2.date }),
|
|
134803
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: __spreadProps(__spreadValues({}, cellSx), { fontWeight: 700, color: C6.navy, fontSize: 13 }), children: r2.call_count }),
|
|
134804
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: __spreadProps(__spreadValues({}, cellSx), { fontSize: 11, fontWeight: 600, color: statusColor(r2.latest_status) }), children: r2.latest_status }),
|
|
134805
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: __spreadProps(__spreadValues({}, cellSx), { fontSize: 11 }), children: r2.latest_call_type })
|
|
134714
134806
|
] }, `${r2.phone_number}-${r2.date}`))
|
|
134715
134807
|
] })
|
|
134716
134808
|
] }) })
|
|
@@ -134719,7 +134811,7 @@ function ManagementDashboardContent() {
|
|
|
134719
134811
|
] })
|
|
134720
134812
|
] }) });
|
|
134721
134813
|
}
|
|
134722
|
-
var import_react106, import_dayjs10,
|
|
134814
|
+
var import_react106, import_dayjs10, import_jsx_runtime294, C6, headSx, cellSx, monoSx2, labelSx2, cardPaper, cardHeader, numIconSx, bigNumSx, EMPTY3, HOURLY_SERIES, ManagementDashboard, managementDashboard_default;
|
|
134723
134815
|
var init_managementDashboard = __esm({
|
|
134724
134816
|
"call-control-sdk/lib/pages/managementDashboard/index.tsx"() {
|
|
134725
134817
|
"use strict";
|
|
@@ -134734,13 +134826,14 @@ var init_managementDashboard = __esm({
|
|
|
134734
134826
|
init_Refresh();
|
|
134735
134827
|
init_PhoneCallback();
|
|
134736
134828
|
init_PhoneForwarded();
|
|
134829
|
+
init_PhoneMissed();
|
|
134737
134830
|
init_PageHeader();
|
|
134738
134831
|
init_ReportFilterBar();
|
|
134739
134832
|
init_AppButton();
|
|
134740
134833
|
init_tableStyles();
|
|
134741
134834
|
init_SDKProvider();
|
|
134742
134835
|
init_useManagementDashboard();
|
|
134743
|
-
|
|
134836
|
+
import_jsx_runtime294 = require("react/jsx-runtime");
|
|
134744
134837
|
C6 = {
|
|
134745
134838
|
navy: "#14505b",
|
|
134746
134839
|
blue: "#1A5F6C",
|
|
@@ -134765,10 +134858,11 @@ var init_managementDashboard = __esm({
|
|
|
134765
134858
|
headSx = __spreadProps(__spreadValues({}, headCellSx2), { py: 1, px: 1.5 });
|
|
134766
134859
|
cellSx = { fontSize: 12, py: 0.8, px: 1.5, borderBottom: `1px solid ${C6.b1}` };
|
|
134767
134860
|
monoSx2 = { fontFamily: "'JetBrains Mono', monospace", fontSize: 12, fontWeight: 700 };
|
|
134768
|
-
labelSx2 = { fontSize: 11, fontWeight: 700, letterSpacing: 0.7, textTransform: "uppercase", color: C6.t2 };
|
|
134861
|
+
labelSx2 = { fontSize: 11, fontWeight: 700, letterSpacing: 0.7, textTransform: "uppercase", color: C6.t2, textAlign: "center", lineHeight: 1.2 };
|
|
134769
134862
|
cardPaper = { background: C6.surface, border: `1px solid #dce3ef`, borderRadius: "6px", overflow: "hidden", boxShadow: "0 1px 4px rgba(0,0,0,.09)" };
|
|
134770
|
-
cardHeader = { px: 1.5, py: 1, background: C6.s2, borderBottom: `1px solid ${C6.b1}`, display: "flex", alignItems: "center", justifyContent: "center" };
|
|
134771
|
-
numIconSx = { fontSize: 28, color: C6.blue };
|
|
134863
|
+
cardHeader = { px: 1.5, py: 1, minHeight: 36, background: C6.s2, borderBottom: `1px solid ${C6.b1}`, display: "flex", alignItems: "center", justifyContent: "center" };
|
|
134864
|
+
numIconSx = { fontSize: { xs: 28, lg: 24, xl: 28 }, color: C6.blue };
|
|
134865
|
+
bigNumSx = { fontFamily: "'Barlow Condensed', sans-serif", fontSize: { xs: 32, lg: 26, xl: 32 }, fontWeight: 800, color: C6.navy, lineHeight: 1 };
|
|
134772
134866
|
EMPTY3 = {
|
|
134773
134867
|
inbound: { total: 0, answered: 0, unanswered: 0, answered_pct: 0, unanswered_pct: 0 },
|
|
134774
134868
|
outbound: { total: 0, answered: 0, unanswered: 0, answered_pct: 0, unanswered_pct: 0 },
|
|
@@ -134781,7 +134875,12 @@ var init_managementDashboard = __esm({
|
|
|
134781
134875
|
hourly_chart: [],
|
|
134782
134876
|
repeated_calls: []
|
|
134783
134877
|
};
|
|
134784
|
-
|
|
134878
|
+
HOURLY_SERIES = [
|
|
134879
|
+
{ key: "answered", label: "Answered", color: "#F2B51D", line: false },
|
|
134880
|
+
{ key: "abandoned", label: "Abandoned", color: "#9fc4cb", line: false },
|
|
134881
|
+
{ key: "agents", label: "Agents", color: "#14505b", line: true }
|
|
134882
|
+
];
|
|
134883
|
+
ManagementDashboard = () => /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(SDKProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(ManagementDashboardContent, {}) });
|
|
134785
134884
|
managementDashboard_default = ManagementDashboard;
|
|
134786
134885
|
}
|
|
134787
134886
|
});
|
|
@@ -134792,7 +134891,7 @@ __export(caroVoiceAI_exports, {
|
|
|
134792
134891
|
default: () => CaroVoiceAIPage
|
|
134793
134892
|
});
|
|
134794
134893
|
function CaroVoiceAIPage() {
|
|
134795
|
-
return /* @__PURE__ */ (0,
|
|
134894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(Box_default, { sx: { width: "100%", height: "calc(100vh - 64px)" }, children: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
|
|
134796
134895
|
"iframe",
|
|
134797
134896
|
{
|
|
134798
134897
|
src: CARO_VOICE_AI_URL,
|
|
@@ -134802,12 +134901,12 @@ function CaroVoiceAIPage() {
|
|
|
134802
134901
|
}
|
|
134803
134902
|
) });
|
|
134804
134903
|
}
|
|
134805
|
-
var
|
|
134904
|
+
var import_jsx_runtime295, CARO_VOICE_AI_URL;
|
|
134806
134905
|
var init_caroVoiceAI = __esm({
|
|
134807
134906
|
"call-control-sdk/lib/pages/caroVoiceAI/index.tsx"() {
|
|
134808
134907
|
"use strict";
|
|
134809
134908
|
init_material();
|
|
134810
|
-
|
|
134909
|
+
import_jsx_runtime295 = require("react/jsx-runtime");
|
|
134811
134910
|
CARO_VOICE_AI_URL = "https://dev-ai-voice.achalahealth.com:3100/executive-dashboard";
|
|
134812
134911
|
}
|
|
134813
134912
|
});
|
|
@@ -134818,7 +134917,7 @@ __export(qualityAuditDashboard_exports, {
|
|
|
134818
134917
|
default: () => QualityAuditDashboardPage
|
|
134819
134918
|
});
|
|
134820
134919
|
function QualityAuditDashboardPage() {
|
|
134821
|
-
return /* @__PURE__ */ (0,
|
|
134920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Box_default, { sx: { width: "100%", height: "calc(100vh - 64px)", overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
|
|
134822
134921
|
"iframe",
|
|
134823
134922
|
{
|
|
134824
134923
|
srcDoc: htmlContent,
|
|
@@ -134827,12 +134926,12 @@ function QualityAuditDashboardPage() {
|
|
|
134827
134926
|
}
|
|
134828
134927
|
) });
|
|
134829
134928
|
}
|
|
134830
|
-
var
|
|
134929
|
+
var import_jsx_runtime296, htmlContent;
|
|
134831
134930
|
var init_qualityAuditDashboard = __esm({
|
|
134832
134931
|
"call-control-sdk/lib/pages/qualityAuditDashboard/index.tsx"() {
|
|
134833
134932
|
"use strict";
|
|
134834
134933
|
init_material();
|
|
134835
|
-
|
|
134934
|
+
import_jsx_runtime296 = require("react/jsx-runtime");
|
|
134836
134935
|
htmlContent = `<!DOCTYPE html>
|
|
134837
134936
|
<html>
|
|
134838
134937
|
<head>
|
|
@@ -134889,7 +134988,7 @@ __export(caroQualityAuditDashboard_exports, {
|
|
|
134889
134988
|
default: () => CaroQualityAuditDashboardPage
|
|
134890
134989
|
});
|
|
134891
134990
|
function CaroQualityAuditDashboardPage() {
|
|
134892
|
-
return /* @__PURE__ */ (0,
|
|
134991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(Box_default, { sx: { width: "100%", height: "calc(100vh - 64px)", overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
|
134893
134992
|
"iframe",
|
|
134894
134993
|
{
|
|
134895
134994
|
srcDoc: htmlContent2,
|
|
@@ -134898,12 +134997,12 @@ function CaroQualityAuditDashboardPage() {
|
|
|
134898
134997
|
}
|
|
134899
134998
|
) });
|
|
134900
134999
|
}
|
|
134901
|
-
var
|
|
135000
|
+
var import_jsx_runtime297, htmlContent2;
|
|
134902
135001
|
var init_caroQualityAuditDashboard = __esm({
|
|
134903
135002
|
"call-control-sdk/lib/pages/caroQualityAuditDashboard/index.tsx"() {
|
|
134904
135003
|
"use strict";
|
|
134905
135004
|
init_material();
|
|
134906
|
-
|
|
135005
|
+
import_jsx_runtime297 = require("react/jsx-runtime");
|
|
134907
135006
|
htmlContent2 = `<!DOCTYPE html>
|
|
134908
135007
|
<html>
|
|
134909
135008
|
<head>
|
|
@@ -134955,44 +135054,44 @@ var init_caroQualityAuditDashboard = __esm({
|
|
|
134955
135054
|
});
|
|
134956
135055
|
|
|
134957
135056
|
// node_modules/@mui/icons-material/ArrowUpward.mjs
|
|
134958
|
-
var
|
|
135057
|
+
var import_jsx_runtime298, ArrowUpward_default;
|
|
134959
135058
|
var init_ArrowUpward = __esm({
|
|
134960
135059
|
"node_modules/@mui/icons-material/ArrowUpward.mjs"() {
|
|
134961
135060
|
"use strict";
|
|
134962
135061
|
"use client";
|
|
134963
135062
|
init_createSvgIcon3();
|
|
134964
|
-
|
|
134965
|
-
ArrowUpward_default = createSvgIcon(/* @__PURE__ */ (0,
|
|
135063
|
+
import_jsx_runtime298 = require("react/jsx-runtime");
|
|
135064
|
+
ArrowUpward_default = createSvgIcon(/* @__PURE__ */ (0, import_jsx_runtime298.jsx)("path", {
|
|
134966
135065
|
d: "m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"
|
|
134967
135066
|
}), "ArrowUpward");
|
|
134968
135067
|
}
|
|
134969
135068
|
});
|
|
134970
135069
|
|
|
134971
135070
|
// node_modules/@mui/icons-material/History.mjs
|
|
134972
|
-
var
|
|
135071
|
+
var import_jsx_runtime299, History_default;
|
|
134973
135072
|
var init_History = __esm({
|
|
134974
135073
|
"node_modules/@mui/icons-material/History.mjs"() {
|
|
134975
135074
|
"use strict";
|
|
134976
135075
|
"use client";
|
|
134977
135076
|
init_createSvgIcon3();
|
|
134978
|
-
|
|
134979
|
-
History_default = createSvgIcon(/* @__PURE__ */ (0,
|
|
135077
|
+
import_jsx_runtime299 = require("react/jsx-runtime");
|
|
135078
|
+
History_default = createSvgIcon(/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("path", {
|
|
134980
135079
|
d: "M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z"
|
|
134981
135080
|
}), "History");
|
|
134982
135081
|
}
|
|
134983
135082
|
});
|
|
134984
135083
|
|
|
134985
135084
|
// node_modules/@mui/icons-material/WarningAmber.mjs
|
|
134986
|
-
var
|
|
135085
|
+
var import_jsx_runtime300, WarningAmber_default;
|
|
134987
135086
|
var init_WarningAmber = __esm({
|
|
134988
135087
|
"node_modules/@mui/icons-material/WarningAmber.mjs"() {
|
|
134989
135088
|
"use strict";
|
|
134990
135089
|
"use client";
|
|
134991
135090
|
init_createSvgIcon3();
|
|
134992
|
-
|
|
134993
|
-
WarningAmber_default = createSvgIcon([/* @__PURE__ */ (0,
|
|
135091
|
+
import_jsx_runtime300 = require("react/jsx-runtime");
|
|
135092
|
+
WarningAmber_default = createSvgIcon([/* @__PURE__ */ (0, import_jsx_runtime300.jsx)("path", {
|
|
134994
135093
|
d: "M12 5.99 19.53 19H4.47zM12 2 1 21h22z"
|
|
134995
|
-
}, "0"), /* @__PURE__ */ (0,
|
|
135094
|
+
}, "0"), /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("path", {
|
|
134996
135095
|
d: "M13 16h-2v2h2zm0-6h-2v5h2z"
|
|
134997
135096
|
}, "1")], "WarningAmber");
|
|
134998
135097
|
}
|
|
@@ -135143,12 +135242,12 @@ __export(leadIntegrations_exports, {
|
|
|
135143
135242
|
});
|
|
135144
135243
|
function TokenStatusChip({ integration }) {
|
|
135145
135244
|
const meta = TOKEN_STATUS_META[integration.tokenExpiryStatus];
|
|
135146
|
-
if (!meta) return /* @__PURE__ */ (0,
|
|
135245
|
+
if (!meta) return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: { fontSize: "0.82rem", color: "text.secondary" }, children: "\u2014" });
|
|
135147
135246
|
const effective = getEffectiveExpiry(integration);
|
|
135148
|
-
return /* @__PURE__ */ (0,
|
|
135247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Tooltip_default, { title: effective ? `${effective.label} expires: ${effective.date.toLocaleString()}` : "", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135149
135248
|
Chip_default,
|
|
135150
135249
|
{
|
|
135151
|
-
icon: integration.tokenExpiryStatus !== "ok" ? /* @__PURE__ */ (0,
|
|
135250
|
+
icon: integration.tokenExpiryStatus !== "ok" ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(WarningAmber_default, { fontSize: "small" }) : void 0,
|
|
135152
135251
|
label: effective ? `${meta.label} \xB7 ${effective.date.toLocaleDateString()}` : meta.label,
|
|
135153
135252
|
size: "small",
|
|
135154
135253
|
color: meta.color
|
|
@@ -135160,12 +135259,12 @@ function TokenExpiryAlert({ integration }) {
|
|
|
135160
135259
|
if (!meta || integration.tokenExpiryStatus === "ok") return null;
|
|
135161
135260
|
const effective = getEffectiveExpiry(integration);
|
|
135162
135261
|
const isExpired = integration.tokenExpiryStatus === "expired";
|
|
135163
|
-
return /* @__PURE__ */ (0,
|
|
135164
|
-
/* @__PURE__ */ (0,
|
|
135262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Alert_default, { severity: isExpired ? "error" : "warning", icon: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(WarningAmber_default, { fontSize: "inherit" }), sx: { mb: 2 }, children: [
|
|
135263
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Typography_default, { variant: "body2", sx: { fontWeight: 600, mb: 0.5 }, children: [
|
|
135165
135264
|
effective ? `${effective.label} ${isExpired ? "expired" : "expires"} ${effective.date.toLocaleDateString()} (${effective.date.toLocaleTimeString()})` : isExpired ? "This integration is no longer valid." : "This integration is expiring soon.",
|
|
135166
135265
|
isExpired ? " \u2014 lead ingestion has stopped." : " \u2014 lead ingestion will stop once this passes."
|
|
135167
135266
|
] }),
|
|
135168
|
-
/* @__PURE__ */ (0,
|
|
135267
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { variant: "body2", children: getRenewalInstructions((effective == null ? void 0 : effective.label) || "Access token") })
|
|
135169
135268
|
] });
|
|
135170
135269
|
}
|
|
135171
135270
|
function ModalShell({
|
|
@@ -135176,7 +135275,7 @@ function ModalShell({
|
|
|
135176
135275
|
footer,
|
|
135177
135276
|
children
|
|
135178
135277
|
}) {
|
|
135179
|
-
return /* @__PURE__ */ (0,
|
|
135278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135180
135279
|
Box_default,
|
|
135181
135280
|
{
|
|
135182
135281
|
sx: {
|
|
@@ -135189,7 +135288,7 @@ function ModalShell({
|
|
|
135189
135288
|
justifyContent: "center"
|
|
135190
135289
|
},
|
|
135191
135290
|
onClick: (e) => e.stopPropagation(),
|
|
135192
|
-
children: /* @__PURE__ */ (0,
|
|
135291
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
|
|
135193
135292
|
Paper_default,
|
|
135194
135293
|
{
|
|
135195
135294
|
elevation: 6,
|
|
@@ -135203,7 +135302,7 @@ function ModalShell({
|
|
|
135203
135302
|
boxShadow: "0 8px 32px rgba(26,95,108,0.18)"
|
|
135204
135303
|
},
|
|
135205
135304
|
children: [
|
|
135206
|
-
/* @__PURE__ */ (0,
|
|
135305
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
|
|
135207
135306
|
Box_default,
|
|
135208
135307
|
{
|
|
135209
135308
|
sx: __spreadProps(__spreadValues({}, dialogHeaderSx), {
|
|
@@ -135212,13 +135311,13 @@ function ModalShell({
|
|
|
135212
135311
|
"& .MuiIconButton-root": { color: "#fff" }
|
|
135213
135312
|
}),
|
|
135214
135313
|
children: [
|
|
135215
|
-
/* @__PURE__ */ (0,
|
|
135216
|
-
/* @__PURE__ */ (0,
|
|
135314
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { fontWeight: 700, fontSize: "1rem", fontFamily: "poppins, Arial, sans-serif", children: title }),
|
|
135315
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(IconButton_default, { size: "small", onClick: onClose, sx: { color: "#fff" }, children: "\u2715" })
|
|
135217
135316
|
]
|
|
135218
135317
|
}
|
|
135219
135318
|
),
|
|
135220
|
-
/* @__PURE__ */ (0,
|
|
135221
|
-
/* @__PURE__ */ (0,
|
|
135319
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Box_default, { sx: { flex: 1, overflowY: "auto" }, children }),
|
|
135320
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Box_default, { sx: dialogFooterSx, children: footer })
|
|
135222
135321
|
]
|
|
135223
135322
|
}
|
|
135224
135323
|
)
|
|
@@ -135233,21 +135332,21 @@ function LogsDialog({
|
|
|
135233
135332
|
onClose
|
|
135234
135333
|
}) {
|
|
135235
135334
|
if (!open) return null;
|
|
135236
|
-
return /* @__PURE__ */ (0,
|
|
135335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135237
135336
|
ModalShell,
|
|
135238
135337
|
{
|
|
135239
135338
|
title: `Webhook Logs \u2014 ${integrationName}`,
|
|
135240
135339
|
width: { xs: "95vw", md: 960 },
|
|
135241
135340
|
zIndex: 1400,
|
|
135242
135341
|
onClose,
|
|
135243
|
-
footer: /* @__PURE__ */ (0,
|
|
135244
|
-
children: /* @__PURE__ */ (0,
|
|
135245
|
-
/* @__PURE__ */ (0,
|
|
135246
|
-
/* @__PURE__ */ (0,
|
|
135247
|
-
logs.map((log2) => /* @__PURE__ */ (0,
|
|
135248
|
-
/* @__PURE__ */ (0,
|
|
135249
|
-
/* @__PURE__ */ (0,
|
|
135250
|
-
/* @__PURE__ */ (0,
|
|
135342
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(SDKButton, { variant: "cancel", onClick: onClose, children: "Close" }),
|
|
135343
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Box_default, { sx: { p: 2.5 }, children: loading ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Box_default, { sx: { display: "flex", justifyContent: "center", py: 4 }, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(CircularProgress_default, { size: 24 }) }) : /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableContainer_default, { component: Paper_default, variant: "outlined", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Table_default, { size: "small", children: [
|
|
135344
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableHead_default, { children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableRow_default, { children: ["Time", "Method", "Status", "Leads Created", "Error"].map((col) => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: headCellSx, children: col }, col)) }) }),
|
|
135345
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(TableBody_default, { children: [
|
|
135346
|
+
logs.map((log2) => /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(TableRow_default, { sx: tableRowSx, children: [
|
|
135347
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: new Date(log2.createdAt).toLocaleString() }),
|
|
135348
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: log2.requestMethod }),
|
|
135349
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135251
135350
|
Chip_default,
|
|
135252
135351
|
{
|
|
135253
135352
|
label: log2.isSuccess ? "Success" : "Failed",
|
|
@@ -135255,8 +135354,8 @@ function LogsDialog({
|
|
|
135255
135354
|
color: log2.isSuccess ? "success" : "error"
|
|
135256
135355
|
}
|
|
135257
135356
|
) }),
|
|
135258
|
-
/* @__PURE__ */ (0,
|
|
135259
|
-
/* @__PURE__ */ (0,
|
|
135357
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: log2.leadsCreated }),
|
|
135358
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Tooltip_default, { title: log2.errorMessage || "", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135260
135359
|
Typography_default,
|
|
135261
135360
|
{
|
|
135262
135361
|
variant: "body2",
|
|
@@ -135267,7 +135366,7 @@ function LogsDialog({
|
|
|
135267
135366
|
}
|
|
135268
135367
|
) }) })
|
|
135269
135368
|
] }, log2.id)),
|
|
135270
|
-
logs.length === 0 && /* @__PURE__ */ (0,
|
|
135369
|
+
logs.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableRow_default, { children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { colSpan: 5, align: "center", sx: { py: 3, color: "#999", fontSize: "0.82rem" }, children: "No webhook logs found" }) })
|
|
135271
135370
|
] })
|
|
135272
135371
|
] }) }) })
|
|
135273
135372
|
}
|
|
@@ -135282,7 +135381,7 @@ function ConfirmDialog2({
|
|
|
135282
135381
|
onClose
|
|
135283
135382
|
}) {
|
|
135284
135383
|
if (!open) return null;
|
|
135285
|
-
return /* @__PURE__ */ (0,
|
|
135384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135286
135385
|
Box_default,
|
|
135287
135386
|
{
|
|
135288
135387
|
sx: {
|
|
@@ -135295,26 +135394,26 @@ function ConfirmDialog2({
|
|
|
135295
135394
|
justifyContent: "center"
|
|
135296
135395
|
},
|
|
135297
135396
|
onClick: (e) => e.stopPropagation(),
|
|
135298
|
-
children: /* @__PURE__ */ (0,
|
|
135397
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
|
|
135299
135398
|
Paper_default,
|
|
135300
135399
|
{
|
|
135301
135400
|
elevation: 6,
|
|
135302
135401
|
sx: { width: { xs: "90vw", sm: 420 }, borderRadius: "16px", overflow: "hidden", boxShadow: "0 8px 32px rgba(0,0,0,0.18)" },
|
|
135303
135402
|
children: [
|
|
135304
|
-
/* @__PURE__ */ (0,
|
|
135305
|
-
/* @__PURE__ */ (0,
|
|
135306
|
-
/* @__PURE__ */ (0,
|
|
135403
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: __spreadProps(__spreadValues({}, dialogHeaderSx), { borderBottom: "none", pb: 0 }), children: [
|
|
135404
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { fontWeight: 700, fontSize: "1rem", fontFamily: "poppins, Arial, sans-serif", children: title }),
|
|
135405
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(IconButton_default, { size: "small", onClick: onClose, children: "\u2715" })
|
|
135307
135406
|
] }),
|
|
135308
|
-
/* @__PURE__ */ (0,
|
|
135309
|
-
/* @__PURE__ */ (0,
|
|
135310
|
-
/* @__PURE__ */ (0,
|
|
135311
|
-
/* @__PURE__ */ (0,
|
|
135407
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Box_default, { sx: { px: 2.5, py: 1.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { fontSize: "0.85rem", color: "#555", fontFamily: "poppins, Arial, sans-serif", children: message }) }),
|
|
135408
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: dialogFooterSx, children: [
|
|
135409
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(SDKButton, { variant: "cancel", onClick: onClose, children: "Cancel" }),
|
|
135410
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135312
135411
|
SDKButton,
|
|
135313
135412
|
{
|
|
135314
135413
|
variant: "danger",
|
|
135315
135414
|
onClick: onConfirm,
|
|
135316
135415
|
disabled: loading,
|
|
135317
|
-
startIcon: loading ? /* @__PURE__ */ (0,
|
|
135416
|
+
startIcon: loading ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(CircularProgress_default, { size: 14, color: "inherit" }) : void 0,
|
|
135318
135417
|
children: "Confirm"
|
|
135319
135418
|
}
|
|
135320
135419
|
)
|
|
@@ -135325,7 +135424,7 @@ function ConfirmDialog2({
|
|
|
135325
135424
|
}
|
|
135326
135425
|
);
|
|
135327
135426
|
}
|
|
135328
|
-
var import_react108,
|
|
135427
|
+
var import_react108, import_jsx_runtime301, INTEGRATION_COLS, CENTER_COLS2, MANAGE_PERMISSIONS, defaultIntegrationForm, defaultMappingForm, errMsg, Required, SELECT_MENU_Z_INDEX, IntegrationDialog, MappingDialog, LeadIntegrationsContent, LeadIntegrations, leadIntegrations_default;
|
|
135329
135428
|
var init_leadIntegrations = __esm({
|
|
135330
135429
|
"call-control-sdk/lib/pages/leadIntegrations/index.tsx"() {
|
|
135331
135430
|
"use strict";
|
|
@@ -135351,7 +135450,7 @@ var init_leadIntegrations = __esm({
|
|
|
135351
135450
|
init_styles2();
|
|
135352
135451
|
init_useLeadIntegrations();
|
|
135353
135452
|
init_types3();
|
|
135354
|
-
|
|
135453
|
+
import_jsx_runtime301 = require("react/jsx-runtime");
|
|
135355
135454
|
INTEGRATION_COLS = [
|
|
135356
135455
|
"Name",
|
|
135357
135456
|
"Source",
|
|
@@ -135394,7 +135493,7 @@ var init_leadIntegrations = __esm({
|
|
|
135394
135493
|
var _a2, _b, _c, _d;
|
|
135395
135494
|
return ((_b = (_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data) == null ? void 0 : _b.message) || ((_d = (_c = error == null ? void 0 : error.response) == null ? void 0 : _c.data) == null ? void 0 : _d.detail) || (error == null ? void 0 : error.message) || fallback;
|
|
135396
135495
|
};
|
|
135397
|
-
Required = () => /* @__PURE__ */ (0,
|
|
135496
|
+
Required = () => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("span", { style: { color: "#c0392b" }, children: "*" });
|
|
135398
135497
|
SELECT_MENU_Z_INDEX = 1600;
|
|
135399
135498
|
IntegrationDialog = (0, import_react108.memo)(function IntegrationDialog2({
|
|
135400
135499
|
open,
|
|
@@ -135418,14 +135517,14 @@ var init_leadIntegrations = __esm({
|
|
|
135418
135517
|
if (!open) return null;
|
|
135419
135518
|
const TAB_LABELS = ["Basic Info", "Credentials", "Form Mappings"];
|
|
135420
135519
|
const mappings = (_a2 = editingIntegration == null ? void 0 : editingIntegration.formMappings) != null ? _a2 : [];
|
|
135421
|
-
return /* @__PURE__ */ (0,
|
|
135520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
|
|
135422
135521
|
ModalShell,
|
|
135423
135522
|
{
|
|
135424
135523
|
title: mode === "add" ? "Add Integration" : "Edit Integration",
|
|
135425
135524
|
onClose,
|
|
135426
|
-
footer: /* @__PURE__ */ (0,
|
|
135427
|
-
/* @__PURE__ */ (0,
|
|
135428
|
-
/* @__PURE__ */ (0,
|
|
135525
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(import_jsx_runtime301.Fragment, { children: [
|
|
135526
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(SDKButton, { variant: "cancel", onClick: onClose, children: "Cancel" }),
|
|
135527
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135429
135528
|
SDKPermissionGuard,
|
|
135430
135529
|
{
|
|
135431
135530
|
permissions: [
|
|
@@ -135433,12 +135532,12 @@ var init_leadIntegrations = __esm({
|
|
|
135433
135532
|
SDK_PERMISSIONS.LEAD_INTEGRATIONS_MANAGE
|
|
135434
135533
|
],
|
|
135435
135534
|
showFallback: false,
|
|
135436
|
-
children: /* @__PURE__ */ (0,
|
|
135535
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135437
135536
|
SDKButton,
|
|
135438
135537
|
{
|
|
135439
135538
|
onClick: onSave,
|
|
135440
135539
|
disabled: saving,
|
|
135441
|
-
startIcon: saving ? /* @__PURE__ */ (0,
|
|
135540
|
+
startIcon: saving ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(CircularProgress_default, { size: 14, color: "inherit" }) : void 0,
|
|
135442
135541
|
children: mode === "add" ? "Create" : "Save"
|
|
135443
135542
|
}
|
|
135444
135543
|
)
|
|
@@ -135446,7 +135545,7 @@ var init_leadIntegrations = __esm({
|
|
|
135446
135545
|
)
|
|
135447
135546
|
] }),
|
|
135448
135547
|
children: [
|
|
135449
|
-
/* @__PURE__ */ (0,
|
|
135548
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135450
135549
|
Tabs_default,
|
|
135451
135550
|
{
|
|
135452
135551
|
value: tab,
|
|
@@ -135466,17 +135565,17 @@ var init_leadIntegrations = __esm({
|
|
|
135466
135565
|
"& .Mui-selected": { color: "#1A5F6C" }
|
|
135467
135566
|
},
|
|
135468
135567
|
TabIndicatorProps: { style: { height: 3, backgroundColor: "#1A5F6C", borderRadius: "3px 3px 0 0" } },
|
|
135469
|
-
children: TAB_LABELS.map((label, i) => /* @__PURE__ */ (0,
|
|
135568
|
+
children: TAB_LABELS.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Tab_default, { label, value: i, disabled: i === 2 && mode === "add" }, label))
|
|
135470
135569
|
}
|
|
135471
135570
|
),
|
|
135472
|
-
tab === 0 && /* @__PURE__ */ (0,
|
|
135473
|
-
/* @__PURE__ */ (0,
|
|
135474
|
-
/* @__PURE__ */ (0,
|
|
135475
|
-
/* @__PURE__ */ (0,
|
|
135571
|
+
tab === 0 && /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { p: 2.5 }, children: [
|
|
135572
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" }, gap: 2, mb: 2 }, children: [
|
|
135573
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135574
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Typography_default, { sx: labelSx, children: [
|
|
135476
135575
|
"Name ",
|
|
135477
|
-
/* @__PURE__ */ (0,
|
|
135576
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Required, {})
|
|
135478
135577
|
] }),
|
|
135479
|
-
/* @__PURE__ */ (0,
|
|
135578
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135480
135579
|
TextField_default,
|
|
135481
135580
|
{
|
|
135482
135581
|
fullWidth: true,
|
|
@@ -135487,12 +135586,12 @@ var init_leadIntegrations = __esm({
|
|
|
135487
135586
|
}
|
|
135488
135587
|
)
|
|
135489
135588
|
] }),
|
|
135490
|
-
/* @__PURE__ */ (0,
|
|
135491
|
-
/* @__PURE__ */ (0,
|
|
135589
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135590
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Typography_default, { sx: labelSx, children: [
|
|
135492
135591
|
"Source Type ",
|
|
135493
|
-
/* @__PURE__ */ (0,
|
|
135592
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Required, {})
|
|
135494
135593
|
] }),
|
|
135495
|
-
/* @__PURE__ */ (0,
|
|
135594
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(FormControl_default, { fullWidth: true, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135496
135595
|
Select_default,
|
|
135497
135596
|
{
|
|
135498
135597
|
value: formData.sourceType,
|
|
@@ -135500,7 +135599,7 @@ var init_leadIntegrations = __esm({
|
|
|
135500
135599
|
MenuProps: { sx: { zIndex: SELECT_MENU_Z_INDEX } },
|
|
135501
135600
|
disabled: mode === "edit",
|
|
135502
135601
|
onChange: (e) => setFormData((prev2) => __spreadProps(__spreadValues({}, prev2), { sourceType: e.target.value })),
|
|
135503
|
-
children: SOURCE_TYPE_OPTIONS.map((opt) => /* @__PURE__ */ (0,
|
|
135602
|
+
children: SOURCE_TYPE_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(MenuItem_default, { value: opt.value, children: [
|
|
135504
135603
|
opt.icon,
|
|
135505
135604
|
" ",
|
|
135506
135605
|
opt.label
|
|
@@ -135509,10 +135608,10 @@ var init_leadIntegrations = __esm({
|
|
|
135509
135608
|
) })
|
|
135510
135609
|
] })
|
|
135511
135610
|
] }),
|
|
135512
|
-
/* @__PURE__ */ (0,
|
|
135513
|
-
/* @__PURE__ */ (0,
|
|
135514
|
-
/* @__PURE__ */ (0,
|
|
135515
|
-
/* @__PURE__ */ (0,
|
|
135611
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" }, gap: 2, mb: 2 }, children: [
|
|
135612
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135613
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "Default Campaign" }),
|
|
135614
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(FormControl_default, { fullWidth: true, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
|
|
135516
135615
|
Select_default,
|
|
135517
135616
|
{
|
|
135518
135617
|
value: (_b = formData.defaultCampaignId) != null ? _b : "",
|
|
@@ -135523,15 +135622,15 @@ var init_leadIntegrations = __esm({
|
|
|
135523
135622
|
defaultCampaignId: e.target.value ? Number(e.target.value) : null
|
|
135524
135623
|
})),
|
|
135525
135624
|
children: [
|
|
135526
|
-
/* @__PURE__ */ (0,
|
|
135527
|
-
campaigns.map((c2) => /* @__PURE__ */ (0,
|
|
135625
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(MenuItem_default, { value: "", children: "None" }),
|
|
135626
|
+
campaigns.map((c2) => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(MenuItem_default, { value: c2.id, children: c2.name }, c2.id))
|
|
135528
135627
|
]
|
|
135529
135628
|
}
|
|
135530
135629
|
) })
|
|
135531
135630
|
] }),
|
|
135532
|
-
/* @__PURE__ */ (0,
|
|
135533
|
-
/* @__PURE__ */ (0,
|
|
135534
|
-
/* @__PURE__ */ (0,
|
|
135631
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135632
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "API Version" }),
|
|
135633
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135535
135634
|
TextField_default,
|
|
135536
135635
|
{
|
|
135537
135636
|
fullWidth: true,
|
|
@@ -135543,9 +135642,9 @@ var init_leadIntegrations = __esm({
|
|
|
135543
135642
|
)
|
|
135544
135643
|
] })
|
|
135545
135644
|
] }),
|
|
135546
|
-
/* @__PURE__ */ (0,
|
|
135547
|
-
/* @__PURE__ */ (0,
|
|
135548
|
-
/* @__PURE__ */ (0,
|
|
135645
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
135646
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: __spreadProps(__spreadValues({}, labelSx), { mb: 0 }), children: "Active" }),
|
|
135647
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135549
135648
|
Switch_default,
|
|
135550
135649
|
{
|
|
135551
135650
|
size: "small",
|
|
@@ -135555,14 +135654,14 @@ var init_leadIntegrations = __esm({
|
|
|
135555
135654
|
)
|
|
135556
135655
|
] })
|
|
135557
135656
|
] }),
|
|
135558
|
-
tab === 1 && /* @__PURE__ */ (0,
|
|
135559
|
-
/* @__PURE__ */ (0,
|
|
135560
|
-
/* @__PURE__ */ (0,
|
|
135561
|
-
mode === "edit" && editingIntegration && /* @__PURE__ */ (0,
|
|
135562
|
-
/* @__PURE__ */ (0,
|
|
135563
|
-
/* @__PURE__ */ (0,
|
|
135564
|
-
/* @__PURE__ */ (0,
|
|
135565
|
-
/* @__PURE__ */ (0,
|
|
135657
|
+
tab === 1 && /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { p: 2.5 }, children: [
|
|
135658
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: sectionTitleSx, children: "API Credentials" }),
|
|
135659
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { variant: "body2", color: "text.secondary", sx: { mb: 2, fontSize: "0.82rem" }, children: "Enter your platform credentials. These are encrypted and stored securely." }),
|
|
135660
|
+
mode === "edit" && editingIntegration && /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TokenExpiryAlert, { integration: editingIntegration }),
|
|
135661
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" }, gap: 2 }, children: [
|
|
135662
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135663
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "App ID" }),
|
|
135664
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135566
135665
|
TextField_default,
|
|
135567
135666
|
{
|
|
135568
135667
|
fullWidth: true,
|
|
@@ -135573,9 +135672,9 @@ var init_leadIntegrations = __esm({
|
|
|
135573
135672
|
}
|
|
135574
135673
|
)
|
|
135575
135674
|
] }),
|
|
135576
|
-
/* @__PURE__ */ (0,
|
|
135577
|
-
/* @__PURE__ */ (0,
|
|
135578
|
-
/* @__PURE__ */ (0,
|
|
135675
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135676
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "Page ID" }),
|
|
135677
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135579
135678
|
TextField_default,
|
|
135580
135679
|
{
|
|
135581
135680
|
fullWidth: true,
|
|
@@ -135587,9 +135686,9 @@ var init_leadIntegrations = __esm({
|
|
|
135587
135686
|
}
|
|
135588
135687
|
)
|
|
135589
135688
|
] }),
|
|
135590
|
-
/* @__PURE__ */ (0,
|
|
135591
|
-
/* @__PURE__ */ (0,
|
|
135592
|
-
/* @__PURE__ */ (0,
|
|
135689
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135690
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "App Secret" }),
|
|
135691
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135593
135692
|
TextField_default,
|
|
135594
135693
|
{
|
|
135595
135694
|
fullWidth: true,
|
|
@@ -135602,9 +135701,9 @@ var init_leadIntegrations = __esm({
|
|
|
135602
135701
|
}
|
|
135603
135702
|
)
|
|
135604
135703
|
] }),
|
|
135605
|
-
/* @__PURE__ */ (0,
|
|
135606
|
-
/* @__PURE__ */ (0,
|
|
135607
|
-
/* @__PURE__ */ (0,
|
|
135704
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135705
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "Access Token" }),
|
|
135706
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135608
135707
|
TextField_default,
|
|
135609
135708
|
{
|
|
135610
135709
|
fullWidth: true,
|
|
@@ -135617,9 +135716,9 @@ var init_leadIntegrations = __esm({
|
|
|
135617
135716
|
}
|
|
135618
135717
|
)
|
|
135619
135718
|
] }),
|
|
135620
|
-
/* @__PURE__ */ (0,
|
|
135621
|
-
/* @__PURE__ */ (0,
|
|
135622
|
-
/* @__PURE__ */ (0,
|
|
135719
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135720
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "Page Access Token" }),
|
|
135721
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135623
135722
|
TextField_default,
|
|
135624
135723
|
{
|
|
135625
135724
|
fullWidth: true,
|
|
@@ -135632,9 +135731,9 @@ var init_leadIntegrations = __esm({
|
|
|
135632
135731
|
}
|
|
135633
135732
|
)
|
|
135634
135733
|
] }),
|
|
135635
|
-
/* @__PURE__ */ (0,
|
|
135636
|
-
/* @__PURE__ */ (0,
|
|
135637
|
-
/* @__PURE__ */ (0,
|
|
135734
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135735
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "Verify Token (for webhook verification)" }),
|
|
135736
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135638
135737
|
TextField_default,
|
|
135639
135738
|
{
|
|
135640
135739
|
fullWidth: true,
|
|
@@ -135647,30 +135746,30 @@ var init_leadIntegrations = __esm({
|
|
|
135647
135746
|
] })
|
|
135648
135747
|
] })
|
|
135649
135748
|
] }),
|
|
135650
|
-
tab === 2 && editingIntegration && /* @__PURE__ */ (0,
|
|
135651
|
-
/* @__PURE__ */ (0,
|
|
135652
|
-
/* @__PURE__ */ (0,
|
|
135653
|
-
/* @__PURE__ */ (0,
|
|
135749
|
+
tab === 2 && editingIntegration && /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { p: 2.5 }, children: [
|
|
135750
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center", mb: 1.5 }, children: [
|
|
135751
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: __spreadProps(__spreadValues({}, sectionTitleSx), { mb: 0 }), children: "Form \u2192 Campaign Mappings" }),
|
|
135752
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(SDKPermissionGuard, { permissions: MANAGE_PERMISSIONS, showFallback: false, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135654
135753
|
SDKButton,
|
|
135655
135754
|
{
|
|
135656
135755
|
size: "small",
|
|
135657
|
-
startIcon: /* @__PURE__ */ (0,
|
|
135756
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Add_default, { sx: { fontSize: "1rem !important" } }),
|
|
135658
135757
|
onClick: () => onAddMapping(editingIntegration),
|
|
135659
135758
|
children: "Add Mapping"
|
|
135660
135759
|
}
|
|
135661
135760
|
) })
|
|
135662
135761
|
] }),
|
|
135663
|
-
/* @__PURE__ */ (0,
|
|
135664
|
-
/* @__PURE__ */ (0,
|
|
135665
|
-
/* @__PURE__ */ (0,
|
|
135762
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableContainer_default, { component: Paper_default, variant: "outlined", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Table_default, { size: "small", children: [
|
|
135763
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableHead_default, { children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableRow_default, { children: ["Form ID", "Form Name", "Campaign", "Priority", "Status", "Actions"].map((col) => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { align: col === "Actions" ? "center" : "left", sx: headCellSx, children: col }, col)) }) }),
|
|
135764
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(TableBody_default, { children: [
|
|
135666
135765
|
mappings.map((mapping) => {
|
|
135667
135766
|
var _a3;
|
|
135668
|
-
return /* @__PURE__ */ (0,
|
|
135669
|
-
/* @__PURE__ */ (0,
|
|
135670
|
-
/* @__PURE__ */ (0,
|
|
135671
|
-
/* @__PURE__ */ (0,
|
|
135672
|
-
/* @__PURE__ */ (0,
|
|
135673
|
-
/* @__PURE__ */ (0,
|
|
135767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(TableRow_default, { sx: tableRowSx, children: [
|
|
135768
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: mapping.sourceFormId }),
|
|
135769
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: mapping.sourceFormName || "\u2014" }),
|
|
135770
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: ((_a3 = campaigns.find((c2) => c2.id === mapping.campaignId)) == null ? void 0 : _a3.name) || mapping.campaignId }),
|
|
135771
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: mapping.priorityOverride || "Default" }),
|
|
135772
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135674
135773
|
Chip_default,
|
|
135675
135774
|
{
|
|
135676
135775
|
label: mapping.isActive ? "Active" : "Inactive",
|
|
@@ -135678,29 +135777,29 @@ var init_leadIntegrations = __esm({
|
|
|
135678
135777
|
color: mapping.isActive ? "success" : "default"
|
|
135679
135778
|
}
|
|
135680
135779
|
) }),
|
|
135681
|
-
/* @__PURE__ */ (0,
|
|
135682
|
-
/* @__PURE__ */ (0,
|
|
135780
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, align: "center", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(SDKPermissionGuard, { permissions: MANAGE_PERMISSIONS, showFallback: false, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Stack_default, { direction: "row", spacing: 0.5, justifyContent: "center", children: [
|
|
135781
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Tooltip_default, { title: "Edit", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135683
135782
|
IconButton_default,
|
|
135684
135783
|
{
|
|
135685
135784
|
size: "small",
|
|
135686
135785
|
sx: iconBtnPrimarySx,
|
|
135687
135786
|
onClick: () => onEditMapping(editingIntegration, mapping),
|
|
135688
|
-
children: /* @__PURE__ */ (0,
|
|
135787
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Edit_default, { fontSize: "small" })
|
|
135689
135788
|
}
|
|
135690
135789
|
) }),
|
|
135691
|
-
/* @__PURE__ */ (0,
|
|
135790
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Tooltip_default, { title: "Delete", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135692
135791
|
IconButton_default,
|
|
135693
135792
|
{
|
|
135694
135793
|
size: "small",
|
|
135695
135794
|
sx: iconBtnDangerSx,
|
|
135696
135795
|
onClick: () => onDeleteMapping(editingIntegration, mapping),
|
|
135697
|
-
children: /* @__PURE__ */ (0,
|
|
135796
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Delete_default, { fontSize: "small" })
|
|
135698
135797
|
}
|
|
135699
135798
|
) })
|
|
135700
135799
|
] }) }) })
|
|
135701
135800
|
] }, mapping.id);
|
|
135702
135801
|
}),
|
|
135703
|
-
mappings.length === 0 && /* @__PURE__ */ (0,
|
|
135802
|
+
mappings.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableRow_default, { children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { colSpan: 6, align: "center", sx: { py: 3, color: "#999", fontSize: "0.82rem" }, children: "No form mappings configured" }) })
|
|
135704
135803
|
] })
|
|
135705
135804
|
] }) })
|
|
135706
135805
|
] })
|
|
@@ -135728,32 +135827,32 @@ var init_leadIntegrations = __esm({
|
|
|
135728
135827
|
[next2[idx], next2[idx + delta]] = [next2[idx + delta], next2[idx]];
|
|
135729
135828
|
return next2;
|
|
135730
135829
|
});
|
|
135731
|
-
return /* @__PURE__ */ (0,
|
|
135830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135732
135831
|
ModalShell,
|
|
135733
135832
|
{
|
|
135734
135833
|
title: mode === "add" ? "Add Form Mapping" : "Edit Form Mapping",
|
|
135735
135834
|
width: { xs: "95vw", sm: 560 },
|
|
135736
135835
|
zIndex: 1400,
|
|
135737
135836
|
onClose,
|
|
135738
|
-
footer: /* @__PURE__ */ (0,
|
|
135739
|
-
/* @__PURE__ */ (0,
|
|
135740
|
-
/* @__PURE__ */ (0,
|
|
135837
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(import_jsx_runtime301.Fragment, { children: [
|
|
135838
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(SDKButton, { variant: "cancel", onClick: onClose, children: "Cancel" }),
|
|
135839
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135741
135840
|
SDKButton,
|
|
135742
135841
|
{
|
|
135743
135842
|
onClick: onSave,
|
|
135744
135843
|
disabled: saving,
|
|
135745
|
-
startIcon: saving ? /* @__PURE__ */ (0,
|
|
135844
|
+
startIcon: saving ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(CircularProgress_default, { size: 14, color: "inherit" }) : void 0,
|
|
135746
135845
|
children: mode === "add" ? "Create" : "Save"
|
|
135747
135846
|
}
|
|
135748
135847
|
)
|
|
135749
135848
|
] }),
|
|
135750
|
-
children: /* @__PURE__ */ (0,
|
|
135751
|
-
/* @__PURE__ */ (0,
|
|
135752
|
-
/* @__PURE__ */ (0,
|
|
135849
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { p: 2.5 }, children: [
|
|
135850
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { mb: 2 }, children: [
|
|
135851
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Typography_default, { sx: labelSx, children: [
|
|
135753
135852
|
"Source Form Name ",
|
|
135754
|
-
/* @__PURE__ */ (0,
|
|
135853
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Required, {})
|
|
135755
135854
|
] }),
|
|
135756
|
-
/* @__PURE__ */ (0,
|
|
135855
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(FormControl_default, { fullWidth: true, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
|
|
135757
135856
|
Select_default,
|
|
135758
135857
|
{
|
|
135759
135858
|
value: formData.sourceFormId || "",
|
|
@@ -135763,7 +135862,7 @@ var init_leadIntegrations = __esm({
|
|
|
135763
135862
|
disabled: mode === "edit",
|
|
135764
135863
|
renderValue: (selected) => {
|
|
135765
135864
|
var _a3;
|
|
135766
|
-
return !selected ? /* @__PURE__ */ (0,
|
|
135865
|
+
return !selected ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("span", { style: { color: "#9e9e9e" }, children: "Select Form" }) : ((_a3 = availableForms.find((form) => form.id === selected)) == null ? void 0 : _a3.name) || formData.sourceFormName || "";
|
|
135767
135866
|
},
|
|
135768
135867
|
onChange: (e) => {
|
|
135769
135868
|
const selectedForm = availableForms.find((form) => form.id === e.target.value);
|
|
@@ -135774,18 +135873,18 @@ var init_leadIntegrations = __esm({
|
|
|
135774
135873
|
}));
|
|
135775
135874
|
},
|
|
135776
135875
|
children: [
|
|
135777
|
-
/* @__PURE__ */ (0,
|
|
135778
|
-
availableForms.map((form) => /* @__PURE__ */ (0,
|
|
135876
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(MenuItem_default, { value: "", disabled: true, children: "Select Form" }),
|
|
135877
|
+
availableForms.map((form) => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(MenuItem_default, { value: form.id, children: form.name }, form.id))
|
|
135779
135878
|
]
|
|
135780
135879
|
}
|
|
135781
135880
|
) })
|
|
135782
135881
|
] }),
|
|
135783
|
-
/* @__PURE__ */ (0,
|
|
135784
|
-
/* @__PURE__ */ (0,
|
|
135882
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { mb: 2 }, children: [
|
|
135883
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Typography_default, { sx: labelSx, children: [
|
|
135785
135884
|
"Source Form ID ",
|
|
135786
|
-
/* @__PURE__ */ (0,
|
|
135885
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Required, {})
|
|
135787
135886
|
] }),
|
|
135788
|
-
/* @__PURE__ */ (0,
|
|
135887
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135789
135888
|
TextField_default,
|
|
135790
135889
|
{
|
|
135791
135890
|
fullWidth: true,
|
|
@@ -135797,12 +135896,12 @@ var init_leadIntegrations = __esm({
|
|
|
135797
135896
|
}
|
|
135798
135897
|
)
|
|
135799
135898
|
] }),
|
|
135800
|
-
/* @__PURE__ */ (0,
|
|
135801
|
-
/* @__PURE__ */ (0,
|
|
135899
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { mb: 2 }, children: [
|
|
135900
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Typography_default, { sx: labelSx, children: [
|
|
135802
135901
|
"Target Campaign ",
|
|
135803
|
-
/* @__PURE__ */ (0,
|
|
135902
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Required, {})
|
|
135804
135903
|
] }),
|
|
135805
|
-
/* @__PURE__ */ (0,
|
|
135904
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(FormControl_default, { fullWidth: true, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135806
135905
|
Select_default,
|
|
135807
135906
|
{
|
|
135808
135907
|
value: formData.campaignId || "",
|
|
@@ -135811,16 +135910,16 @@ var init_leadIntegrations = __esm({
|
|
|
135811
135910
|
MenuProps: { sx: { zIndex: SELECT_MENU_Z_INDEX } },
|
|
135812
135911
|
renderValue: (selected) => {
|
|
135813
135912
|
var _a3;
|
|
135814
|
-
return !selected ? /* @__PURE__ */ (0,
|
|
135913
|
+
return !selected ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("span", { style: { color: "#9e9e9e" }, children: "Select Campaign" }) : ((_a3 = campaigns.find((c2) => c2.id === selected)) == null ? void 0 : _a3.name) || String(selected);
|
|
135815
135914
|
},
|
|
135816
135915
|
onChange: (e) => setFormData((prev2) => __spreadProps(__spreadValues({}, prev2), { campaignId: Number(e.target.value) })),
|
|
135817
|
-
children: campaigns.map((c2) => /* @__PURE__ */ (0,
|
|
135916
|
+
children: campaigns.map((c2) => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(MenuItem_default, { value: c2.id, children: c2.name }, c2.id))
|
|
135818
135917
|
}
|
|
135819
135918
|
) })
|
|
135820
135919
|
] }),
|
|
135821
|
-
/* @__PURE__ */ (0,
|
|
135822
|
-
/* @__PURE__ */ (0,
|
|
135823
|
-
/* @__PURE__ */ (0,
|
|
135920
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { mb: 2 }, children: [
|
|
135921
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "Priority Override (1-10)" }),
|
|
135922
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135824
135923
|
TextField_default,
|
|
135825
135924
|
{
|
|
135826
135925
|
fullWidth: true,
|
|
@@ -135835,24 +135934,24 @@ var init_leadIntegrations = __esm({
|
|
|
135835
135934
|
}
|
|
135836
135935
|
)
|
|
135837
135936
|
] }),
|
|
135838
|
-
/* @__PURE__ */ (0,
|
|
135839
|
-
/* @__PURE__ */ (0,
|
|
135840
|
-
fieldRows.length === 0 && /* @__PURE__ */ (0,
|
|
135841
|
-
fieldRows.map((row, idx) => /* @__PURE__ */ (0,
|
|
135842
|
-
/* @__PURE__ */ (0,
|
|
135843
|
-
/* @__PURE__ */ (0,
|
|
135844
|
-
/* @__PURE__ */ (0,
|
|
135937
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { mb: 2 }, children: [
|
|
135938
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "Display Fields (which custom_data fields show in the leads UI)" }),
|
|
135939
|
+
fieldRows.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { variant: "body2", color: "text.secondary", sx: { mb: 1, fontSize: "0.8rem" }, children: "No display fields configured \u2014 leads for this form won't show extra details in the UI." }),
|
|
135940
|
+
fieldRows.map((row, idx) => /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { display: "flex", gap: 1, mb: 1, alignItems: "center" }, children: [
|
|
135941
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { display: "flex", flexDirection: "column" }, children: [
|
|
135942
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(IconButton_default, { size: "small", disabled: idx === 0, onClick: () => move(idx, -1), sx: { p: 0.25 }, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(ArrowUpward_default, { fontSize: "inherit" }) }),
|
|
135943
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135845
135944
|
IconButton_default,
|
|
135846
135945
|
{
|
|
135847
135946
|
size: "small",
|
|
135848
135947
|
disabled: idx === fieldRows.length - 1,
|
|
135849
135948
|
onClick: () => move(idx, 1),
|
|
135850
135949
|
sx: { p: 0.25 },
|
|
135851
|
-
children: /* @__PURE__ */ (0,
|
|
135950
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(ArrowDownward_default2, { fontSize: "inherit" })
|
|
135852
135951
|
}
|
|
135853
135952
|
)
|
|
135854
135953
|
] }),
|
|
135855
|
-
/* @__PURE__ */ (0,
|
|
135954
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135856
135955
|
TextField_default,
|
|
135857
135956
|
{
|
|
135858
135957
|
fullWidth: true,
|
|
@@ -135863,7 +135962,7 @@ var init_leadIntegrations = __esm({
|
|
|
135863
135962
|
onChange: (e) => setFieldRows((prev2) => prev2.map((r2, i) => i === idx ? __spreadProps(__spreadValues({}, r2), { key: e.target.value }) : r2))
|
|
135864
135963
|
}
|
|
135865
135964
|
),
|
|
135866
|
-
/* @__PURE__ */ (0,
|
|
135965
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135867
135966
|
TextField_default,
|
|
135868
135967
|
{
|
|
135869
135968
|
fullWidth: true,
|
|
@@ -135874,22 +135973,22 @@ var init_leadIntegrations = __esm({
|
|
|
135874
135973
|
onChange: (e) => setFieldRows((prev2) => prev2.map((r2, i) => i === idx ? __spreadProps(__spreadValues({}, r2), { label: e.target.value }) : r2))
|
|
135875
135974
|
}
|
|
135876
135975
|
),
|
|
135877
|
-
/* @__PURE__ */ (0,
|
|
135976
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(IconButton_default, { size: "small", sx: iconBtnDangerSx, onClick: () => setFieldRows((prev2) => prev2.filter((_, i) => i !== idx)), children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Delete_default, { fontSize: "small" }) })
|
|
135878
135977
|
] }, idx)),
|
|
135879
|
-
/* @__PURE__ */ (0,
|
|
135978
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135880
135979
|
SDKButton,
|
|
135881
135980
|
{
|
|
135882
135981
|
variant: "outlined",
|
|
135883
135982
|
size: "small",
|
|
135884
|
-
startIcon: /* @__PURE__ */ (0,
|
|
135983
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Add_default, { sx: { fontSize: "1rem !important" } }),
|
|
135885
135984
|
onClick: () => setFieldRows((prev2) => [...prev2, { key: "", label: "" }]),
|
|
135886
135985
|
children: "Add Field"
|
|
135887
135986
|
}
|
|
135888
135987
|
)
|
|
135889
135988
|
] }),
|
|
135890
|
-
/* @__PURE__ */ (0,
|
|
135891
|
-
/* @__PURE__ */ (0,
|
|
135892
|
-
/* @__PURE__ */ (0,
|
|
135989
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
135990
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: __spreadProps(__spreadValues({}, labelSx), { mb: 0 }), children: "Active" }),
|
|
135991
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135893
135992
|
Switch_default,
|
|
135894
135993
|
{
|
|
135895
135994
|
size: "small",
|
|
@@ -136125,36 +136224,36 @@ var init_leadIntegrations = __esm({
|
|
|
136125
136224
|
setLogsLoading(false);
|
|
136126
136225
|
}
|
|
136127
136226
|
};
|
|
136128
|
-
return /* @__PURE__ */ (0,
|
|
136129
|
-
/* @__PURE__ */ (0,
|
|
136227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
136228
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136130
136229
|
SDKPageHeader,
|
|
136131
136230
|
{
|
|
136132
136231
|
title: "Lead Integrations",
|
|
136133
136232
|
count: filtered.length,
|
|
136134
136233
|
countLabel: "integrations",
|
|
136135
|
-
actions: /* @__PURE__ */ (0,
|
|
136136
|
-
/* @__PURE__ */ (0,
|
|
136234
|
+
actions: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Stack_default, { direction: "row", alignItems: "center", spacing: 1, children: [
|
|
136235
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136137
136236
|
SDKButton,
|
|
136138
136237
|
{
|
|
136139
136238
|
variant: "outlined",
|
|
136140
136239
|
size: "small",
|
|
136141
|
-
startIcon: loading ? /* @__PURE__ */ (0,
|
|
136240
|
+
startIcon: loading ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(CircularProgress_default, { size: 14, color: "inherit" }) : /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Refresh_default, { sx: { fontSize: "0.95rem !important" } }),
|
|
136142
136241
|
onClick: refresh,
|
|
136143
136242
|
disabled: loading,
|
|
136144
136243
|
sx: { height: 36 },
|
|
136145
136244
|
children: "Refresh"
|
|
136146
136245
|
}
|
|
136147
136246
|
),
|
|
136148
|
-
/* @__PURE__ */ (0,
|
|
136247
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136149
136248
|
SDKPermissionGuard,
|
|
136150
136249
|
{
|
|
136151
136250
|
permissions: [SDK_PERMISSIONS.LEAD_INTEGRATIONS_CREATE, SDK_PERMISSIONS.LEAD_INTEGRATIONS_MANAGE],
|
|
136152
136251
|
showFallback: false,
|
|
136153
|
-
children: /* @__PURE__ */ (0,
|
|
136252
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136154
136253
|
SDKButton,
|
|
136155
136254
|
{
|
|
136156
136255
|
size: "small",
|
|
136157
|
-
startIcon: /* @__PURE__ */ (0,
|
|
136256
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Add_default, { sx: { fontSize: "1rem !important" } }),
|
|
136158
136257
|
onClick: () => openDialog("add"),
|
|
136159
136258
|
sx: { height: 36 },
|
|
136160
136259
|
children: "Add Integration"
|
|
@@ -136165,9 +136264,9 @@ var init_leadIntegrations = __esm({
|
|
|
136165
136264
|
] })
|
|
136166
136265
|
}
|
|
136167
136266
|
),
|
|
136168
|
-
/* @__PURE__ */ (0,
|
|
136169
|
-
/* @__PURE__ */ (0,
|
|
136170
|
-
/* @__PURE__ */ (0,
|
|
136267
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { py: 1.5, px: 2, children: [
|
|
136268
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Stack_default, { direction: "row", spacing: 2, alignItems: "center", mb: 2, flexWrap: "wrap", useFlexGap: true, children: [
|
|
136269
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136171
136270
|
SearchBar,
|
|
136172
136271
|
{
|
|
136173
136272
|
value: search,
|
|
@@ -136178,7 +136277,7 @@ var init_leadIntegrations = __esm({
|
|
|
136178
136277
|
placeholder: "Search integrations..."
|
|
136179
136278
|
}
|
|
136180
136279
|
),
|
|
136181
|
-
/* @__PURE__ */ (0,
|
|
136280
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(FormControl_default, { size: "small", sx: { minWidth: 190 }, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
|
|
136182
136281
|
Select_default,
|
|
136183
136282
|
{
|
|
136184
136283
|
value: sourceFilter,
|
|
@@ -136188,8 +136287,8 @@ var init_leadIntegrations = __esm({
|
|
|
136188
136287
|
},
|
|
136189
136288
|
sx: { height: 36, fontSize: "0.85rem", borderRadius: "8px" },
|
|
136190
136289
|
children: [
|
|
136191
|
-
/* @__PURE__ */ (0,
|
|
136192
|
-
SOURCE_TYPE_OPTIONS.map((opt) => /* @__PURE__ */ (0,
|
|
136290
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(MenuItem_default, { value: "all", children: "All Sources" }),
|
|
136291
|
+
SOURCE_TYPE_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(MenuItem_default, { value: opt.value, children: [
|
|
136193
136292
|
opt.icon,
|
|
136194
136293
|
" ",
|
|
136195
136294
|
opt.label
|
|
@@ -136198,10 +136297,10 @@ var init_leadIntegrations = __esm({
|
|
|
136198
136297
|
}
|
|
136199
136298
|
) })
|
|
136200
136299
|
] }),
|
|
136201
|
-
/* @__PURE__ */ (0,
|
|
136202
|
-
/* @__PURE__ */ (0,
|
|
136203
|
-
/* @__PURE__ */ (0,
|
|
136204
|
-
/* @__PURE__ */ (0,
|
|
136300
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(TableContainer_default, { component: Paper_default, variant: "outlined", sx: { display: "flex", flexDirection: "column" }, children: [
|
|
136301
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Box_default, { sx: { overflowY: "auto", maxHeight: 600 }, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Table_default, { stickyHeader: true, size: "small", children: [
|
|
136302
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableHead_default, { children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableRow_default, { children: INTEGRATION_COLS.map((col) => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { align: CENTER_COLS2.has(col) ? "center" : "left", sx: headCellSx, children: col }, col)) }) }),
|
|
136303
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableBody_default, { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableRow_default, { children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { colSpan: INTEGRATION_COLS.length, align: "center", sx: { py: 4 }, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(CircularProgress_default, { size: 24 }) }) }) : paginated.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableRow_default, { children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136205
136304
|
TableCell_default,
|
|
136206
136305
|
{
|
|
136207
136306
|
colSpan: INTEGRATION_COLS.length,
|
|
@@ -136211,9 +136310,9 @@ var init_leadIntegrations = __esm({
|
|
|
136211
136310
|
}
|
|
136212
136311
|
) }) : paginated.map((integration) => {
|
|
136213
136312
|
var _a3;
|
|
136214
|
-
return /* @__PURE__ */ (0,
|
|
136215
|
-
/* @__PURE__ */ (0,
|
|
136216
|
-
/* @__PURE__ */ (0,
|
|
136313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(TableRow_default, { sx: tableRowSx, children: [
|
|
136314
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { fontWeight: 600, fontSize: "0.82rem", children: integration.name }) }),
|
|
136315
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136217
136316
|
Chip_default,
|
|
136218
136317
|
{
|
|
136219
136318
|
label: `${getSourceTypeIcon(integration.sourceType)} ${getSourceTypeLabel(integration.sourceType)}`,
|
|
@@ -136221,7 +136320,7 @@ var init_leadIntegrations = __esm({
|
|
|
136221
136320
|
variant: "outlined"
|
|
136222
136321
|
}
|
|
136223
136322
|
) }),
|
|
136224
|
-
/* @__PURE__ */ (0,
|
|
136323
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136225
136324
|
Chip_default,
|
|
136226
136325
|
{
|
|
136227
136326
|
label: integration.isActive ? "Active" : "Inactive",
|
|
@@ -136229,9 +136328,9 @@ var init_leadIntegrations = __esm({
|
|
|
136229
136328
|
color: integration.isActive ? "success" : "default"
|
|
136230
136329
|
}
|
|
136231
136330
|
) }),
|
|
136232
|
-
/* @__PURE__ */ (0,
|
|
136233
|
-
/* @__PURE__ */ (0,
|
|
136234
|
-
/* @__PURE__ */ (0,
|
|
136331
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TokenStatusChip, { integration }) }),
|
|
136332
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
136333
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Tooltip_default, { title: integration.webhookUrl || "", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136235
136334
|
Typography_default,
|
|
136236
136335
|
{
|
|
136237
136336
|
noWrap: true,
|
|
@@ -136239,24 +136338,24 @@ var init_leadIntegrations = __esm({
|
|
|
136239
136338
|
children: integration.webhookUrl
|
|
136240
136339
|
}
|
|
136241
136340
|
) }),
|
|
136242
|
-
/* @__PURE__ */ (0,
|
|
136341
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Tooltip_default, { title: "Copy URL", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(IconButton_default, { size: "small", onClick: () => handleCopyWebhookUrl(integration.webhookUrl), children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(ContentCopy_default, { fontSize: "small" }) }) })
|
|
136243
136342
|
] }) }),
|
|
136244
|
-
/* @__PURE__ */ (0,
|
|
136245
|
-
/* @__PURE__ */ (0,
|
|
136246
|
-
integration.lastLeadAt && /* @__PURE__ */ (0,
|
|
136343
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(TableCell_default, { sx: bodyCellSx, children: [
|
|
136344
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { fontSize: "0.82rem", children: integration.totalLeadsReceived }),
|
|
136345
|
+
integration.lastLeadAt && /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Typography_default, { variant: "caption", color: "text.secondary", children: [
|
|
136247
136346
|
"Last: ",
|
|
136248
136347
|
new Date(integration.lastLeadAt).toLocaleDateString()
|
|
136249
136348
|
] })
|
|
136250
136349
|
] }),
|
|
136251
|
-
/* @__PURE__ */ (0,
|
|
136252
|
-
/* @__PURE__ */ (0,
|
|
136253
|
-
/* @__PURE__ */ (0,
|
|
136350
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
136351
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Chip_default, { label: `${((_a3 = integration.formMappings) == null ? void 0 : _a3.length) || 0} mappings`, size: "small" }),
|
|
136352
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(SDKPermissionGuard, { permissions: MANAGE_PERMISSIONS, showFallback: false, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Tooltip_default, { title: "Add Mapping", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(IconButton_default, { size: "small", onClick: () => openMappingDialog(integration, "add"), children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Add_default, { fontSize: "small" }) }) }) })
|
|
136254
136353
|
] }) }),
|
|
136255
|
-
/* @__PURE__ */ (0,
|
|
136256
|
-
/* @__PURE__ */ (0,
|
|
136257
|
-
/* @__PURE__ */ (0,
|
|
136258
|
-
/* @__PURE__ */ (0,
|
|
136259
|
-
/* @__PURE__ */ (0,
|
|
136354
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, align: "center", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Stack_default, { direction: "row", spacing: 0.5, justifyContent: "center", children: [
|
|
136355
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(SDKPermissionGuard, { permissions: MANAGE_PERMISSIONS, showFallback: false, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Tooltip_default, { title: "Edit", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(IconButton_default, { size: "small", sx: iconBtnPrimarySx, onClick: () => openDialog("edit", integration), children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Edit_default, { fontSize: "small" }) }) }) }),
|
|
136356
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Tooltip_default, { title: "View Logs", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(IconButton_default, { size: "small", onClick: () => openLogs(integration), children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(History_default, { fontSize: "small" }) }) }),
|
|
136357
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(SDKPermissionGuard, { permissions: MANAGE_PERMISSIONS, showFallback: false, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Tooltip_default, { title: "Regenerate Token", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(IconButton_default, { size: "small", onClick: () => setRegenerateTarget(integration), children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Refresh_default, { fontSize: "small" }) }) }) }),
|
|
136358
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136260
136359
|
SDKPermissionGuard,
|
|
136261
136360
|
{
|
|
136262
136361
|
permissions: [
|
|
@@ -136264,14 +136363,14 @@ var init_leadIntegrations = __esm({
|
|
|
136264
136363
|
SDK_PERMISSIONS.LEAD_INTEGRATIONS_MANAGE
|
|
136265
136364
|
],
|
|
136266
136365
|
showFallback: false,
|
|
136267
|
-
children: /* @__PURE__ */ (0,
|
|
136366
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Tooltip_default, { title: "Delete", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(IconButton_default, { size: "small", sx: iconBtnDangerSx, onClick: () => setDeleteTarget(integration), children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Delete_default, { fontSize: "small" }) }) })
|
|
136268
136367
|
}
|
|
136269
136368
|
)
|
|
136270
136369
|
] }) })
|
|
136271
136370
|
] }, integration.id);
|
|
136272
136371
|
}) })
|
|
136273
136372
|
] }) }),
|
|
136274
|
-
/* @__PURE__ */ (0,
|
|
136373
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136275
136374
|
TablePagination_default,
|
|
136276
136375
|
{
|
|
136277
136376
|
component: "div",
|
|
@@ -136289,7 +136388,7 @@ var init_leadIntegrations = __esm({
|
|
|
136289
136388
|
)
|
|
136290
136389
|
] })
|
|
136291
136390
|
] }),
|
|
136292
|
-
/* @__PURE__ */ (0,
|
|
136391
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136293
136392
|
IntegrationDialog,
|
|
136294
136393
|
{
|
|
136295
136394
|
open: dialogOpen,
|
|
@@ -136306,7 +136405,7 @@ var init_leadIntegrations = __esm({
|
|
|
136306
136405
|
onDeleteMapping: (integration, mapping) => setMappingDeleteTarget({ integration, mapping })
|
|
136307
136406
|
}
|
|
136308
136407
|
),
|
|
136309
|
-
/* @__PURE__ */ (0,
|
|
136408
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136310
136409
|
MappingDialog,
|
|
136311
136410
|
{
|
|
136312
136411
|
open: mappingDialogOpen,
|
|
@@ -136322,7 +136421,7 @@ var init_leadIntegrations = __esm({
|
|
|
136322
136421
|
onClose: () => setMappingDialogOpen(false)
|
|
136323
136422
|
}
|
|
136324
136423
|
),
|
|
136325
|
-
/* @__PURE__ */ (0,
|
|
136424
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136326
136425
|
LogsDialog,
|
|
136327
136426
|
{
|
|
136328
136427
|
open: logsDialogOpen,
|
|
@@ -136332,7 +136431,7 @@ var init_leadIntegrations = __esm({
|
|
|
136332
136431
|
onClose: () => setLogsDialogOpen(false)
|
|
136333
136432
|
}
|
|
136334
136433
|
),
|
|
136335
|
-
/* @__PURE__ */ (0,
|
|
136434
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136336
136435
|
ConfirmDialog2,
|
|
136337
136436
|
{
|
|
136338
136437
|
open: !!deleteTarget,
|
|
@@ -136343,7 +136442,7 @@ var init_leadIntegrations = __esm({
|
|
|
136343
136442
|
onClose: () => setDeleteTarget(null)
|
|
136344
136443
|
}
|
|
136345
136444
|
),
|
|
136346
|
-
/* @__PURE__ */ (0,
|
|
136445
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136347
136446
|
ConfirmDialog2,
|
|
136348
136447
|
{
|
|
136349
136448
|
open: !!mappingDeleteTarget,
|
|
@@ -136354,7 +136453,7 @@ var init_leadIntegrations = __esm({
|
|
|
136354
136453
|
onClose: () => setMappingDeleteTarget(null)
|
|
136355
136454
|
}
|
|
136356
136455
|
),
|
|
136357
|
-
/* @__PURE__ */ (0,
|
|
136456
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136358
136457
|
ConfirmDialog2,
|
|
136359
136458
|
{
|
|
136360
136459
|
open: !!regenerateTarget,
|
|
@@ -136368,7 +136467,7 @@ var init_leadIntegrations = __esm({
|
|
|
136368
136467
|
] });
|
|
136369
136468
|
});
|
|
136370
136469
|
LeadIntegrationsContent.displayName = "LeadIntegrationsContent";
|
|
136371
|
-
LeadIntegrations = () => /* @__PURE__ */ (0,
|
|
136470
|
+
LeadIntegrations = () => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(SDKProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(LeadIntegrationsContent, {}) });
|
|
136372
136471
|
leadIntegrations_default = LeadIntegrations;
|
|
136373
136472
|
}
|
|
136374
136473
|
});
|
|
@@ -140953,13 +141052,13 @@ CallControlPanel.displayName = "CallControlPanel";
|
|
|
140953
141052
|
var import_react109 = __toESM(require("react"));
|
|
140954
141053
|
init_SDKPermissionGuard();
|
|
140955
141054
|
init_permissions();
|
|
140956
|
-
var
|
|
141055
|
+
var import_jsx_runtime302 = require("react/jsx-runtime");
|
|
140957
141056
|
function withGuard(menuCodes, loader, permissions) {
|
|
140958
141057
|
const permissionList = permissions ? Array.isArray(permissions) ? permissions : [permissions] : void 0;
|
|
140959
141058
|
return import_react109.default.lazy(async () => {
|
|
140960
141059
|
const mod = await loader();
|
|
140961
141060
|
const Page = mod.default;
|
|
140962
|
-
const Guarded = (props) => /* @__PURE__ */ (0,
|
|
141061
|
+
const Guarded = (props) => /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(SDKPermissionGuard, { menuFeature: menuCodes, permissions: permissionList, children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(Page, __spreadValues({}, props)) });
|
|
140963
141062
|
return { default: Guarded };
|
|
140964
141063
|
});
|
|
140965
141064
|
}
|