@apextelemed/partner-core 0.6.0 → 0.6.2

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.
@@ -3875,7 +3875,7 @@ var US_STATES3 = [
3875
3875
  var US_STATE_OPTIONS3 = US_STATES3.map((s) => ({ value: s, label: s }));
3876
3876
 
3877
3877
  // src/pages/AdminDashboard.tsx
3878
- import { createEffect as createEffect10, createSignal as createSignal31, ErrorBoundary, Match as Match2, Show as Show46, Switch as Switch2, For as For34 } from "solid-js";
3878
+ import { createEffect as createEffect10, createSignal as createSignal31, ErrorBoundary, Match as Match3, Show as Show46, Switch as Switch3, For as For34 } from "solid-js";
3879
3879
 
3880
3880
  // src/pages/admin/Affiliates.tsx
3881
3881
  import { createSignal as createSignal10, For as For14, Match, Switch } from "solid-js";
@@ -14289,7 +14289,7 @@ function EmailTemplates() {
14289
14289
  import { createResource as createResource21, createSignal as createSignal29, For as For32, Show as Show44 } from "solid-js";
14290
14290
 
14291
14291
  // src/pages/admin/Sequences.tsx
14292
- import { createResource as createResource20, createSignal as createSignal28, For as For31, Index as Index2, Show as Show43 } from "solid-js";
14292
+ import { createResource as createResource20, createSignal as createSignal28, For as For31, Index as Index2, Match as Match2, Show as Show43, Switch as Switch2 } from "solid-js";
14293
14293
 
14294
14294
  // src/pages/admin/funnelShared.ts
14295
14295
  var SEGMENT_KEYS = {
@@ -14358,11 +14358,11 @@ function blankSequence() {
14358
14358
  }
14359
14359
  var label = { "font-size": "0.8125rem", color: "var(--app-admin-fg-muted)" };
14360
14360
  var field = { display: "grid", gap: "0.25rem" };
14361
- function Queue(props) {
14361
+ function SequenceQueue(props) {
14362
14362
  const nav = useAdminNav();
14363
- const [reload, setReload] = createSignal28(0);
14364
14363
  const [busy, setBusy] = createSignal28(null);
14365
- const [queue, { refetch }] = createResource20(reload, () => apiFetch("/admin/funnel/queue"));
14364
+ const rows = () => props.rows ?? [];
14365
+ const refetch = () => props.refetch();
14366
14366
  const act = async (row, action) => {
14367
14367
  setBusy(row.enrollmentId);
14368
14368
  try {
@@ -14380,15 +14380,16 @@ function Queue(props) {
14380
14380
  setBusy(null);
14381
14381
  }
14382
14382
  };
14383
- const sendAll = async (sequenceId, name, count) => {
14384
- if (!window.confirm(`Send ${count} due email${count === 1 ? "" : "s"} for \u201C${name}\u201D now?`)) return;
14385
- setBusy(sequenceId);
14383
+ const sendAll = async () => {
14384
+ const count = rows().length;
14385
+ if (!window.confirm(`Send ${count} due email${count === 1 ? "" : "s"} for \u201C${props.sequence.name}\u201D now?`)) return;
14386
+ setBusy("all");
14386
14387
  try {
14387
- const r = await apiFetch(`/admin/funnel/sequences/${sequenceId}/send-due`, { method: "POST" });
14388
+ const r = await apiFetch(`/admin/funnel/sequences/${props.sequence.id}/send-due`, { method: "POST" });
14388
14389
  toastSuccess(
14389
14390
  Object.entries(r.outcomes).map(([k, n]) => `${n} ${OUTCOME_LABEL[k] ?? k}`).join(", ") || "Nothing was due"
14390
14391
  );
14391
- setReload(reload() + 1);
14392
+ refetch();
14392
14393
  props.onChanged();
14393
14394
  } catch (e) {
14394
14395
  toastError(e.message);
@@ -14396,69 +14397,60 @@ function Queue(props) {
14396
14397
  setBusy(null);
14397
14398
  }
14398
14399
  };
14399
- const bySequence = () => {
14400
- const groups = /* @__PURE__ */ new Map();
14401
- for (const row of queue()?.due ?? []) {
14402
- const g = groups.get(row.sequenceId);
14403
- if (g) g.push(row);
14404
- else groups.set(row.sequenceId, [row]);
14405
- }
14406
- return [...groups.entries()];
14407
- };
14408
- return <div class="app-admin-card" style={{ "margin-top": "1.25rem", overflow: "hidden" }}>
14409
- <div style={{ padding: "1rem 1.25rem", "border-bottom": "1px solid var(--app-admin-border-soft)" }}>
14410
- <h2 class="app-admin-heading" style={{ "font-size": "0.9375rem", "font-weight": "600", margin: 0 }}>Waiting to send</h2>
14411
- <p style={{ ...label, "font-size": "0.75rem", margin: "0.25rem 0 0" }}>
14412
- Due by each sequence's schedule. Nothing here has been emailed, and nothing will be until you send it or switch the sequence to automatic.
14400
+ return <Section
14401
+ title="Waiting to send"
14402
+ count={rows().length}
14403
+ flush
14404
+ action={<Show43 when={rows().length > 0}>
14405
+ <button type="button" class="app-admin-btn app-admin-btn-primary app-admin-btn-sm" disabled={busy() === "all"} onClick={() => void sendAll()}>
14406
+ Send all due
14407
+ </button>
14408
+ </Show43>}
14409
+ >
14410
+ <Show43 when={!props.sequence.autoSend}>
14411
+ <p class="app-admin-text-muted" style={{ "font-size": "0.75rem", margin: 0, padding: "0.625rem 1.25rem 0" }}>
14412
+ Nothing here has been emailed, and nothing will be until you send it or turn automatic sending on.
14413
14413
  </p>
14414
- </div>
14415
- <Show43 when={queue()} fallback={<LoadingSpinner />}>
14416
- <Show43 when={(queue().due.length ?? 0) > 0} fallback={<EmptyState message="Nobody is due an email right now." />}>
14417
- <For31 each={bySequence()}>
14418
- {([sequenceId, rows]) => <>
14419
- <div style={{ display: "flex", "justify-content": "space-between", "align-items": "center", padding: "0.75rem 1.25rem", background: "var(--app-admin-card-soft-bg, transparent)" }}>
14420
- <strong style={{ "font-size": "0.875rem" }}>{rows[0].sequenceName} — {rows.length} due</strong>
14421
- <button type="button" class="app-admin-btn app-admin-btn-sm" disabled={busy() === sequenceId} onClick={() => void sendAll(sequenceId, rows[0].sequenceName, rows.length)}>
14422
- Send all due
14423
- </button>
14424
- </div>
14425
- <table class="app-admin-table">
14426
- <thead>
14427
- <tr><th>Person</th><th>Came from</th><th>Waiting</th><th>Email</th><th /></tr>
14428
- </thead>
14429
- <tbody>
14430
- <For31 each={rows}>
14431
- {(row) => <tr>
14432
- <td data-label="Person">
14433
- <Show43 when={row.userId && nav} fallback={row.email}>
14434
- <button type="button" class="app-admin-link-btn" style={{ "font-size": "inherit" }} onClick={() => nav.openCustomer(row.userId)}>{row.email}</button>
14435
- </Show43>
14436
- </td>
14437
- <td data-label="Came from">{segmentLongLabel(row.segmentAtAdd)}</td>
14438
- <td data-label="Waiting">{daysAgo(row.anchoredAt)}</td>
14439
- <td data-label="Email">
14440
- <div>{row.subject}</div>
14441
- <div class="app-admin-text-muted" style={{ "font-size": "0.75rem" }}>Step {row.stepIndex + 1} of {row.stepCount}</div>
14442
- </td>
14443
- <td>
14444
- <div style={{ display: "flex", gap: "0.375rem", "flex-wrap": "wrap" }}>
14445
- <button type="button" class="app-admin-btn app-admin-btn-primary app-admin-btn-sm" disabled={busy() === row.enrollmentId} onClick={() => void act(row, "send")}>
14446
- {busy() === row.enrollmentId ? "Sending\u2026" : "Send"}
14447
- </button>
14448
- <button type="button" class="app-admin-btn app-admin-btn-sm" disabled={busy() === row.enrollmentId} onClick={() => void act(row, "skip")} title="Move past this step without emailing. They stay in the sequence for the next one.">
14449
- Skip
14450
- </button>
14451
- </div>
14452
- </td>
14453
- </tr>}
14454
- </For31>
14455
- </tbody>
14456
- </table>
14457
- </>}
14458
- </For31>
14414
+ </Show43>
14415
+ <Show43 when={props.rows} fallback={<LoadingSpinner />}>
14416
+ <Show43
14417
+ when={rows().length > 0}
14418
+ fallback={<EmptyState
14419
+ message={props.sequence.autoSend ? "Nothing due \u2014 the hourly check sends these itself." : "Nobody is due right now."}
14420
+ />}
14421
+ >
14422
+ <table class="app-admin-table">
14423
+ <thead>
14424
+ <tr><th>Person</th><th>Came from</th><th>Waiting</th><th>Step</th><th /></tr>
14425
+ </thead>
14426
+ <tbody>
14427
+ <For31 each={rows()}>
14428
+ {(row) => <tr>
14429
+ <td data-label="Person">
14430
+ <Show43 when={row.userId && nav} fallback={row.email}>
14431
+ <button type="button" class="app-admin-link-btn" style={{ "font-size": "inherit" }} onClick={() => nav.openCustomer(row.userId)}>{row.email}</button>
14432
+ </Show43>
14433
+ </td>
14434
+ <td data-label="Came from">{segmentLongLabel(row.segmentAtAdd)}</td>
14435
+ <td data-label="Waiting">{daysAgo(row.anchoredAt)}</td>
14436
+ <td data-label="Step">{row.stepIndex + 1} of {row.stepCount}</td>
14437
+ <td class="app-admin-table-cell--end">
14438
+ <div style={{ display: "flex", gap: "0.375rem", "justify-content": "flex-end" }}>
14439
+ <button type="button" class="app-admin-btn app-admin-btn-primary app-admin-btn-sm" disabled={busy() === row.enrollmentId} onClick={() => void act(row, "send")}>
14440
+ {busy() === row.enrollmentId ? "Sending\u2026" : "Send"}
14441
+ </button>
14442
+ <button type="button" class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm" disabled={busy() === row.enrollmentId} onClick={() => void act(row, "skip")} title="Move past this step without emailing. They stay in the sequence for the next one.">
14443
+ Skip
14444
+ </button>
14445
+ </div>
14446
+ </td>
14447
+ </tr>}
14448
+ </For31>
14449
+ </tbody>
14450
+ </table>
14459
14451
  </Show43>
14460
14452
  </Show43>
14461
- </div>;
14453
+ </Section>;
14462
14454
  }
14463
14455
  var OUTCOME_LABEL = {
14464
14456
  sent: "sent",
@@ -14505,64 +14497,62 @@ function AddToSequence(props) {
14505
14497
  </Show43>
14506
14498
  </div>;
14507
14499
  }
14508
- function StepEditor(props) {
14509
- const nav = useAdminNav();
14500
+ function StepRow(props) {
14510
14501
  const set = (k, v) => props.onChange({ ...props.step, [k]: v });
14511
14502
  const missingTemplate = () => props.step.templateId && !props.templates.some((t) => t.id === props.step.templateId);
14512
- return <div class="app-admin-card-soft" style={{ padding: "1rem", display: "grid", gap: "1rem" }}>
14513
- <div style={{ display: "flex", "justify-content": "space-between", "align-items": "center" }}>
14514
- <strong style={{ "font-size": "0.875rem" }}>Step {props.index + 1}</strong>
14515
- <div style={{ display: "flex", gap: "0.375rem" }}>
14516
- <button type="button" class="app-admin-btn app-admin-btn-sm" onClick={() => props.onTest()}>Send me a test</button>
14517
- <Show43 when={props.count > 1}>
14518
- <button type="button" class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm" onClick={() => props.onRemove()}>Remove step</button>
14519
- </Show43>
14520
- </div>
14521
- </div>
14522
- <div style={{ display: "grid", "grid-template-columns": "repeat(auto-fit, minmax(12rem, 1fr))", gap: "0.75rem" }}>
14523
- <label style={field}>
14524
- <span style={label}>{props.index === 0 ? "Hours after they are added" : "Hours after the previous step"}</span>
14525
- <input class="app-admin-input" type="number" min="1" max="720" value={props.step.waitHours} onInput={(e) => set("waitHours", Number(e.currentTarget.value))} />
14526
- </label>
14527
- <label style={field}>
14528
- <span style={label}>Template</span>
14529
- <Show43
14530
- when={props.templates.length > 0}
14531
- fallback={<div style={{ display: "flex", gap: "0.5rem", "align-items": "center", "flex-wrap": "wrap" }}>
14532
- <span class="app-admin-text-muted" style={{ "font-size": "0.8125rem" }}>Create one under Email › Templates first.</span>
14533
- <Show43 when={nav}>
14534
- <button type="button" class="app-admin-btn app-admin-btn-sm" onClick={() => nav.selectTab("email-templates")}>Open Email › Templates</button>
14535
- </Show43>
14536
- </div>}
14537
- >
14538
- <select class="app-admin-input" value={props.step.templateId} onChange={(e) => set("templateId", e.currentTarget.value)}>
14539
- <option value="">Choose a template…</option>
14540
- <Show43 when={missingTemplate()}>
14541
- <option value={props.step.templateId}>(deleted template)</option>
14542
- </Show43>
14543
- <For31 each={props.templates}>{(t) => <option value={t.id}>{t.name}</option>}</For31>
14544
- </select>
14545
- </Show43>
14546
- </label>
14547
- <label style={field}>
14548
- <span style={label}>Link ({"{{link}}"})</span>
14549
- <select class="app-admin-input" value={props.step.link} onChange={(e) => set("link", e.currentTarget.value)}>
14550
- <For31 each={LINKS}>{(l) => <option value={l}>{LINK_LABEL[l]}</option>}</For31>
14551
- </select>
14552
- </label>
14503
+ return <div
14504
+ style={{
14505
+ display: "grid",
14506
+ "grid-template-columns": "2rem minmax(7rem, 9rem) minmax(12rem, 2fr) minmax(10rem, 1fr) auto",
14507
+ gap: "0.5rem",
14508
+ "align-items": "center",
14509
+ padding: "0.625rem 1.25rem",
14510
+ "border-top": props.index === 0 ? "none" : "1px solid var(--app-admin-border-soft)"
14511
+ }}
14512
+ >
14513
+ <span class="app-admin-text-muted" style={{ "font-size": "0.8125rem", "font-weight": "600" }}>{props.index + 1}</span>
14514
+ <label style={{ display: "flex", gap: "0.375rem", "align-items": "center", "font-size": "0.8125rem" }}>
14515
+ <span class="app-admin-text-muted">{props.index === 0 ? "after" : "+"}</span>
14516
+ <input class="app-admin-input" type="number" min="1" max="720" aria-label={`Step ${props.index + 1} wait hours`} value={props.step.waitHours} onInput={(e) => set("waitHours", Number(e.currentTarget.value))} style={{ width: "4.5rem" }} />
14517
+ <span class="app-admin-text-muted">h</span>
14518
+ </label>
14519
+ <select class="app-admin-input" aria-label={`Step ${props.index + 1} template`} value={props.step.templateId} onChange={(e) => set("templateId", e.currentTarget.value)}>
14520
+ <option value="">Choose a template…</option>
14521
+ <Show43 when={missingTemplate()}>
14522
+ <option value={props.step.templateId}>(deleted template)</option>
14523
+ </Show43>
14524
+ <For31 each={props.templates}>{(t) => <option value={t.id}>{t.name}</option>}</For31>
14525
+ </select>
14526
+ <select class="app-admin-input" aria-label={`Step ${props.index + 1} link`} value={props.step.link} onChange={(e) => set("link", e.currentTarget.value)}>
14527
+ <For31 each={LINKS}>{(l) => <option value={l}>{LINK_LABEL[l]}</option>}</For31>
14528
+ </select>
14529
+ <div style={{ display: "flex", gap: "0.25rem" }}>
14530
+ <button type="button" class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm" disabled={!props.canTest} title={props.canTest ? "Email this step to me" : "Save first"} onClick={() => props.onTest()}>Test</button>
14531
+ <button type="button" class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm" disabled={props.count <= 1} title="Remove step" aria-label={`Remove step ${props.index + 1}`} onClick={() => props.onRemove()}>×</button>
14553
14532
  </div>
14554
14533
  </div>;
14555
14534
  }
14535
+ var checkboxRow = { "font-size": "0.8125rem", display: "flex", gap: "0.5rem", "align-items": "flex-start" };
14556
14536
  function SequenceEditor(props) {
14557
14537
  const nav = useAdminNav();
14558
14538
  const [draft, setDraft] = createSignal28(JSON.parse(JSON.stringify(props.initial)));
14559
14539
  const [saving, setSaving] = createSignal28(false);
14560
14540
  const [error, setError] = createSignal28(null);
14561
14541
  const isNew = () => !draft().id;
14542
+ const dirty = () => JSON.stringify(draft()) !== JSON.stringify(props.initial);
14562
14543
  const [enrollments, { refetch: refetchEnrollments }] = createResource20(
14563
14544
  () => props.initial.id || null,
14564
14545
  (id) => apiFetch(`/admin/funnel/sequences/${id}/enrollments`)
14565
14546
  );
14547
+ const [queue, { refetch: refetchQueue }] = createResource20(
14548
+ () => props.initial.id || null,
14549
+ () => apiFetch("/admin/funnel/queue")
14550
+ );
14551
+ const dueRows = () => queue() ? queue().due.filter((r) => r.sequenceId === props.initial.id) : void 0;
14552
+ const [tab, setTab] = createSignal28(isNew() ? "settings" : "queue");
14553
+ const tabKeys = () => isNew() ? ["steps", "settings"] : ["queue", "steps", "people", "settings"];
14554
+ const TAB_LABEL = { queue: "Queue", steps: "Steps", people: "People", settings: "Settings" };
14555
+ const tabCount = (key) => key === "queue" ? dueRows()?.length : key === "steps" ? draft().steps.length : key === "people" ? enrollments()?.enrollments.length : void 0;
14566
14556
  const update = (patch) => setDraft({ ...draft(), ...patch });
14567
14557
  const setStep = (i, s) => update({ steps: draft().steps.map((x, j) => j === i ? s : x) });
14568
14558
  const payload = () => {
@@ -14602,10 +14592,6 @@ function SequenceEditor(props) {
14602
14592
  }
14603
14593
  };
14604
14594
  const test = async (stepIndex) => {
14605
- if (isNew()) {
14606
- toastError("Save the sequence first, then send a test.");
14607
- return;
14608
- }
14609
14595
  try {
14610
14596
  const r = await apiFetch(`/admin/funnel/sequences/${draft().id}/test`, { method: "POST", body: JSON.stringify({ stepIndex }) });
14611
14597
  toastSuccess(`Test sent to ${r.to} \u2014 uses the saved step and its template, not unsaved edits.`);
@@ -14626,131 +14612,200 @@ function SequenceEditor(props) {
14626
14612
  const cur = draft().feedSegments;
14627
14613
  update({ feedSegments: cur.includes(key) ? cur.filter((k) => k !== key) : [...cur, key] });
14628
14614
  };
14629
- return <div class="app-admin-card" style={{ "margin-top": "1.25rem" }}>
14630
- <div style={{ padding: "1rem 1.25rem", "border-bottom": "1px solid var(--app-admin-border-soft)", display: "flex", "justify-content": "space-between", "align-items": "center" }}>
14631
- <h2 class="app-admin-heading" style={{ "font-size": "0.9375rem", "font-weight": "600", margin: 0 }}>{isNew() ? "New sequence" : draft().name}</h2>
14632
- <button type="button" class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm" onClick={() => props.onClose()}>Back to list</button>
14633
- </div>
14615
+ const feedSummary = () => draft().feedSegments.length > 0 ? `Fed by ${draft().feedSegments.length} segment${draft().feedSegments.length === 1 ? "" : "s"}, last ${draft().feedMaxAgeDays ?? 30} days` : "Enrolled by hand only";
14616
+ return <div>
14617
+ <DetailHeader
14618
+ backLabel="Sequences"
14619
+ onBack={() => props.onClose()}
14620
+ title={isNew() ? "New sequence" : draft().name || "Untitled sequence"}
14621
+ subtitle={draft().description || (isNew() ? "Timed emails for people who stopped short of a subscription." : void 0)}
14622
+ badges={<>
14623
+ <span class={`app-admin-badge app-admin-badge--${draft().autoSend ? "success" : "info"}`} style={{ "text-transform": "none" }}>{draft().autoSend ? "Sends automatically" : "Sends on review"}</span>
14624
+ <span class="app-admin-badge app-admin-badge--neutral" style={{ "text-transform": "none" }}>{feedSummary()}</span>
14625
+ <Show43 when={!isNew() && enrollments()}>
14626
+ <span class="app-admin-badge app-admin-badge--neutral" style={{ "text-transform": "none" }}>{enrollments().enrollments.length} in it</span>
14627
+ </Show43>
14628
+ </>}
14629
+ actions={<>
14630
+ <Show43 when={!isNew()}>
14631
+ <button type="button" class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm" onClick={() => void archive()}>Archive</button>
14632
+ </Show43>
14633
+ <button type="button" class="app-admin-btn app-admin-btn-primary" disabled={saving() || !isNew() && !dirty()} onClick={() => void save()}>
14634
+ {saving() ? "Saving\u2026" : isNew() ? "Create sequence" : "Save changes"}
14635
+ </button>
14636
+ </>}
14637
+ />
14634
14638
 
14635
- <div style={{ padding: "1rem 1.25rem", display: "grid", gap: "1rem" }}>
14636
- <div style={{ display: "grid", "grid-template-columns": "repeat(auto-fit, minmax(14rem, 1fr))", gap: "0.75rem" }}>
14637
- <label style={field}>
14638
- <span style={label}>Name</span>
14639
- <input class="app-admin-input" value={draft().name} maxLength={120} onInput={(e) => update({ name: e.currentTarget.value })} placeholder="Finish your visit" />
14640
- </label>
14641
- <label style={field}>
14642
- <span style={label}>Description (internal)</span>
14643
- <input class="app-admin-input" value={draft().description ?? ""} maxLength={500} onInput={(e) => update({ description: e.currentTarget.value || null })} />
14644
- </label>
14645
- </div>
14639
+ <Show43 when={error()}>
14640
+ <AlertItem severity="danger" title="Could not save" detail={error()} />
14641
+ </Show43>
14646
14642
 
14643
+ <nav
14644
+ role="tablist"
14645
+ aria-label="Sequence sections"
14646
+ style={{ display: "flex", gap: "0.25rem", "border-bottom": "1px solid var(--app-admin-border)", margin: "1rem 0 1.25rem" }}
14647
+ >
14648
+ <For31 each={tabKeys()}>
14649
+ {(key) => <button
14650
+ type="button"
14651
+ role="tab"
14652
+ aria-selected={tab() === key}
14653
+ onClick={() => setTab(key)}
14654
+ style={{
14655
+ padding: "0.625rem 1rem",
14656
+ "margin-bottom": "-1px",
14657
+ "font-size": "0.8125rem",
14658
+ "font-weight": "600",
14659
+ "text-transform": "uppercase",
14660
+ "letter-spacing": "0.05em",
14661
+ "border-bottom": "2px solid",
14662
+ "border-color": tab() === key ? "var(--app-admin-primary)" : "transparent",
14663
+ color: tab() === key ? "var(--app-admin-primary)" : "var(--app-admin-fg-muted)",
14664
+ background: "none",
14665
+ "border-top": "none",
14666
+ "border-left": "none",
14667
+ "border-right": "none",
14668
+ cursor: "pointer"
14669
+ }}
14670
+ >
14671
+ {TAB_LABEL[key]}
14672
+ <Show43 when={tabCount(key) !== void 0}>
14673
+ <span style={{ "margin-left": "0.375rem", opacity: 0.7 }}>{tabCount(key)}</span>
14674
+ </Show43>
14675
+ </button>}
14676
+ </For31>
14677
+ </nav>
14647
14678
 
14648
- <Index2 each={draft().steps}>
14649
- {(step, i) => <StepEditor
14679
+ <Switch2>
14680
+ <Match2 when={tab() === "queue"}>
14681
+ <SequenceQueue sequence={props.initial} rows={dueRows()} refetch={() => void refetchQueue()} onChanged={props.onChanged} />
14682
+ </Match2>
14683
+ <Match2 when={tab() === "steps"}>
14684
+ <Section
14685
+ title="Steps"
14686
+ count={draft().steps.length}
14687
+ flush
14688
+ action={<button type="button" class="app-admin-btn app-admin-btn-sm" disabled={draft().steps.length >= 8} onClick={() => update({ steps: [...draft().steps, { ...EMPTY_STEP, waitHours: 72 }] })}>
14689
+ Add step
14690
+ </button>}
14691
+ >
14692
+ <Show43
14693
+ when={props.templates.length > 0}
14694
+ fallback={<div style={{ padding: "1rem 1.25rem", display: "flex", gap: "0.75rem", "align-items": "center", "flex-wrap": "wrap" }}>
14695
+ <span class="app-admin-text-muted" style={{ "font-size": "0.8125rem" }}>A step sends a marketing template. Create one under Email › Templates first.</span>
14696
+ <Show43 when={nav}>
14697
+ <button type="button" class="app-admin-btn app-admin-btn-sm" onClick={() => nav.selectTab("email-templates")}>Open Email › Templates</button>
14698
+ </Show43>
14699
+ </div>}
14700
+ >
14701
+ <p class="app-admin-text-muted" style={{ "font-size": "0.75rem", margin: 0, padding: "0.625rem 1.25rem 0" }}>
14702
+ Each step waits the given hours after the previous one (the first, after enrollment), then sends its template with the chosen link.
14703
+ </p>
14704
+ <Index2 each={draft().steps}>
14705
+ {(step, i) => <StepRow
14650
14706
  index={i}
14651
14707
  step={step()}
14652
14708
  count={draft().steps.length}
14653
14709
  templates={props.templates}
14710
+ canTest={!isNew()}
14654
14711
  onChange={(s) => setStep(i, s)}
14655
14712
  onRemove={() => update({ steps: draft().steps.filter((_, j) => j !== i) })}
14656
14713
  onTest={() => void test(i)}
14657
14714
  />}
14658
- </Index2>
14659
- <div>
14660
- <button type="button" class="app-admin-btn app-admin-btn-sm" disabled={draft().steps.length >= 8} onClick={() => update({ steps: [...draft().steps, { ...EMPTY_STEP, waitHours: 72 }] })}>
14661
- Add a step
14662
- </button>
14663
- </div>
14664
-
14665
- <div class="app-admin-card-soft" style={{ padding: "1rem", display: "grid", gap: "0.75rem" }}>
14666
- <strong style={{ "font-size": "0.875rem" }}>Who gets enrolled</strong>
14667
- <p class="app-admin-text-muted" style={{ "font-size": "0.75rem", margin: 0 }}>
14668
- People you add from the Funnel tab are always enrolled. Tick segments below and the hourly check also enrolls anyone who enters them — and removes them when they leave. Their clock starts from their own entry.
14669
- </p>
14670
- <For31 each={["a", "b"]}>
14671
- {(g) => <div>
14672
- <div style={{ ...label, "margin-bottom": "0.25rem" }}>{GROUP_LABEL[g]}</div>
14673
- <div style={{ display: "flex", "flex-wrap": "wrap", gap: "0.5rem 1rem" }}>
14674
- <For31 each={SEGMENT_KEYS[g]}>
14675
- {(key) => <label style={{ "font-size": "0.8125rem", display: "flex", gap: "0.375rem", "align-items": "center" }}>
14676
- <input type="checkbox" checked={draft().feedSegments.includes(key)} onChange={() => toggleSegment(key)} />
14677
- {SEGMENT_LABEL[key]}
14678
- </label>}
14679
- </For31>
14680
- </div>
14681
- </div>}
14682
- </For31>
14683
- <Show43 when={draft().feedSegments.length > 0}>
14684
- <div style={{ display: "grid", "grid-template-columns": "repeat(auto-fit, minmax(14rem, 1fr))", gap: "0.75rem" }}>
14685
- <label style={field}>
14686
- <span style={label}>Only enroll people who entered in the last (days)</span>
14687
- <input class="app-admin-input" type="number" min="1" max="365" value={draft().feedMaxAgeDays ?? 30} onInput={(e) => update({ feedMaxAgeDays: Number(e.currentTarget.value) })} />
14688
- <span class="app-admin-text-muted" style={{ "font-size": "0.75rem" }}>So switching a feed on never mails months-old accounts. Add those by hand from the Funnel tab if you want them.</span>
14689
- </label>
14690
- <label style={{ "font-size": "0.8125rem", display: "flex", gap: "0.375rem", "align-items": "center" }}>
14691
- <input type="checkbox" checked={draft().feedQualifiedOnly} onChange={(e) => update({ feedQualifiedOnly: e.currentTarget.checked })} />
14692
- Skip people whose questionnaire did not qualify
14715
+ </Index2>
14716
+ </Show43>
14717
+ </Section>
14718
+ </Match2>
14719
+ <Match2 when={tab() === "people"}>
14720
+ <Section title="People in this sequence" count={enrollments()?.enrollments.length} flush>
14721
+ <Show43 when={enrollments()} fallback={<LoadingSpinner />}>
14722
+ <Show43 when={enrollments().enrollments.length > 0} fallback={<EmptyState message="Nobody yet. Add people from the Funnel tab, or feed the sequence from a segment." />}>
14723
+ <table class="app-admin-table">
14724
+ <thead>
14725
+ <tr><th>Person</th><th>Came from</th><th>Step</th><th>Next due</th><th /></tr>
14726
+ </thead>
14727
+ <tbody>
14728
+ <For31 each={enrollments().enrollments}>
14729
+ {(e) => <tr>
14730
+ <td data-label="Person">
14731
+ <Show43 when={e.userId && nav} fallback={e.email}>
14732
+ <button type="button" class="app-admin-link-btn" style={{ "font-size": "inherit" }} onClick={() => nav.openCustomer(e.userId)}>{e.email}</button>
14733
+ </Show43>
14734
+ <div class="app-admin-text-muted" style={{ "font-size": "0.75rem" }}>{e.source === "feed" ? "enrolled by the feed" : "added by hand"} · {formatDate(e.addedAt)}</div>
14735
+ </td>
14736
+ <td data-label="Came from">{segmentLongLabel(e.segmentAtAdd)}</td>
14737
+ <td data-label="Step">{Math.min(e.stepIndex + 1, draft().steps.length)} of {draft().steps.length}</td>
14738
+ <td data-label="Next due" class="app-admin-text-muted">{e.nextDueAt ? formatDate(e.nextDueAt) : "\u2014"}</td>
14739
+ <td class="app-admin-table-cell--end"><button type="button" class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm" onClick={() => void remove(e)}>Remove</button></td>
14740
+ </tr>}
14741
+ </For31>
14742
+ </tbody>
14743
+ </table>
14744
+ </Show43>
14745
+ </Show43>
14746
+ </Section>
14747
+ </Match2>
14748
+ <Match2 when={tab() === "settings"}>
14749
+ <div style={{ "max-width": "40rem" }}>
14750
+ <Section title="About">
14751
+ <div style={{ display: "grid", gap: "0.75rem" }}>
14752
+ <label style={field}>
14753
+ <span style={label}>Name</span>
14754
+ <input class="app-admin-input" value={draft().name} maxLength={120} onInput={(e) => update({ name: e.currentTarget.value })} placeholder="Finish your visit" />
14755
+ </label>
14756
+ <label style={field}>
14757
+ <span style={label}>Notes (internal)</span>
14758
+ <input class="app-admin-input" value={draft().description ?? ""} maxLength={500} onInput={(e) => update({ description: e.currentTarget.value || null })} placeholder="Who this is for and why" />
14759
+ </label>
14760
+ </div>
14761
+ </Section>
14762
+
14763
+ <Section title="Sending">
14764
+ <label style={checkboxRow}>
14765
+ <input type="checkbox" aria-label="Send automatically when a step is due" checked={draft().autoSend} onChange={(e) => update({ autoSend: e.currentTarget.checked })} />
14766
+ <span>
14767
+ Send automatically when a step is due
14768
+ <span class="app-admin-text-muted" style={{ display: "block", "font-size": "0.75rem", "margin-top": "0.125rem" }}>
14769
+ {draft().autoSend ? "The hourly check emails due steps itself. Buyers and unsubscribes drop out first; one sequence email per person per day." : "Off: due steps wait under \u201CWaiting to send\u201D for you."}
14770
+ </span>
14771
+ </span>
14693
14772
  </label>
14694
- </div>
14695
- </Show43>
14696
- </div>
14697
-
14698
- <div class="app-admin-card-soft" style={{ padding: "1rem", display: "grid", gap: "0.5rem" }}>
14699
- <strong style={{ "font-size": "0.875rem" }}>How emails go out</strong>
14700
- <label style={{ "font-size": "0.8125rem", display: "flex", gap: "0.375rem", "align-items": "center" }}>
14701
- <input type="checkbox" checked={draft().autoSend} onChange={(e) => update({ autoSend: e.currentTarget.checked })} />
14702
- Send automatically when a step is due
14703
- </label>
14704
- <p class="app-admin-text-muted" style={{ "font-size": "0.75rem", margin: 0 }}>
14705
- {draft().autoSend ? "Due steps are emailed by the hourly check with no further review. Anyone who buys or unsubscribes drops out first; nobody gets more than one sequence email a day." : "Due steps wait under \u201CWaiting to send\u201D for you to send or skip them."}
14706
- </p>
14707
- </div>
14708
-
14709
- <Show43 when={error()}>
14710
- <p style={{ color: "var(--app-admin-danger-fg)", "font-size": "0.8125rem", margin: 0 }}>{error()}</p>
14711
- </Show43>
14712
- <div style={{ display: "flex", gap: "0.5rem", "align-items": "center" }}>
14713
- <button type="button" class="app-admin-btn app-admin-btn-primary" disabled={saving()} onClick={() => void save()}>
14714
- {saving() ? "Saving\u2026" : isNew() ? "Create sequence" : "Save changes"}
14715
- </button>
14716
- <Show43 when={!isNew()}>
14717
- <button type="button" class="app-admin-btn app-admin-btn-danger app-admin-btn-sm" onClick={() => void archive()}>Archive</button>
14718
- </Show43>
14719
- </div>
14720
- </div>
14773
+ </Section>
14721
14774
 
14722
- <Show43 when={!isNew()}>
14723
- <div style={{ "border-top": "1px solid var(--app-admin-border-soft)" }}>
14724
- <div style={{ padding: "0.75rem 1.25rem" }}>
14725
- <strong style={{ "font-size": "0.875rem" }}>In this sequence — {enrollments()?.enrollments.length ?? "\u2026"}</strong>
14775
+ <Section title="Who gets enrolled">
14776
+ <div style={{ display: "grid", gap: "0.75rem" }}>
14777
+ <p class="app-admin-text-muted" style={{ "font-size": "0.75rem", margin: 0 }}>
14778
+ Anyone you add from the Funnel tab. Tick segments to also enroll whoever enters them (the hourly check adds and removes them; their clock starts at their own entry).
14779
+ </p>
14780
+ <For31 each={["a", "b"]}>
14781
+ {(g) => <div>
14782
+ <div style={{ ...label, "font-size": "0.75rem", "margin-bottom": "0.25rem" }}>{GROUP_LABEL[g]}</div>
14783
+ <div style={{ display: "grid", gap: "0.25rem" }}>
14784
+ <For31 each={SEGMENT_KEYS[g]}>
14785
+ {(key) => <label style={{ "font-size": "0.8125rem", display: "flex", gap: "0.375rem", "align-items": "center" }}>
14786
+ <input type="checkbox" checked={draft().feedSegments.includes(key)} onChange={() => toggleSegment(key)} />
14787
+ {SEGMENT_LABEL[key]}
14788
+ </label>}
14789
+ </For31>
14790
+ </div>
14791
+ </div>}
14792
+ </For31>
14793
+ <Show43 when={draft().feedSegments.length > 0}>
14794
+ <label style={field}>
14795
+ <span style={label}>Only enroll people who entered in the last (days)</span>
14796
+ <input class="app-admin-input" type="number" min="1" max="365" value={draft().feedMaxAgeDays ?? 30} onInput={(e) => update({ feedMaxAgeDays: Number(e.currentTarget.value) })} />
14797
+ <span class="app-admin-text-muted" style={{ "font-size": "0.75rem" }}>So a feed never mails months-old accounts. Add those by hand if you want them.</span>
14798
+ </label>
14799
+ <label style={{ "font-size": "0.8125rem", display: "flex", gap: "0.375rem", "align-items": "center" }}>
14800
+ <input type="checkbox" checked={draft().feedQualifiedOnly} onChange={(e) => update({ feedQualifiedOnly: e.currentTarget.checked })} />
14801
+ Skip people whose questionnaire did not qualify
14802
+ </label>
14803
+ </Show43>
14804
+ </div>
14805
+ </Section>
14726
14806
  </div>
14727
- <Show43 when={enrollments()} fallback={<LoadingSpinner />}>
14728
- <Show43 when={enrollments().enrollments.length > 0} fallback={<EmptyState message="Nobody yet. Add people from the Funnel tab, or tick a segment above." />}>
14729
- <table class="app-admin-table">
14730
- <thead>
14731
- <tr><th>Person</th><th>Came from</th><th>Step</th><th>Next due</th><th /></tr>
14732
- </thead>
14733
- <tbody>
14734
- <For31 each={enrollments().enrollments}>
14735
- {(e) => <tr>
14736
- <td data-label="Person">
14737
- <Show43 when={e.userId && nav} fallback={e.email}>
14738
- <button type="button" class="app-admin-link-btn" style={{ "font-size": "inherit" }} onClick={() => nav.openCustomer(e.userId)}>{e.email}</button>
14739
- </Show43>
14740
- <div class="app-admin-text-muted" style={{ "font-size": "0.75rem" }}>{e.source === "feed" ? "enrolled by the feed" : "added by hand"} · {formatDate(e.addedAt)}</div>
14741
- </td>
14742
- <td data-label="Came from">{segmentLongLabel(e.segmentAtAdd)}</td>
14743
- <td data-label="Step">{Math.min(e.stepIndex + 1, draft().steps.length)} of {draft().steps.length}</td>
14744
- <td data-label="Next due" class="app-admin-text-muted">{e.nextDueAt ? formatDate(e.nextDueAt) : "\u2014"}</td>
14745
- <td><button type="button" class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm" onClick={() => void remove(e)}>Remove</button></td>
14746
- </tr>}
14747
- </For31>
14748
- </tbody>
14749
- </table>
14750
- </Show43>
14751
- </Show43>
14752
- </div>
14753
- </Show43>
14807
+ </Match2>
14808
+ </Switch2>
14754
14809
  </div>;
14755
14810
  }
14756
14811
  function Sequences() {
@@ -14759,12 +14814,15 @@ function Sequences() {
14759
14814
  const [emailTemplates] = createResource20(() => adminApi.getEmailTemplates());
14760
14815
  const customTemplates = () => emailTemplates()?.customTemplates ?? [];
14761
14816
  const [editing, setEditing] = createSignal28(null);
14762
- const changed = () => void refetch();
14817
+ const [queue, { refetch: refetchQueue }] = createResource20(reload, () => apiFetch("/admin/funnel/queue").catch(() => ({ due: [] })));
14818
+ const dueFor = (id) => (queue()?.due ?? []).filter((d) => d.sequenceId === id).length;
14819
+ const changed = () => {
14820
+ void refetch();
14821
+ void refetchQueue();
14822
+ };
14763
14823
  return <div>
14764
- <PageTitle subtitle="Timed emails for people who stopped short of a subscription">Sequences</PageTitle>
14765
-
14766
- <Show43 when={list()} fallback={<LoadingSpinner />}>
14767
- <Queue sequences={list().sequences} onChanged={changed} />
14824
+ <Show43 when={!editing()}>
14825
+ <PageTitle subtitle="Timed emails for people who stopped short of a subscription">Sequences</PageTitle>
14768
14826
  </Show43>
14769
14827
 
14770
14828
  <Show43
@@ -14778,7 +14836,7 @@ function Sequences() {
14778
14836
  <Show43 when={list().sequences.length > 0} fallback={<EmptyState message="No sequences yet. Create one, then add people from the Funnel tab." />}>
14779
14837
  <table class="app-admin-table">
14780
14838
  <thead>
14781
- <tr><th>Name</th><th>Steps</th><th>Fed by</th><th>Sending</th><th>In it</th><th>Sent</th><th>Bought</th><th>Unsubscribed</th></tr>
14839
+ <tr><th>Name</th><th>Steps</th><th>Fed by</th><th>Sending</th><th>In it</th><th>Due now</th><th>Sent</th><th>Bought</th><th>Unsubscribed</th></tr>
14782
14840
  </thead>
14783
14841
  <tbody>
14784
14842
  <For31 each={list().sequences}>
@@ -14791,6 +14849,7 @@ function Sequences() {
14791
14849
  <td data-label="Fed by">{s.feedSegments.length > 0 ? `${s.feedSegments.length} segment${s.feedSegments.length === 1 ? "" : "s"}, \u2264${s.feedMaxAgeDays}d` : <span class="app-admin-text-muted">by hand</span>}</td>
14792
14850
  <td data-label="Sending">{s.autoSend ? "Automatic" : "Review"}</td>
14793
14851
  <td data-label="In it">{s.stats.active}</td>
14852
+ <td data-label="Due now">{dueFor(s.id) > 0 ? <strong>{dueFor(s.id)}</strong> : <span class="app-admin-text-muted">0</span>}</td>
14794
14853
  <td data-label="Sent">{s.stats.sent}</td>
14795
14854
  <td data-label="Bought">{s.stats.boughtAfterEnroll}</td>
14796
14855
  <td data-label="Unsubscribed">{s.stats.unsubscribed}</td>
@@ -15495,22 +15554,22 @@ function AdminDashboard(props) {
15495
15554
  }
15496
15555
  <Show46 when={currentTab()} keyed>
15497
15556
  <ErrorBoundary fallback={(err, reset) => <AdminTabError error={err} reset={reset} />}>
15498
- <Switch2 fallback={<Dashboard onSelectTab={handleTabClick} isTabEnabled={isTabEnabled} />}>
15499
- <Match2 when={currentTab() === "dashboard"}>
15557
+ <Switch3 fallback={<Dashboard onSelectTab={handleTabClick} isTabEnabled={isTabEnabled} />}>
15558
+ <Match3 when={currentTab() === "dashboard"}>
15500
15559
  <Dashboard onSelectTab={handleTabClick} isTabEnabled={isTabEnabled} />
15501
- </Match2>
15502
- <Match2 when={currentTab() === "customers"}>
15560
+ </Match3>
15561
+ <Match3 when={currentTab() === "customers"}>
15503
15562
  <Customers
15504
15563
  passwordResetRedirectUrl={props.passwordResetRedirectUrl}
15505
15564
  activeUid={props.customers?.activeUid}
15506
15565
  onSelectCustomer={props.customers?.onSelectCustomer}
15507
15566
  initialUid={pendingCustomerUid()}
15508
15567
  />
15509
- </Match2>
15510
- <Match2 when={currentTab() === "payments"}>
15568
+ </Match3>
15569
+ <Match3 when={currentTab() === "payments"}>
15511
15570
  <Payments />
15512
- </Match2>
15513
- <Match2 when={currentTab() === "subscriptions"}>
15571
+ </Match3>
15572
+ <Match3 when={currentTab() === "subscriptions"}>
15514
15573
  {
15515
15574
  /* Retired tab alias: the customer list, filtered to active subscribers. */
15516
15575
  }
@@ -15520,41 +15579,41 @@ function AdminDashboard(props) {
15520
15579
  activeUid={props.customers?.activeUid}
15521
15580
  onSelectCustomer={props.customers?.onSelectCustomer}
15522
15581
  />
15523
- </Match2>
15524
- <Match2 when={currentTab() === "products"}>
15582
+ </Match3>
15583
+ <Match3 when={currentTab() === "products"}>
15525
15584
  <Products productDefaultsLookup={props.productDefaultsLookup} />
15526
- </Match2>
15527
- <Match2 when={currentTab() === "categories"}>
15585
+ </Match3>
15586
+ <Match3 when={currentTab() === "categories"}>
15528
15587
  <Categories />
15529
- </Match2>
15530
- <Match2 when={currentTab() === "sales"}>
15588
+ </Match3>
15589
+ <Match3 when={currentTab() === "sales"}>
15531
15590
  <Sales />
15532
- </Match2>
15533
- <Match2 when={currentTab() === "promo-codes"}>
15591
+ </Match3>
15592
+ <Match3 when={currentTab() === "promo-codes"}>
15534
15593
  <PromoCodes affiliatesEnabled={affiliatesEnabled()} />
15535
- </Match2>
15536
- <Match2 when={currentTab() === "affiliates"}>
15594
+ </Match3>
15595
+ <Match3 when={currentTab() === "affiliates"}>
15537
15596
  <Affiliates {...props.affiliates ?? {}} />
15538
- </Match2>
15539
- <Match2 when={currentTab() === "support"}>
15597
+ </Match3>
15598
+ <Match3 when={currentTab() === "support"}>
15540
15599
  <Support initialThreadId={pendingThreadId()} />
15541
- </Match2>
15542
- <Match2 when={currentTab() === "webhooks"}>
15600
+ </Match3>
15601
+ <Match3 when={currentTab() === "webhooks"}>
15543
15602
  <Webhooks />
15544
- </Match2>
15545
- <Match2 when={currentTab() === "email-templates"}>
15603
+ </Match3>
15604
+ <Match3 when={currentTab() === "email-templates"}>
15546
15605
  <EmailTemplates />
15547
- </Match2>
15548
- <Match2 when={currentTab() === "funnel"}>
15606
+ </Match3>
15607
+ <Match3 when={currentTab() === "funnel"}>
15549
15608
  <Funnel />
15550
- </Match2>
15551
- <Match2 when={currentTab() === "sequences"}>
15609
+ </Match3>
15610
+ <Match3 when={currentTab() === "sequences"}>
15552
15611
  <Sequences />
15553
- </Match2>
15554
- <Match2 when={currentTab() === "email-notifications"}>
15612
+ </Match3>
15613
+ <Match3 when={currentTab() === "email-notifications"}>
15555
15614
  <EmailNotifications />
15556
- </Match2>
15557
- </Switch2>
15615
+ </Match3>
15616
+ </Switch3>
15558
15617
  </ErrorBoundary>
15559
15618
  </Show46>
15560
15619
  </div>
@@ -16031,7 +16090,7 @@ function UpdatePaymentMethod(props) {
16031
16090
  }
16032
16091
 
16033
16092
  // src/pages/MemberPortal.tsx
16034
- import { Show as Show56, Switch as Switch4, Match as Match4, For as For41, createSignal as createSignal38, onMount as onMount3 } from "solid-js";
16093
+ import { Show as Show56, Switch as Switch5, Match as Match5, For as For41, createSignal as createSignal38, onMount as onMount3 } from "solid-js";
16035
16094
 
16036
16095
  // src/pages/member/OrderTracker.tsx
16037
16096
  import { Show as Show49, For as For36, createSignal as createSignal32 } from "solid-js";
@@ -16696,7 +16755,7 @@ function MedicationGuide(props) {
16696
16755
  }
16697
16756
 
16698
16757
  // src/pages/member/MessagesPanel.tsx
16699
- import { Show as Show54, For as For39, Switch as Switch3, Match as Match3, createEffect as createEffect11, createSignal as createSignal36, on as on7 } from "solid-js";
16758
+ import { Show as Show54, For as For39, Switch as Switch4, Match as Match4, createEffect as createEffect11, createSignal as createSignal36, on as on7 } from "solid-js";
16700
16759
  import DOMPurify from "dompurify";
16701
16760
  function sanitizeMessageHtml(html) {
16702
16761
  return DOMPurify.sanitize(html, {
@@ -17531,17 +17590,17 @@ function MessagesPanel(props) {
17531
17590
  </div>
17532
17591
  <div class={`msg-panel__main${threadOpen() ? "" : " msg-panel__main--hidden-mobile"}`}>
17533
17592
  <Show54 when={composing()}>
17534
- <Switch3>
17535
- <Match3 when={composeStep() === "care"}>
17593
+ <Switch4>
17594
+ <Match4 when={composeStep() === "care"}>
17536
17595
  <NewCareTeamThread />
17537
- </Match3>
17538
- <Match3 when={composeStep() === "care-notice"}>
17596
+ </Match4>
17597
+ <Match4 when={composeStep() === "care-notice"}>
17539
17598
  <CareTeamNotice />
17540
- </Match3>
17541
- <Match3 when={composeStep() === "support"}>
17599
+ </Match4>
17600
+ <Match4 when={composeStep() === "support"}>
17542
17601
  <NewSupportThread />
17543
- </Match3>
17544
- </Switch3>
17602
+ </Match4>
17603
+ </Switch4>
17545
17604
  </Show54>
17546
17605
  <Show54 when={!composing()}>
17547
17606
  <Show54
@@ -17844,11 +17903,11 @@ function MemberPortal(props) {
17844
17903
  </button>
17845
17904
  </div>}
17846
17905
  >
17847
- <Switch4 fallback={<TrackerTab />}>
17848
- <Match4 when={tab() === "instructions" && guide()}>
17906
+ <Switch5 fallback={<TrackerTab />}>
17907
+ <Match5 when={tab() === "instructions" && guide()}>
17849
17908
  {(g) => <MedicationGuide guide={g()} currentDose={currentDose()} />}
17850
- </Match4>
17851
- <Match4 when={tab() === "plan"}>
17909
+ </Match5>
17910
+ <Match5 when={tab() === "plan"}>
17852
17911
  <PlanBilling
17853
17912
  subscriptions={data.subscriptions()}
17854
17913
  brandName={props.brand.name}
@@ -17858,11 +17917,11 @@ function MemberPortal(props) {
17858
17917
  onOpenMessages={openMessages}
17859
17918
  messagingEnabled={messagingEnabled()}
17860
17919
  />
17861
- </Match4>
17862
- <Match4 when={tab() === "history" && props.surveyHistory}>
17920
+ </Match5>
17921
+ <Match5 when={tab() === "history" && props.surveyHistory}>
17863
17922
  <SurveyHistory />
17864
- </Match4>
17865
- <Match4 when={tab() === "account"}>
17923
+ </Match5>
17924
+ <Match5 when={tab() === "account"}>
17866
17925
  <AccountPanel
17867
17926
  member={data.member()}
17868
17927
  legalLinks={props.legalLinks}
@@ -17870,11 +17929,11 @@ function MemberPortal(props) {
17870
17929
  onOpenMessages={openMessages}
17871
17930
  messagingEnabled={messagingEnabled()}
17872
17931
  />
17873
- </Match4>
17874
- <Match4 when={tab() === "messages"}>
17932
+ </Match5>
17933
+ <Match5 when={tab() === "messages"}>
17875
17934
  <MessagesPanel thread={messages} intent={intent()} />
17876
- </Match4>
17877
- </Switch4>
17935
+ </Match5>
17936
+ </Switch5>
17878
17937
  </Show56>
17879
17938
  </Show56>;
17880
17939
  return <main
@@ -17946,7 +18005,7 @@ function MemberPortal(props) {
17946
18005
  }
17947
18006
 
17948
18007
  // src/pages/AffiliatePortal.tsx
17949
- import { createEffect as createEffect12, createSignal as createSignal40, Match as Match5, Show as Show62, Switch as Switch5, For as For46 } from "solid-js";
18008
+ import { createEffect as createEffect12, createSignal as createSignal40, Match as Match6, Show as Show62, Switch as Switch6, For as For46 } from "solid-js";
17950
18009
 
17951
18010
  // src/pages/affiliate/Overview.tsx
17952
18011
  import { Show as Show57, For as For42 } from "solid-js";
@@ -18632,23 +18691,23 @@ function AffiliatePortal(props) {
18632
18691
  </aside>
18633
18692
 
18634
18693
  <div class="app-affiliate-content">
18635
- <Switch5 fallback={<AffiliateOverview />}>
18636
- <Match5 when={currentTab() === "overview"}>
18694
+ <Switch6 fallback={<AffiliateOverview />}>
18695
+ <Match6 when={currentTab() === "overview"}>
18637
18696
  <AffiliateOverview />
18638
- </Match5>
18639
- <Match5 when={currentTab() === "conversions"}>
18697
+ </Match6>
18698
+ <Match6 when={currentTab() === "conversions"}>
18640
18699
  <AffiliateConversions />
18641
- </Match5>
18642
- <Match5 when={currentTab() === "downline"}>
18700
+ </Match6>
18701
+ <Match6 when={currentTab() === "downline"}>
18643
18702
  <AffiliateDownline />
18644
- </Match5>
18645
- <Match5 when={currentTab() === "referral"}>
18703
+ </Match6>
18704
+ <Match6 when={currentTab() === "referral"}>
18646
18705
  <AffiliateReferralLink />
18647
- </Match5>
18648
- <Match5 when={currentTab() === "settings"}>
18706
+ </Match6>
18707
+ <Match6 when={currentTab() === "settings"}>
18649
18708
  <AffiliateSettings />
18650
- </Match5>
18651
- </Switch5>
18709
+ </Match6>
18710
+ </Switch6>
18652
18711
  </div>
18653
18712
  </div>
18654
18713
  </Show62>;
@@ -19842,4 +19901,4 @@ export {
19842
19901
  AffiliateForgotPassword,
19843
19902
  AffiliateResetPassword
19844
19903
  };
19845
- //# sourceMappingURL=SSVJ27MR.jsx.map
19904
+ //# sourceMappingURL=7ENL3GYZ.jsx.map