@mccaskie-labs/workbench-agreements 0.3.0 → 0.3.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @mccaskie-labs/workbench-agreements
2
2
 
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - The page a signer sees after declining no longer says "We've told {business}" when the business has no address to be told at (the agreement has no `copyTo` and the agreements have no `replyTo`). It now says the business hasn't been emailed, so the signer can tell them. New word `declined.untold` (English and Tagalog; Taglish takes the Tagalog). `renderEndedPage` takes `businessTold`: `false` draws the new words, and leaving it out keeps the old ones.
8
+
3
9
  ## 0.3.0
4
10
 
5
11
  ### Minor Changes
@@ -547,7 +547,7 @@ export function createAgreements(opts) {
547
547
  const codeSent = !!s.code_expires_at && Date.parse(s.code_expires_at) > at.getTime();
548
548
  if (method !== "POST") {
549
549
  if (s.status === "declined")
550
- return html(200, renderEndedPage("declined_by_you", { ...o, title: a.title, business: a.business }), false, head);
550
+ return html(200, renderEndedPage("declined_by_you", { ...o, title: a.title, business: a.business, businessTold: businessTo(a).length > 0 }), false, head);
551
551
  if (s.status === "signed")
552
552
  return html(200, renderDonePage(view, { ...o, signedAt: dateLabel(s.signed_at), completed: a.status === "completed", ...(a.status === "completed" ? { downloadHref: `${self}/signed.pdf` } : {}) }), false, head);
553
553
  if (closed)
package/dist/page.d.ts CHANGED
@@ -49,4 +49,5 @@ export type EndedReason = "declined_by_you" | "voided" | "expired" | "declined";
49
49
  export declare function renderEndedPage(reason: EndedReason | "not_found", o: PageCommon & {
50
50
  title?: string;
51
51
  business?: string;
52
+ businessTold?: boolean;
52
53
  }): string;
package/dist/page.js CHANGED
@@ -130,7 +130,11 @@ export function renderDonePage(v, o) {
130
130
  /** A closed agreement, or a link that leads nowhere. */
131
131
  export function renderEndedPage(reason, o) {
132
132
  const business = o.business ?? "";
133
- const [title, text] = reason === "not_found" ? ["not_found.title", "not_found.text"] : reason === "declined_by_you" ? ["declined.title", "declined.text"] : ["ended.title", `ended.${reason}`];
133
+ const [title, text] = reason === "not_found"
134
+ ? ["not_found.title", "not_found.text"]
135
+ : reason === "declined_by_you"
136
+ ? ["declined.title", o.businessTold === false ? "declined.untold" : "declined.text"]
137
+ : ["ended.title", `ended.${reason}`];
134
138
  const body = [
135
139
  `<h1 class="wb-agreement-title">${w(o, title)}</h1>`,
136
140
  ...(o.title ? [`<p class="wb-agreement-meta">${esc(o.title)}</p>`] : []),
package/dist/words.d.ts CHANGED
@@ -52,6 +52,7 @@ declare const EN: {
52
52
  readonly "done.download": "Download the signed copy";
53
53
  readonly "declined.title": "You declined to sign";
54
54
  readonly "declined.text": "We've told {business}. If that was a mistake, ask them to send it again.";
55
+ readonly "declined.untold": "{business} hasn't been emailed about it, so tell them yourself if you need to. If that was a mistake, ask them to send it again.";
55
56
  readonly "ended.title": "This agreement is closed";
56
57
  readonly "ended.voided": "{business} has withdrawn this agreement. Ask them if you were expecting to sign it.";
57
58
  readonly "ended.expired": "The time to sign this agreement has passed. Ask {business} to send it again.";
package/dist/words.js CHANGED
@@ -56,6 +56,7 @@ const EN = {
56
56
  "done.download": "Download the signed copy",
57
57
  "declined.title": "You declined to sign",
58
58
  "declined.text": "We've told {business}. If that was a mistake, ask them to send it again.",
59
+ "declined.untold": "{business} hasn't been emailed about it, so tell them yourself if you need to. If that was a mistake, ask them to send it again.",
59
60
  "ended.title": "This agreement is closed",
60
61
  "ended.voided": "{business} has withdrawn this agreement. Ask them if you were expecting to sign it.",
61
62
  "ended.expired": "The time to sign this agreement has passed. Ask {business} to send it again.",
@@ -152,6 +153,7 @@ const TL = {
152
153
  "done.download": "I-download ang pirmadong kopya",
153
154
  "declined.title": "Tinanggihan mong pumirma",
154
155
  "declined.text": "Sinabihan na namin si {business}. Kung nagkamali ka, pakiusapan silang ipadala ulit.",
156
+ "declined.untold": "Hindi na-email si {business} tungkol dito, kaya sabihan mo sila kung kailangan. Kung nagkamali ka, pakiusapan silang ipadala ulit.",
155
157
  "ended.title": "Sarado na ang kasunduang ito",
156
158
  "ended.voided": "Binawi na ni {business} ang kasunduang ito. Tanungin sila kung inaasahan mong pumirma.",
157
159
  "ended.expired": "Lumipas na ang oras para pumirma. Pakiusapan si {business} na ipadala ulit.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mccaskie-labs/workbench-agreements",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Agreements and e-signing for Workbench apps: send a branded PDF agreement, let each person sign it online with a typed or drawn signature, keep a timestamped audit trail, and email the signed copy, with a signing certificate, to everyone. Runs in the app's own Worker, database and R2 bucket.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",