ahs-cti 0.0.15 → 0.0.17

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 CHANGED
@@ -79656,7 +79656,7 @@ function CallRow({
79656
79656
  ) }),
79657
79657
  /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(TableCell_default, { sx: cellSx2, children: new Date(row.start_time).toLocaleString() }),
79658
79658
  /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(TableCell_default, { sx: cellSx2, children: row.end_time ? new Date(row.end_time).toLocaleString() : "\u2014" }),
79659
- /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(TableCell_default, { align: "center", sx: cellSx2, children: (_a2 = row.agent_id) != null ? _a2 : "" }),
79659
+ /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(TableCell_default, { align: "center", sx: cellSx2, children: (_a2 = row.user_id) != null ? _a2 : "" }),
79660
79660
  /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(TableCell_default, { align: "center", sx: cellSx2, children: row.recording.available ? /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
79661
79661
  IconButton_default,
79662
79662
  {
@@ -82056,7 +82056,7 @@ var import_react33, import_jsx_runtime222, CampaignDialog, AddLeadDialog, fmtRec
82056
82056
  var init_campaigns = __esm({
82057
82057
  "call-control-sdk/lib/pages/campaigns/index.tsx"() {
82058
82058
  "use strict";
82059
- import_react33 = __toESM(require("react"));
82059
+ import_react33 = require("react");
82060
82060
  init_material();
82061
82061
  init_Add();
82062
82062
  init_Archive();
@@ -82428,16 +82428,7 @@ var init_campaigns = __esm({
82428
82428
  downloadLeadTemplate,
82429
82429
  exportLeads
82430
82430
  } = useLeads();
82431
- const displayLeads = import_react33.default.useMemo(() => {
82432
- const PENDING_STATES = ["PENDING", "SCHEDULED"];
82433
- const ts = (v) => v ? new Date(v).getTime() : 0;
82434
- return [...leads].sort((a2, b) => {
82435
- const ap = PENDING_STATES.includes((a2.status || "").toUpperCase());
82436
- const bp = PENDING_STATES.includes((b.status || "").toUpperCase());
82437
- if (ap !== bp) return ap ? -1 : 1;
82438
- return ts(a2.createdAt) - ts(b.createdAt);
82439
- });
82440
- }, [leads]);
82431
+ const displayLeads = leads;
82441
82432
  const { fetchQueues: fetchQueues4 } = useQueues();
82442
82433
  const [queueNameMap, setQueueNameMap] = (0, import_react33.useState)({});
82443
82434
  (0, import_react33.useEffect)(() => {
@@ -83351,17 +83342,17 @@ var init_campaigns = __esm({
83351
83342
  const { chip: prioChip, label: prioLabel } = leadPriorityChipSx(lead.priority);
83352
83343
  const isManualPreview = ((leadsMeta == null ? void 0 : leadsMeta.dialingMode) || (sc == null ? void 0 : sc.dialingMode) || "").toUpperCase() === "PREVIEW";
83353
83344
  return /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)(TableRow_default, { sx: tableRowSx, children: [
83354
- /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(TableCell_default, { sx: bodyCellSx, children: isManualPreview && isDialable ? /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(Tooltip_default, { title: dialTooltip, children: /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
83345
+ /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(TableCell_default, { sx: bodyCellSx, children: isManualPreview ? /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(Tooltip_default, { title: dialTooltip, children: /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
83355
83346
  Box_default,
83356
83347
  {
83357
83348
  component: "span",
83358
- onClick: () => handleDialPreview(lead.id),
83349
+ onClick: isDialable ? () => handleDialPreview(lead.id) : void 0,
83359
83350
  sx: {
83360
- color: "#1A5F6C",
83361
- fontWeight: 600,
83362
- cursor: "pointer",
83363
- textDecoration: "underline",
83364
- "&:hover": { color: "#12454f" }
83351
+ color: isDialable ? "#1A5F6C" : "inherit",
83352
+ fontWeight: isDialable ? 600 : "inherit",
83353
+ cursor: isDialable ? "pointer" : "default",
83354
+ textDecoration: isDialable ? "underline" : "none",
83355
+ "&:hover": isDialable ? { color: "#12454f" } : void 0
83365
83356
  },
83366
83357
  children: lead.phoneNumber
83367
83358
  }
@@ -83381,7 +83372,7 @@ var init_campaigns = __esm({
83381
83372
  IconButton_default,
83382
83373
  {
83383
83374
  size: "small",
83384
- onClick: () => handleDialPreview(lead.id),
83375
+ onClick: isDialable ? () => handleDialPreview(lead.id) : void 0,
83385
83376
  disabled: !isDialable,
83386
83377
  sx: {
83387
83378
  color: isDialable ? "#2e7d32" : "#bdbdbd",