@semics-tech/emdash-events 1.0.0-rc.0 → 1.0.0-rc.10
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/README.md +3 -2
- package/dist/index.mjs +25 -1
- package/dist/manifest.json +25 -1
- package/dist/plugin.mjs +6 -6
- package/dist/ts/astro/lib/page.d.ts +44 -0
- package/dist/ts/astro/lib/page.js +122 -0
- package/dist/ts/integration/index.d.ts +4 -0
- package/dist/ts/integration/index.js +2 -0
- package/emdash-plugin.jsonc +16 -0
- package/package.json +7 -2
- package/src/astro/AttendeeList.astro +154 -0
- package/src/astro/BookingPage.astro +82 -9
- package/src/astro/BookingStatus.astro +147 -51
- package/src/astro/BookingWidget.astro +307 -35
- package/src/astro/CancelBooking.astro +80 -0
- package/src/astro/PageBrand.astro +18 -0
- package/src/astro/PageOrganiser.astro +22 -0
- package/src/astro/TicketPass.astro +131 -33
- package/src/astro/lib/attendees.ts +218 -0
- package/src/astro/lib/list.ts +22 -0
- package/src/astro/lib/page.ts +142 -0
- package/src/astro/lib/pass.ts +9 -0
- package/src/astro/lib/payment.ts +6 -10
- package/src/astro/lib/picker.ts +245 -0
- package/src/astro/lib/widget.ts +75 -2
- package/src/astro/virtual.d.ts +2 -0
- package/src/client/booking.ts +3 -1
- package/src/client/forget-form.ts +16 -0
- package/src/client/picker.ts +154 -0
- package/src/client/print.ts +12 -0
- package/src/i18n/ar.ts +63 -1
- package/src/i18n/en.ts +61 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The look of the plugins' own full pages (`/booking`, the suite's `/_events/waiver`), which run outside the
|
|
3
|
+
* site's layout: a default stylesheet built only on the `--events-*` properties, and what a site sets through
|
|
4
|
+
* `eventsIntegration({ page })` / `eventsSuite({ page })`. It is one exact string so the signing page can allow
|
|
5
|
+
* it by hash (its CSP allows nothing else inline, `ceremonyCsp`). Web APIs only (R35).
|
|
6
|
+
*
|
|
7
|
+
* The site's own layout is deliberately not wrapped around these pages: an emailed link's one-time code is in the
|
|
8
|
+
* URL here, and a signing page's CSP would block the layout's scripts and styles anyway.
|
|
9
|
+
*/
|
|
10
|
+
/** A theme value by property: `accent` sets `--events-accent` (the signing form follows, see `PAGE_CSS`). */
|
|
11
|
+
export declare const THEME_PROPERTIES: readonly ["fg", "muted", "bg", "border", "accent", "accent-fg", "error", "success", "radius", "font", "page-bg", "heading-font", "heading-fg"];
|
|
12
|
+
export type ThemeProperty = (typeof THEME_PROPERTIES)[number];
|
|
13
|
+
export interface PageBrand {
|
|
14
|
+
/** The site's name: the link's text, or the logo's alternative text. Also the organiser at the page's foot. */
|
|
15
|
+
name: string;
|
|
16
|
+
/** Where it links, a path on this site (default `/`). */
|
|
17
|
+
href?: string;
|
|
18
|
+
/** A logo, a path on this site. */
|
|
19
|
+
logo?: string;
|
|
20
|
+
/** The organiser's postal address, one line, at the page's foot and on a printed booking (T157). */
|
|
21
|
+
address?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface PageOptions {
|
|
24
|
+
/** Values for the pages' custom properties, for example `{ accent: "#1f3a2e", "page-bg": "#f6f1ea" }`. */
|
|
25
|
+
theme?: Partial<Record<ThemeProperty, string>>;
|
|
26
|
+
/** A stylesheet on this site, loaded after the defaults: for `@font-face`, or any further rules. */
|
|
27
|
+
stylesheet?: string;
|
|
28
|
+
/** The site's name or logo at the top of each page. */
|
|
29
|
+
brand?: PageBrand;
|
|
30
|
+
/** The event's page, where "Book again" goes: a path with `{slug}` (default `/events/{slug}`). */
|
|
31
|
+
eventPath?: string;
|
|
32
|
+
}
|
|
33
|
+
/** Checks a site's page options when the site's config loads; a bad value stops the build with its name. */
|
|
34
|
+
export declare function checkPageOptions(page?: PageOptions): PageOptions;
|
|
35
|
+
/** The event's page for "Book again"; undefined when the booking does not know its slug. */
|
|
36
|
+
export declare function eventPageHref(slug: string | null | undefined, eventPath?: string): string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Works with no site theme at all. Zero specificity on elements, so the components' own rules win; except the card
|
|
39
|
+
* rule for `main`'s sections, which outranks a component's own box (`.semics-payment`, `.semics-attendee-list`) so
|
|
40
|
+
* every card has the same edges, width and look (T158).
|
|
41
|
+
*/
|
|
42
|
+
export declare const PAGE_CSS = "*,*::before,*::after{box-sizing:border-box}\nhtml{color-scheme:light;-webkit-text-size-adjust:100%}\nbody.semics-page{margin:0;min-block-size:100vh;background:var(--events-page-bg, #f5f4f0);color:var(--events-fg, #1a1a1a);font-family:var(--events-font, system-ui, sans-serif);font-size:1.0625rem;line-height:1.55;overflow-wrap:anywhere;\n--esign-fg:var(--events-fg, #1a1a1a);--esign-muted:var(--events-muted, #4a4a4a);--esign-bg:var(--events-bg, #ffffff);--esign-border:var(--events-border, #6b6b6b);--esign-accent:var(--events-accent, #0b57d0);--esign-accent-fg:var(--events-accent-fg, #ffffff);--esign-error:var(--events-error, #b3261e);--esign-radius:var(--events-radius, 6px);--esign-font:var(--events-font, system-ui, sans-serif)}\n.semics-page-brand{max-inline-size:40rem;margin-inline:auto;padding:1.25rem 1rem 0;font-family:var(--events-heading-font, inherit);font-weight:600}\n.semics-page-brand a{color:var(--events-heading-fg, inherit);text-decoration:none}\n.semics-page-brand img{display:block;block-size:2.5rem;inline-size:auto;max-inline-size:100%}\n.semics-page-main{max-inline-size:40rem;margin-inline:auto;padding:1.5rem 1rem 2rem}\n:where(.semics-page) :is(h1,h2,h3){margin:0 0 .75rem;font-family:var(--events-heading-font, inherit);color:var(--events-heading-fg, inherit);line-height:1.2}\n:where(.semics-page) h1{margin-block-end:1.25rem;font-size:clamp(1.75rem,1.5rem + 1.5vw,2.25rem)}\n:where(.semics-page) h2{font-size:1.25rem}\n:where(.semics-page) h3{font-size:1.0625rem}\n:where(.semics-page) p{margin:0 0 .75rem}\n:where(.semics-page) a{color:var(--events-accent, #0b57d0);text-underline-offset:.2em}\n:where(.semics-page) :focus-visible{outline:3px solid var(--events-accent, #0b57d0);outline-offset:2px}\n.semics-page-main > :is(section,form:not([hidden]),.semics-ceremony){margin-block:0 1.25rem;padding:clamp(1.25rem,.9rem + 1.8vw,1.75rem);background:var(--events-bg, #ffffff);border:1px solid color-mix(in srgb,var(--events-border, #6b6b6b) 30%,transparent);border-radius:calc(var(--events-radius, 6px) + 6px);box-shadow:0 1px 2px rgb(0 0 0 / .04),0 6px 24px rgb(0 0 0 / .05);max-inline-size:none}\n:where(.semics-page-main > section,.semics-page-main > form,.semics-page-main > .semics-ceremony) > :last-child{margin-block-end:0}\n:where(.semics-page) [role=\"alert\"]{padding:.75rem 1rem;border:1px solid var(--events-error, #b3261e);border-radius:var(--events-radius, 6px);background:var(--events-bg, #ffffff);color:var(--events-error, #b3261e)}\n:where(.semics-page) :is(input:not([type=\"checkbox\"],[type=\"radio\"],[type=\"hidden\"]),select,textarea){font:inherit;inline-size:100%;min-block-size:2.75rem;padding:.5rem .75rem;border:1px solid var(--events-border, #6b6b6b);border-radius:var(--events-radius, 6px);background:var(--events-bg, #ffffff);color:var(--events-fg, #1a1a1a)}\n:where(.semics-page) label{display:block}\n:where(.semics-page) fieldset{min-inline-size:0;margin:0 0 1rem;padding:0;border:0}\n:where(.semics-page) legend{padding:0;margin-block-end:.5rem;font-weight:600}\n:where(.semics-page) button{font:inherit;font-weight:600;min-block-size:2.75rem;padding:.625rem 1.25rem;border:1px solid var(--events-accent, #0b57d0);border-radius:var(--events-radius, 6px);background:var(--events-accent, #0b57d0);color:var(--events-accent-fg, #ffffff);cursor:pointer}\n.semics-page-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem 1.25rem;margin-block:0 1.25rem}\n.semics-page-actions .semics-print{background:transparent;color:var(--events-accent, #0b57d0)}\n.semics-page-organiser{max-inline-size:40rem;margin-inline:auto;padding:0 1rem 3rem;color:var(--events-muted, #4a4a4a);font-size:.9375rem}\n.semics-page-organiser p{margin:0}\n.semics-page-organiser address{font-style:normal}\n@media print{\n@page{margin:15mm}\nbody.semics-page{min-block-size:0;background:#ffffff;color:#000000;font-size:11pt}\n.semics-page-brand,.semics-page-actions,.semics-page-main form,.semics-page-main button,.semics-page-main details,.semics-add-to-calendar,[data-semics-payment-live]{display:none !important}\n.semics-page-main{max-inline-size:none;padding:0}\n.semics-page-main > :is(section,form:not([hidden]),.semics-ceremony){box-shadow:none;border-color:#999999;break-inside:avoid}\n.semics-ticket-pass{break-inside:avoid}\n.semics-page-organiser{max-inline-size:none;padding:1rem 0 0;color:#000000}\n}\n";
|
|
43
|
+
/** The stylesheet for a page: the defaults, then the site's theme. Exact: the signing page hashes this text. */
|
|
44
|
+
export declare function pageCss(page?: PageOptions): string;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// i18n-ignore-file: a stylesheet and its option names, no text for people.
|
|
2
|
+
/**
|
|
3
|
+
* The look of the plugins' own full pages (`/booking`, the suite's `/_events/waiver`), which run outside the
|
|
4
|
+
* site's layout: a default stylesheet built only on the `--events-*` properties, and what a site sets through
|
|
5
|
+
* `eventsIntegration({ page })` / `eventsSuite({ page })`. It is one exact string so the signing page can allow
|
|
6
|
+
* it by hash (its CSP allows nothing else inline, `ceremonyCsp`). Web APIs only (R35).
|
|
7
|
+
*
|
|
8
|
+
* The site's own layout is deliberately not wrapped around these pages: an emailed link's one-time code is in the
|
|
9
|
+
* URL here, and a signing page's CSP would block the layout's scripts and styles anyway.
|
|
10
|
+
*/
|
|
11
|
+
/** A theme value by property: `accent` sets `--events-accent` (the signing form follows, see `PAGE_CSS`). */
|
|
12
|
+
export const THEME_PROPERTIES = [
|
|
13
|
+
"fg",
|
|
14
|
+
"muted",
|
|
15
|
+
"bg",
|
|
16
|
+
"border",
|
|
17
|
+
"accent",
|
|
18
|
+
"accent-fg",
|
|
19
|
+
"error",
|
|
20
|
+
"success",
|
|
21
|
+
"radius",
|
|
22
|
+
"font",
|
|
23
|
+
"page-bg",
|
|
24
|
+
"heading-font",
|
|
25
|
+
"heading-fg",
|
|
26
|
+
];
|
|
27
|
+
/** One line of text for people: 1 to 300 characters, no control characters (line breaks included). */
|
|
28
|
+
function oneLine(value) {
|
|
29
|
+
if (typeof value !== "string" || !value.trim() || value.length > 300)
|
|
30
|
+
return false;
|
|
31
|
+
for (let i = 0; i < value.length; i++) {
|
|
32
|
+
const unit = value.charCodeAt(i);
|
|
33
|
+
if (unit <= 0x1f || unit === 0x7f)
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
/** One line of CSS, nothing that could end the declaration, the rule or the `<style>` element. */
|
|
39
|
+
const THEME_VALUE = /^[^;{}<>\\@]{1,200}$/;
|
|
40
|
+
/** A path on this site; `;` and `,` would end a source in the signing page's CSP header. */
|
|
41
|
+
const SITE_PATH = /^\/(?!\/)[^\s"'<>\\;,]*$/;
|
|
42
|
+
/** Checks a site's page options when the site's config loads; a bad value stops the build with its name. */
|
|
43
|
+
export function checkPageOptions(page = {}) {
|
|
44
|
+
const refuse = (what) => {
|
|
45
|
+
throw new Error(`page.${what} is not valid`); // i18n-ignore
|
|
46
|
+
};
|
|
47
|
+
for (const [name, value] of Object.entries(page.theme ?? {})) {
|
|
48
|
+
const known = THEME_PROPERTIES.includes(name);
|
|
49
|
+
if (!known || typeof value !== "string" || !THEME_VALUE.test(value) || /url\(/i.test(value))
|
|
50
|
+
refuse(`theme.${name}`);
|
|
51
|
+
}
|
|
52
|
+
const { brand, stylesheet, eventPath } = page;
|
|
53
|
+
if (stylesheet !== undefined && !SITE_PATH.test(stylesheet))
|
|
54
|
+
refuse("stylesheet");
|
|
55
|
+
if (eventPath !== undefined && !(SITE_PATH.test(eventPath) && eventPath.includes("{slug}")))
|
|
56
|
+
refuse("eventPath");
|
|
57
|
+
if (brand) {
|
|
58
|
+
if (typeof brand.name !== "string" || !brand.name.trim())
|
|
59
|
+
refuse("brand.name");
|
|
60
|
+
if (brand.href !== undefined && !SITE_PATH.test(brand.href))
|
|
61
|
+
refuse("brand.href");
|
|
62
|
+
if (brand.logo !== undefined && !SITE_PATH.test(brand.logo))
|
|
63
|
+
refuse("brand.logo");
|
|
64
|
+
if (brand.address !== undefined && !oneLine(brand.address))
|
|
65
|
+
refuse("brand.address");
|
|
66
|
+
}
|
|
67
|
+
return page;
|
|
68
|
+
}
|
|
69
|
+
/** The event's page for "Book again"; undefined when the booking does not know its slug. */
|
|
70
|
+
export function eventPageHref(slug, eventPath) {
|
|
71
|
+
return slug ? (eventPath ?? "/events/{slug}").replace("{slug}", encodeURIComponent(slug)) : undefined;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Works with no site theme at all. Zero specificity on elements, so the components' own rules win; except the card
|
|
75
|
+
* rule for `main`'s sections, which outranks a component's own box (`.semics-payment`, `.semics-attendee-list`) so
|
|
76
|
+
* every card has the same edges, width and look (T158).
|
|
77
|
+
*/
|
|
78
|
+
export const PAGE_CSS = `*,*::before,*::after{box-sizing:border-box}
|
|
79
|
+
html{color-scheme:light;-webkit-text-size-adjust:100%}
|
|
80
|
+
body.semics-page{margin:0;min-block-size:100vh;background:var(--events-page-bg, #f5f4f0);color:var(--events-fg, #1a1a1a);font-family:var(--events-font, system-ui, sans-serif);font-size:1.0625rem;line-height:1.55;overflow-wrap:anywhere;
|
|
81
|
+
--esign-fg:var(--events-fg, #1a1a1a);--esign-muted:var(--events-muted, #4a4a4a);--esign-bg:var(--events-bg, #ffffff);--esign-border:var(--events-border, #6b6b6b);--esign-accent:var(--events-accent, #0b57d0);--esign-accent-fg:var(--events-accent-fg, #ffffff);--esign-error:var(--events-error, #b3261e);--esign-radius:var(--events-radius, 6px);--esign-font:var(--events-font, system-ui, sans-serif)}
|
|
82
|
+
.semics-page-brand{max-inline-size:40rem;margin-inline:auto;padding:1.25rem 1rem 0;font-family:var(--events-heading-font, inherit);font-weight:600}
|
|
83
|
+
.semics-page-brand a{color:var(--events-heading-fg, inherit);text-decoration:none}
|
|
84
|
+
.semics-page-brand img{display:block;block-size:2.5rem;inline-size:auto;max-inline-size:100%}
|
|
85
|
+
.semics-page-main{max-inline-size:40rem;margin-inline:auto;padding:1.5rem 1rem 2rem}
|
|
86
|
+
:where(.semics-page) :is(h1,h2,h3){margin:0 0 .75rem;font-family:var(--events-heading-font, inherit);color:var(--events-heading-fg, inherit);line-height:1.2}
|
|
87
|
+
:where(.semics-page) h1{margin-block-end:1.25rem;font-size:clamp(1.75rem,1.5rem + 1.5vw,2.25rem)}
|
|
88
|
+
:where(.semics-page) h2{font-size:1.25rem}
|
|
89
|
+
:where(.semics-page) h3{font-size:1.0625rem}
|
|
90
|
+
:where(.semics-page) p{margin:0 0 .75rem}
|
|
91
|
+
:where(.semics-page) a{color:var(--events-accent, #0b57d0);text-underline-offset:.2em}
|
|
92
|
+
:where(.semics-page) :focus-visible{outline:3px solid var(--events-accent, #0b57d0);outline-offset:2px}
|
|
93
|
+
.semics-page-main > :is(section,form:not([hidden]),.semics-ceremony){margin-block:0 1.25rem;padding:clamp(1.25rem,.9rem + 1.8vw,1.75rem);background:var(--events-bg, #ffffff);border:1px solid color-mix(in srgb,var(--events-border, #6b6b6b) 30%,transparent);border-radius:calc(var(--events-radius, 6px) + 6px);box-shadow:0 1px 2px rgb(0 0 0 / .04),0 6px 24px rgb(0 0 0 / .05);max-inline-size:none}
|
|
94
|
+
:where(.semics-page-main > section,.semics-page-main > form,.semics-page-main > .semics-ceremony) > :last-child{margin-block-end:0}
|
|
95
|
+
:where(.semics-page) [role="alert"]{padding:.75rem 1rem;border:1px solid var(--events-error, #b3261e);border-radius:var(--events-radius, 6px);background:var(--events-bg, #ffffff);color:var(--events-error, #b3261e)}
|
|
96
|
+
:where(.semics-page) :is(input:not([type="checkbox"],[type="radio"],[type="hidden"]),select,textarea){font:inherit;inline-size:100%;min-block-size:2.75rem;padding:.5rem .75rem;border:1px solid var(--events-border, #6b6b6b);border-radius:var(--events-radius, 6px);background:var(--events-bg, #ffffff);color:var(--events-fg, #1a1a1a)}
|
|
97
|
+
:where(.semics-page) label{display:block}
|
|
98
|
+
:where(.semics-page) fieldset{min-inline-size:0;margin:0 0 1rem;padding:0;border:0}
|
|
99
|
+
:where(.semics-page) legend{padding:0;margin-block-end:.5rem;font-weight:600}
|
|
100
|
+
:where(.semics-page) button{font:inherit;font-weight:600;min-block-size:2.75rem;padding:.625rem 1.25rem;border:1px solid var(--events-accent, #0b57d0);border-radius:var(--events-radius, 6px);background:var(--events-accent, #0b57d0);color:var(--events-accent-fg, #ffffff);cursor:pointer}
|
|
101
|
+
.semics-page-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem 1.25rem;margin-block:0 1.25rem}
|
|
102
|
+
.semics-page-actions .semics-print{background:transparent;color:var(--events-accent, #0b57d0)}
|
|
103
|
+
.semics-page-organiser{max-inline-size:40rem;margin-inline:auto;padding:0 1rem 3rem;color:var(--events-muted, #4a4a4a);font-size:.9375rem}
|
|
104
|
+
.semics-page-organiser p{margin:0}
|
|
105
|
+
.semics-page-organiser address{font-style:normal}
|
|
106
|
+
@media print{
|
|
107
|
+
@page{margin:15mm}
|
|
108
|
+
body.semics-page{min-block-size:0;background:#ffffff;color:#000000;font-size:11pt}
|
|
109
|
+
.semics-page-brand,.semics-page-actions,.semics-page-main form,.semics-page-main button,.semics-page-main details,.semics-add-to-calendar,[data-semics-payment-live]{display:none !important}
|
|
110
|
+
.semics-page-main{max-inline-size:none;padding:0}
|
|
111
|
+
.semics-page-main > :is(section,form:not([hidden]),.semics-ceremony){box-shadow:none;border-color:#999999;break-inside:avoid}
|
|
112
|
+
.semics-ticket-pass{break-inside:avoid}
|
|
113
|
+
.semics-page-organiser{max-inline-size:none;padding:1rem 0 0;color:#000000}
|
|
114
|
+
}
|
|
115
|
+
`;
|
|
116
|
+
/** The stylesheet for a page: the defaults, then the site's theme. Exact: the signing page hashes this text. */
|
|
117
|
+
export function pageCss(page = {}) {
|
|
118
|
+
const set = Object.entries(page.theme ?? {});
|
|
119
|
+
if (set.length === 0)
|
|
120
|
+
return PAGE_CSS;
|
|
121
|
+
return `${PAGE_CSS}:root{${set.map(([name, value]) => `--events-${name}:${value}`).join(";")}}\n`;
|
|
122
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type PageOptions } from "../astro/lib/page.ts";
|
|
2
|
+
export type { PageOptions };
|
|
1
3
|
export interface EventsIntegrationOptions {
|
|
2
4
|
/**
|
|
3
5
|
* The sandboxed core's plugin id. Defaults to the slug (`semics-events`, npm installs).
|
|
@@ -15,6 +17,8 @@ export interface EventsIntegrationOptions {
|
|
|
15
17
|
* for a booking waiting for signatures (the suite passes its own, T066). Without it nothing is reconciled.
|
|
16
18
|
*/
|
|
17
19
|
reconcile?: string;
|
|
20
|
+
/** How the plugin's own pages look on this site: theme, stylesheet, brand, event page path (`PageOptions`). */
|
|
21
|
+
page?: PageOptions;
|
|
18
22
|
}
|
|
19
23
|
/** The slice of Astro's integration API this needs (so the package takes no `astro` dependency). */
|
|
20
24
|
interface SetupArgs {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EVENTS_PLUGIN_ID } from "../astro/lib/call.js";
|
|
2
|
+
import { checkPageOptions } from "../astro/lib/page.js";
|
|
2
3
|
const VIRTUAL = "virtual:semics-events/config";
|
|
3
4
|
const RESOLVED = `\0${VIRTUAL}`;
|
|
4
5
|
/**
|
|
@@ -14,6 +15,7 @@ export function eventsIntegration(options = {}) {
|
|
|
14
15
|
const pluginId = options.pluginId ?? EVENTS_PLUGIN_ID;
|
|
15
16
|
const config = [
|
|
16
17
|
`export const pluginId = ${JSON.stringify(pluginId)};`,
|
|
18
|
+
`export const page = ${JSON.stringify(checkPageOptions(options.page))};`,
|
|
17
19
|
`export const esignPluginId = ${JSON.stringify(options.esignPluginId ?? null)};`,
|
|
18
20
|
options.reconcile
|
|
19
21
|
? `export { reconcileBooking as reconcile } from ${JSON.stringify(options.reconcile)};`
|
package/emdash-plugin.jsonc
CHANGED
|
@@ -196,6 +196,22 @@
|
|
|
196
196
|
"default": 365,
|
|
197
197
|
"min": 30
|
|
198
198
|
},
|
|
199
|
+
// Admin notifications (T131): sent through the outbox; the email links into the admin.
|
|
200
|
+
"adminNotifyEmails": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"label": "Admin notification emails",
|
|
203
|
+
"description": "Up to 5 addresses, separated by commas, told about booking requests (and bookings, if chosen below)."
|
|
204
|
+
},
|
|
205
|
+
"notifyAdminOn": {
|
|
206
|
+
"type": "select",
|
|
207
|
+
"label": "Notify admins about",
|
|
208
|
+
"options": [
|
|
209
|
+
{ "value": "requests", "label": "Booking requests that need approval" },
|
|
210
|
+
{ "value": "all", "label": "All bookings" },
|
|
211
|
+
{ "value": "off", "label": "Nothing" }
|
|
212
|
+
],
|
|
213
|
+
"default": "requests"
|
|
214
|
+
},
|
|
199
215
|
"emailSenderName": {
|
|
200
216
|
"type": "string",
|
|
201
217
|
"label": "Email sender name",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semics-tech/emdash-events",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
"./i18n": "./src/i18n/index.ts",
|
|
26
26
|
"./client/*": "./src/client/*.ts",
|
|
27
27
|
"./astro/BookingPage.astro": "./src/astro/BookingPage.astro",
|
|
28
|
+
"./astro/PageBrand.astro": "./src/astro/PageBrand.astro",
|
|
29
|
+
"./astro/PageOrganiser.astro": "./src/astro/PageOrganiser.astro",
|
|
30
|
+
"./astro/CancelBooking.astro": "./src/astro/CancelBooking.astro",
|
|
28
31
|
"./astro/DoorSignPage.astro": "./src/astro/DoorSignPage.astro",
|
|
29
32
|
"./astro/CheckIn.astro": "./src/astro/CheckIn.astro",
|
|
30
33
|
"./astro/OptOutPage.astro": "./src/astro/OptOutPage.astro",
|
|
@@ -34,6 +37,7 @@
|
|
|
34
37
|
"./astro/EventCard.astro": "./src/astro/EventCard.astro",
|
|
35
38
|
"./astro/BookingStatus.astro": "./src/astro/BookingStatus.astro",
|
|
36
39
|
"./astro/PaymentReturn.astro": "./src/astro/PaymentReturn.astro",
|
|
40
|
+
"./astro/AttendeeList.astro": "./src/astro/AttendeeList.astro",
|
|
37
41
|
"./astro/TicketPass.astro": "./src/astro/TicketPass.astro",
|
|
38
42
|
"./astro/AddToCalendar.astro": "./src/astro/AddToCalendar.astro"
|
|
39
43
|
},
|
|
@@ -55,7 +59,7 @@
|
|
|
55
59
|
"typescript": "^5.9.0",
|
|
56
60
|
"vitest": "^4.1.12",
|
|
57
61
|
"zod": "4.6.5",
|
|
58
|
-
"@semics-tech/shared": "0.0
|
|
62
|
+
"@semics-tech/shared": "0.1.0-rc.2"
|
|
59
63
|
},
|
|
60
64
|
"description": "Events bookings and ticketing for EmDash",
|
|
61
65
|
"license": "MIT",
|
|
@@ -75,6 +79,7 @@
|
|
|
75
79
|
"test": "emdash-plugin validate && vitest run",
|
|
76
80
|
"bundle": "emdash-plugin bundle",
|
|
77
81
|
"login": "emdash-plugin login",
|
|
82
|
+
"registry:publish": "emdash-plugin publish",
|
|
78
83
|
"release:setup": "emdash-plugin release setup"
|
|
79
84
|
}
|
|
80
85
|
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
// <AttendeeList>: a waiver booking's attendees with Signed / Waiting (T133, R95; Suite Pro). Rendered
|
|
3
|
+
// by the `/booking` page only when Events Pro's `public/booking` carries a signing list. Every button
|
|
4
|
+
// is a plain form POST back to the page (no JavaScript): Sign now opens that attendee's signing on
|
|
5
|
+
// this device, Resend asks e-sign to email an invited adult again, and the edit form corrects names
|
|
6
|
+
// and emails of attendees who have not signed, until the cutoff. Rows come from `signingRows`.
|
|
7
|
+
import { around, pickLocale, translator } from "../i18n/index";
|
|
8
|
+
import type { SigningRow } from "./lib/attendees";
|
|
9
|
+
import { zonedAt } from "./lib/list";
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
rows: SigningRow[];
|
|
13
|
+
/** Where the forms post (`/booking?ref=…`). */
|
|
14
|
+
action: string;
|
|
15
|
+
/** While names may be changed: the deadline (ISO). */
|
|
16
|
+
editUntil?: string;
|
|
17
|
+
/** The event's time zone, for that deadline. */
|
|
18
|
+
zone?: string | null;
|
|
19
|
+
locale?: string;
|
|
20
|
+
/** A waiver after payment (T160): a seat not signed reads "Waiver pending" (else "Waiting"). */
|
|
21
|
+
pending?: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const { rows, action, editUntil, zone, pending } = Astro.props;
|
|
25
|
+
const locale = pickLocale(Astro.props.locale, Astro.currentLocale);
|
|
26
|
+
const { t, lang, dir } = translator(locale);
|
|
27
|
+
const editable = rows.filter((r) => r.canEdit);
|
|
28
|
+
const [untilBefore, untilAfter] = around(t("booking.attendees.editUntil"), "time");
|
|
29
|
+
const [emailedBefore, emailedAfter] = around(t("booking.attendees.emailed"), "email");
|
|
30
|
+
const at = (iso: string) => zonedAt(iso, zone, locale);
|
|
31
|
+
---
|
|
32
|
+
<section class="semics-events semics-attendee-list" data-testid="attendee-list" lang={lang} dir={dir} aria-labelledby="semics-attendees-title">
|
|
33
|
+
<h2 id="semics-attendees-title">{t("booking.attendees.title")}</h2>
|
|
34
|
+
<ul>
|
|
35
|
+
{
|
|
36
|
+
rows.map((row) => (
|
|
37
|
+
<li data-testid="attendee-row" data-seat={row.seat} data-signing={row.signed ? "signed" : "waiting"}>
|
|
38
|
+
<span class="semics-attendee-name" id={`semics-attendee-${row.seat}`}>{row.name}</span>
|
|
39
|
+
<span class="semics-status-badge">{row.signed ? t("booking.attendees.signed") : t(pending ? "booking.attendees.pending" : "booking.attendees.waiting")}</span>
|
|
40
|
+
{row.minor && <p class="semics-attendee-note">{t("booking.attendees.minor")}</p>}
|
|
41
|
+
{row.canResend && row.email && (
|
|
42
|
+
<p class="semics-attendee-note">
|
|
43
|
+
{emailedBefore}<span>{row.email}</span>{emailedAfter}
|
|
44
|
+
</p>
|
|
45
|
+
)}
|
|
46
|
+
{(row.canSign || row.canResend) && (
|
|
47
|
+
<div class="semics-attendee-actions">
|
|
48
|
+
{row.canSign && (
|
|
49
|
+
<form method="post" action={action}>
|
|
50
|
+
<input type="hidden" name="intent" value="sign-now" />
|
|
51
|
+
<input type="hidden" name="seat" value={row.seat} />
|
|
52
|
+
<button type="submit" aria-describedby={`semics-attendee-${row.seat}`} data-testid="attendee-sign-now">
|
|
53
|
+
{t("booking.attendees.signNow")}
|
|
54
|
+
</button>
|
|
55
|
+
</form>
|
|
56
|
+
)}
|
|
57
|
+
{row.canResend && (
|
|
58
|
+
<form method="post" action={action}>
|
|
59
|
+
<input type="hidden" name="intent" value="resend" />
|
|
60
|
+
<input type="hidden" name="seat" value={row.seat} />
|
|
61
|
+
<button type="submit" aria-describedby={`semics-attendee-${row.seat}`} data-testid="attendee-resend">
|
|
62
|
+
{t("booking.attendees.resend")}
|
|
63
|
+
</button>
|
|
64
|
+
</form>
|
|
65
|
+
)}
|
|
66
|
+
</div>
|
|
67
|
+
)}
|
|
68
|
+
</li>
|
|
69
|
+
))
|
|
70
|
+
}
|
|
71
|
+
</ul>
|
|
72
|
+
{rows.some((r) => r.canResend) && <p class="semics-attendee-note" data-testid="attendee-not-arrived">{t("booking.attendees.notArrived")}</p>}
|
|
73
|
+
{
|
|
74
|
+
editable.length > 0 && (
|
|
75
|
+
<form method="post" action={action} class="semics-attendee-edit" data-testid="attendee-edit">
|
|
76
|
+
<input type="hidden" name="intent" value="attendees" />
|
|
77
|
+
<h3>{t("booking.attendees.edit")}</h3>
|
|
78
|
+
{editUntil && (
|
|
79
|
+
<p>
|
|
80
|
+
{untilBefore}<time datetime={editUntil}>{at(editUntil)}</time>{untilAfter}
|
|
81
|
+
</p>
|
|
82
|
+
)}
|
|
83
|
+
{editable.map((row) => (
|
|
84
|
+
<fieldset>
|
|
85
|
+
<legend>{row.name}</legend>
|
|
86
|
+
<label for={`semics-attendee-name-${row.seat}`}>{t("booking.attendees.name")}</label>
|
|
87
|
+
<input id={`semics-attendee-name-${row.seat}`} name={`name:${row.seat}`} value={row.name} required maxlength={200} autocomplete="off" />
|
|
88
|
+
{!row.minor && (
|
|
89
|
+
<>
|
|
90
|
+
<label for={`semics-attendee-email-${row.seat}`}>{t("booking.attendees.email")}</label>
|
|
91
|
+
<input id={`semics-attendee-email-${row.seat}`} name={`email:${row.seat}`} type="email" value={row.email} required maxlength={254} autocomplete="off" />
|
|
92
|
+
</>
|
|
93
|
+
)}
|
|
94
|
+
</fieldset>
|
|
95
|
+
))}
|
|
96
|
+
<button type="submit" data-testid="attendee-save">{t("booking.attendees.save")}</button>
|
|
97
|
+
</form>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
</section>
|
|
101
|
+
|
|
102
|
+
<style>
|
|
103
|
+
.semics-attendee-list {
|
|
104
|
+
box-sizing: border-box;
|
|
105
|
+
max-inline-size: 36rem;
|
|
106
|
+
color: var(--events-fg, #1a1a1a);
|
|
107
|
+
overflow-wrap: anywhere;
|
|
108
|
+
}
|
|
109
|
+
.semics-attendee-list ul {
|
|
110
|
+
list-style: none;
|
|
111
|
+
padding: 0;
|
|
112
|
+
}
|
|
113
|
+
.semics-attendee-list li {
|
|
114
|
+
padding-block: 0.5rem;
|
|
115
|
+
border-block-end: 1px solid var(--events-border, #6b6b6b);
|
|
116
|
+
}
|
|
117
|
+
.semics-attendee-name {
|
|
118
|
+
font-weight: 600;
|
|
119
|
+
margin-inline-end: 0.5rem;
|
|
120
|
+
}
|
|
121
|
+
.semics-status-badge {
|
|
122
|
+
display: inline-block;
|
|
123
|
+
padding: 0.125rem 0.5rem;
|
|
124
|
+
border: 1px solid currentColor;
|
|
125
|
+
border-radius: var(--events-radius, 6px);
|
|
126
|
+
}
|
|
127
|
+
[data-signing="signed"] .semics-status-badge {
|
|
128
|
+
color: var(--events-success, #146c2e);
|
|
129
|
+
}
|
|
130
|
+
.semics-attendee-actions {
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-wrap: wrap;
|
|
133
|
+
gap: 0.5rem;
|
|
134
|
+
margin-block-start: 0.5rem;
|
|
135
|
+
}
|
|
136
|
+
.semics-attendee-list button,
|
|
137
|
+
.semics-attendee-list input {
|
|
138
|
+
font: inherit;
|
|
139
|
+
min-block-size: 2.75rem;
|
|
140
|
+
}
|
|
141
|
+
.semics-attendee-list button {
|
|
142
|
+
padding: 0.5rem 1rem;
|
|
143
|
+
}
|
|
144
|
+
.semics-attendee-edit fieldset {
|
|
145
|
+
display: grid;
|
|
146
|
+
gap: 0.25rem;
|
|
147
|
+
margin-block: 0.5rem;
|
|
148
|
+
}
|
|
149
|
+
.semics-attendee-edit input {
|
|
150
|
+
box-sizing: border-box;
|
|
151
|
+
inline-size: 100%;
|
|
152
|
+
padding: 0.25rem 0.5rem;
|
|
153
|
+
}
|
|
154
|
+
</style>
|
|
@@ -8,11 +8,14 @@
|
|
|
8
8
|
// `src/client/receipt.ts` clears the fragment and posts the receipt here, which forwards it to the
|
|
9
9
|
// core's `signatures/receipt` (no access token needed: the receipt is HMAC-signed) and redirects to
|
|
10
10
|
// `?ref=&waiver=<outcome>`.
|
|
11
|
-
import { esignPluginId, pluginId, reconcile } from "virtual:semics-events/config";
|
|
11
|
+
import { esignPluginId, page, pluginId, reconcile } from "virtual:semics-events/config";
|
|
12
12
|
|
|
13
13
|
import { type MessageKey, pickLocale, translator } from "../i18n/index";
|
|
14
14
|
import AddToCalendar from "./AddToCalendar.astro";
|
|
15
15
|
import BookingStatus from "./BookingStatus.astro";
|
|
16
|
+
import CancelBooking from "./CancelBooking.astro";
|
|
17
|
+
import PageBrand from "./PageBrand.astro";
|
|
18
|
+
import PageOrganiser from "./PageOrganiser.astro";
|
|
16
19
|
import PaymentReturn from "./PaymentReturn.astro";
|
|
17
20
|
import { callPublicRoute } from "./lib/call";
|
|
18
21
|
import {
|
|
@@ -26,9 +29,12 @@ import {
|
|
|
26
29
|
redeemBookingLink,
|
|
27
30
|
resumePayment,
|
|
28
31
|
} from "./lib/checkout-form";
|
|
32
|
+
import AttendeeList from "./AttendeeList.astro";
|
|
33
|
+
import { handleAttendeeAction, signingRows, waiverStep } from "./lib/attendees";
|
|
34
|
+
import { eventPageHref, pageCss } from "./lib/page";
|
|
29
35
|
import { paymentView } from "./lib/payment";
|
|
30
36
|
import { forwardReceipt } from "./lib/receipt";
|
|
31
|
-
import type
|
|
37
|
+
import { asOfNow, type BookingView, type PublicEvent, reconcileWanted, ticketNames } from "./lib/widget";
|
|
32
38
|
import TicketPass from "./TicketPass.astro";
|
|
33
39
|
|
|
34
40
|
export const prerender = false;
|
|
@@ -48,8 +54,19 @@ const CODES = [
|
|
|
48
54
|
"BAD_REQUEST",
|
|
49
55
|
LINK_INVALID,
|
|
50
56
|
OFFER_INVALID,
|
|
57
|
+
// The attendee signing list (T133, Events Pro).
|
|
58
|
+
"ATTENDEE_SIGNED",
|
|
59
|
+
"ATTENDEES_LOCKED",
|
|
60
|
+
"ATTENDEE_INVALID",
|
|
61
|
+
"ATTENDEES_UNSENT",
|
|
62
|
+
"WAIVER_EMAIL_REQUIRED",
|
|
63
|
+
"WAIVER_TOO_MANY_EMAILS",
|
|
64
|
+
"RATE_LIMITED",
|
|
65
|
+
"SIGNING_UNAVAILABLE",
|
|
66
|
+
"ESIGN_NOT_CONFIGURED",
|
|
51
67
|
];
|
|
52
68
|
const WAIVER_OUTCOMES = ["signed", "declined", "voided", "expired", "failed"];
|
|
69
|
+
const ATTENDEE_OUTCOMES = ["saved", "resent", "invited"];
|
|
53
70
|
const errorText = (code: string, fallback: MessageKey) =>
|
|
54
71
|
CODES.includes(code) ? t(`booking.error.${code}` as MessageKey) : t(fallback);
|
|
55
72
|
|
|
@@ -59,7 +76,11 @@ const ref = /^[0-9A-HJKMNP-TV-Z]{10}$/.test(rawRef) ? rawRef : "";
|
|
|
59
76
|
const errorCode = url.searchParams.get("error") ?? "";
|
|
60
77
|
const waiver = url.searchParams.get("waiver") ?? "";
|
|
61
78
|
const waiverNotice = WAIVER_OUTCOMES.includes(waiver) ? t(`booking.waiver.${waiver}` as MessageKey) : "";
|
|
62
|
-
|
|
79
|
+
const attendeesOutcome = url.searchParams.get("attendees") ?? "";
|
|
80
|
+
const attendeesNotice = ATTENDEE_OUTCOMES.includes(attendeesOutcome)
|
|
81
|
+
? t(`booking.attendees.${attendeesOutcome}` as MessageKey)
|
|
82
|
+
: "";
|
|
83
|
+
let notice = errorCode ? errorText(errorCode, "booking.error.INTERNAL") : waiverNotice || attendeesNotice;
|
|
63
84
|
const code = url.searchParams.get("k") ?? "";
|
|
64
85
|
const ctx = { locals: Astro.locals, url, request: Astro.request };
|
|
65
86
|
// The cancel and redeem forms post here: refuse another site's posts (CSRF) before reading them.
|
|
@@ -121,7 +142,8 @@ if (ref && token) {
|
|
|
121
142
|
else missing = true;
|
|
122
143
|
// A booking waiting for signatures is reconciled with e-sign (the suite supplies `reconcile`): a signer who
|
|
123
144
|
// closed the tab or signed by email has a receipt this page forwards, then it shows the booking afresh.
|
|
124
|
-
|
|
145
|
+
// An ended booking's open envelopes are voided the same way (Pro's void intents, T152).
|
|
146
|
+
if (reconcileWanted(booking) && reconcile && esignPluginId) {
|
|
125
147
|
const done = await reconcile(ctx, { booking, pluginId, esignPluginId });
|
|
126
148
|
if (done.forwarded > 0) {
|
|
127
149
|
const fresh = await callPublicRoute<BookingView>(ctx, {
|
|
@@ -136,8 +158,24 @@ if (ref && token) {
|
|
|
136
158
|
} else if (ref && !opening) {
|
|
137
159
|
missing = true;
|
|
138
160
|
}
|
|
161
|
+
if (booking) booking = asOfNow(booking, Date.now());
|
|
162
|
+
// The attendee signing list's forms (T133): Sign now, Resend and Save, against the fresh answer.
|
|
163
|
+
if (booking && form && ref && token) {
|
|
164
|
+
const done = await handleAttendeeAction(ctx, form, { ref, token }, { pluginId, esignPluginId }, booking);
|
|
165
|
+
if (done) return Astro.redirect(done.location, 303);
|
|
166
|
+
}
|
|
167
|
+
// The lines name their ticket types from the event (T134): the booking itself carries only ids.
|
|
168
|
+
let names: Record<string, string> = {};
|
|
169
|
+
if (booking?.eventId) {
|
|
170
|
+
const event = await callPublicRoute<PublicEvent>(ctx, { path: "public/event", pluginId, body: { eventId: booking.eventId } });
|
|
171
|
+
if (event.ok) names = ticketNames(event.data);
|
|
172
|
+
}
|
|
173
|
+
const signingList = booking && !cancelled ? signingRows(booking) : null;
|
|
174
|
+
// A waiver that comes after payment (Events Pro, T160): the signing step leads the page while seats wait.
|
|
175
|
+
const waiverNext = booking && !cancelled ? waiverStep(booking) : null;
|
|
139
176
|
const payment = booking && !cancelled ? paymentView(booking, locale) : null;
|
|
140
|
-
const
|
|
177
|
+
const confirmed = Boolean(booking && !cancelled && booking.status === "confirmed");
|
|
178
|
+
const passes = booking && confirmed ? booking.attendees.filter((a) => a.code) : [];
|
|
141
179
|
---
|
|
142
180
|
<!doctype html>
|
|
143
181
|
<html lang={lang} dir={dir}>
|
|
@@ -147,9 +185,12 @@ const passes = booking && !cancelled && booking.status === "confirmed" ? booking
|
|
|
147
185
|
<meta name="robots" content="noindex" />
|
|
148
186
|
<meta name="referrer" content="no-referrer" />
|
|
149
187
|
<title>{t("booking.title")}</title>
|
|
188
|
+
<style is:inline set:html={pageCss(page)}></style>
|
|
189
|
+
{page.stylesheet && <link rel="stylesheet" href={page.stylesheet} />}
|
|
150
190
|
</head>
|
|
151
|
-
<body>
|
|
152
|
-
<
|
|
191
|
+
<body class="semics-page">
|
|
192
|
+
<PageBrand brand={page.brand} />
|
|
193
|
+
<main class="semics-booking semics-page-main" data-testid="booking-page">
|
|
153
194
|
<h1>{t("booking.title")}</h1>
|
|
154
195
|
<form method="post" action={ref ? `/booking?ref=${ref}` : "/booking"} data-semics-fragment="receipt" hidden>
|
|
155
196
|
<input type="hidden" name="intent" value="receipt" />
|
|
@@ -166,8 +207,29 @@ const passes = booking && !cancelled && booking.status === "confirmed" ? booking
|
|
|
166
207
|
</form>
|
|
167
208
|
) : booking ? (
|
|
168
209
|
<>
|
|
169
|
-
<BookingStatus booking={booking} cancelled={cancelled}
|
|
210
|
+
<BookingStatus booking={booking} cancelled={cancelled} ticketNames={names} bookAgain={eventPageHref(booking.event?.slug, page.eventPath)} showAttendees={!signingList} locale={locale} />
|
|
170
211
|
{payment && <PaymentReturn view={payment} bookingRef={ref} action={`/booking?ref=${ref}`} locale={locale} />}
|
|
212
|
+
{waiverNext && (
|
|
213
|
+
<section class="semics-events semics-waiver-step" data-testid="waiver-step" aria-labelledby="semics-waiver-step-title">
|
|
214
|
+
<h2 id="semics-waiver-step-title">{t("booking.waiverStep.title")}</h2>
|
|
215
|
+
<p>{t("booking.waiverStep.lead")}</p>
|
|
216
|
+
{waiverNext.invite && <p>{t("booking.waiverStep.emailed")}</p>}
|
|
217
|
+
<form method="post" action={`/booking?ref=${ref}`}>
|
|
218
|
+
<input type="hidden" name="intent" value="sign-waiver" />
|
|
219
|
+
<button type="submit" data-testid="waiver-step-sign">{waiverNext.sign ? t("booking.waiverStep.sign") : t("booking.waiverStep.invite")}</button>
|
|
220
|
+
</form>
|
|
221
|
+
</section>
|
|
222
|
+
)}
|
|
223
|
+
{signingList && (
|
|
224
|
+
<AttendeeList
|
|
225
|
+
rows={signingList}
|
|
226
|
+
action={`/booking?ref=${ref}`}
|
|
227
|
+
editUntil={booking.signingList?.editable ? booking.signingList.editUntil : undefined}
|
|
228
|
+
zone={booking.event?.timezone}
|
|
229
|
+
locale={locale}
|
|
230
|
+
pending={booking.waiverAfter === true}
|
|
231
|
+
/>
|
|
232
|
+
)}
|
|
171
233
|
{passes.length > 0 && (
|
|
172
234
|
<section aria-labelledby="semics-passes-title">
|
|
173
235
|
<h2 id="semics-passes-title">{t("booking.passes")}</h2>
|
|
@@ -176,7 +238,15 @@ const passes = booking && !cancelled && booking.status === "confirmed" ? booking
|
|
|
176
238
|
))}
|
|
177
239
|
</section>
|
|
178
240
|
)}
|
|
179
|
-
{
|
|
241
|
+
{confirmed && (
|
|
242
|
+
<div class="semics-page-actions" data-testid="booking-actions">
|
|
243
|
+
<AddToCalendar signedQuery={booking.calendar?.query} locale={locale} />
|
|
244
|
+
<button type="button" class="semics-print" data-print data-testid="booking-print" hidden>{t("booking.print")}</button>
|
|
245
|
+
</div>
|
|
246
|
+
)}
|
|
247
|
+
{booking.canCancel && !cancelled && (
|
|
248
|
+
<CancelBooking action={`/booking?ref=${ref}`} cancelBy={booking.cancelBy} zone={booking.event?.timezone} locale={locale} />
|
|
249
|
+
)}
|
|
180
250
|
</>
|
|
181
251
|
) : missing ? (
|
|
182
252
|
<p data-testid="booking-missing">{t("booking.missing")}</p>
|
|
@@ -185,9 +255,12 @@ const passes = booking && !cancelled && booking.status === "confirmed" ? booking
|
|
|
185
255
|
) : null
|
|
186
256
|
}
|
|
187
257
|
</main>
|
|
258
|
+
<PageOrganiser brand={page.brand} locale={locale} />
|
|
188
259
|
<script>
|
|
189
260
|
import "../client/receipt.ts";
|
|
190
261
|
import "../client/payment.ts";
|
|
262
|
+
import "../client/forget-form.ts";
|
|
263
|
+
import "../client/print.ts";
|
|
191
264
|
</script>
|
|
192
265
|
</body>
|
|
193
266
|
</html>
|