@odla-ai/chapter 0.59.0 → 0.60.0

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.
@@ -4,7 +4,7 @@ import {
4
4
  DEFAULT_CHAPTER_COPY,
5
5
  formatChapterCopy,
6
6
  useChapterCopy
7
- } from "./chunk-GADLTNJF.js";
7
+ } from "./chunk-QNP3UEIL.js";
8
8
 
9
9
  // src/ui/admin.tsx
10
10
  import { useEffect as useEffect12, useMemo as useMemo3, useRef as useRef3, useState as useState27 } from "preact/hooks";
@@ -2739,6 +2739,11 @@ function EmailBody({ ctx }) {
2739
2739
  " ready"
2740
2740
  ] }),
2741
2741
  data.validation.issues.length ? /* @__PURE__ */ jsx29("ul", { role: "alert", children: data.validation.issues.map((issue, i) => /* @__PURE__ */ jsx29("li", { children: issue.message }, i)) }) : null,
2742
+ data.validation.warnings?.length ? /* @__PURE__ */ jsx29("ul", { children: data.validation.warnings.map((warning, i) => /* @__PURE__ */ jsxs27("li", { children: [
2743
+ copy.spamRisk,
2744
+ ": ",
2745
+ warning.message
2746
+ ] }, i)) }) : null,
2742
2747
  draft ? /* @__PURE__ */ jsx29("p", { role: "status", children: "Save your changes to refresh these checks." }) : /* @__PURE__ */ jsxs27("p", { className: "muted", children: [
2743
2748
  "Checked ",
2744
2749
  new Date(data.validation.checkedAt).toLocaleString()
@@ -2773,6 +2778,11 @@ function EmailBody({ ctx }) {
2773
2778
  "."
2774
2779
  ] }),
2775
2780
  event.issues.length ? /* @__PURE__ */ jsx29("ul", { children: event.issues.map((issue, i) => /* @__PURE__ */ jsx29("li", { children: issue.message }, i)) }) : null,
2781
+ event.warnings?.length ? /* @__PURE__ */ jsx29("ul", { className: "muted", children: event.warnings.map((warning, i) => /* @__PURE__ */ jsxs27("li", { children: [
2782
+ copy.spamRisk,
2783
+ ": ",
2784
+ warning.message
2785
+ ] }, i)) }) : null,
2776
2786
  /* @__PURE__ */ jsx29(Checkbox2, { label: copy.enabled, checked: t.enabled === true, onChange: (e) => editTemplate(key, { enabled: e.target.checked }) }),
2777
2787
  /* @__PURE__ */ jsx29(Field13, { label: copy.subject, children: /* @__PURE__ */ jsx29(Input6, { value: t.subject, onInput: (e) => editTemplate(key, { subject: e.target.value }) }) }),
2778
2788
  /* @__PURE__ */ jsx29(Field13, { label: copy.body, children: /* @__PURE__ */ jsx29(Textarea5, { prose: true, rows: 5, value: t.text, onInput: (e) => editTemplate(key, { text: e.target.value }) }) }),
@@ -3602,12 +3612,17 @@ var DISPUTE_STATUS_WORDS = {
3602
3612
  recharged: "re-charged"
3603
3613
  };
3604
3614
  var columns3 = (begin, busy) => [
3605
- { key: "member", header: "Member", cell: (row) => /* @__PURE__ */ jsxs34("span", { children: [
3615
+ { key: "member", header: "Member", cell: (row) => row.kind === "seat" ? /* @__PURE__ */ jsxs34("span", { children: [
3616
+ "Seat for ",
3617
+ row.recipientName ?? "the named recipient",
3618
+ " \xB7 ",
3619
+ /* @__PURE__ */ jsx38("code", { children: row.applicationId })
3620
+ ] }) : /* @__PURE__ */ jsxs34("span", { children: [
3606
3621
  row.memberNumber ? `#${row.memberNumber} \xB7 ` : "",
3607
3622
  /* @__PURE__ */ jsx38("code", { children: row.applicationId })
3608
3623
  ] }) },
3609
3624
  { key: "chapter", header: "Chapter / runtime", cell: (row) => `${row.chapterId} / ${row.runtime}` },
3610
- { key: "status", header: "Membership", cell: (row) => row.status === "payment_disputed" ? "suspended by dispute" : row.status },
3625
+ { key: "status", header: "Record", cell: (row) => row.status === "payment_disputed" ? `${row.kind === "seat" ? "seat" : "membership"} suspended by dispute` : row.status },
3611
3626
  { key: "dispute", header: "Dispute", cell: (row) => /* @__PURE__ */ jsxs34("span", { children: [
3612
3627
  DISPUTE_STATUS_WORDS[row.disputeStatus] ?? row.disputeStatus,
3613
3628
  row.disputeReason ? ` \xB7 ${row.disputeReason}` : ""
@@ -3636,7 +3651,8 @@ function MembershipDisputes(props) {
3636
3651
  `/api/admin/membership-disputes/${encodeURIComponent(row.id)}/recharge`,
3637
3652
  { method: "POST" }
3638
3653
  );
3639
- setNote(receipt.replayed ? `Membership ${row.applicationId} was already re-charged (${receipt.paymentIntentId}).` : `Collected ${money4(row, receipt.amountCents)} again for ${row.applicationId}; the membership is ${receipt.status}.`);
3654
+ const what = row.kind === "seat" ? `the seat for ${row.recipientName ?? "the recipient"}` : `membership ${row.applicationId}`;
3655
+ setNote(receipt.replayed ? `${what} was already re-charged (${receipt.paymentIntentId}).` : `Collected ${money4(row, receipt.amountCents)} again for ${what}; it is ${receipt.status}.`);
3640
3656
  refresh();
3641
3657
  } catch (failure) {
3642
3658
  setNote(failure instanceof Error ? failure.message : "The charge could not be re-issued.");
@@ -3657,7 +3673,7 @@ function MembershipDisputes(props) {
3657
3673
  "Charge ",
3658
3674
  money4(confirming, confirming.disputeAmountCents ?? confirming.amountCents),
3659
3675
  " again to the card on file for ",
3660
- confirming.applicationId,
3676
+ confirming.kind === "seat" ? `the seat for ${confirming.recipientName ?? "the recipient"}` : confirming.applicationId,
3661
3677
  "?"
3662
3678
  ] }),
3663
3679
  /* @__PURE__ */ jsx38(Button20, { mini: true, onClick: () => void recharge(confirming), children: "Yes, charge the card" }),
@@ -3869,4 +3885,4 @@ export {
3869
3885
  MembershipDisputes,
3870
3886
  MembershipPolicyVersions
3871
3887
  };
3872
- //# sourceMappingURL=chunk-WFTWT3V7.js.map
3888
+ //# sourceMappingURL=chunk-J7ES2OWN.js.map