ahs-cti 1.0.1-beta.73 → 1.0.1-beta.75
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 +484 -385
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{managementDashboard-CIIHP7ET.mjs → managementDashboard-OYS6IUBN.mjs} +111 -21
- package/dist/managementDashboard-OYS6IUBN.mjs.map +1 -0
- package/dist-react/index.js +108 -23
- package/dist-react/index.js.map +1 -1
- package/dist-react/index.mjs +3 -3
- package/dist-react/index.mjs.map +1 -1
- package/dist-react/{managementDashboard-AMEYHYMZ.mjs → managementDashboard-GNPXMV3V.mjs} +106 -21
- package/dist-react/managementDashboard-GNPXMV3V.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/managementDashboard-CIIHP7ET.mjs.map +0 -1
- package/dist-react/managementDashboard-AMEYHYMZ.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -13338,10 +13338,10 @@ var init_emotion_react_browser_esm = __esm({
|
|
|
13338
13338
|
}
|
|
13339
13339
|
return React3.createElement.apply(null, createElementArgArray);
|
|
13340
13340
|
};
|
|
13341
|
-
(function(
|
|
13341
|
+
(function(_jsx266) {
|
|
13342
13342
|
var JSX;
|
|
13343
13343
|
/* @__PURE__ */ (function(_JSX) {
|
|
13344
|
-
})(JSX || (JSX =
|
|
13344
|
+
})(JSX || (JSX = _jsx266.JSX || (_jsx266.JSX = {})));
|
|
13345
13345
|
})(jsx || (jsx = {}));
|
|
13346
13346
|
Global = /* @__PURE__ */ withEmotionCache(function(props, cache) {
|
|
13347
13347
|
var styles5 = props.styles;
|
|
@@ -134252,6 +134252,20 @@ var init_PhoneForwarded = __esm({
|
|
|
134252
134252
|
}
|
|
134253
134253
|
});
|
|
134254
134254
|
|
|
134255
|
+
// node_modules/@mui/icons-material/PhoneMissed.mjs
|
|
134256
|
+
var import_jsx_runtime293, PhoneMissed_default;
|
|
134257
|
+
var init_PhoneMissed = __esm({
|
|
134258
|
+
"node_modules/@mui/icons-material/PhoneMissed.mjs"() {
|
|
134259
|
+
"use strict";
|
|
134260
|
+
"use client";
|
|
134261
|
+
init_createSvgIcon3();
|
|
134262
|
+
import_jsx_runtime293 = require("react/jsx-runtime");
|
|
134263
|
+
PhoneMissed_default = createSvgIcon(/* @__PURE__ */ (0, import_jsx_runtime293.jsx)("path", {
|
|
134264
|
+
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"
|
|
134265
|
+
}), "PhoneMissed");
|
|
134266
|
+
}
|
|
134267
|
+
});
|
|
134268
|
+
|
|
134255
134269
|
// call-control-sdk/lib/pages/managementDashboard/useManagementDashboard.ts
|
|
134256
134270
|
function buildQs(params) {
|
|
134257
134271
|
const qs = new URLSearchParams();
|
|
@@ -134280,23 +134294,26 @@ var managementDashboard_exports = {};
|
|
|
134280
134294
|
__export(managementDashboard_exports, {
|
|
134281
134295
|
default: () => managementDashboard_default
|
|
134282
134296
|
});
|
|
134283
|
-
function DirectionCard({ title, data, icon }) {
|
|
134284
|
-
|
|
134285
|
-
|
|
134286
|
-
|
|
134287
|
-
|
|
134297
|
+
function DirectionCard({ title, data, icon, droppedLabel }) {
|
|
134298
|
+
var _a2, _b, _c, _d, _e, _f, _g;
|
|
134299
|
+
const dropped = (_b = (_a2 = data.abandoned) != null ? _a2 : data.unanswered) != null ? _b : 0;
|
|
134300
|
+
const droppedPct = (_d = (_c = data.abandoned_pct) != null ? _c : data.unanswered_pct) != null ? _d : 0;
|
|
134301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Paper_default, { sx: cardPaper, children: [
|
|
134302
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: labelSx2, children: title }) }),
|
|
134303
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { p: 1.5 }, children: [
|
|
134304
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "flex", alignItems: "center", justifyContent: "center", gap: 1, mb: 1.2 }, children: [
|
|
134288
134305
|
icon,
|
|
134289
|
-
/* @__PURE__ */ (0,
|
|
134306
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: bigNumSx, children: ((_e = data.total) != null ? _e : 0).toLocaleString() })
|
|
134290
134307
|
] }),
|
|
134291
|
-
/* @__PURE__ */ (0,
|
|
134292
|
-
{ label: "ANSWERED", value: data.answered, pct: data.answered_pct },
|
|
134293
|
-
{ label:
|
|
134294
|
-
].map(({ label, value, pct }, idx) => /* @__PURE__ */ (0,
|
|
134295
|
-
/* @__PURE__ */ (0,
|
|
134296
|
-
/* @__PURE__ */ (0,
|
|
134297
|
-
/* @__PURE__ */ (0,
|
|
134298
|
-
/* @__PURE__ */ (0,
|
|
134299
|
-
/* @__PURE__ */ (0,
|
|
134308
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { display: "grid", gridTemplateColumns: "1fr 1fr", borderTop: `2px solid ${C6.s3}`, pt: 1 }, children: [
|
|
134309
|
+
{ label: "ANSWERED", value: (_f = data.answered) != null ? _f : 0, pct: (_g = data.answered_pct) != null ? _g : 0 },
|
|
134310
|
+
{ label: droppedLabel, value: dropped, pct: droppedPct }
|
|
134311
|
+
].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: [
|
|
134312
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 10, fontWeight: 700, letterSpacing: 0.5, color: C6.t3, mb: 0.3 }, children: label }),
|
|
134313
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "flex", alignItems: "baseline", justifyContent: "center", gap: 0.5 }, children: [
|
|
134314
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 15, fontWeight: 700, color: C6.blue }, children: value.toLocaleString() }),
|
|
134315
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t3 }, children: "|" }),
|
|
134316
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Typography_default, { sx: { fontSize: 12, fontWeight: 600, color: C6.blue }, children: [
|
|
134300
134317
|
pct.toFixed(1),
|
|
134301
134318
|
"%"
|
|
134302
134319
|
] })
|
|
@@ -134307,18 +134324,18 @@ function DirectionCard({ title, data, icon }) {
|
|
|
134307
134324
|
}
|
|
134308
134325
|
function QueueCallsCard({ data }) {
|
|
134309
134326
|
const maxCount = data.reduce((m, q) => Math.max(m, q.call_count), 0) || 1;
|
|
134310
|
-
return /* @__PURE__ */ (0,
|
|
134311
|
-
/* @__PURE__ */ (0,
|
|
134312
|
-
/* @__PURE__ */ (0,
|
|
134313
|
-
data.length === 0 && /* @__PURE__ */ (0,
|
|
134327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Paper_default, { sx: cardPaper, children: [
|
|
134328
|
+
/* @__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" }) }),
|
|
134329
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { p: 1.5 }, children: [
|
|
134330
|
+
data.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 12, color: C6.t3, textAlign: "center", py: 2 }, children: "No data" }),
|
|
134314
134331
|
data.map((q, i) => {
|
|
134315
134332
|
const pct = Math.max(6, q.call_count / maxCount * 100);
|
|
134316
|
-
return /* @__PURE__ */ (0,
|
|
134317
|
-
/* @__PURE__ */ (0,
|
|
134318
|
-
/* @__PURE__ */ (0,
|
|
134319
|
-
/* @__PURE__ */ (0,
|
|
134333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { mb: 0.7, "&:last-child": { mb: 0 } }, children: [
|
|
134334
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center", mb: 0.3 }, children: [
|
|
134335
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 12, fontWeight: 600, color: C6.t2 }, children: q.queue_name }),
|
|
134336
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 13, fontWeight: 700, color: C6.blue }, children: q.call_count })
|
|
134320
134337
|
] }),
|
|
134321
|
-
/* @__PURE__ */ (0,
|
|
134338
|
+
/* @__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 } }) })
|
|
134322
134339
|
] }, q.queue_name);
|
|
134323
134340
|
})
|
|
134324
134341
|
] })
|
|
@@ -134329,28 +134346,28 @@ function AbandonedCallbackCard({ data }) {
|
|
|
134329
134346
|
const subCellSx = { p: 1, textAlign: "center", borderTop: `1px solid ${C6.b1}` };
|
|
134330
134347
|
const subLabelSx = { fontSize: 10, fontWeight: 600, color: C6.t3, mb: 0.3, lineHeight: 1.2 };
|
|
134331
134348
|
const subRowSx = { display: "flex", alignItems: "baseline", justifyContent: "center", gap: 0.5 };
|
|
134332
|
-
return /* @__PURE__ */ (0,
|
|
134333
|
-
/* @__PURE__ */ (0,
|
|
134334
|
-
/* @__PURE__ */ (0,
|
|
134335
|
-
/* @__PURE__ */ (0,
|
|
134336
|
-
/* @__PURE__ */ (0,
|
|
134337
|
-
/* @__PURE__ */ (0,
|
|
134338
|
-
/* @__PURE__ */ (0,
|
|
134339
|
-
/* @__PURE__ */ (0,
|
|
134340
|
-
/* @__PURE__ */ (0,
|
|
134341
|
-
/* @__PURE__ */ (0,
|
|
134342
|
-
/* @__PURE__ */ (0,
|
|
134349
|
+
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: [
|
|
134350
|
+
/* @__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" }) }),
|
|
134351
|
+
/* @__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" }) }),
|
|
134352
|
+
/* @__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() }) }),
|
|
134353
|
+
/* @__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 }) }),
|
|
134354
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: __spreadProps(__spreadValues({}, subCellSx), { borderRight: `1px solid ${C6.b1}` }), children: [
|
|
134355
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: subLabelSx, children: "Called Back" }),
|
|
134356
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: subRowSx, children: [
|
|
134357
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 13, fontWeight: 700, color: C6.blue }, children: data.called_back }),
|
|
134358
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t3 }, children: "|" }),
|
|
134359
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Typography_default, { sx: { fontSize: 12, fontWeight: 600, color: C6.blue }, children: [
|
|
134343
134360
|
data.called_back_pct.toFixed(1),
|
|
134344
134361
|
"%"
|
|
134345
134362
|
] })
|
|
134346
134363
|
] })
|
|
134347
134364
|
] }),
|
|
134348
|
-
/* @__PURE__ */ (0,
|
|
134349
|
-
/* @__PURE__ */ (0,
|
|
134350
|
-
/* @__PURE__ */ (0,
|
|
134351
|
-
/* @__PURE__ */ (0,
|
|
134352
|
-
/* @__PURE__ */ (0,
|
|
134353
|
-
/* @__PURE__ */ (0,
|
|
134365
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: subCellSx, children: [
|
|
134366
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: subLabelSx, children: "To be Called" }),
|
|
134367
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: subRowSx, children: [
|
|
134368
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 13, fontWeight: 700, color: C6.blue }, children: data.to_call }),
|
|
134369
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t3 }, children: "|" }),
|
|
134370
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Typography_default, { sx: { fontSize: 12, fontWeight: 600, color: C6.blue }, children: [
|
|
134354
134371
|
data.to_call_pct.toFixed(1),
|
|
134355
134372
|
"%"
|
|
134356
134373
|
] })
|
|
@@ -134358,6 +134375,70 @@ function AbandonedCallbackCard({ data }) {
|
|
|
134358
134375
|
] })
|
|
134359
134376
|
] }) });
|
|
134360
134377
|
}
|
|
134378
|
+
function IvrAbandonedCard({ data }) {
|
|
134379
|
+
const gridCellSx = { p: 1, textAlign: "center", borderTop: `1px solid ${C6.b1}` };
|
|
134380
|
+
const gridLabelSx = { fontSize: 10, fontWeight: 600, color: C6.t3, mb: 0.3, lineHeight: 1.2 };
|
|
134381
|
+
const splitSx = { display: "flex", alignItems: "baseline", justifyContent: "center", gap: 0.5 };
|
|
134382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Paper_default, { sx: cardPaper, children: [
|
|
134383
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: labelSx2, children: "IVR Abandoned" }) }),
|
|
134384
|
+
/* @__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: [
|
|
134385
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(PhoneMissed_default, { sx: numIconSx }),
|
|
134386
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: bigNumSx, children: data.total.toLocaleString() })
|
|
134387
|
+
] }) }),
|
|
134388
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { display: "grid", gridTemplateColumns: "1fr 1fr" }, children: [
|
|
134389
|
+
{ label: "Called Back", value: data.called_back, pct: data.called_back_pct },
|
|
134390
|
+
{ label: "To be Called Back", value: data.to_call, pct: data.to_call_pct }
|
|
134391
|
+
].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: [
|
|
134392
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: gridLabelSx, children: label }),
|
|
134393
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: splitSx, children: [
|
|
134394
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 15, fontWeight: 700, color: C6.blue }, children: value.toLocaleString() }),
|
|
134395
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t3 }, children: "|" }),
|
|
134396
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Typography_default, { sx: { fontSize: 12, fontWeight: 600, color: C6.blue }, children: [
|
|
134397
|
+
pct.toFixed(1),
|
|
134398
|
+
"%"
|
|
134399
|
+
] })
|
|
134400
|
+
] })
|
|
134401
|
+
] }, label)) })
|
|
134402
|
+
] });
|
|
134403
|
+
}
|
|
134404
|
+
function HourlyTooltip({ active, payload }) {
|
|
134405
|
+
if (!active || !(payload == null ? void 0 : payload.length)) return null;
|
|
134406
|
+
const row = payload[0].payload;
|
|
134407
|
+
const calls = Number(row.answered) + Number(row.abandoned);
|
|
134408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: {
|
|
134409
|
+
background: C6.surface,
|
|
134410
|
+
border: `1px solid ${C6.b2}`,
|
|
134411
|
+
borderRadius: "8px",
|
|
134412
|
+
boxShadow: "0 6px 18px rgba(20,80,91,.18)",
|
|
134413
|
+
px: 1.25,
|
|
134414
|
+
py: 1,
|
|
134415
|
+
minWidth: 168,
|
|
134416
|
+
pointerEvents: "none"
|
|
134417
|
+
}, children: [
|
|
134418
|
+
/* @__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: [
|
|
134419
|
+
row.hour,
|
|
134420
|
+
":00 \u2013 ",
|
|
134421
|
+
row.hour,
|
|
134422
|
+
":59"
|
|
134423
|
+
] }) }),
|
|
134424
|
+
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: [
|
|
134425
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { width: 10, height: line2 ? 3 : 10, borderRadius: "2px", background: color3, flexShrink: 0 } }),
|
|
134426
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t2, flex: 1 }, children: label }),
|
|
134427
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 12, fontWeight: 700, color: C6.t1, fontVariantNumeric: "tabular-nums" }, children: row[key] })
|
|
134428
|
+
] }, key)),
|
|
134429
|
+
/* @__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: [
|
|
134430
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t3 }, children: "Total calls" }),
|
|
134431
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "flex", alignItems: "baseline", gap: 0.5 }, children: [
|
|
134432
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 13, fontWeight: 700, color: C6.blue, fontVariantNumeric: "tabular-nums" }, children: calls }),
|
|
134433
|
+
calls > 0 && /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Typography_default, { sx: { fontSize: 10, color: C6.t3 }, children: [
|
|
134434
|
+
"\xB7 ",
|
|
134435
|
+
(Number(row.answered) / calls * 100).toFixed(0),
|
|
134436
|
+
"% answered"
|
|
134437
|
+
] })
|
|
134438
|
+
] })
|
|
134439
|
+
] })
|
|
134440
|
+
] });
|
|
134441
|
+
}
|
|
134361
134442
|
function statusColor(status) {
|
|
134362
134443
|
const s3 = status == null ? void 0 : status.toUpperCase();
|
|
134363
134444
|
if (s3 === "ANSWERED") return C6.green;
|
|
@@ -134436,30 +134517,33 @@ function ManagementDashboardContent() {
|
|
|
134436
134517
|
};
|
|
134437
134518
|
img.src = "data:image/svg+xml;base64," + btoa(unescape(encodeURIComponent(svgData)));
|
|
134438
134519
|
};
|
|
134439
|
-
return /* @__PURE__ */ (0,
|
|
134440
|
-
/* @__PURE__ */ (0,
|
|
134520
|
+
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: [
|
|
134521
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
134441
134522
|
PageHeader,
|
|
134442
134523
|
{
|
|
134443
134524
|
title: "Management Dashboard",
|
|
134444
|
-
actions: /* @__PURE__ */ (0,
|
|
134445
|
-
/* @__PURE__ */ (0,
|
|
134525
|
+
actions: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Stack_default, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
134526
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
134446
134527
|
AppButton,
|
|
134447
134528
|
{
|
|
134448
134529
|
variant: "outlined",
|
|
134449
|
-
startIcon: /* @__PURE__ */ (0,
|
|
134530
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Refresh_default, { sx: { fontSize: "0.95rem !important" } }),
|
|
134450
134531
|
onClick: fetchDashboard,
|
|
134451
134532
|
disabled: loading,
|
|
134452
134533
|
children: "Refresh"
|
|
134453
134534
|
}
|
|
134454
134535
|
),
|
|
134455
|
-
/* @__PURE__ */ (0,
|
|
134536
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
134456
134537
|
AppButton,
|
|
134457
134538
|
{
|
|
134458
|
-
startIcon: /* @__PURE__ */ (0,
|
|
134539
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(FileDownload_default, { sx: { fontSize: "0.95rem !important" } }),
|
|
134459
134540
|
disabled: loading || data.totals.total_calls === 0,
|
|
134460
134541
|
onClick: () => {
|
|
134461
|
-
const
|
|
134462
|
-
const
|
|
134542
|
+
const esc = (v) => `"${String(v != null ? v : "").replace(/"/g, '""')}"`;
|
|
134543
|
+
const rows = data.repeated_calls.map(
|
|
134544
|
+
(r2) => [r2.phone_number, r2.date, r2.call_count, r2.latest_status, r2.latest_call_type].map(esc).join(",")
|
|
134545
|
+
);
|
|
134546
|
+
const csv = ["Phone,Date,Count,Status,Type", ...rows].join("\n");
|
|
134463
134547
|
const a2 = document.createElement("a");
|
|
134464
134548
|
a2.href = URL.createObjectURL(new Blob([csv], { type: "text/csv" }));
|
|
134465
134549
|
a2.download = `mgmt_dashboard_${startDate == null ? void 0 : startDate.format("YYYY-MM-DD")}.csv`;
|
|
@@ -134471,7 +134555,7 @@ function ManagementDashboardContent() {
|
|
|
134471
134555
|
] })
|
|
134472
134556
|
}
|
|
134473
134557
|
),
|
|
134474
|
-
/* @__PURE__ */ (0,
|
|
134558
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
134475
134559
|
ReportFilterBar,
|
|
134476
134560
|
{
|
|
134477
134561
|
startDate,
|
|
@@ -134483,110 +134567,119 @@ function ManagementDashboardContent() {
|
|
|
134483
134567
|
onQuickRangeChange: handleQuickRangeChange
|
|
134484
134568
|
}
|
|
134485
134569
|
),
|
|
134486
|
-
error && /* @__PURE__ */ (0,
|
|
134487
|
-
loading && /* @__PURE__ */ (0,
|
|
134488
|
-
!loading && /* @__PURE__ */ (0,
|
|
134489
|
-
/* @__PURE__ */ (0,
|
|
134570
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Alert_default, { severity: "error", sx: { mx: 2.5, mt: 1.5 }, onClose: () => setError(""), children: error }),
|
|
134571
|
+
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 }) }),
|
|
134572
|
+
!loading && /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { px: { xs: 1, md: 2 }, py: 1.5 }, children: [
|
|
134573
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: {
|
|
134490
134574
|
display: "grid",
|
|
134491
|
-
gridTemplateColumns: {
|
|
134575
|
+
gridTemplateColumns: {
|
|
134576
|
+
xs: "1fr",
|
|
134577
|
+
sm: "repeat(2, 1fr)",
|
|
134578
|
+
md: "repeat(3, 1fr)",
|
|
134579
|
+
lg: "1.1fr 1fr 1.6fr 1.1fr 1.2fr"
|
|
134580
|
+
},
|
|
134492
134581
|
gap: 1.2,
|
|
134493
|
-
mb: 1.2
|
|
134582
|
+
mb: 1.2,
|
|
134583
|
+
alignItems: "stretch",
|
|
134584
|
+
/* the wide Abandoned card gets a full row of its own while stacked 2-up */
|
|
134585
|
+
"& > :nth-of-type(3)": { gridColumn: { xs: "auto", sm: "span 2", md: "auto" } }
|
|
134494
134586
|
}, children: [
|
|
134495
|
-
/* @__PURE__ */ (0,
|
|
134496
|
-
/* @__PURE__ */ (0,
|
|
134497
|
-
/* @__PURE__ */ (0,
|
|
134498
|
-
/* @__PURE__ */ (0,
|
|
134587
|
+
/* @__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" }),
|
|
134588
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(QueueCallsCard, { data: data.queue_calls }),
|
|
134589
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(AbandonedCallbackCard, { data: data.abandoned }),
|
|
134590
|
+
/* @__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" }),
|
|
134591
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(IvrAbandonedCard, { data: data.ivr })
|
|
134499
134592
|
] }),
|
|
134500
|
-
/* @__PURE__ */ (0,
|
|
134593
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: {
|
|
134501
134594
|
display: "grid",
|
|
134502
134595
|
gridTemplateColumns: { xs: "1fr", sm: "repeat(2, 1fr)", lg: "1fr 1fr 1fr 1.6fr" },
|
|
134503
134596
|
gap: 1.2,
|
|
134504
134597
|
mb: 1.2
|
|
134505
134598
|
}, children: [
|
|
134506
|
-
/* @__PURE__ */ (0,
|
|
134507
|
-
/* @__PURE__ */ (0,
|
|
134508
|
-
/* @__PURE__ */ (0,
|
|
134509
|
-
/* @__PURE__ */ (0,
|
|
134510
|
-
/* @__PURE__ */ (0,
|
|
134511
|
-
/* @__PURE__ */ (0,
|
|
134512
|
-
/* @__PURE__ */ (0,
|
|
134599
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Paper_default, { sx: cardPaper, children: [
|
|
134600
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: labelSx2, children: "Summary" }) }),
|
|
134601
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { p: 1.5 }, children: [
|
|
134602
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "flex", alignItems: "baseline", gap: 0.5, mb: 0.5 }, children: [
|
|
134603
|
+
/* @__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() }),
|
|
134604
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 14, color: C6.t3 }, children: "/" }),
|
|
134605
|
+
/* @__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() })
|
|
134513
134606
|
] }),
|
|
134514
|
-
/* @__PURE__ */ (0,
|
|
134515
|
-
/* @__PURE__ */ (0,
|
|
134516
|
-
/* @__PURE__ */ (0,
|
|
134517
|
-
/* @__PURE__ */ (0,
|
|
134518
|
-
/* @__PURE__ */ (0,
|
|
134519
|
-
/* @__PURE__ */ (0,
|
|
134520
|
-
/* @__PURE__ */ (0,
|
|
134607
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t3, mb: 1 }, children: "Total Calls" }),
|
|
134608
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { mt: 1 }, children: [
|
|
134609
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t3, mb: 0.3 }, children: "Call Duration" }),
|
|
134610
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "flex", gap: 2 }, children: [
|
|
134611
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { children: [
|
|
134612
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 10, color: C6.t3 }, children: "Highest" }),
|
|
134613
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: __spreadProps(__spreadValues({}, monoSx2), { color: C6.blue, fontSize: 13 }), children: data.totals.highest_duration })
|
|
134521
134614
|
] }),
|
|
134522
|
-
/* @__PURE__ */ (0,
|
|
134523
|
-
/* @__PURE__ */ (0,
|
|
134524
|
-
/* @__PURE__ */ (0,
|
|
134615
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { children: [
|
|
134616
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 10, color: C6.t3 }, children: "Lowest" }),
|
|
134617
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: __spreadProps(__spreadValues({}, monoSx2), { color: C6.blue, fontSize: 13 }), children: data.totals.lowest_duration })
|
|
134525
134618
|
] })
|
|
134526
134619
|
] })
|
|
134527
134620
|
] }),
|
|
134528
|
-
/* @__PURE__ */ (0,
|
|
134529
|
-
/* @__PURE__ */ (0,
|
|
134530
|
-
/* @__PURE__ */ (0,
|
|
134621
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { mt: 1 }, children: [
|
|
134622
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t3, display: "inline" }, children: "Calls < 30 sec: " }),
|
|
134623
|
+
/* @__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() })
|
|
134531
134624
|
] })
|
|
134532
134625
|
] })
|
|
134533
134626
|
] }),
|
|
134534
|
-
/* @__PURE__ */ (0,
|
|
134535
|
-
/* @__PURE__ */ (0,
|
|
134536
|
-
/* @__PURE__ */ (0,
|
|
134627
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Paper_default, { sx: cardPaper, children: [
|
|
134628
|
+
/* @__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" }) }),
|
|
134629
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { p: 1.5 }, children: [
|
|
134537
134630
|
{ label: "Inbound", value: data.totals.avg_inbound_duration },
|
|
134538
134631
|
{ label: "Outbound", value: data.totals.avg_outbound_duration }
|
|
134539
|
-
].map(({ label, value }) => /* @__PURE__ */ (0,
|
|
134540
|
-
/* @__PURE__ */ (0,
|
|
134541
|
-
/* @__PURE__ */ (0,
|
|
134632
|
+
].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: [
|
|
134633
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 12, fontWeight: 600, color: C6.t2 }, children: label }),
|
|
134634
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: __spreadProps(__spreadValues({}, monoSx2), { fontSize: 16, color: C6.blue }), children: value })
|
|
134542
134635
|
] }, label)) })
|
|
134543
134636
|
] }),
|
|
134544
|
-
/* @__PURE__ */ (0,
|
|
134545
|
-
/* @__PURE__ */ (0,
|
|
134546
|
-
/* @__PURE__ */ (0,
|
|
134637
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Paper_default, { sx: cardPaper, children: [
|
|
134638
|
+
/* @__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" }) }),
|
|
134639
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { p: 1.5, display: "grid", gridTemplateColumns: "1fr 1fr", mt: 0.5 }, children: [
|
|
134547
134640
|
{ label: "Waiting Time", value: data.waiting.avg_wait_time },
|
|
134548
134641
|
{ label: "Queue Waiting", value: data.waiting.avg_queue_wait }
|
|
134549
|
-
].map(({ label, value }, idx) => /* @__PURE__ */ (0,
|
|
134550
|
-
/* @__PURE__ */ (0,
|
|
134551
|
-
/* @__PURE__ */ (0,
|
|
134642
|
+
].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: [
|
|
134643
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 10, fontWeight: 600, color: C6.t3, mb: 0.5 }, children: label }),
|
|
134644
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: __spreadProps(__spreadValues({}, monoSx2), { fontSize: 18, color: C6.blue }), children: value })
|
|
134552
134645
|
] }, label)) })
|
|
134553
134646
|
] }),
|
|
134554
|
-
/* @__PURE__ */ (0,
|
|
134555
|
-
/* @__PURE__ */ (0,
|
|
134556
|
-
/* @__PURE__ */ (0,
|
|
134557
|
-
/* @__PURE__ */ (0,
|
|
134558
|
-
/* @__PURE__ */ (0,
|
|
134559
|
-
/* @__PURE__ */ (0,
|
|
134560
|
-
/* @__PURE__ */ (0,
|
|
134561
|
-
/* @__PURE__ */ (0,
|
|
134647
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Paper_default, { sx: cardPaper, children: [
|
|
134648
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: labelSx2, children: "Average CHT" }) }),
|
|
134649
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableContainer_default, { children: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Table_default, { size: "small", children: [
|
|
134650
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableHead_default, { children: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(TableRow_default, { children: [
|
|
134651
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: headSx, children: "Call Type" }),
|
|
134652
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: headSx, children: "Call Handling Time" }),
|
|
134653
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: headSx, children: "Talk Duration" }),
|
|
134654
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: headSx, children: "Hold Duration" })
|
|
134562
134655
|
] }) }),
|
|
134563
|
-
/* @__PURE__ */ (0,
|
|
134564
|
-
data.cht.length === 0 && /* @__PURE__ */ (0,
|
|
134565
|
-
data.cht.map((row) => /* @__PURE__ */ (0,
|
|
134566
|
-
/* @__PURE__ */ (0,
|
|
134567
|
-
/* @__PURE__ */ (0,
|
|
134568
|
-
/* @__PURE__ */ (0,
|
|
134569
|
-
/* @__PURE__ */ (0,
|
|
134656
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(TableBody_default, { children: [
|
|
134657
|
+
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" }) }),
|
|
134658
|
+
data.cht.map((row) => /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(TableRow_default, { hover: true, children: [
|
|
134659
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: __spreadProps(__spreadValues({}, cellSx), { fontWeight: 600, color: C6.t2 }), children: row.call_type }),
|
|
134660
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: __spreadProps(__spreadValues(__spreadValues({}, cellSx), monoSx2), { color: C6.blue }), children: row.call_handling_time }),
|
|
134661
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: __spreadProps(__spreadValues(__spreadValues({}, cellSx), monoSx2), { color: C6.blue }), children: row.talk_duration }),
|
|
134662
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: __spreadProps(__spreadValues(__spreadValues({}, cellSx), monoSx2), { color: C6.blue }), children: row.hold_duration })
|
|
134570
134663
|
] }, row.call_type))
|
|
134571
134664
|
] })
|
|
134572
134665
|
] }) })
|
|
134573
134666
|
] })
|
|
134574
134667
|
] }),
|
|
134575
|
-
/* @__PURE__ */ (0,
|
|
134576
|
-
/* @__PURE__ */ (0,
|
|
134577
|
-
/* @__PURE__ */ (0,
|
|
134578
|
-
/* @__PURE__ */ (0,
|
|
134579
|
-
/* @__PURE__ */ (0,
|
|
134580
|
-
/* @__PURE__ */ (0,
|
|
134668
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", lg: "1fr 1fr" }, gap: 1.2 }, children: [
|
|
134669
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Paper_default, { sx: cardPaper, children: [
|
|
134670
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: __spreadProps(__spreadValues({}, cardHeader), { flexWrap: "wrap", gap: 1, justifyContent: "space-between" }), children: [
|
|
134671
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { children: [
|
|
134672
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: labelSx2, children: "Avg Hour Wise Inbound Calls vs Agents" }),
|
|
134673
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Stack_default, { direction: "row", spacing: 1.5, sx: { mt: 0.5 }, children: [
|
|
134581
134674
|
{ color: "#F2B51D", label: "Answered" },
|
|
134582
134675
|
{ color: "#9fc4cb", label: "Abandoned" },
|
|
134583
134676
|
{ color: "#14505b", label: "Agents" }
|
|
134584
|
-
].map(({ color: color3, label }) => /* @__PURE__ */ (0,
|
|
134585
|
-
/* @__PURE__ */ (0,
|
|
134586
|
-
/* @__PURE__ */ (0,
|
|
134677
|
+
].map(({ color: color3, label }) => /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
134678
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { width: 12, height: 12, borderRadius: "2px", background: color3 } }),
|
|
134679
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: { fontSize: 11, color: C6.t3 }, children: label })
|
|
134587
134680
|
] }, label)) })
|
|
134588
134681
|
] }),
|
|
134589
|
-
/* @__PURE__ */ (0,
|
|
134682
|
+
/* @__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)(
|
|
134590
134683
|
Typography_default,
|
|
134591
134684
|
{
|
|
134592
134685
|
onClick: downloadChart,
|
|
@@ -134595,32 +134688,31 @@ function ManagementDashboardContent() {
|
|
|
134595
134688
|
}
|
|
134596
134689
|
) })
|
|
134597
134690
|
] }),
|
|
134598
|
-
/* @__PURE__ */ (0,
|
|
134599
|
-
/* @__PURE__ */ (0,
|
|
134600
|
-
/* @__PURE__ */ (0,
|
|
134601
|
-
/* @__PURE__ */ (0,
|
|
134602
|
-
/* @__PURE__ */ (0,
|
|
134603
|
-
/* @__PURE__ */ (0,
|
|
134691
|
+
/* @__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: [
|
|
134692
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(CartesianGrid, { strokeDasharray: "3 3", stroke: C6.b2, vertical: false }),
|
|
134693
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(XAxis, { dataKey: "hour", tick: { fontSize: 9, fill: C6.t3 }, interval: 1 }),
|
|
134694
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(YAxis, { yAxisId: "left", tick: { fontSize: 9, fill: C6.t3 } }),
|
|
134695
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(YAxis, { yAxisId: "right", orientation: "right", tick: { fontSize: 9, fill: C6.t3 } }),
|
|
134696
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
134604
134697
|
Tooltip3,
|
|
134605
134698
|
{
|
|
134606
|
-
|
|
134607
|
-
|
|
134608
|
-
|
|
134609
|
-
|
|
134610
|
-
}
|
|
134699
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(HourlyTooltip, {}),
|
|
134700
|
+
cursor: { fill: "rgba(26,95,108,.07)" },
|
|
134701
|
+
animationDuration: 140,
|
|
134702
|
+
wrapperStyle: { outline: "none", zIndex: 2 }
|
|
134611
134703
|
}
|
|
134612
134704
|
),
|
|
134613
|
-
/* @__PURE__ */ (0,
|
|
134614
|
-
/* @__PURE__ */ (0,
|
|
134615
|
-
/* @__PURE__ */ (0,
|
|
134705
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Bar, { yAxisId: "left", dataKey: "answered", fill: "#F2B51D", radius: [2, 2, 0, 0], maxBarSize: 14 }),
|
|
134706
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Bar, { yAxisId: "left", dataKey: "abandoned", fill: "#9fc4cb", radius: [2, 2, 0, 0], maxBarSize: 14 }),
|
|
134707
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Line, { yAxisId: "right", type: "monotone", dataKey: "agents", stroke: "#14505b", strokeWidth: 1.5, dot: { r: 2, fill: "#14505b" } })
|
|
134616
134708
|
] }) }) })
|
|
134617
134709
|
] }),
|
|
134618
|
-
/* @__PURE__ */ (0,
|
|
134619
|
-
/* @__PURE__ */ (0,
|
|
134620
|
-
/* @__PURE__ */ (0,
|
|
134621
|
-
/* @__PURE__ */ (0,
|
|
134710
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Paper_default, { sx: cardPaper, children: [
|
|
134711
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(Box_default, { sx: __spreadProps(__spreadValues({}, cardHeader), { justifyContent: "space-between" }), children: [
|
|
134712
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Typography_default, { sx: labelSx2, children: "Repeated Calls" }),
|
|
134713
|
+
/* @__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 } })
|
|
134622
134714
|
] }),
|
|
134623
|
-
/* @__PURE__ */ (0,
|
|
134715
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Box_default, { sx: { px: 1.5, py: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
134624
134716
|
TextField_default,
|
|
134625
134717
|
{
|
|
134626
134718
|
size: "small",
|
|
@@ -134628,26 +134720,26 @@ function ManagementDashboardContent() {
|
|
|
134628
134720
|
value: repeatedSearch,
|
|
134629
134721
|
onChange: (e) => setRepeatedSearch(e.target.value),
|
|
134630
134722
|
fullWidth: true,
|
|
134631
|
-
slotProps: { input: { startAdornment: /* @__PURE__ */ (0,
|
|
134723
|
+
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 } }) }) } },
|
|
134632
134724
|
sx: { "& .MuiInputBase-root": { fontSize: 12 } }
|
|
134633
134725
|
}
|
|
134634
134726
|
) }),
|
|
134635
|
-
/* @__PURE__ */ (0,
|
|
134636
|
-
/* @__PURE__ */ (0,
|
|
134637
|
-
/* @__PURE__ */ (0,
|
|
134638
|
-
/* @__PURE__ */ (0,
|
|
134639
|
-
/* @__PURE__ */ (0,
|
|
134640
|
-
/* @__PURE__ */ (0,
|
|
134641
|
-
/* @__PURE__ */ (0,
|
|
134727
|
+
/* @__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: [
|
|
134728
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableHead_default, { children: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(TableRow_default, { children: [
|
|
134729
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: headSx, children: "Phone Number" }),
|
|
134730
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: headSx, children: "Date" }),
|
|
134731
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: headSx, children: "No of Calls" }),
|
|
134732
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: headSx, children: "Latest Status" }),
|
|
134733
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: headSx, children: "Latest Call Type" })
|
|
134642
134734
|
] }) }),
|
|
134643
|
-
/* @__PURE__ */ (0,
|
|
134644
|
-
filteredRepeated.length === 0 && /* @__PURE__ */ (0,
|
|
134645
|
-
filteredRepeated.map((r2) => /* @__PURE__ */ (0,
|
|
134646
|
-
/* @__PURE__ */ (0,
|
|
134647
|
-
/* @__PURE__ */ (0,
|
|
134648
|
-
/* @__PURE__ */ (0,
|
|
134649
|
-
/* @__PURE__ */ (0,
|
|
134650
|
-
/* @__PURE__ */ (0,
|
|
134735
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(TableBody_default, { children: [
|
|
134736
|
+
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" }) }),
|
|
134737
|
+
filteredRepeated.map((r2) => /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(TableRow_default, { hover: true, children: [
|
|
134738
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: __spreadProps(__spreadValues(__spreadValues({}, cellSx), monoSx2), { fontSize: 11 }), children: r2.phone_number }),
|
|
134739
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: __spreadProps(__spreadValues({}, cellSx), { fontSize: 11 }), children: r2.date }),
|
|
134740
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: __spreadProps(__spreadValues({}, cellSx), { fontWeight: 700, color: C6.navy, fontSize: 13 }), children: r2.call_count }),
|
|
134741
|
+
/* @__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 }),
|
|
134742
|
+
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TableCell_default, { sx: __spreadProps(__spreadValues({}, cellSx), { fontSize: 11 }), children: r2.latest_call_type })
|
|
134651
134743
|
] }, `${r2.phone_number}-${r2.date}`))
|
|
134652
134744
|
] })
|
|
134653
134745
|
] }) })
|
|
@@ -134656,7 +134748,7 @@ function ManagementDashboardContent() {
|
|
|
134656
134748
|
] })
|
|
134657
134749
|
] }) });
|
|
134658
134750
|
}
|
|
134659
|
-
var import_react106, import_dayjs10,
|
|
134751
|
+
var import_react106, import_dayjs10, import_jsx_runtime294, C6, headSx, cellSx, monoSx2, labelSx2, cardPaper, cardHeader, numIconSx, bigNumSx, EMPTY3, HOURLY_SERIES, ManagementDashboard, managementDashboard_default;
|
|
134660
134752
|
var init_managementDashboard = __esm({
|
|
134661
134753
|
"call-control-sdk/lib/pages/managementDashboard/index.tsx"() {
|
|
134662
134754
|
"use strict";
|
|
@@ -134671,13 +134763,14 @@ var init_managementDashboard = __esm({
|
|
|
134671
134763
|
init_Refresh();
|
|
134672
134764
|
init_PhoneCallback();
|
|
134673
134765
|
init_PhoneForwarded();
|
|
134766
|
+
init_PhoneMissed();
|
|
134674
134767
|
init_PageHeader();
|
|
134675
134768
|
init_ReportFilterBar();
|
|
134676
134769
|
init_AppButton();
|
|
134677
134770
|
init_tableStyles();
|
|
134678
134771
|
init_SDKProvider();
|
|
134679
134772
|
init_useManagementDashboard();
|
|
134680
|
-
|
|
134773
|
+
import_jsx_runtime294 = require("react/jsx-runtime");
|
|
134681
134774
|
C6 = {
|
|
134682
134775
|
navy: "#14505b",
|
|
134683
134776
|
blue: "#1A5F6C",
|
|
@@ -134702,10 +134795,11 @@ var init_managementDashboard = __esm({
|
|
|
134702
134795
|
headSx = __spreadProps(__spreadValues({}, headCellSx2), { py: 1, px: 1.5 });
|
|
134703
134796
|
cellSx = { fontSize: 12, py: 0.8, px: 1.5, borderBottom: `1px solid ${C6.b1}` };
|
|
134704
134797
|
monoSx2 = { fontFamily: "'JetBrains Mono', monospace", fontSize: 12, fontWeight: 700 };
|
|
134705
|
-
labelSx2 = { fontSize: 11, fontWeight: 700, letterSpacing: 0.7, textTransform: "uppercase", color: C6.t2 };
|
|
134798
|
+
labelSx2 = { fontSize: 11, fontWeight: 700, letterSpacing: 0.7, textTransform: "uppercase", color: C6.t2, textAlign: "center", lineHeight: 1.2 };
|
|
134706
134799
|
cardPaper = { background: C6.surface, border: `1px solid #dce3ef`, borderRadius: "6px", overflow: "hidden", boxShadow: "0 1px 4px rgba(0,0,0,.09)" };
|
|
134707
|
-
cardHeader = { px: 1.5, py: 1, background: C6.s2, borderBottom: `1px solid ${C6.b1}`, display: "flex", alignItems: "center", justifyContent: "center" };
|
|
134708
|
-
numIconSx = { fontSize: 28, color: C6.blue };
|
|
134800
|
+
cardHeader = { px: 1.5, py: 1, minHeight: 36, background: C6.s2, borderBottom: `1px solid ${C6.b1}`, display: "flex", alignItems: "center", justifyContent: "center" };
|
|
134801
|
+
numIconSx = { fontSize: { xs: 28, lg: 24, xl: 28 }, color: C6.blue };
|
|
134802
|
+
bigNumSx = { fontFamily: "'Barlow Condensed', sans-serif", fontSize: { xs: 32, lg: 26, xl: 32 }, fontWeight: 800, color: C6.navy, lineHeight: 1 };
|
|
134709
134803
|
EMPTY3 = {
|
|
134710
134804
|
inbound: { total: 0, answered: 0, unanswered: 0, answered_pct: 0, unanswered_pct: 0 },
|
|
134711
134805
|
outbound: { total: 0, answered: 0, unanswered: 0, answered_pct: 0, unanswered_pct: 0 },
|
|
@@ -134718,7 +134812,12 @@ var init_managementDashboard = __esm({
|
|
|
134718
134812
|
hourly_chart: [],
|
|
134719
134813
|
repeated_calls: []
|
|
134720
134814
|
};
|
|
134721
|
-
|
|
134815
|
+
HOURLY_SERIES = [
|
|
134816
|
+
{ key: "answered", label: "Answered", color: "#F2B51D", line: false },
|
|
134817
|
+
{ key: "abandoned", label: "Abandoned", color: "#9fc4cb", line: false },
|
|
134818
|
+
{ key: "agents", label: "Agents", color: "#14505b", line: true }
|
|
134819
|
+
];
|
|
134820
|
+
ManagementDashboard = () => /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(SDKProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(ManagementDashboardContent, {}) });
|
|
134722
134821
|
managementDashboard_default = ManagementDashboard;
|
|
134723
134822
|
}
|
|
134724
134823
|
});
|
|
@@ -134729,7 +134828,7 @@ __export(caroVoiceAI_exports, {
|
|
|
134729
134828
|
default: () => CaroVoiceAIPage
|
|
134730
134829
|
});
|
|
134731
134830
|
function CaroVoiceAIPage() {
|
|
134732
|
-
return /* @__PURE__ */ (0,
|
|
134831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(Box_default, { sx: { width: "100%", height: "calc(100vh - 64px)" }, children: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
|
|
134733
134832
|
"iframe",
|
|
134734
134833
|
{
|
|
134735
134834
|
src: CARO_VOICE_AI_URL,
|
|
@@ -134739,12 +134838,12 @@ function CaroVoiceAIPage() {
|
|
|
134739
134838
|
}
|
|
134740
134839
|
) });
|
|
134741
134840
|
}
|
|
134742
|
-
var
|
|
134841
|
+
var import_jsx_runtime295, CARO_VOICE_AI_URL;
|
|
134743
134842
|
var init_caroVoiceAI = __esm({
|
|
134744
134843
|
"call-control-sdk/lib/pages/caroVoiceAI/index.tsx"() {
|
|
134745
134844
|
"use strict";
|
|
134746
134845
|
init_material();
|
|
134747
|
-
|
|
134846
|
+
import_jsx_runtime295 = require("react/jsx-runtime");
|
|
134748
134847
|
CARO_VOICE_AI_URL = "https://dev-ai-voice.achalahealth.com:3100/executive-dashboard";
|
|
134749
134848
|
}
|
|
134750
134849
|
});
|
|
@@ -134755,7 +134854,7 @@ __export(qualityAuditDashboard_exports, {
|
|
|
134755
134854
|
default: () => QualityAuditDashboardPage
|
|
134756
134855
|
});
|
|
134757
134856
|
function QualityAuditDashboardPage() {
|
|
134758
|
-
return /* @__PURE__ */ (0,
|
|
134857
|
+
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)(
|
|
134759
134858
|
"iframe",
|
|
134760
134859
|
{
|
|
134761
134860
|
srcDoc: htmlContent,
|
|
@@ -134764,12 +134863,12 @@ function QualityAuditDashboardPage() {
|
|
|
134764
134863
|
}
|
|
134765
134864
|
) });
|
|
134766
134865
|
}
|
|
134767
|
-
var
|
|
134866
|
+
var import_jsx_runtime296, htmlContent;
|
|
134768
134867
|
var init_qualityAuditDashboard = __esm({
|
|
134769
134868
|
"call-control-sdk/lib/pages/qualityAuditDashboard/index.tsx"() {
|
|
134770
134869
|
"use strict";
|
|
134771
134870
|
init_material();
|
|
134772
|
-
|
|
134871
|
+
import_jsx_runtime296 = require("react/jsx-runtime");
|
|
134773
134872
|
htmlContent = `<!DOCTYPE html>
|
|
134774
134873
|
<html>
|
|
134775
134874
|
<head>
|
|
@@ -134826,7 +134925,7 @@ __export(caroQualityAuditDashboard_exports, {
|
|
|
134826
134925
|
default: () => CaroQualityAuditDashboardPage
|
|
134827
134926
|
});
|
|
134828
134927
|
function CaroQualityAuditDashboardPage() {
|
|
134829
|
-
return /* @__PURE__ */ (0,
|
|
134928
|
+
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)(
|
|
134830
134929
|
"iframe",
|
|
134831
134930
|
{
|
|
134832
134931
|
srcDoc: htmlContent2,
|
|
@@ -134835,12 +134934,12 @@ function CaroQualityAuditDashboardPage() {
|
|
|
134835
134934
|
}
|
|
134836
134935
|
) });
|
|
134837
134936
|
}
|
|
134838
|
-
var
|
|
134937
|
+
var import_jsx_runtime297, htmlContent2;
|
|
134839
134938
|
var init_caroQualityAuditDashboard = __esm({
|
|
134840
134939
|
"call-control-sdk/lib/pages/caroQualityAuditDashboard/index.tsx"() {
|
|
134841
134940
|
"use strict";
|
|
134842
134941
|
init_material();
|
|
134843
|
-
|
|
134942
|
+
import_jsx_runtime297 = require("react/jsx-runtime");
|
|
134844
134943
|
htmlContent2 = `<!DOCTYPE html>
|
|
134845
134944
|
<html>
|
|
134846
134945
|
<head>
|
|
@@ -134892,44 +134991,44 @@ var init_caroQualityAuditDashboard = __esm({
|
|
|
134892
134991
|
});
|
|
134893
134992
|
|
|
134894
134993
|
// node_modules/@mui/icons-material/ArrowUpward.mjs
|
|
134895
|
-
var
|
|
134994
|
+
var import_jsx_runtime298, ArrowUpward_default;
|
|
134896
134995
|
var init_ArrowUpward = __esm({
|
|
134897
134996
|
"node_modules/@mui/icons-material/ArrowUpward.mjs"() {
|
|
134898
134997
|
"use strict";
|
|
134899
134998
|
"use client";
|
|
134900
134999
|
init_createSvgIcon3();
|
|
134901
|
-
|
|
134902
|
-
ArrowUpward_default = createSvgIcon(/* @__PURE__ */ (0,
|
|
135000
|
+
import_jsx_runtime298 = require("react/jsx-runtime");
|
|
135001
|
+
ArrowUpward_default = createSvgIcon(/* @__PURE__ */ (0, import_jsx_runtime298.jsx)("path", {
|
|
134903
135002
|
d: "m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"
|
|
134904
135003
|
}), "ArrowUpward");
|
|
134905
135004
|
}
|
|
134906
135005
|
});
|
|
134907
135006
|
|
|
134908
135007
|
// node_modules/@mui/icons-material/History.mjs
|
|
134909
|
-
var
|
|
135008
|
+
var import_jsx_runtime299, History_default;
|
|
134910
135009
|
var init_History = __esm({
|
|
134911
135010
|
"node_modules/@mui/icons-material/History.mjs"() {
|
|
134912
135011
|
"use strict";
|
|
134913
135012
|
"use client";
|
|
134914
135013
|
init_createSvgIcon3();
|
|
134915
|
-
|
|
134916
|
-
History_default = createSvgIcon(/* @__PURE__ */ (0,
|
|
135014
|
+
import_jsx_runtime299 = require("react/jsx-runtime");
|
|
135015
|
+
History_default = createSvgIcon(/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("path", {
|
|
134917
135016
|
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"
|
|
134918
135017
|
}), "History");
|
|
134919
135018
|
}
|
|
134920
135019
|
});
|
|
134921
135020
|
|
|
134922
135021
|
// node_modules/@mui/icons-material/WarningAmber.mjs
|
|
134923
|
-
var
|
|
135022
|
+
var import_jsx_runtime300, WarningAmber_default;
|
|
134924
135023
|
var init_WarningAmber = __esm({
|
|
134925
135024
|
"node_modules/@mui/icons-material/WarningAmber.mjs"() {
|
|
134926
135025
|
"use strict";
|
|
134927
135026
|
"use client";
|
|
134928
135027
|
init_createSvgIcon3();
|
|
134929
|
-
|
|
134930
|
-
WarningAmber_default = createSvgIcon([/* @__PURE__ */ (0,
|
|
135028
|
+
import_jsx_runtime300 = require("react/jsx-runtime");
|
|
135029
|
+
WarningAmber_default = createSvgIcon([/* @__PURE__ */ (0, import_jsx_runtime300.jsx)("path", {
|
|
134931
135030
|
d: "M12 5.99 19.53 19H4.47zM12 2 1 21h22z"
|
|
134932
|
-
}, "0"), /* @__PURE__ */ (0,
|
|
135031
|
+
}, "0"), /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("path", {
|
|
134933
135032
|
d: "M13 16h-2v2h2zm0-6h-2v5h2z"
|
|
134934
135033
|
}, "1")], "WarningAmber");
|
|
134935
135034
|
}
|
|
@@ -135080,12 +135179,12 @@ __export(leadIntegrations_exports, {
|
|
|
135080
135179
|
});
|
|
135081
135180
|
function TokenStatusChip({ integration }) {
|
|
135082
135181
|
const meta = TOKEN_STATUS_META[integration.tokenExpiryStatus];
|
|
135083
|
-
if (!meta) return /* @__PURE__ */ (0,
|
|
135182
|
+
if (!meta) return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: { fontSize: "0.82rem", color: "text.secondary" }, children: "\u2014" });
|
|
135084
135183
|
const effective = getEffectiveExpiry(integration);
|
|
135085
|
-
return /* @__PURE__ */ (0,
|
|
135184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Tooltip_default, { title: effective ? `${effective.label} expires: ${effective.date.toLocaleString()}` : "", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135086
135185
|
Chip_default,
|
|
135087
135186
|
{
|
|
135088
|
-
icon: integration.tokenExpiryStatus !== "ok" ? /* @__PURE__ */ (0,
|
|
135187
|
+
icon: integration.tokenExpiryStatus !== "ok" ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(WarningAmber_default, { fontSize: "small" }) : void 0,
|
|
135089
135188
|
label: effective ? `${meta.label} \xB7 ${effective.date.toLocaleDateString()}` : meta.label,
|
|
135090
135189
|
size: "small",
|
|
135091
135190
|
color: meta.color
|
|
@@ -135097,12 +135196,12 @@ function TokenExpiryAlert({ integration }) {
|
|
|
135097
135196
|
if (!meta || integration.tokenExpiryStatus === "ok") return null;
|
|
135098
135197
|
const effective = getEffectiveExpiry(integration);
|
|
135099
135198
|
const isExpired = integration.tokenExpiryStatus === "expired";
|
|
135100
|
-
return /* @__PURE__ */ (0,
|
|
135101
|
-
/* @__PURE__ */ (0,
|
|
135199
|
+
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: [
|
|
135200
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Typography_default, { variant: "body2", sx: { fontWeight: 600, mb: 0.5 }, children: [
|
|
135102
135201
|
effective ? `${effective.label} ${isExpired ? "expired" : "expires"} ${effective.date.toLocaleDateString()} (${effective.date.toLocaleTimeString()})` : isExpired ? "This integration is no longer valid." : "This integration is expiring soon.",
|
|
135103
135202
|
isExpired ? " \u2014 lead ingestion has stopped." : " \u2014 lead ingestion will stop once this passes."
|
|
135104
135203
|
] }),
|
|
135105
|
-
/* @__PURE__ */ (0,
|
|
135204
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { variant: "body2", children: getRenewalInstructions((effective == null ? void 0 : effective.label) || "Access token") })
|
|
135106
135205
|
] });
|
|
135107
135206
|
}
|
|
135108
135207
|
function ModalShell({
|
|
@@ -135113,7 +135212,7 @@ function ModalShell({
|
|
|
135113
135212
|
footer,
|
|
135114
135213
|
children
|
|
135115
135214
|
}) {
|
|
135116
|
-
return /* @__PURE__ */ (0,
|
|
135215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135117
135216
|
Box_default,
|
|
135118
135217
|
{
|
|
135119
135218
|
sx: {
|
|
@@ -135126,7 +135225,7 @@ function ModalShell({
|
|
|
135126
135225
|
justifyContent: "center"
|
|
135127
135226
|
},
|
|
135128
135227
|
onClick: (e) => e.stopPropagation(),
|
|
135129
|
-
children: /* @__PURE__ */ (0,
|
|
135228
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
|
|
135130
135229
|
Paper_default,
|
|
135131
135230
|
{
|
|
135132
135231
|
elevation: 6,
|
|
@@ -135140,7 +135239,7 @@ function ModalShell({
|
|
|
135140
135239
|
boxShadow: "0 8px 32px rgba(26,95,108,0.18)"
|
|
135141
135240
|
},
|
|
135142
135241
|
children: [
|
|
135143
|
-
/* @__PURE__ */ (0,
|
|
135242
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
|
|
135144
135243
|
Box_default,
|
|
135145
135244
|
{
|
|
135146
135245
|
sx: __spreadProps(__spreadValues({}, dialogHeaderSx), {
|
|
@@ -135149,13 +135248,13 @@ function ModalShell({
|
|
|
135149
135248
|
"& .MuiIconButton-root": { color: "#fff" }
|
|
135150
135249
|
}),
|
|
135151
135250
|
children: [
|
|
135152
|
-
/* @__PURE__ */ (0,
|
|
135153
|
-
/* @__PURE__ */ (0,
|
|
135251
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { fontWeight: 700, fontSize: "1rem", fontFamily: "poppins, Arial, sans-serif", children: title }),
|
|
135252
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(IconButton_default, { size: "small", onClick: onClose, sx: { color: "#fff" }, children: "\u2715" })
|
|
135154
135253
|
]
|
|
135155
135254
|
}
|
|
135156
135255
|
),
|
|
135157
|
-
/* @__PURE__ */ (0,
|
|
135158
|
-
/* @__PURE__ */ (0,
|
|
135256
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Box_default, { sx: { flex: 1, overflowY: "auto" }, children }),
|
|
135257
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Box_default, { sx: dialogFooterSx, children: footer })
|
|
135159
135258
|
]
|
|
135160
135259
|
}
|
|
135161
135260
|
)
|
|
@@ -135170,21 +135269,21 @@ function LogsDialog({
|
|
|
135170
135269
|
onClose
|
|
135171
135270
|
}) {
|
|
135172
135271
|
if (!open) return null;
|
|
135173
|
-
return /* @__PURE__ */ (0,
|
|
135272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135174
135273
|
ModalShell,
|
|
135175
135274
|
{
|
|
135176
135275
|
title: `Webhook Logs \u2014 ${integrationName}`,
|
|
135177
135276
|
width: { xs: "95vw", md: 960 },
|
|
135178
135277
|
zIndex: 1400,
|
|
135179
135278
|
onClose,
|
|
135180
|
-
footer: /* @__PURE__ */ (0,
|
|
135181
|
-
children: /* @__PURE__ */ (0,
|
|
135182
|
-
/* @__PURE__ */ (0,
|
|
135183
|
-
/* @__PURE__ */ (0,
|
|
135184
|
-
logs.map((log2) => /* @__PURE__ */ (0,
|
|
135185
|
-
/* @__PURE__ */ (0,
|
|
135186
|
-
/* @__PURE__ */ (0,
|
|
135187
|
-
/* @__PURE__ */ (0,
|
|
135279
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(SDKButton, { variant: "cancel", onClick: onClose, children: "Close" }),
|
|
135280
|
+
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: [
|
|
135281
|
+
/* @__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)) }) }),
|
|
135282
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(TableBody_default, { children: [
|
|
135283
|
+
logs.map((log2) => /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(TableRow_default, { sx: tableRowSx, children: [
|
|
135284
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: new Date(log2.createdAt).toLocaleString() }),
|
|
135285
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: log2.requestMethod }),
|
|
135286
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135188
135287
|
Chip_default,
|
|
135189
135288
|
{
|
|
135190
135289
|
label: log2.isSuccess ? "Success" : "Failed",
|
|
@@ -135192,8 +135291,8 @@ function LogsDialog({
|
|
|
135192
135291
|
color: log2.isSuccess ? "success" : "error"
|
|
135193
135292
|
}
|
|
135194
135293
|
) }),
|
|
135195
|
-
/* @__PURE__ */ (0,
|
|
135196
|
-
/* @__PURE__ */ (0,
|
|
135294
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: log2.leadsCreated }),
|
|
135295
|
+
/* @__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)(
|
|
135197
135296
|
Typography_default,
|
|
135198
135297
|
{
|
|
135199
135298
|
variant: "body2",
|
|
@@ -135204,7 +135303,7 @@ function LogsDialog({
|
|
|
135204
135303
|
}
|
|
135205
135304
|
) }) })
|
|
135206
135305
|
] }, log2.id)),
|
|
135207
|
-
logs.length === 0 && /* @__PURE__ */ (0,
|
|
135306
|
+
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" }) })
|
|
135208
135307
|
] })
|
|
135209
135308
|
] }) }) })
|
|
135210
135309
|
}
|
|
@@ -135219,7 +135318,7 @@ function ConfirmDialog2({
|
|
|
135219
135318
|
onClose
|
|
135220
135319
|
}) {
|
|
135221
135320
|
if (!open) return null;
|
|
135222
|
-
return /* @__PURE__ */ (0,
|
|
135321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135223
135322
|
Box_default,
|
|
135224
135323
|
{
|
|
135225
135324
|
sx: {
|
|
@@ -135232,26 +135331,26 @@ function ConfirmDialog2({
|
|
|
135232
135331
|
justifyContent: "center"
|
|
135233
135332
|
},
|
|
135234
135333
|
onClick: (e) => e.stopPropagation(),
|
|
135235
|
-
children: /* @__PURE__ */ (0,
|
|
135334
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
|
|
135236
135335
|
Paper_default,
|
|
135237
135336
|
{
|
|
135238
135337
|
elevation: 6,
|
|
135239
135338
|
sx: { width: { xs: "90vw", sm: 420 }, borderRadius: "16px", overflow: "hidden", boxShadow: "0 8px 32px rgba(0,0,0,0.18)" },
|
|
135240
135339
|
children: [
|
|
135241
|
-
/* @__PURE__ */ (0,
|
|
135242
|
-
/* @__PURE__ */ (0,
|
|
135243
|
-
/* @__PURE__ */ (0,
|
|
135340
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: __spreadProps(__spreadValues({}, dialogHeaderSx), { borderBottom: "none", pb: 0 }), children: [
|
|
135341
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { fontWeight: 700, fontSize: "1rem", fontFamily: "poppins, Arial, sans-serif", children: title }),
|
|
135342
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(IconButton_default, { size: "small", onClick: onClose, children: "\u2715" })
|
|
135244
135343
|
] }),
|
|
135245
|
-
/* @__PURE__ */ (0,
|
|
135246
|
-
/* @__PURE__ */ (0,
|
|
135247
|
-
/* @__PURE__ */ (0,
|
|
135248
|
-
/* @__PURE__ */ (0,
|
|
135344
|
+
/* @__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 }) }),
|
|
135345
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: dialogFooterSx, children: [
|
|
135346
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(SDKButton, { variant: "cancel", onClick: onClose, children: "Cancel" }),
|
|
135347
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135249
135348
|
SDKButton,
|
|
135250
135349
|
{
|
|
135251
135350
|
variant: "danger",
|
|
135252
135351
|
onClick: onConfirm,
|
|
135253
135352
|
disabled: loading,
|
|
135254
|
-
startIcon: loading ? /* @__PURE__ */ (0,
|
|
135353
|
+
startIcon: loading ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(CircularProgress_default, { size: 14, color: "inherit" }) : void 0,
|
|
135255
135354
|
children: "Confirm"
|
|
135256
135355
|
}
|
|
135257
135356
|
)
|
|
@@ -135262,7 +135361,7 @@ function ConfirmDialog2({
|
|
|
135262
135361
|
}
|
|
135263
135362
|
);
|
|
135264
135363
|
}
|
|
135265
|
-
var import_react108,
|
|
135364
|
+
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;
|
|
135266
135365
|
var init_leadIntegrations = __esm({
|
|
135267
135366
|
"call-control-sdk/lib/pages/leadIntegrations/index.tsx"() {
|
|
135268
135367
|
"use strict";
|
|
@@ -135288,7 +135387,7 @@ var init_leadIntegrations = __esm({
|
|
|
135288
135387
|
init_styles2();
|
|
135289
135388
|
init_useLeadIntegrations();
|
|
135290
135389
|
init_types3();
|
|
135291
|
-
|
|
135390
|
+
import_jsx_runtime301 = require("react/jsx-runtime");
|
|
135292
135391
|
INTEGRATION_COLS = [
|
|
135293
135392
|
"Name",
|
|
135294
135393
|
"Source",
|
|
@@ -135331,7 +135430,7 @@ var init_leadIntegrations = __esm({
|
|
|
135331
135430
|
var _a2, _b, _c, _d;
|
|
135332
135431
|
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;
|
|
135333
135432
|
};
|
|
135334
|
-
Required = () => /* @__PURE__ */ (0,
|
|
135433
|
+
Required = () => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("span", { style: { color: "#c0392b" }, children: "*" });
|
|
135335
135434
|
SELECT_MENU_Z_INDEX = 1600;
|
|
135336
135435
|
IntegrationDialog = (0, import_react108.memo)(function IntegrationDialog2({
|
|
135337
135436
|
open,
|
|
@@ -135355,14 +135454,14 @@ var init_leadIntegrations = __esm({
|
|
|
135355
135454
|
if (!open) return null;
|
|
135356
135455
|
const TAB_LABELS = ["Basic Info", "Credentials", "Form Mappings"];
|
|
135357
135456
|
const mappings = (_a2 = editingIntegration == null ? void 0 : editingIntegration.formMappings) != null ? _a2 : [];
|
|
135358
|
-
return /* @__PURE__ */ (0,
|
|
135457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
|
|
135359
135458
|
ModalShell,
|
|
135360
135459
|
{
|
|
135361
135460
|
title: mode === "add" ? "Add Integration" : "Edit Integration",
|
|
135362
135461
|
onClose,
|
|
135363
|
-
footer: /* @__PURE__ */ (0,
|
|
135364
|
-
/* @__PURE__ */ (0,
|
|
135365
|
-
/* @__PURE__ */ (0,
|
|
135462
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(import_jsx_runtime301.Fragment, { children: [
|
|
135463
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(SDKButton, { variant: "cancel", onClick: onClose, children: "Cancel" }),
|
|
135464
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135366
135465
|
SDKPermissionGuard,
|
|
135367
135466
|
{
|
|
135368
135467
|
permissions: [
|
|
@@ -135370,12 +135469,12 @@ var init_leadIntegrations = __esm({
|
|
|
135370
135469
|
SDK_PERMISSIONS.LEAD_INTEGRATIONS_MANAGE
|
|
135371
135470
|
],
|
|
135372
135471
|
showFallback: false,
|
|
135373
|
-
children: /* @__PURE__ */ (0,
|
|
135472
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135374
135473
|
SDKButton,
|
|
135375
135474
|
{
|
|
135376
135475
|
onClick: onSave,
|
|
135377
135476
|
disabled: saving,
|
|
135378
|
-
startIcon: saving ? /* @__PURE__ */ (0,
|
|
135477
|
+
startIcon: saving ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(CircularProgress_default, { size: 14, color: "inherit" }) : void 0,
|
|
135379
135478
|
children: mode === "add" ? "Create" : "Save"
|
|
135380
135479
|
}
|
|
135381
135480
|
)
|
|
@@ -135383,7 +135482,7 @@ var init_leadIntegrations = __esm({
|
|
|
135383
135482
|
)
|
|
135384
135483
|
] }),
|
|
135385
135484
|
children: [
|
|
135386
|
-
/* @__PURE__ */ (0,
|
|
135485
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135387
135486
|
Tabs_default,
|
|
135388
135487
|
{
|
|
135389
135488
|
value: tab,
|
|
@@ -135403,17 +135502,17 @@ var init_leadIntegrations = __esm({
|
|
|
135403
135502
|
"& .Mui-selected": { color: "#1A5F6C" }
|
|
135404
135503
|
},
|
|
135405
135504
|
TabIndicatorProps: { style: { height: 3, backgroundColor: "#1A5F6C", borderRadius: "3px 3px 0 0" } },
|
|
135406
|
-
children: TAB_LABELS.map((label, i) => /* @__PURE__ */ (0,
|
|
135505
|
+
children: TAB_LABELS.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Tab_default, { label, value: i, disabled: i === 2 && mode === "add" }, label))
|
|
135407
135506
|
}
|
|
135408
135507
|
),
|
|
135409
|
-
tab === 0 && /* @__PURE__ */ (0,
|
|
135410
|
-
/* @__PURE__ */ (0,
|
|
135411
|
-
/* @__PURE__ */ (0,
|
|
135412
|
-
/* @__PURE__ */ (0,
|
|
135508
|
+
tab === 0 && /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { p: 2.5 }, children: [
|
|
135509
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" }, gap: 2, mb: 2 }, children: [
|
|
135510
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135511
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Typography_default, { sx: labelSx, children: [
|
|
135413
135512
|
"Name ",
|
|
135414
|
-
/* @__PURE__ */ (0,
|
|
135513
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Required, {})
|
|
135415
135514
|
] }),
|
|
135416
|
-
/* @__PURE__ */ (0,
|
|
135515
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135417
135516
|
TextField_default,
|
|
135418
135517
|
{
|
|
135419
135518
|
fullWidth: true,
|
|
@@ -135424,12 +135523,12 @@ var init_leadIntegrations = __esm({
|
|
|
135424
135523
|
}
|
|
135425
135524
|
)
|
|
135426
135525
|
] }),
|
|
135427
|
-
/* @__PURE__ */ (0,
|
|
135428
|
-
/* @__PURE__ */ (0,
|
|
135526
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135527
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Typography_default, { sx: labelSx, children: [
|
|
135429
135528
|
"Source Type ",
|
|
135430
|
-
/* @__PURE__ */ (0,
|
|
135529
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Required, {})
|
|
135431
135530
|
] }),
|
|
135432
|
-
/* @__PURE__ */ (0,
|
|
135531
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(FormControl_default, { fullWidth: true, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135433
135532
|
Select_default,
|
|
135434
135533
|
{
|
|
135435
135534
|
value: formData.sourceType,
|
|
@@ -135437,7 +135536,7 @@ var init_leadIntegrations = __esm({
|
|
|
135437
135536
|
MenuProps: { sx: { zIndex: SELECT_MENU_Z_INDEX } },
|
|
135438
135537
|
disabled: mode === "edit",
|
|
135439
135538
|
onChange: (e) => setFormData((prev2) => __spreadProps(__spreadValues({}, prev2), { sourceType: e.target.value })),
|
|
135440
|
-
children: SOURCE_TYPE_OPTIONS.map((opt) => /* @__PURE__ */ (0,
|
|
135539
|
+
children: SOURCE_TYPE_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(MenuItem_default, { value: opt.value, children: [
|
|
135441
135540
|
opt.icon,
|
|
135442
135541
|
" ",
|
|
135443
135542
|
opt.label
|
|
@@ -135446,10 +135545,10 @@ var init_leadIntegrations = __esm({
|
|
|
135446
135545
|
) })
|
|
135447
135546
|
] })
|
|
135448
135547
|
] }),
|
|
135449
|
-
/* @__PURE__ */ (0,
|
|
135450
|
-
/* @__PURE__ */ (0,
|
|
135451
|
-
/* @__PURE__ */ (0,
|
|
135452
|
-
/* @__PURE__ */ (0,
|
|
135548
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" }, gap: 2, mb: 2 }, children: [
|
|
135549
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135550
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "Default Campaign" }),
|
|
135551
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(FormControl_default, { fullWidth: true, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
|
|
135453
135552
|
Select_default,
|
|
135454
135553
|
{
|
|
135455
135554
|
value: (_b = formData.defaultCampaignId) != null ? _b : "",
|
|
@@ -135460,15 +135559,15 @@ var init_leadIntegrations = __esm({
|
|
|
135460
135559
|
defaultCampaignId: e.target.value ? Number(e.target.value) : null
|
|
135461
135560
|
})),
|
|
135462
135561
|
children: [
|
|
135463
|
-
/* @__PURE__ */ (0,
|
|
135464
|
-
campaigns.map((c2) => /* @__PURE__ */ (0,
|
|
135562
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(MenuItem_default, { value: "", children: "None" }),
|
|
135563
|
+
campaigns.map((c2) => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(MenuItem_default, { value: c2.id, children: c2.name }, c2.id))
|
|
135465
135564
|
]
|
|
135466
135565
|
}
|
|
135467
135566
|
) })
|
|
135468
135567
|
] }),
|
|
135469
|
-
/* @__PURE__ */ (0,
|
|
135470
|
-
/* @__PURE__ */ (0,
|
|
135471
|
-
/* @__PURE__ */ (0,
|
|
135568
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135569
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "API Version" }),
|
|
135570
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135472
135571
|
TextField_default,
|
|
135473
135572
|
{
|
|
135474
135573
|
fullWidth: true,
|
|
@@ -135480,9 +135579,9 @@ var init_leadIntegrations = __esm({
|
|
|
135480
135579
|
)
|
|
135481
135580
|
] })
|
|
135482
135581
|
] }),
|
|
135483
|
-
/* @__PURE__ */ (0,
|
|
135484
|
-
/* @__PURE__ */ (0,
|
|
135485
|
-
/* @__PURE__ */ (0,
|
|
135582
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
135583
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: __spreadProps(__spreadValues({}, labelSx), { mb: 0 }), children: "Active" }),
|
|
135584
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135486
135585
|
Switch_default,
|
|
135487
135586
|
{
|
|
135488
135587
|
size: "small",
|
|
@@ -135492,14 +135591,14 @@ var init_leadIntegrations = __esm({
|
|
|
135492
135591
|
)
|
|
135493
135592
|
] })
|
|
135494
135593
|
] }),
|
|
135495
|
-
tab === 1 && /* @__PURE__ */ (0,
|
|
135496
|
-
/* @__PURE__ */ (0,
|
|
135497
|
-
/* @__PURE__ */ (0,
|
|
135498
|
-
mode === "edit" && editingIntegration && /* @__PURE__ */ (0,
|
|
135499
|
-
/* @__PURE__ */ (0,
|
|
135500
|
-
/* @__PURE__ */ (0,
|
|
135501
|
-
/* @__PURE__ */ (0,
|
|
135502
|
-
/* @__PURE__ */ (0,
|
|
135594
|
+
tab === 1 && /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { p: 2.5 }, children: [
|
|
135595
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: sectionTitleSx, children: "API Credentials" }),
|
|
135596
|
+
/* @__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." }),
|
|
135597
|
+
mode === "edit" && editingIntegration && /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TokenExpiryAlert, { integration: editingIntegration }),
|
|
135598
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" }, gap: 2 }, children: [
|
|
135599
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135600
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "App ID" }),
|
|
135601
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135503
135602
|
TextField_default,
|
|
135504
135603
|
{
|
|
135505
135604
|
fullWidth: true,
|
|
@@ -135510,9 +135609,9 @@ var init_leadIntegrations = __esm({
|
|
|
135510
135609
|
}
|
|
135511
135610
|
)
|
|
135512
135611
|
] }),
|
|
135513
|
-
/* @__PURE__ */ (0,
|
|
135514
|
-
/* @__PURE__ */ (0,
|
|
135515
|
-
/* @__PURE__ */ (0,
|
|
135612
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135613
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "Page ID" }),
|
|
135614
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135516
135615
|
TextField_default,
|
|
135517
135616
|
{
|
|
135518
135617
|
fullWidth: true,
|
|
@@ -135524,9 +135623,9 @@ var init_leadIntegrations = __esm({
|
|
|
135524
135623
|
}
|
|
135525
135624
|
)
|
|
135526
135625
|
] }),
|
|
135527
|
-
/* @__PURE__ */ (0,
|
|
135528
|
-
/* @__PURE__ */ (0,
|
|
135529
|
-
/* @__PURE__ */ (0,
|
|
135626
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135627
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "App Secret" }),
|
|
135628
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135530
135629
|
TextField_default,
|
|
135531
135630
|
{
|
|
135532
135631
|
fullWidth: true,
|
|
@@ -135539,9 +135638,9 @@ var init_leadIntegrations = __esm({
|
|
|
135539
135638
|
}
|
|
135540
135639
|
)
|
|
135541
135640
|
] }),
|
|
135542
|
-
/* @__PURE__ */ (0,
|
|
135543
|
-
/* @__PURE__ */ (0,
|
|
135544
|
-
/* @__PURE__ */ (0,
|
|
135641
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135642
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "Access Token" }),
|
|
135643
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135545
135644
|
TextField_default,
|
|
135546
135645
|
{
|
|
135547
135646
|
fullWidth: true,
|
|
@@ -135554,9 +135653,9 @@ var init_leadIntegrations = __esm({
|
|
|
135554
135653
|
}
|
|
135555
135654
|
)
|
|
135556
135655
|
] }),
|
|
135557
|
-
/* @__PURE__ */ (0,
|
|
135558
|
-
/* @__PURE__ */ (0,
|
|
135559
|
-
/* @__PURE__ */ (0,
|
|
135656
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135657
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "Page Access Token" }),
|
|
135658
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135560
135659
|
TextField_default,
|
|
135561
135660
|
{
|
|
135562
135661
|
fullWidth: true,
|
|
@@ -135569,9 +135668,9 @@ var init_leadIntegrations = __esm({
|
|
|
135569
135668
|
}
|
|
135570
135669
|
)
|
|
135571
135670
|
] }),
|
|
135572
|
-
/* @__PURE__ */ (0,
|
|
135573
|
-
/* @__PURE__ */ (0,
|
|
135574
|
-
/* @__PURE__ */ (0,
|
|
135671
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
135672
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "Verify Token (for webhook verification)" }),
|
|
135673
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135575
135674
|
TextField_default,
|
|
135576
135675
|
{
|
|
135577
135676
|
fullWidth: true,
|
|
@@ -135584,30 +135683,30 @@ var init_leadIntegrations = __esm({
|
|
|
135584
135683
|
] })
|
|
135585
135684
|
] })
|
|
135586
135685
|
] }),
|
|
135587
|
-
tab === 2 && editingIntegration && /* @__PURE__ */ (0,
|
|
135588
|
-
/* @__PURE__ */ (0,
|
|
135589
|
-
/* @__PURE__ */ (0,
|
|
135590
|
-
/* @__PURE__ */ (0,
|
|
135686
|
+
tab === 2 && editingIntegration && /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { p: 2.5 }, children: [
|
|
135687
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center", mb: 1.5 }, children: [
|
|
135688
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: __spreadProps(__spreadValues({}, sectionTitleSx), { mb: 0 }), children: "Form \u2192 Campaign Mappings" }),
|
|
135689
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(SDKPermissionGuard, { permissions: MANAGE_PERMISSIONS, showFallback: false, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135591
135690
|
SDKButton,
|
|
135592
135691
|
{
|
|
135593
135692
|
size: "small",
|
|
135594
|
-
startIcon: /* @__PURE__ */ (0,
|
|
135693
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Add_default, { sx: { fontSize: "1rem !important" } }),
|
|
135595
135694
|
onClick: () => onAddMapping(editingIntegration),
|
|
135596
135695
|
children: "Add Mapping"
|
|
135597
135696
|
}
|
|
135598
135697
|
) })
|
|
135599
135698
|
] }),
|
|
135600
|
-
/* @__PURE__ */ (0,
|
|
135601
|
-
/* @__PURE__ */ (0,
|
|
135602
|
-
/* @__PURE__ */ (0,
|
|
135699
|
+
/* @__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: [
|
|
135700
|
+
/* @__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)) }) }),
|
|
135701
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(TableBody_default, { children: [
|
|
135603
135702
|
mappings.map((mapping) => {
|
|
135604
135703
|
var _a3;
|
|
135605
|
-
return /* @__PURE__ */ (0,
|
|
135606
|
-
/* @__PURE__ */ (0,
|
|
135607
|
-
/* @__PURE__ */ (0,
|
|
135608
|
-
/* @__PURE__ */ (0,
|
|
135609
|
-
/* @__PURE__ */ (0,
|
|
135610
|
-
/* @__PURE__ */ (0,
|
|
135704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(TableRow_default, { sx: tableRowSx, children: [
|
|
135705
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: mapping.sourceFormId }),
|
|
135706
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: mapping.sourceFormName || "\u2014" }),
|
|
135707
|
+
/* @__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 }),
|
|
135708
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: mapping.priorityOverride || "Default" }),
|
|
135709
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135611
135710
|
Chip_default,
|
|
135612
135711
|
{
|
|
135613
135712
|
label: mapping.isActive ? "Active" : "Inactive",
|
|
@@ -135615,29 +135714,29 @@ var init_leadIntegrations = __esm({
|
|
|
135615
135714
|
color: mapping.isActive ? "success" : "default"
|
|
135616
135715
|
}
|
|
135617
135716
|
) }),
|
|
135618
|
-
/* @__PURE__ */ (0,
|
|
135619
|
-
/* @__PURE__ */ (0,
|
|
135717
|
+
/* @__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: [
|
|
135718
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Tooltip_default, { title: "Edit", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135620
135719
|
IconButton_default,
|
|
135621
135720
|
{
|
|
135622
135721
|
size: "small",
|
|
135623
135722
|
sx: iconBtnPrimarySx,
|
|
135624
135723
|
onClick: () => onEditMapping(editingIntegration, mapping),
|
|
135625
|
-
children: /* @__PURE__ */ (0,
|
|
135724
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Edit_default, { fontSize: "small" })
|
|
135626
135725
|
}
|
|
135627
135726
|
) }),
|
|
135628
|
-
/* @__PURE__ */ (0,
|
|
135727
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Tooltip_default, { title: "Delete", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135629
135728
|
IconButton_default,
|
|
135630
135729
|
{
|
|
135631
135730
|
size: "small",
|
|
135632
135731
|
sx: iconBtnDangerSx,
|
|
135633
135732
|
onClick: () => onDeleteMapping(editingIntegration, mapping),
|
|
135634
|
-
children: /* @__PURE__ */ (0,
|
|
135733
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Delete_default, { fontSize: "small" })
|
|
135635
135734
|
}
|
|
135636
135735
|
) })
|
|
135637
135736
|
] }) }) })
|
|
135638
135737
|
] }, mapping.id);
|
|
135639
135738
|
}),
|
|
135640
|
-
mappings.length === 0 && /* @__PURE__ */ (0,
|
|
135739
|
+
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" }) })
|
|
135641
135740
|
] })
|
|
135642
135741
|
] }) })
|
|
135643
135742
|
] })
|
|
@@ -135665,32 +135764,32 @@ var init_leadIntegrations = __esm({
|
|
|
135665
135764
|
[next2[idx], next2[idx + delta]] = [next2[idx + delta], next2[idx]];
|
|
135666
135765
|
return next2;
|
|
135667
135766
|
});
|
|
135668
|
-
return /* @__PURE__ */ (0,
|
|
135767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135669
135768
|
ModalShell,
|
|
135670
135769
|
{
|
|
135671
135770
|
title: mode === "add" ? "Add Form Mapping" : "Edit Form Mapping",
|
|
135672
135771
|
width: { xs: "95vw", sm: 560 },
|
|
135673
135772
|
zIndex: 1400,
|
|
135674
135773
|
onClose,
|
|
135675
|
-
footer: /* @__PURE__ */ (0,
|
|
135676
|
-
/* @__PURE__ */ (0,
|
|
135677
|
-
/* @__PURE__ */ (0,
|
|
135774
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(import_jsx_runtime301.Fragment, { children: [
|
|
135775
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(SDKButton, { variant: "cancel", onClick: onClose, children: "Cancel" }),
|
|
135776
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135678
135777
|
SDKButton,
|
|
135679
135778
|
{
|
|
135680
135779
|
onClick: onSave,
|
|
135681
135780
|
disabled: saving,
|
|
135682
|
-
startIcon: saving ? /* @__PURE__ */ (0,
|
|
135781
|
+
startIcon: saving ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(CircularProgress_default, { size: 14, color: "inherit" }) : void 0,
|
|
135683
135782
|
children: mode === "add" ? "Create" : "Save"
|
|
135684
135783
|
}
|
|
135685
135784
|
)
|
|
135686
135785
|
] }),
|
|
135687
|
-
children: /* @__PURE__ */ (0,
|
|
135688
|
-
/* @__PURE__ */ (0,
|
|
135689
|
-
/* @__PURE__ */ (0,
|
|
135786
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { p: 2.5 }, children: [
|
|
135787
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { mb: 2 }, children: [
|
|
135788
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Typography_default, { sx: labelSx, children: [
|
|
135690
135789
|
"Source Form Name ",
|
|
135691
|
-
/* @__PURE__ */ (0,
|
|
135790
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Required, {})
|
|
135692
135791
|
] }),
|
|
135693
|
-
/* @__PURE__ */ (0,
|
|
135792
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(FormControl_default, { fullWidth: true, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
|
|
135694
135793
|
Select_default,
|
|
135695
135794
|
{
|
|
135696
135795
|
value: formData.sourceFormId || "",
|
|
@@ -135700,7 +135799,7 @@ var init_leadIntegrations = __esm({
|
|
|
135700
135799
|
disabled: mode === "edit",
|
|
135701
135800
|
renderValue: (selected) => {
|
|
135702
135801
|
var _a3;
|
|
135703
|
-
return !selected ? /* @__PURE__ */ (0,
|
|
135802
|
+
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 || "";
|
|
135704
135803
|
},
|
|
135705
135804
|
onChange: (e) => {
|
|
135706
135805
|
const selectedForm = availableForms.find((form) => form.id === e.target.value);
|
|
@@ -135711,18 +135810,18 @@ var init_leadIntegrations = __esm({
|
|
|
135711
135810
|
}));
|
|
135712
135811
|
},
|
|
135713
135812
|
children: [
|
|
135714
|
-
/* @__PURE__ */ (0,
|
|
135715
|
-
availableForms.map((form) => /* @__PURE__ */ (0,
|
|
135813
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(MenuItem_default, { value: "", disabled: true, children: "Select Form" }),
|
|
135814
|
+
availableForms.map((form) => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(MenuItem_default, { value: form.id, children: form.name }, form.id))
|
|
135716
135815
|
]
|
|
135717
135816
|
}
|
|
135718
135817
|
) })
|
|
135719
135818
|
] }),
|
|
135720
|
-
/* @__PURE__ */ (0,
|
|
135721
|
-
/* @__PURE__ */ (0,
|
|
135819
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { mb: 2 }, children: [
|
|
135820
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Typography_default, { sx: labelSx, children: [
|
|
135722
135821
|
"Source Form ID ",
|
|
135723
|
-
/* @__PURE__ */ (0,
|
|
135822
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Required, {})
|
|
135724
135823
|
] }),
|
|
135725
|
-
/* @__PURE__ */ (0,
|
|
135824
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135726
135825
|
TextField_default,
|
|
135727
135826
|
{
|
|
135728
135827
|
fullWidth: true,
|
|
@@ -135734,12 +135833,12 @@ var init_leadIntegrations = __esm({
|
|
|
135734
135833
|
}
|
|
135735
135834
|
)
|
|
135736
135835
|
] }),
|
|
135737
|
-
/* @__PURE__ */ (0,
|
|
135738
|
-
/* @__PURE__ */ (0,
|
|
135836
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { mb: 2 }, children: [
|
|
135837
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Typography_default, { sx: labelSx, children: [
|
|
135739
135838
|
"Target Campaign ",
|
|
135740
|
-
/* @__PURE__ */ (0,
|
|
135839
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Required, {})
|
|
135741
135840
|
] }),
|
|
135742
|
-
/* @__PURE__ */ (0,
|
|
135841
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(FormControl_default, { fullWidth: true, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135743
135842
|
Select_default,
|
|
135744
135843
|
{
|
|
135745
135844
|
value: formData.campaignId || "",
|
|
@@ -135748,16 +135847,16 @@ var init_leadIntegrations = __esm({
|
|
|
135748
135847
|
MenuProps: { sx: { zIndex: SELECT_MENU_Z_INDEX } },
|
|
135749
135848
|
renderValue: (selected) => {
|
|
135750
135849
|
var _a3;
|
|
135751
|
-
return !selected ? /* @__PURE__ */ (0,
|
|
135850
|
+
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);
|
|
135752
135851
|
},
|
|
135753
135852
|
onChange: (e) => setFormData((prev2) => __spreadProps(__spreadValues({}, prev2), { campaignId: Number(e.target.value) })),
|
|
135754
|
-
children: campaigns.map((c2) => /* @__PURE__ */ (0,
|
|
135853
|
+
children: campaigns.map((c2) => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(MenuItem_default, { value: c2.id, children: c2.name }, c2.id))
|
|
135755
135854
|
}
|
|
135756
135855
|
) })
|
|
135757
135856
|
] }),
|
|
135758
|
-
/* @__PURE__ */ (0,
|
|
135759
|
-
/* @__PURE__ */ (0,
|
|
135760
|
-
/* @__PURE__ */ (0,
|
|
135857
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { mb: 2 }, children: [
|
|
135858
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "Priority Override (1-10)" }),
|
|
135859
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135761
135860
|
TextField_default,
|
|
135762
135861
|
{
|
|
135763
135862
|
fullWidth: true,
|
|
@@ -135772,24 +135871,24 @@ var init_leadIntegrations = __esm({
|
|
|
135772
135871
|
}
|
|
135773
135872
|
)
|
|
135774
135873
|
] }),
|
|
135775
|
-
/* @__PURE__ */ (0,
|
|
135776
|
-
/* @__PURE__ */ (0,
|
|
135777
|
-
fieldRows.length === 0 && /* @__PURE__ */ (0,
|
|
135778
|
-
fieldRows.map((row, idx) => /* @__PURE__ */ (0,
|
|
135779
|
-
/* @__PURE__ */ (0,
|
|
135780
|
-
/* @__PURE__ */ (0,
|
|
135781
|
-
/* @__PURE__ */ (0,
|
|
135874
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { mb: 2 }, children: [
|
|
135875
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: labelSx, children: "Display Fields (which custom_data fields show in the leads UI)" }),
|
|
135876
|
+
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." }),
|
|
135877
|
+
fieldRows.map((row, idx) => /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { display: "flex", gap: 1, mb: 1, alignItems: "center" }, children: [
|
|
135878
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { display: "flex", flexDirection: "column" }, children: [
|
|
135879
|
+
/* @__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" }) }),
|
|
135880
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135782
135881
|
IconButton_default,
|
|
135783
135882
|
{
|
|
135784
135883
|
size: "small",
|
|
135785
135884
|
disabled: idx === fieldRows.length - 1,
|
|
135786
135885
|
onClick: () => move(idx, 1),
|
|
135787
135886
|
sx: { p: 0.25 },
|
|
135788
|
-
children: /* @__PURE__ */ (0,
|
|
135887
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(ArrowDownward_default2, { fontSize: "inherit" })
|
|
135789
135888
|
}
|
|
135790
135889
|
)
|
|
135791
135890
|
] }),
|
|
135792
|
-
/* @__PURE__ */ (0,
|
|
135891
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135793
135892
|
TextField_default,
|
|
135794
135893
|
{
|
|
135795
135894
|
fullWidth: true,
|
|
@@ -135800,7 +135899,7 @@ var init_leadIntegrations = __esm({
|
|
|
135800
135899
|
onChange: (e) => setFieldRows((prev2) => prev2.map((r2, i) => i === idx ? __spreadProps(__spreadValues({}, r2), { key: e.target.value }) : r2))
|
|
135801
135900
|
}
|
|
135802
135901
|
),
|
|
135803
|
-
/* @__PURE__ */ (0,
|
|
135902
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135804
135903
|
TextField_default,
|
|
135805
135904
|
{
|
|
135806
135905
|
fullWidth: true,
|
|
@@ -135811,22 +135910,22 @@ var init_leadIntegrations = __esm({
|
|
|
135811
135910
|
onChange: (e) => setFieldRows((prev2) => prev2.map((r2, i) => i === idx ? __spreadProps(__spreadValues({}, r2), { label: e.target.value }) : r2))
|
|
135812
135911
|
}
|
|
135813
135912
|
),
|
|
135814
|
-
/* @__PURE__ */ (0,
|
|
135913
|
+
/* @__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" }) })
|
|
135815
135914
|
] }, idx)),
|
|
135816
|
-
/* @__PURE__ */ (0,
|
|
135915
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135817
135916
|
SDKButton,
|
|
135818
135917
|
{
|
|
135819
135918
|
variant: "outlined",
|
|
135820
135919
|
size: "small",
|
|
135821
|
-
startIcon: /* @__PURE__ */ (0,
|
|
135920
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Add_default, { sx: { fontSize: "1rem !important" } }),
|
|
135822
135921
|
onClick: () => setFieldRows((prev2) => [...prev2, { key: "", label: "" }]),
|
|
135823
135922
|
children: "Add Field"
|
|
135824
135923
|
}
|
|
135825
135924
|
)
|
|
135826
135925
|
] }),
|
|
135827
|
-
/* @__PURE__ */ (0,
|
|
135828
|
-
/* @__PURE__ */ (0,
|
|
135829
|
-
/* @__PURE__ */ (0,
|
|
135926
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
135927
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { sx: __spreadProps(__spreadValues({}, labelSx), { mb: 0 }), children: "Active" }),
|
|
135928
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
135830
135929
|
Switch_default,
|
|
135831
135930
|
{
|
|
135832
135931
|
size: "small",
|
|
@@ -136062,36 +136161,36 @@ var init_leadIntegrations = __esm({
|
|
|
136062
136161
|
setLogsLoading(false);
|
|
136063
136162
|
}
|
|
136064
136163
|
};
|
|
136065
|
-
return /* @__PURE__ */ (0,
|
|
136066
|
-
/* @__PURE__ */ (0,
|
|
136164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { children: [
|
|
136165
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136067
136166
|
SDKPageHeader,
|
|
136068
136167
|
{
|
|
136069
136168
|
title: "Lead Integrations",
|
|
136070
136169
|
count: filtered.length,
|
|
136071
136170
|
countLabel: "integrations",
|
|
136072
|
-
actions: /* @__PURE__ */ (0,
|
|
136073
|
-
/* @__PURE__ */ (0,
|
|
136171
|
+
actions: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Stack_default, { direction: "row", alignItems: "center", spacing: 1, children: [
|
|
136172
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136074
136173
|
SDKButton,
|
|
136075
136174
|
{
|
|
136076
136175
|
variant: "outlined",
|
|
136077
136176
|
size: "small",
|
|
136078
|
-
startIcon: loading ? /* @__PURE__ */ (0,
|
|
136177
|
+
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" } }),
|
|
136079
136178
|
onClick: refresh,
|
|
136080
136179
|
disabled: loading,
|
|
136081
136180
|
sx: { height: 36 },
|
|
136082
136181
|
children: "Refresh"
|
|
136083
136182
|
}
|
|
136084
136183
|
),
|
|
136085
|
-
/* @__PURE__ */ (0,
|
|
136184
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136086
136185
|
SDKPermissionGuard,
|
|
136087
136186
|
{
|
|
136088
136187
|
permissions: [SDK_PERMISSIONS.LEAD_INTEGRATIONS_CREATE, SDK_PERMISSIONS.LEAD_INTEGRATIONS_MANAGE],
|
|
136089
136188
|
showFallback: false,
|
|
136090
|
-
children: /* @__PURE__ */ (0,
|
|
136189
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136091
136190
|
SDKButton,
|
|
136092
136191
|
{
|
|
136093
136192
|
size: "small",
|
|
136094
|
-
startIcon: /* @__PURE__ */ (0,
|
|
136193
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Add_default, { sx: { fontSize: "1rem !important" } }),
|
|
136095
136194
|
onClick: () => openDialog("add"),
|
|
136096
136195
|
sx: { height: 36 },
|
|
136097
136196
|
children: "Add Integration"
|
|
@@ -136102,9 +136201,9 @@ var init_leadIntegrations = __esm({
|
|
|
136102
136201
|
] })
|
|
136103
136202
|
}
|
|
136104
136203
|
),
|
|
136105
|
-
/* @__PURE__ */ (0,
|
|
136106
|
-
/* @__PURE__ */ (0,
|
|
136107
|
-
/* @__PURE__ */ (0,
|
|
136204
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Box_default, { py: 1.5, px: 2, children: [
|
|
136205
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Stack_default, { direction: "row", spacing: 2, alignItems: "center", mb: 2, flexWrap: "wrap", useFlexGap: true, children: [
|
|
136206
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136108
136207
|
SearchBar,
|
|
136109
136208
|
{
|
|
136110
136209
|
value: search,
|
|
@@ -136115,7 +136214,7 @@ var init_leadIntegrations = __esm({
|
|
|
136115
136214
|
placeholder: "Search integrations..."
|
|
136116
136215
|
}
|
|
136117
136216
|
),
|
|
136118
|
-
/* @__PURE__ */ (0,
|
|
136217
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(FormControl_default, { size: "small", sx: { minWidth: 190 }, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
|
|
136119
136218
|
Select_default,
|
|
136120
136219
|
{
|
|
136121
136220
|
value: sourceFilter,
|
|
@@ -136125,8 +136224,8 @@ var init_leadIntegrations = __esm({
|
|
|
136125
136224
|
},
|
|
136126
136225
|
sx: { height: 36, fontSize: "0.85rem", borderRadius: "8px" },
|
|
136127
136226
|
children: [
|
|
136128
|
-
/* @__PURE__ */ (0,
|
|
136129
|
-
SOURCE_TYPE_OPTIONS.map((opt) => /* @__PURE__ */ (0,
|
|
136227
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(MenuItem_default, { value: "all", children: "All Sources" }),
|
|
136228
|
+
SOURCE_TYPE_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(MenuItem_default, { value: opt.value, children: [
|
|
136130
136229
|
opt.icon,
|
|
136131
136230
|
" ",
|
|
136132
136231
|
opt.label
|
|
@@ -136135,10 +136234,10 @@ var init_leadIntegrations = __esm({
|
|
|
136135
136234
|
}
|
|
136136
136235
|
) })
|
|
136137
136236
|
] }),
|
|
136138
|
-
/* @__PURE__ */ (0,
|
|
136139
|
-
/* @__PURE__ */ (0,
|
|
136140
|
-
/* @__PURE__ */ (0,
|
|
136141
|
-
/* @__PURE__ */ (0,
|
|
136237
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(TableContainer_default, { component: Paper_default, variant: "outlined", sx: { display: "flex", flexDirection: "column" }, children: [
|
|
136238
|
+
/* @__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: [
|
|
136239
|
+
/* @__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)) }) }),
|
|
136240
|
+
/* @__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)(
|
|
136142
136241
|
TableCell_default,
|
|
136143
136242
|
{
|
|
136144
136243
|
colSpan: INTEGRATION_COLS.length,
|
|
@@ -136148,9 +136247,9 @@ var init_leadIntegrations = __esm({
|
|
|
136148
136247
|
}
|
|
136149
136248
|
) }) : paginated.map((integration) => {
|
|
136150
136249
|
var _a3;
|
|
136151
|
-
return /* @__PURE__ */ (0,
|
|
136152
|
-
/* @__PURE__ */ (0,
|
|
136153
|
-
/* @__PURE__ */ (0,
|
|
136250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(TableRow_default, { sx: tableRowSx, children: [
|
|
136251
|
+
/* @__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 }) }),
|
|
136252
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136154
136253
|
Chip_default,
|
|
136155
136254
|
{
|
|
136156
136255
|
label: `${getSourceTypeIcon(integration.sourceType)} ${getSourceTypeLabel(integration.sourceType)}`,
|
|
@@ -136158,7 +136257,7 @@ var init_leadIntegrations = __esm({
|
|
|
136158
136257
|
variant: "outlined"
|
|
136159
136258
|
}
|
|
136160
136259
|
) }),
|
|
136161
|
-
/* @__PURE__ */ (0,
|
|
136260
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136162
136261
|
Chip_default,
|
|
136163
136262
|
{
|
|
136164
136263
|
label: integration.isActive ? "Active" : "Inactive",
|
|
@@ -136166,9 +136265,9 @@ var init_leadIntegrations = __esm({
|
|
|
136166
136265
|
color: integration.isActive ? "success" : "default"
|
|
136167
136266
|
}
|
|
136168
136267
|
) }),
|
|
136169
|
-
/* @__PURE__ */ (0,
|
|
136170
|
-
/* @__PURE__ */ (0,
|
|
136171
|
-
/* @__PURE__ */ (0,
|
|
136268
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TableCell_default, { sx: bodyCellSx, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(TokenStatusChip, { integration }) }),
|
|
136269
|
+
/* @__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: [
|
|
136270
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Tooltip_default, { title: integration.webhookUrl || "", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136172
136271
|
Typography_default,
|
|
136173
136272
|
{
|
|
136174
136273
|
noWrap: true,
|
|
@@ -136176,24 +136275,24 @@ var init_leadIntegrations = __esm({
|
|
|
136176
136275
|
children: integration.webhookUrl
|
|
136177
136276
|
}
|
|
136178
136277
|
) }),
|
|
136179
|
-
/* @__PURE__ */ (0,
|
|
136278
|
+
/* @__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" }) }) })
|
|
136180
136279
|
] }) }),
|
|
136181
|
-
/* @__PURE__ */ (0,
|
|
136182
|
-
/* @__PURE__ */ (0,
|
|
136183
|
-
integration.lastLeadAt && /* @__PURE__ */ (0,
|
|
136280
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(TableCell_default, { sx: bodyCellSx, children: [
|
|
136281
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Typography_default, { fontSize: "0.82rem", children: integration.totalLeadsReceived }),
|
|
136282
|
+
integration.lastLeadAt && /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Typography_default, { variant: "caption", color: "text.secondary", children: [
|
|
136184
136283
|
"Last: ",
|
|
136185
136284
|
new Date(integration.lastLeadAt).toLocaleDateString()
|
|
136186
136285
|
] })
|
|
136187
136286
|
] }),
|
|
136188
|
-
/* @__PURE__ */ (0,
|
|
136189
|
-
/* @__PURE__ */ (0,
|
|
136190
|
-
/* @__PURE__ */ (0,
|
|
136287
|
+
/* @__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: [
|
|
136288
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Chip_default, { label: `${((_a3 = integration.formMappings) == null ? void 0 : _a3.length) || 0} mappings`, size: "small" }),
|
|
136289
|
+
/* @__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" }) }) }) })
|
|
136191
136290
|
] }) }),
|
|
136192
|
-
/* @__PURE__ */ (0,
|
|
136193
|
-
/* @__PURE__ */ (0,
|
|
136194
|
-
/* @__PURE__ */ (0,
|
|
136195
|
-
/* @__PURE__ */ (0,
|
|
136196
|
-
/* @__PURE__ */ (0,
|
|
136291
|
+
/* @__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: [
|
|
136292
|
+
/* @__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" }) }) }) }),
|
|
136293
|
+
/* @__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" }) }) }),
|
|
136294
|
+
/* @__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" }) }) }) }),
|
|
136295
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136197
136296
|
SDKPermissionGuard,
|
|
136198
136297
|
{
|
|
136199
136298
|
permissions: [
|
|
@@ -136201,14 +136300,14 @@ var init_leadIntegrations = __esm({
|
|
|
136201
136300
|
SDK_PERMISSIONS.LEAD_INTEGRATIONS_MANAGE
|
|
136202
136301
|
],
|
|
136203
136302
|
showFallback: false,
|
|
136204
|
-
children: /* @__PURE__ */ (0,
|
|
136303
|
+
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" }) }) })
|
|
136205
136304
|
}
|
|
136206
136305
|
)
|
|
136207
136306
|
] }) })
|
|
136208
136307
|
] }, integration.id);
|
|
136209
136308
|
}) })
|
|
136210
136309
|
] }) }),
|
|
136211
|
-
/* @__PURE__ */ (0,
|
|
136310
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136212
136311
|
TablePagination_default,
|
|
136213
136312
|
{
|
|
136214
136313
|
component: "div",
|
|
@@ -136226,7 +136325,7 @@ var init_leadIntegrations = __esm({
|
|
|
136226
136325
|
)
|
|
136227
136326
|
] })
|
|
136228
136327
|
] }),
|
|
136229
|
-
/* @__PURE__ */ (0,
|
|
136328
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136230
136329
|
IntegrationDialog,
|
|
136231
136330
|
{
|
|
136232
136331
|
open: dialogOpen,
|
|
@@ -136243,7 +136342,7 @@ var init_leadIntegrations = __esm({
|
|
|
136243
136342
|
onDeleteMapping: (integration, mapping) => setMappingDeleteTarget({ integration, mapping })
|
|
136244
136343
|
}
|
|
136245
136344
|
),
|
|
136246
|
-
/* @__PURE__ */ (0,
|
|
136345
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136247
136346
|
MappingDialog,
|
|
136248
136347
|
{
|
|
136249
136348
|
open: mappingDialogOpen,
|
|
@@ -136259,7 +136358,7 @@ var init_leadIntegrations = __esm({
|
|
|
136259
136358
|
onClose: () => setMappingDialogOpen(false)
|
|
136260
136359
|
}
|
|
136261
136360
|
),
|
|
136262
|
-
/* @__PURE__ */ (0,
|
|
136361
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136263
136362
|
LogsDialog,
|
|
136264
136363
|
{
|
|
136265
136364
|
open: logsDialogOpen,
|
|
@@ -136269,7 +136368,7 @@ var init_leadIntegrations = __esm({
|
|
|
136269
136368
|
onClose: () => setLogsDialogOpen(false)
|
|
136270
136369
|
}
|
|
136271
136370
|
),
|
|
136272
|
-
/* @__PURE__ */ (0,
|
|
136371
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136273
136372
|
ConfirmDialog2,
|
|
136274
136373
|
{
|
|
136275
136374
|
open: !!deleteTarget,
|
|
@@ -136280,7 +136379,7 @@ var init_leadIntegrations = __esm({
|
|
|
136280
136379
|
onClose: () => setDeleteTarget(null)
|
|
136281
136380
|
}
|
|
136282
136381
|
),
|
|
136283
|
-
/* @__PURE__ */ (0,
|
|
136382
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136284
136383
|
ConfirmDialog2,
|
|
136285
136384
|
{
|
|
136286
136385
|
open: !!mappingDeleteTarget,
|
|
@@ -136291,7 +136390,7 @@ var init_leadIntegrations = __esm({
|
|
|
136291
136390
|
onClose: () => setMappingDeleteTarget(null)
|
|
136292
136391
|
}
|
|
136293
136392
|
),
|
|
136294
|
-
/* @__PURE__ */ (0,
|
|
136393
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
136295
136394
|
ConfirmDialog2,
|
|
136296
136395
|
{
|
|
136297
136396
|
open: !!regenerateTarget,
|
|
@@ -136305,7 +136404,7 @@ var init_leadIntegrations = __esm({
|
|
|
136305
136404
|
] });
|
|
136306
136405
|
});
|
|
136307
136406
|
LeadIntegrationsContent.displayName = "LeadIntegrationsContent";
|
|
136308
|
-
LeadIntegrations = () => /* @__PURE__ */ (0,
|
|
136407
|
+
LeadIntegrations = () => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(SDKProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(LeadIntegrationsContent, {}) });
|
|
136309
136408
|
leadIntegrations_default = LeadIntegrations;
|
|
136310
136409
|
}
|
|
136311
136410
|
});
|
|
@@ -138651,7 +138750,7 @@ function DispoFieldLabel({ children }) {
|
|
|
138651
138750
|
Typography_default,
|
|
138652
138751
|
{
|
|
138653
138752
|
variant: "caption",
|
|
138654
|
-
sx: { display: "block", fontWeight: 600, fontSize: "0.8rem", color: "text.secondary", mb: 0.5 },
|
|
138753
|
+
sx: { display: "block", textAlign: "left", fontWeight: 600, fontSize: "0.8rem", color: "text.secondary", mb: 0.5 },
|
|
138655
138754
|
children
|
|
138656
138755
|
}
|
|
138657
138756
|
);
|
|
@@ -138777,7 +138876,7 @@ function EndCallDispositionDialog({ open, setOpen, onSubmitDisposition }) {
|
|
|
138777
138876
|
)
|
|
138778
138877
|
}
|
|
138779
138878
|
),
|
|
138780
|
-
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)(Box_default, { sx: { flex: 1, minHeight: 0, overflowY: "auto", p: 1.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(
|
|
138879
|
+
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)(Box_default, { sx: { flex: 1, minHeight: 0, overflowY: "auto", p: 1.5, textAlign: "left" }, children: /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(
|
|
138781
138880
|
Box_default,
|
|
138782
138881
|
{
|
|
138783
138882
|
sx: {
|
|
@@ -141123,13 +141222,13 @@ CallControlPanel.displayName = "CallControlPanel";
|
|
|
141123
141222
|
var import_react109 = __toESM(require("react"));
|
|
141124
141223
|
init_SDKPermissionGuard();
|
|
141125
141224
|
init_permissions();
|
|
141126
|
-
var
|
|
141225
|
+
var import_jsx_runtime302 = require("react/jsx-runtime");
|
|
141127
141226
|
function withGuard(menuCodes, loader, permissions) {
|
|
141128
141227
|
const permissionList = permissions ? Array.isArray(permissions) ? permissions : [permissions] : void 0;
|
|
141129
141228
|
return import_react109.default.lazy(async () => {
|
|
141130
141229
|
const mod = await loader();
|
|
141131
141230
|
const Page = mod.default;
|
|
141132
|
-
const Guarded = (props) => /* @__PURE__ */ (0,
|
|
141231
|
+
const Guarded = (props) => /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(SDKPermissionGuard, { menuFeature: menuCodes, permissions: permissionList, children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(Page, __spreadValues({}, props)) });
|
|
141133
141232
|
return { default: Guarded };
|
|
141134
141233
|
});
|
|
141135
141234
|
}
|