@apextelemed/partner-core 0.17.0-dev.52 → 0.17.0-dev.54
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 +28 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +3 -3
- package/dist/api/index.jsx +5 -3
- package/dist/chunk/{37UEVJEC.jsx → BI7NBPCA.jsx} +30 -1
- package/dist/chunk/{IQDVS3XA.jsx → CAG35QKZ.jsx} +5 -5
- package/dist/chunk/{TLDELI22.jsx → DC24EAWT.jsx} +11 -5
- package/dist/chunk/{2HDMTWLH.js → F5PDIE2J.js} +6 -6
- package/dist/chunk/{2HDMTWLH.js.map → F5PDIE2J.js.map} +1 -1
- package/dist/chunk/{5HQAA4UO.jsx → HXBRBHFR.jsx} +2 -2
- package/dist/chunk/{BYDMO5RM.js → MQRPGAH7.js} +12 -6
- package/dist/chunk/MQRPGAH7.js.map +1 -0
- package/dist/chunk/{RDZDD5UW.js → MUNFWRXF.js} +31 -3
- package/dist/chunk/MUNFWRXF.js.map +1 -0
- package/dist/chunk/{FTZ52PMM.jsx → P3TJ6ALH.jsx} +2 -2
- package/dist/chunk/{BJXD2NQQ.jsx → Q2L3CZPR.jsx} +2 -2
- package/dist/chunk/{T37L6JE6.jsx → VUDLDIMS.jsx} +1313 -831
- package/dist/chunk/{6V7RVUXX.js → WTQ63KR4.js} +3 -3
- package/dist/chunk/{6V7RVUXX.js.map → WTQ63KR4.js.map} +1 -1
- package/dist/chunk/{FXRGPBYU.js → XDRP4X2N.js} +3 -3
- package/dist/chunk/{FXRGPBYU.js.map → XDRP4X2N.js.map} +1 -1
- package/dist/chunk/{A6FJGQIS.js → XI4OZ4SZ.js} +3 -3
- package/dist/chunk/{A6FJGQIS.js.map → XI4OZ4SZ.js.map} +1 -1
- package/dist/chunk/{O7H7DAWO.js → Z5QDFCLZ.js} +1242 -765
- package/dist/chunk/Z5QDFCLZ.js.map +1 -0
- package/dist/{client-BLh8hFAu.d.ts → client-BH1wq2Pp.d.ts} +79 -2
- package/dist/flows/index.d.ts +12 -3
- package/dist/flows/index.js +6 -6
- package/dist/flows/index.jsx +6 -6
- package/dist/index/index.d.ts +2 -2
- package/dist/index/index.js +7 -7
- package/dist/index/index.jsx +11 -7
- package/dist/pages/index.d.ts +29 -3
- package/dist/pages/index.js +5 -5
- package/dist/pages/index.jsx +7 -5
- package/dist/stores/index.d.ts +1 -1
- package/dist/stores/index.js +2 -2
- package/dist/stores/index.jsx +2 -2
- package/package.json +1 -1
- package/dist/chunk/BYDMO5RM.js.map +0 -1
- package/dist/chunk/O7H7DAWO.js.map +0 -1
- package/dist/chunk/RDZDD5UW.js.map +0 -1
|
@@ -84,10 +84,10 @@ import {
|
|
|
84
84
|
useSurveyV2Flow,
|
|
85
85
|
useUpdatePaymentMethodFlow,
|
|
86
86
|
visibleWarnings
|
|
87
|
-
} from "./
|
|
87
|
+
} from "./DC24EAWT.jsx";
|
|
88
88
|
import {
|
|
89
89
|
fetchFunnelConfig
|
|
90
|
-
} from "./
|
|
90
|
+
} from "./HXBRBHFR.jsx";
|
|
91
91
|
import {
|
|
92
92
|
usePrimitives
|
|
93
93
|
} from "./J63XPQP4.jsx";
|
|
@@ -95,8 +95,9 @@ import {
|
|
|
95
95
|
affiliateAuth_default,
|
|
96
96
|
auth_default,
|
|
97
97
|
cart_default
|
|
98
|
-
} from "./
|
|
98
|
+
} from "./Q2L3CZPR.jsx";
|
|
99
99
|
import {
|
|
100
|
+
ADMIN_ROLES,
|
|
100
101
|
ApiError,
|
|
101
102
|
SUPPORT_ATTACHMENT_MAX_BYTES,
|
|
102
103
|
SUPPORT_ATTACHMENT_MIME_TYPES,
|
|
@@ -111,7 +112,7 @@ import {
|
|
|
111
112
|
offersApi,
|
|
112
113
|
subscriptionsApi,
|
|
113
114
|
usersApi
|
|
114
|
-
} from "./
|
|
115
|
+
} from "./BI7NBPCA.jsx";
|
|
115
116
|
|
|
116
117
|
// src/pages/Survey.tsx
|
|
117
118
|
import { Show, For, createEffect, on } from "solid-js";
|
|
@@ -4107,7 +4108,7 @@ var US_STATES3 = [
|
|
|
4107
4108
|
var US_STATE_OPTIONS3 = US_STATES3.map((s) => ({ value: s, label: s }));
|
|
4108
4109
|
|
|
4109
4110
|
// src/pages/AdminDashboard.tsx
|
|
4110
|
-
import { createEffect as createEffect16, createSignal as
|
|
4111
|
+
import { createEffect as createEffect16, createSignal as createSignal44, ErrorBoundary, Match as Match5, Show as Show62, Switch as Switch5, For as For48 } from "solid-js";
|
|
4111
4112
|
|
|
4112
4113
|
// src/pages/admin/Affiliates.tsx
|
|
4113
4114
|
import { createSignal as createSignal10, For as For14, Match, Switch } from "solid-js";
|
|
@@ -9908,10 +9909,10 @@ function Categories() {
|
|
|
9908
9909
|
}
|
|
9909
9910
|
|
|
9910
9911
|
// src/pages/admin/Customers.tsx
|
|
9911
|
-
import { createSignal as
|
|
9912
|
+
import { createSignal as createSignal21, onCleanup, onMount, Show as Show35 } from "solid-js";
|
|
9912
9913
|
|
|
9913
9914
|
// src/pages/admin/customers/CustomerDetail.tsx
|
|
9914
|
-
import { createMemo as createMemo9, createResource as createResource10, createSignal as
|
|
9915
|
+
import { createMemo as createMemo9, createResource as createResource10, createSignal as createSignal19, For as For22, Show as Show33 } from "solid-js";
|
|
9915
9916
|
|
|
9916
9917
|
// src/pages/admin/adminNav.ts
|
|
9917
9918
|
import { createContext, useContext } from "solid-js";
|
|
@@ -10948,6 +10949,14 @@ function SupportSummary(props) {
|
|
|
10948
10949
|
</Show32>;
|
|
10949
10950
|
}
|
|
10950
10951
|
|
|
10952
|
+
// src/pages/admin/adminRoleState.ts
|
|
10953
|
+
import { createSignal as createSignal18 } from "solid-js";
|
|
10954
|
+
var [adminMe, setAdminMe] = createSignal18(void 0);
|
|
10955
|
+
function adminCan(permission) {
|
|
10956
|
+
const me = adminMe();
|
|
10957
|
+
return me ? me.permissions.includes(permission) : true;
|
|
10958
|
+
}
|
|
10959
|
+
|
|
10951
10960
|
// src/pages/admin/customers/CustomerDetail.tsx
|
|
10952
10961
|
var TIMELINE_PREVIEW = 30;
|
|
10953
10962
|
function scrollTo(id) {
|
|
@@ -10956,7 +10965,7 @@ function scrollTo(id) {
|
|
|
10956
10965
|
}
|
|
10957
10966
|
function CustomerDetail(props) {
|
|
10958
10967
|
const nav = useAdminNav();
|
|
10959
|
-
const [loadError, setLoadError] =
|
|
10968
|
+
const [loadError, setLoadError] = createSignal19(null);
|
|
10960
10969
|
const [overview, { refetch }] = createResource10(
|
|
10961
10970
|
() => props.uid,
|
|
10962
10971
|
async (uid) => {
|
|
@@ -10969,15 +10978,15 @@ function CustomerDetail(props) {
|
|
|
10969
10978
|
}
|
|
10970
10979
|
}
|
|
10971
10980
|
);
|
|
10972
|
-
const [busy, setBusy] =
|
|
10973
|
-
const [editingEmail, setEditingEmail] =
|
|
10974
|
-
const [emailDraft, setEmailDraft] =
|
|
10975
|
-
const [savingEmail, setSavingEmail] =
|
|
10976
|
-
const [amountFor, setAmountFor] =
|
|
10977
|
-
const [scheduleFor, setScheduleFor] =
|
|
10978
|
-
const [refundFor, setRefundFor] =
|
|
10979
|
-
const [resolveTarget, setResolveTarget] =
|
|
10980
|
-
const [allTimeline, setAllTimeline] =
|
|
10981
|
+
const [busy, setBusy] = createSignal19(null);
|
|
10982
|
+
const [editingEmail, setEditingEmail] = createSignal19(false);
|
|
10983
|
+
const [emailDraft, setEmailDraft] = createSignal19("");
|
|
10984
|
+
const [savingEmail, setSavingEmail] = createSignal19(false);
|
|
10985
|
+
const [amountFor, setAmountFor] = createSignal19(null);
|
|
10986
|
+
const [scheduleFor, setScheduleFor] = createSignal19(null);
|
|
10987
|
+
const [refundFor, setRefundFor] = createSignal19(null);
|
|
10988
|
+
const [resolveTarget, setResolveTarget] = createSignal19(null);
|
|
10989
|
+
const [allTimeline, setAllTimeline] = createSignal19(false);
|
|
10981
10990
|
const o = () => overview() ?? null;
|
|
10982
10991
|
const customerName = (ov) => [ov.customer.firstName, ov.customer.lastName].filter(Boolean).join(" ").trim() || ov.customer.email;
|
|
10983
10992
|
const liveSubs = () => (o()?.subscriptions ?? []).filter((s) => LIVE_SUBSCRIPTION_STATUSES.has(s.status));
|
|
@@ -11336,7 +11345,8 @@ function CustomerDetail(props) {
|
|
|
11336
11345
|
<Section
|
|
11337
11346
|
title="Prescriptions"
|
|
11338
11347
|
count={ov().requests.items.length}
|
|
11339
|
-
action={<
|
|
11348
|
+
action={<Show33 when={adminCan("patient.support")}>
|
|
11349
|
+
<button
|
|
11340
11350
|
type="button"
|
|
11341
11351
|
onClick={handleCancelUnapprovedRequests}
|
|
11342
11352
|
disabled={busy() === "cancel-requests"}
|
|
@@ -11344,9 +11354,10 @@ function CustomerDetail(props) {
|
|
|
11344
11354
|
title="Cancel any prescription request still awaiting prescriber review. Approved and completed prescriptions are untouched."
|
|
11345
11355
|
>
|
|
11346
11356
|
{busy() === "cancel-requests" ? "Canceling\u2026" : pendingRequests().length > 0 ? `Cancel unapproved requests (${pendingRequests().length})` : "Cancel unapproved requests"}
|
|
11347
|
-
</button>
|
|
11357
|
+
</button>
|
|
11358
|
+
</Show33>}
|
|
11348
11359
|
>
|
|
11349
|
-
<Show33 when={ov().requests.items.length > 0} fallback={<p class="app-admin-text-muted" style={{ margin: 0, "font-size": "0.875rem" }}>No prescription requests
|
|
11360
|
+
<Show33 when={ov().requests.items.length > 0} fallback={<p class="app-admin-text-muted" style={{ margin: 0, "font-size": "0.875rem" }}>{ov().rxRedacted ? "Prescription details aren't shown for your admin role." : "No prescription requests."}</p>}>
|
|
11350
11361
|
<div class="app-admin-section-stack">
|
|
11351
11362
|
<For22 each={[...ov().requests.items].sort((a, b) => Date.parse(b.createdAt ?? "") - Date.parse(a.createdAt ?? ""))}>
|
|
11352
11363
|
{(r) => <RequestCard request={r} fulfillmentMode={ov().tenant.fulfillmentMode} />}
|
|
@@ -11463,7 +11474,7 @@ function CustomerDetail(props) {
|
|
|
11463
11474
|
}
|
|
11464
11475
|
|
|
11465
11476
|
// src/pages/admin/customers/CustomerList.tsx
|
|
11466
|
-
import { createMemo as createMemo10, createResource as createResource11, createSignal as
|
|
11477
|
+
import { createMemo as createMemo10, createResource as createResource11, createSignal as createSignal20, For as For23, Show as Show34 } from "solid-js";
|
|
11467
11478
|
var PAGE = 50;
|
|
11468
11479
|
function hint(row) {
|
|
11469
11480
|
const f = row.facts;
|
|
@@ -11497,13 +11508,13 @@ function rxLabel(status) {
|
|
|
11497
11508
|
return status.replace(/_/g, " ");
|
|
11498
11509
|
}
|
|
11499
11510
|
function CustomerList(props) {
|
|
11500
|
-
const [search, setSearch] =
|
|
11501
|
-
const [searchParam, setSearchParam] =
|
|
11502
|
-
const [lifecycle, setLifecycle] =
|
|
11503
|
-
const [savingsOnly, setSavingsOnly] =
|
|
11504
|
-
const [noIntakeOnly, setNoIntakeOnly] =
|
|
11505
|
-
const [extra, setExtra] =
|
|
11506
|
-
const [loadingMore, setLoadingMore] =
|
|
11511
|
+
const [search, setSearch] = createSignal20("");
|
|
11512
|
+
const [searchParam, setSearchParam] = createSignal20("");
|
|
11513
|
+
const [lifecycle, setLifecycle] = createSignal20(props.initialFilter ?? null);
|
|
11514
|
+
const [savingsOnly, setSavingsOnly] = createSignal20(false);
|
|
11515
|
+
const [noIntakeOnly, setNoIntakeOnly] = createSignal20(false);
|
|
11516
|
+
const [extra, setExtra] = createSignal20([]);
|
|
11517
|
+
const [loadingMore, setLoadingMore] = createSignal20(false);
|
|
11507
11518
|
let debounceTimer;
|
|
11508
11519
|
const onSearch = (val) => {
|
|
11509
11520
|
setSearch(val);
|
|
@@ -11534,7 +11545,7 @@ function CustomerList(props) {
|
|
|
11534
11545
|
});
|
|
11535
11546
|
const rows = () => [...page()?.customers ?? [], ...extra()];
|
|
11536
11547
|
const hasMore = () => extra().length > 0 ? lastHasMore() : page()?.hasMore ?? false;
|
|
11537
|
-
const [lastHasMore, setLastHasMore] =
|
|
11548
|
+
const [lastHasMore, setLastHasMore] = createSignal20(false);
|
|
11538
11549
|
const loadMore = async () => {
|
|
11539
11550
|
setLoadingMore(true);
|
|
11540
11551
|
try {
|
|
@@ -11725,7 +11736,7 @@ function onCustomerUrlChange(handler) {
|
|
|
11725
11736
|
// src/pages/admin/Customers.tsx
|
|
11726
11737
|
function Customers(props = {}) {
|
|
11727
11738
|
const controlled = () => props.activeUid !== void 0 || props.onSelectCustomer !== void 0;
|
|
11728
|
-
const [internalUid, setInternalUid] =
|
|
11739
|
+
const [internalUid, setInternalUid] = createSignal21(
|
|
11729
11740
|
controlled() ? null : props.initialUid ?? customerUidFromUrl()
|
|
11730
11741
|
);
|
|
11731
11742
|
const uid = () => props.activeUid !== void 0 ? props.activeUid : internalUid();
|
|
@@ -11913,13 +11924,13 @@ function RecurringRevenue(props) {
|
|
|
11913
11924
|
}
|
|
11914
11925
|
|
|
11915
11926
|
// src/pages/admin/Payments.tsx
|
|
11916
|
-
import { createResource as createResource14, createSignal as
|
|
11927
|
+
import { createResource as createResource14, createSignal as createSignal23, For as For25, Show as Show38 } from "solid-js";
|
|
11917
11928
|
|
|
11918
11929
|
// src/pages/admin/QuickBooksCard.tsx
|
|
11919
|
-
import { createResource as createResource13, createSignal as
|
|
11930
|
+
import { createResource as createResource13, createSignal as createSignal22, Show as Show37, onMount as onMount2 } from "solid-js";
|
|
11920
11931
|
function QuickBooksCard() {
|
|
11921
11932
|
const [status, { refetch }] = createResource13(() => adminApi.quickbooksStatus().catch(() => null));
|
|
11922
|
-
const [connecting, setConnecting] =
|
|
11933
|
+
const [connecting, setConnecting] = createSignal22(false);
|
|
11923
11934
|
onMount2(() => {
|
|
11924
11935
|
const params = new URLSearchParams(window.location.search);
|
|
11925
11936
|
const result = params.get("quickbooks");
|
|
@@ -11980,7 +11991,7 @@ function QuickBooksCard() {
|
|
|
11980
11991
|
// src/pages/admin/Payments.tsx
|
|
11981
11992
|
function Payments() {
|
|
11982
11993
|
const nav = useAdminNav();
|
|
11983
|
-
const [refreshKey, setRefreshKey] =
|
|
11994
|
+
const [refreshKey, setRefreshKey] = createSignal23(0);
|
|
11984
11995
|
const [payments] = createResource14(refreshKey, async () => {
|
|
11985
11996
|
try {
|
|
11986
11997
|
const res = await adminApi.getPayments({ limit: 50 });
|
|
@@ -11989,8 +12000,8 @@ function Payments() {
|
|
|
11989
12000
|
return [];
|
|
11990
12001
|
}
|
|
11991
12002
|
});
|
|
11992
|
-
const [refundFor, setRefundFor] =
|
|
11993
|
-
const [loadingRefund, setLoadingRefund] =
|
|
12003
|
+
const [refundFor, setRefundFor] = createSignal23(null);
|
|
12004
|
+
const [loadingRefund, setLoadingRefund] = createSignal23(null);
|
|
11994
12005
|
const openRefund = async (payment) => {
|
|
11995
12006
|
setLoadingRefund(payment.id);
|
|
11996
12007
|
let liveSubs = [];
|
|
@@ -12133,7 +12144,7 @@ function Payments() {
|
|
|
12133
12144
|
}
|
|
12134
12145
|
|
|
12135
12146
|
// src/pages/admin/Products.tsx
|
|
12136
|
-
import { createEffect as createEffect12, createMemo as createMemo15, createResource as createResource15, createSignal as
|
|
12147
|
+
import { createEffect as createEffect12, createMemo as createMemo15, createResource as createResource15, createSignal as createSignal28, For as For31, on as on7, Show as Show44, untrack as untrack2 } from "solid-js";
|
|
12137
12148
|
|
|
12138
12149
|
// src/pages/admin/_apexDrugs.ts
|
|
12139
12150
|
var TTL_MS = 5 * 60 * 1e3;
|
|
@@ -12161,7 +12172,7 @@ function clearApexDrugCache() {
|
|
|
12161
12172
|
}
|
|
12162
12173
|
|
|
12163
12174
|
// src/pages/admin/ProductCellEditors.tsx
|
|
12164
|
-
import { createEffect as createEffect8, createMemo as createMemo11, createSignal as
|
|
12175
|
+
import { createEffect as createEffect8, createMemo as createMemo11, createSignal as createSignal24, For as For26, onCleanup as onCleanup2, Show as Show39 } from "solid-js";
|
|
12165
12176
|
import { Portal } from "solid-js/web";
|
|
12166
12177
|
var SLUG_RE2 = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
12167
12178
|
function slugify2(value) {
|
|
@@ -12172,7 +12183,7 @@ function CellPopover(props) {
|
|
|
12172
12183
|
const opener = props.anchor;
|
|
12173
12184
|
const resolveAnchor = props.resolveAnchor;
|
|
12174
12185
|
const anchor = () => opener.isConnected ? opener : resolveAnchor?.() ?? opener;
|
|
12175
|
-
const [pos, setPos] =
|
|
12186
|
+
const [pos, setPos] = createSignal24({ top: 0, left: 0 });
|
|
12176
12187
|
const place = () => {
|
|
12177
12188
|
const r = anchor().getBoundingClientRect();
|
|
12178
12189
|
const w = card?.offsetWidth ?? 300;
|
|
@@ -12234,7 +12245,7 @@ var parseMoney = (s) => {
|
|
|
12234
12245
|
return Number.isFinite(n) && n >= 0 ? n : "invalid";
|
|
12235
12246
|
};
|
|
12236
12247
|
function PricePopover(props) {
|
|
12237
|
-
const [base, setBase] =
|
|
12248
|
+
const [base, setBase] = createSignal24(props.product.price != null ? String(props.product.price) : "");
|
|
12238
12249
|
const catalogRows = () => props.product.catalogOverlay ? buildStrengthRows(props.product, null).filter((r) => r.active) : null;
|
|
12239
12250
|
const perDose = () => props.product.pricingMode !== "flat_fee" && (catalogRows() ? catalogRows().length > 0 : (props.drug?.dosages?.length ?? 0) !== 1);
|
|
12240
12251
|
const initialRows = () => {
|
|
@@ -12244,9 +12255,9 @@ function PricePopover(props) {
|
|
|
12244
12255
|
if (existing.length > 0) return existing.map((dp) => ({ dosage: dp.dosage, price: dp.price != null ? String(dp.price) : "" }));
|
|
12245
12256
|
return (props.drug?.dosages ?? []).map((d) => ({ dosage: d, price: "" }));
|
|
12246
12257
|
};
|
|
12247
|
-
const [rows, setRows] =
|
|
12248
|
-
const [error, setError] =
|
|
12249
|
-
const [saving, setSaving] =
|
|
12258
|
+
const [rows, setRows] = createSignal24(initialRows());
|
|
12259
|
+
const [error, setError] = createSignal24("");
|
|
12260
|
+
const [saving, setSaving] = createSignal24(false);
|
|
12250
12261
|
const save = async () => {
|
|
12251
12262
|
const b = parseMoney(base());
|
|
12252
12263
|
if (b === "invalid") return setError("Enter a price of 0 or more.");
|
|
@@ -12355,11 +12366,11 @@ function PricePopover(props) {
|
|
|
12355
12366
|
</CellPopover>;
|
|
12356
12367
|
}
|
|
12357
12368
|
function CategoriesPopover(props) {
|
|
12358
|
-
const [selected, setSelected] =
|
|
12359
|
-
const [pending, setPending] =
|
|
12360
|
-
const [newName, setNewName] =
|
|
12361
|
-
const [error, setError] =
|
|
12362
|
-
const [creating, setCreating] =
|
|
12369
|
+
const [selected, setSelected] = createSignal24(props.product.categories ?? []);
|
|
12370
|
+
const [pending, setPending] = createSignal24(null);
|
|
12371
|
+
const [newName, setNewName] = createSignal24("");
|
|
12372
|
+
const [error, setError] = createSignal24("");
|
|
12373
|
+
const [creating, setCreating] = createSignal24(false);
|
|
12363
12374
|
const known = createMemo11(() => new Set(props.categories.map((c) => c.id)));
|
|
12364
12375
|
const toggle = async (id) => {
|
|
12365
12376
|
const next = selected().includes(id) ? selected().filter((x) => x !== id) : [...selected(), id];
|
|
@@ -12456,10 +12467,10 @@ function CategoriesPopover(props) {
|
|
|
12456
12467
|
}
|
|
12457
12468
|
|
|
12458
12469
|
// src/pages/admin/ProductCatalogSections.tsx
|
|
12459
|
-
import { createMemo as createMemo13, createSignal as
|
|
12470
|
+
import { createMemo as createMemo13, createSignal as createSignal26, For as For28, onMount as onMount3, Show as Show41 } from "solid-js";
|
|
12460
12471
|
|
|
12461
12472
|
// src/pages/admin/ProductPharmacies.tsx
|
|
12462
|
-
import { createEffect as createEffect9, createMemo as createMemo12, createSignal as
|
|
12473
|
+
import { createEffect as createEffect9, createMemo as createMemo12, createSignal as createSignal25, For as For27, Index, Match as Match2, onCleanup as onCleanup3, Show as Show40, Switch as Switch2 } from "solid-js";
|
|
12463
12474
|
var hint2 = { "font-size": "0.6875rem", color: "var(--app-admin-fg-muted)", margin: "0 0 0.625rem", "line-height": 1.4 };
|
|
12464
12475
|
var UNSAVED_HINT = "Save or discard your changes first.";
|
|
12465
12476
|
function AddPharmacyButton(props) {
|
|
@@ -12476,7 +12487,7 @@ function AddPharmacyButton(props) {
|
|
|
12476
12487
|
}
|
|
12477
12488
|
function AddPharmacyPicker(props) {
|
|
12478
12489
|
const flow = props.flow;
|
|
12479
|
-
const [filter, setFilter] =
|
|
12490
|
+
const [filter, setFilter] = createSignal25("");
|
|
12480
12491
|
const groups = createMemo12(() => {
|
|
12481
12492
|
const q = filter().trim().toLowerCase();
|
|
12482
12493
|
return groupDrugsByPharmacy(flow.drugs(), props.excludedPharmacyIds).map((g) => ({ ...g, drugs: q ? g.drugs.filter((d) => `${d.name} ${g.pharmacyName}`.toLowerCase().includes(q)) : g.drugs })).filter((g) => g.drugs.length > 0);
|
|
@@ -12589,7 +12600,7 @@ function MatchQuestion(props) {
|
|
|
12589
12600
|
{n()} subscriber{n() === 1 ? "" : "s"}
|
|
12590
12601
|
</strong>{" "}
|
|
12591
12602
|
{n() === 1 ? "is" : "are"} on <strong>{name()}</strong>
|
|
12592
|
-
<Show40 when={q().price != null}> — {fmtPrice(q().price)}</Show40>. Which strength is that now?
|
|
12603
|
+
<Show40 when={!props.flatFee && q().price != null}> — {fmtPrice(q().price)}</Show40>. Which strength is that now?
|
|
12593
12604
|
</span>
|
|
12594
12605
|
</span>
|
|
12595
12606
|
<select
|
|
@@ -12599,7 +12610,7 @@ function MatchQuestion(props) {
|
|
|
12599
12610
|
onChange={(e) => props.flow.setMatchAnswer(q().source, e.currentTarget.value === "" ? null : e.currentTarget.value)}
|
|
12600
12611
|
>
|
|
12601
12612
|
<option value="" selected={answer() === ""}>
|
|
12602
|
-
Leave for review
|
|
12613
|
+
{props.flatFee ? "Not matched" : "Leave for review"}
|
|
12603
12614
|
</option>
|
|
12604
12615
|
<For27 each={props.options}>
|
|
12605
12616
|
{(o) => <option value={o.doseId} selected={answer() === o.doseId}>
|
|
@@ -12687,18 +12698,26 @@ function Review(props) {
|
|
|
12687
12698
|
<Show40 when={(p().matchQuestions ?? []).length > 0}>
|
|
12688
12699
|
<div data-testid="add-pharmacy-match">
|
|
12689
12700
|
<h4 class="app-admin-label" style={{ margin: "0 0 0.5rem" }}>
|
|
12690
|
-
Subscribers on strengths that changed
|
|
12701
|
+
Subscribers on strengths that changed{p().flatFee ? " (optional)" : ""}
|
|
12691
12702
|
</h4>
|
|
12692
12703
|
<ul class="app-admin-catalog-list" style={{ margin: 0 }}>
|
|
12693
12704
|
<Index each={p().matchQuestions}>
|
|
12694
12705
|
{(q) => <li class="app-admin-catalog-row" data-testid="add-pharmacy-match-row">
|
|
12695
|
-
<MatchQuestion flow={flow} question={q()} options={p().doseOptions ?? []} />
|
|
12706
|
+
<MatchQuestion flow={flow} question={q()} options={p().doseOptions ?? []} flatFee={p().flatFee === true} />
|
|
12696
12707
|
</li>}
|
|
12697
12708
|
</Index>
|
|
12698
12709
|
</ul>
|
|
12699
12710
|
<p style={{ ...hint2, margin: "0.5rem 0 0" }} class="app-admin-text-muted">
|
|
12700
|
-
|
|
12701
|
-
|
|
12711
|
+
<Show40
|
|
12712
|
+
when={p().flatFee}
|
|
12713
|
+
fallback={<>
|
|
12714
|
+
Picking a strength keeps these subscribers’ refills on it and carries the old price over. Left for review,
|
|
12715
|
+
their refills still go out but are flagged for a person to check. You can change this later on the product.
|
|
12716
|
+
</>}
|
|
12717
|
+
>
|
|
12718
|
+
This product charges one price, so this doesn’t affect refills today. It’s used if you switch to per-strength
|
|
12719
|
+
pricing, and you can change it later on the product.
|
|
12720
|
+
</Show40>
|
|
12702
12721
|
</p>
|
|
12703
12722
|
<Show40 when={flow.replanning()}>
|
|
12704
12723
|
<p style={{ ...hint2, margin: "0.25rem 0 0" }} role="status" aria-live="polite" data-testid="add-pharmacy-replanning">
|
|
@@ -13003,10 +13022,10 @@ function StrengthsSection(props) {
|
|
|
13003
13022
|
const resolved = createMemo13(() => resolveStrengthPrices(ed.rows(), ed.priceDrafts(), props.basePrice, props.flatFee));
|
|
13004
13023
|
const invalid = createMemo13(() => new Set(invalidDraftKeys(ed.priceDrafts())));
|
|
13005
13024
|
const clinical = () => ed.item()?.doseModel === "clinical";
|
|
13006
|
-
const [label3, setLabel] =
|
|
13007
|
-
const [value, setValue] =
|
|
13008
|
-
const [unit, setUnit] =
|
|
13009
|
-
const [price, setPrice] =
|
|
13025
|
+
const [label3, setLabel] = createSignal26("");
|
|
13026
|
+
const [value, setValue] = createSignal26("");
|
|
13027
|
+
const [unit, setUnit] = createSignal26("");
|
|
13028
|
+
const [price, setPrice] = createSignal26("");
|
|
13010
13029
|
const submitAdd = async (e) => {
|
|
13011
13030
|
e.preventDefault();
|
|
13012
13031
|
const out = await ed.addStrength({
|
|
@@ -13022,7 +13041,7 @@ function StrengthsSection(props) {
|
|
|
13022
13041
|
setPrice("");
|
|
13023
13042
|
}
|
|
13024
13043
|
};
|
|
13025
|
-
const [picked, setPicked] =
|
|
13044
|
+
const [picked, setPicked] = createSignal26(/* @__PURE__ */ new Set());
|
|
13026
13045
|
const togglePicked = (i) => setPicked((prev) => {
|
|
13027
13046
|
const next = new Set(prev);
|
|
13028
13047
|
if (next.has(i)) next.delete(i);
|
|
@@ -13599,19 +13618,19 @@ function ReadinessSection(props) {
|
|
|
13599
13618
|
</section>;
|
|
13600
13619
|
}
|
|
13601
13620
|
function NewCatalogProductDialog(props) {
|
|
13602
|
-
const [mode, setMode] =
|
|
13603
|
-
const [drugs, setDrugs] =
|
|
13604
|
-
const [drugsError, setDrugsError] =
|
|
13605
|
-
const [filter, setFilter] =
|
|
13606
|
-
const [drugId, setDrugId] =
|
|
13607
|
-
const [name, setName] =
|
|
13608
|
-
const [classification, setClassification] =
|
|
13609
|
-
const [doseModel, setDoseModel] =
|
|
13610
|
-
const [description, setDescription] =
|
|
13611
|
-
const [submitting, setSubmitting] =
|
|
13612
|
-
const [error, setError] =
|
|
13613
|
-
const [pending, setPending] =
|
|
13614
|
-
const [locked, setLocked] =
|
|
13621
|
+
const [mode, setMode] = createSignal26("from_drug");
|
|
13622
|
+
const [drugs, setDrugs] = createSignal26(null);
|
|
13623
|
+
const [drugsError, setDrugsError] = createSignal26("");
|
|
13624
|
+
const [filter, setFilter] = createSignal26("");
|
|
13625
|
+
const [drugId, setDrugId] = createSignal26("");
|
|
13626
|
+
const [name, setName] = createSignal26("");
|
|
13627
|
+
const [classification, setClassification] = createSignal26("non-controlled");
|
|
13628
|
+
const [doseModel, setDoseModel] = createSignal26("clinical");
|
|
13629
|
+
const [description, setDescription] = createSignal26("");
|
|
13630
|
+
const [submitting, setSubmitting] = createSignal26(false);
|
|
13631
|
+
const [error, setError] = createSignal26("");
|
|
13632
|
+
const [pending, setPending] = createSignal26(null);
|
|
13633
|
+
const [locked, setLocked] = createSignal26(false);
|
|
13615
13634
|
onMount3(async () => {
|
|
13616
13635
|
try {
|
|
13617
13636
|
setDrugs((await adminCatalogApi.listDrugs()).drugs ?? []);
|
|
@@ -13836,7 +13855,8 @@ function NewCatalogProductDialog(props) {
|
|
|
13836
13855
|
import { createEffect as createEffect10, For as For29, onMount as onMount4, Show as Show42 } from "solid-js";
|
|
13837
13856
|
var hint4 = { "font-size": "0.6875rem", color: "var(--app-admin-fg-muted)", margin: "0 0 0.625rem", "line-height": 1.4 };
|
|
13838
13857
|
var idPart = (s) => s.replace(/[^A-Za-z0-9_-]/g, "_");
|
|
13839
|
-
var optionLabel = (o) => `${o.label} \u2014 ${o.price == null ? "no price yet" : fmtPrice(o.price)}`;
|
|
13858
|
+
var optionLabel = (o, flatFee) => flatFee ? o.label : `${o.label} \u2014 ${o.price == null ? "no price yet" : fmtPrice(o.price)}`;
|
|
13859
|
+
var FLAT_FEE_MATCH_NOTE = "This product charges one price, so this doesn't affect refills today. It's used if you switch to per-strength pricing.";
|
|
13840
13860
|
function refocus(el) {
|
|
13841
13861
|
queueMicrotask(() => {
|
|
13842
13862
|
if (!el || !el.isConnected) return;
|
|
@@ -13882,6 +13902,7 @@ function MatchRow(props) {
|
|
|
13882
13902
|
const flow = props.flow;
|
|
13883
13903
|
const row = () => flow.rows().find((r) => r.dosage === props.dosage);
|
|
13884
13904
|
const n = () => row()?.subscriberCount ?? 0;
|
|
13905
|
+
const flatFee = () => flow.flatFee();
|
|
13885
13906
|
const err = () => flow.errors()[props.dosage];
|
|
13886
13907
|
const errorId = () => `strength-match-error-${idPart(props.dosage)}`;
|
|
13887
13908
|
const decision = () => {
|
|
@@ -13901,13 +13922,23 @@ function MatchRow(props) {
|
|
|
13901
13922
|
return <li class="app-admin-catalog-row" data-testid="strength-match-row">
|
|
13902
13923
|
<div class="app-admin-catalog-row__main" style={{ "flex-wrap": "wrap" }}>
|
|
13903
13924
|
<span class="app-admin-catalog-row__title" style={{ "font-size": "0.875rem" }}>
|
|
13904
|
-
<
|
|
13905
|
-
|
|
13906
|
-
|
|
13907
|
-
|
|
13908
|
-
|
|
13909
|
-
|
|
13910
|
-
|
|
13925
|
+
<Show42
|
|
13926
|
+
when={!(flatFee() && n() === 0)}
|
|
13927
|
+
fallback={<span>
|
|
13928
|
+
<strong>{props.dosage}</strong> — no subscribers on it right now
|
|
13929
|
+
</span>}
|
|
13930
|
+
>
|
|
13931
|
+
<span>
|
|
13932
|
+
<strong>
|
|
13933
|
+
{n()} subscriber{n() === 1 ? "" : "s"}
|
|
13934
|
+
</strong>{" "}
|
|
13935
|
+
on <strong>{props.dosage}</strong>
|
|
13936
|
+
</span>
|
|
13937
|
+
</Show42>
|
|
13938
|
+
{
|
|
13939
|
+
/* Nothing is flagged for review on a flat-fee product, so there is nothing to badge. */
|
|
13940
|
+
}
|
|
13941
|
+
<Show42 when={!flatFee() && row() && isLeftForReview(row())}>
|
|
13911
13942
|
<span class="app-admin-badge app-admin-badge--warning">Needs review</span>
|
|
13912
13943
|
</Show42>
|
|
13913
13944
|
</span>
|
|
@@ -13922,8 +13953,8 @@ function MatchRow(props) {
|
|
|
13922
13953
|
void flow.setMatch(props.dosage, doseIdOf(e.currentTarget.value)).then(settle);
|
|
13923
13954
|
}}
|
|
13924
13955
|
>
|
|
13925
|
-
<option value="">Leave for review</option>
|
|
13926
|
-
<For29 each={flow.doseOptions()}>{(o) => <option value={o.doseId}>{optionLabel(o)}</option>}</For29>
|
|
13956
|
+
<option value="">{flatFee() ? "Not matched" : "Leave for review"}</option>
|
|
13957
|
+
<For29 each={flow.doseOptions()}>{(o) => <option value={o.doseId}>{optionLabel(o, flatFee())}</option>}</For29>
|
|
13927
13958
|
</select>
|
|
13928
13959
|
</div>
|
|
13929
13960
|
<Show42 when={decision()} keyed>
|
|
@@ -13975,8 +14006,18 @@ function StrengthMatchesSection(props) {
|
|
|
13975
14006
|
</h3>
|
|
13976
14007
|
</div>
|
|
13977
14008
|
<p style={hint4} id="strength-matches-hint">
|
|
13978
|
-
|
|
13979
|
-
|
|
14009
|
+
<Show42
|
|
14010
|
+
when={flow.flatFee()}
|
|
14011
|
+
fallback={<>
|
|
14012
|
+
Which strength each older strength is now. A change applies from each subscriber's next refill; refills already sent
|
|
14013
|
+
keep what they have. It doesn't change what any strength sells for.
|
|
14014
|
+
</>}
|
|
14015
|
+
>
|
|
14016
|
+
Which strength each older strength is now.{" "}
|
|
14017
|
+
<span class="app-admin-text-muted" data-testid="strength-matches-flat-fee-note">
|
|
14018
|
+
{FLAT_FEE_MATCH_NOTE}
|
|
14019
|
+
</span>
|
|
14020
|
+
</Show42>{" "}
|
|
13980
14021
|
<Show42 when={props.unsaved}>
|
|
13981
14022
|
<strong>{UNSAVED_HINT}</strong>
|
|
13982
14023
|
</Show42>
|
|
@@ -13998,7 +14039,7 @@ function StrengthMatchesSection(props) {
|
|
|
13998
14039
|
}
|
|
13999
14040
|
|
|
14000
14041
|
// src/pages/admin/CatalogConversion.tsx
|
|
14001
|
-
import { createEffect as createEffect11, createMemo as createMemo14, createSignal as
|
|
14042
|
+
import { createEffect as createEffect11, createMemo as createMemo14, createSignal as createSignal27, For as For30, Match as Match3, onCleanup as onCleanup4, Show as Show43, Switch as Switch3 } from "solid-js";
|
|
14002
14043
|
var hint5 = { "font-size": "0.75rem", color: "var(--app-admin-fg-muted)", margin: "0", "line-height": 1.4 };
|
|
14003
14044
|
var NONE = "__not_carried_over__";
|
|
14004
14045
|
function Finding2(props) {
|
|
@@ -14342,8 +14383,8 @@ function Confirm(props) {
|
|
|
14342
14383
|
</div>;
|
|
14343
14384
|
}
|
|
14344
14385
|
function UndoSection(props) {
|
|
14345
|
-
const [alsoOff, setAlsoOff] =
|
|
14346
|
-
const [asking, setAsking] =
|
|
14386
|
+
const [alsoOff, setAlsoOff] = createSignal27(false);
|
|
14387
|
+
const [asking, setAsking] = createSignal27(false);
|
|
14347
14388
|
const refusedEdits = () => props.flow.notice()?.code === "edited_since";
|
|
14348
14389
|
return <section class="app-admin-catalog-block" data-testid="conversion-undo" aria-labelledby="conversion-undo-title">
|
|
14349
14390
|
<h4 class="app-admin-label" id="conversion-undo-title" style={{ margin: "0 0 0.5rem" }}>
|
|
@@ -14492,7 +14533,7 @@ function UndoneReport(props) {
|
|
|
14492
14533
|
function CatalogConversionDialog(props) {
|
|
14493
14534
|
const flow = props.flow;
|
|
14494
14535
|
const kind = () => flow.state().kind;
|
|
14495
|
-
const [introSeen, setIntroSeen] =
|
|
14536
|
+
const [introSeen, setIntroSeen] = createSignal27(false);
|
|
14496
14537
|
createEffect11(() => {
|
|
14497
14538
|
if (kind() !== "committing" && kind() !== "watching") return;
|
|
14498
14539
|
const guard = (e) => {
|
|
@@ -14739,7 +14780,7 @@ function CatalogConversionDialog(props) {
|
|
|
14739
14780
|
</Modal>;
|
|
14740
14781
|
}
|
|
14741
14782
|
function CatalogConversionStatusSection(props) {
|
|
14742
|
-
const [open, setOpen] =
|
|
14783
|
+
const [open, setOpen] = createSignal27(false);
|
|
14743
14784
|
const flow = useCatalogConversion({
|
|
14744
14785
|
product: () => props.product,
|
|
14745
14786
|
enabled: () => !!props.product.catalogOverlay
|
|
@@ -14829,9 +14870,9 @@ function isPriced(product, offeredDoses = []) {
|
|
|
14829
14870
|
}
|
|
14830
14871
|
var isHeading = (row) => "heading" in row;
|
|
14831
14872
|
function ThumbnailUpload(props) {
|
|
14832
|
-
const [uploading, setUploading] =
|
|
14833
|
-
const [localUrl, setLocalUrl] =
|
|
14834
|
-
const [error, setError] =
|
|
14873
|
+
const [uploading, setUploading] = createSignal28(false);
|
|
14874
|
+
const [localUrl, setLocalUrl] = createSignal28(void 0);
|
|
14875
|
+
const [error, setError] = createSignal28("");
|
|
14835
14876
|
let fileInput;
|
|
14836
14877
|
createEffect12(() => {
|
|
14837
14878
|
void props.product.id;
|
|
@@ -14986,19 +15027,19 @@ function SkuSelectOptions(props) {
|
|
|
14986
15027
|
</>;
|
|
14987
15028
|
}
|
|
14988
15029
|
function ProductEditPanel(props) {
|
|
14989
|
-
const [name, setName] =
|
|
14990
|
-
const [description, setDescription] =
|
|
14991
|
-
const [price, setPrice] =
|
|
14992
|
-
const [priceError, setPriceError] =
|
|
15030
|
+
const [name, setName] = createSignal28("");
|
|
15031
|
+
const [description, setDescription] = createSignal28("");
|
|
15032
|
+
const [price, setPrice] = createSignal28("");
|
|
15033
|
+
const [priceError, setPriceError] = createSignal28("");
|
|
14993
15034
|
let priceInput;
|
|
14994
|
-
const [selectedCategoryIds, setSelectedCategoryIds] =
|
|
14995
|
-
const [pricingMode, setPricingMode] =
|
|
14996
|
-
const [benefits, setBenefits] =
|
|
14997
|
-
const [dosageOverride, setDosageOverride] =
|
|
14998
|
-
const [dosagePrices, setDosagePrices] =
|
|
14999
|
-
const [featured, setFeatured] =
|
|
15000
|
-
const [prescriberPicks, setPrescriberPicks] =
|
|
15001
|
-
const [productSkuId, setProductSkuId] =
|
|
15035
|
+
const [selectedCategoryIds, setSelectedCategoryIds] = createSignal28([]);
|
|
15036
|
+
const [pricingMode, setPricingMode] = createSignal28("per_dose");
|
|
15037
|
+
const [benefits, setBenefits] = createSignal28("");
|
|
15038
|
+
const [dosageOverride, setDosageOverride] = createSignal28("");
|
|
15039
|
+
const [dosagePrices, setDosagePrices] = createSignal28([]);
|
|
15040
|
+
const [featured, setFeatured] = createSignal28(false);
|
|
15041
|
+
const [prescriberPicks, setPrescriberPicks] = createSignal28(false);
|
|
15042
|
+
const [productSkuId, setProductSkuId] = createSignal28("");
|
|
15002
15043
|
const isCatalog = () => !!props.product.catalogOverlay;
|
|
15003
15044
|
const isPrescribed = () => !!props.product.prescribed || !!props.product.apexDrugId;
|
|
15004
15045
|
const handleAdded = (added) => props.onPharmacyAdded?.(added);
|
|
@@ -15086,7 +15127,7 @@ function ProductEditPanel(props) {
|
|
|
15086
15127
|
}
|
|
15087
15128
|
};
|
|
15088
15129
|
props.onDirtyProbe?.(() => buildUpdates() !== null);
|
|
15089
|
-
const [pristine, setPristine] =
|
|
15130
|
+
const [pristine, setPristine] = createSignal28("null");
|
|
15090
15131
|
createEffect12(
|
|
15091
15132
|
on7(
|
|
15092
15133
|
[() => props.product, () => props.apexDrug, () => props.apexLoading],
|
|
@@ -15785,17 +15826,17 @@ function ProductEditPanel(props) {
|
|
|
15785
15826
|
</div>;
|
|
15786
15827
|
}
|
|
15787
15828
|
function Products(props) {
|
|
15788
|
-
const [refreshKey, setRefreshKey] =
|
|
15789
|
-
const [editingProduct, setEditingProduct] =
|
|
15790
|
-
const [saving, setSaving] =
|
|
15791
|
-
const [pending, setPending] =
|
|
15829
|
+
const [refreshKey, setRefreshKey] = createSignal28(0);
|
|
15830
|
+
const [editingProduct, setEditingProduct] = createSignal28(null);
|
|
15831
|
+
const [saving, setSaving] = createSignal28(false);
|
|
15832
|
+
const [pending, setPending] = createSignal28(/* @__PURE__ */ new Set());
|
|
15792
15833
|
const setRowPending = (id, on10) => setPending((prev) => {
|
|
15793
15834
|
const next = new Set(prev);
|
|
15794
15835
|
if (on10) next.add(id);
|
|
15795
15836
|
else next.delete(id);
|
|
15796
15837
|
return next;
|
|
15797
15838
|
});
|
|
15798
|
-
const [opening, setOpening] =
|
|
15839
|
+
const [opening, setOpening] = createSignal28(null);
|
|
15799
15840
|
const [drugs, { refetch: refetchDrugs }] = createResource15(loadApexDrugs);
|
|
15800
15841
|
const [products] = createResource15(refreshKey, async () => {
|
|
15801
15842
|
try {
|
|
@@ -15814,7 +15855,7 @@ function Products(props) {
|
|
|
15814
15855
|
}
|
|
15815
15856
|
});
|
|
15816
15857
|
const refresh = () => setRefreshKey((k) => k + 1);
|
|
15817
|
-
const [creating, setCreating] =
|
|
15858
|
+
const [creating, setCreating] = createSignal28(false);
|
|
15818
15859
|
const reloadApexList = () => {
|
|
15819
15860
|
clearApexDrugCache();
|
|
15820
15861
|
void refetchDrugs();
|
|
@@ -15949,7 +15990,7 @@ function Products(props) {
|
|
|
15949
15990
|
}
|
|
15950
15991
|
void handleOpen(entry);
|
|
15951
15992
|
};
|
|
15952
|
-
const [checked, setChecked] =
|
|
15993
|
+
const [checked, setChecked] = createSignal28(/* @__PURE__ */ new Set());
|
|
15953
15994
|
const isChecked = (entry) => checked().has(entry.drugId);
|
|
15954
15995
|
const setCheckedFor = (ids, on10) => setChecked((prev) => {
|
|
15955
15996
|
const next = new Set(prev);
|
|
@@ -15963,7 +16004,7 @@ function Products(props) {
|
|
|
15963
16004
|
});
|
|
15964
16005
|
const availableChecked = () => grouped().available.filter(isChecked);
|
|
15965
16006
|
const storeChecked = () => grouped().store.filter(isChecked);
|
|
15966
|
-
const [bulkNotice, setBulkNotice] =
|
|
16007
|
+
const [bulkNotice, setBulkNotice] = createSignal28(null);
|
|
15967
16008
|
const setActive = async (entry, active) => {
|
|
15968
16009
|
if (!entry.product) return false;
|
|
15969
16010
|
setRowPending(entry.drugId, true);
|
|
@@ -16029,7 +16070,7 @@ function Products(props) {
|
|
|
16029
16070
|
void removeChecked();
|
|
16030
16071
|
}
|
|
16031
16072
|
};
|
|
16032
|
-
const [cellEditor, setCellEditor] =
|
|
16073
|
+
const [cellEditor, setCellEditor] = createSignal28(null);
|
|
16033
16074
|
const cellEditorState = createMemo15(() => {
|
|
16034
16075
|
const ed = cellEditor();
|
|
16035
16076
|
if (!ed) return null;
|
|
@@ -16071,7 +16112,7 @@ function Products(props) {
|
|
|
16071
16112
|
const loading = () => products() === void 0;
|
|
16072
16113
|
const categoryById = createMemo15(() => new Map((categories() ?? []).map((c) => [c.id, c])));
|
|
16073
16114
|
const categoryLabel2 = (id) => categoryById().get(id)?.name ?? id;
|
|
16074
|
-
const [query, setQuery] =
|
|
16115
|
+
const [query, setQuery] = createSignal28("");
|
|
16075
16116
|
const terms = createMemo15(
|
|
16076
16117
|
() => query().trim().toLowerCase().split(/\s+/).filter(Boolean)
|
|
16077
16118
|
);
|
|
@@ -16549,7 +16590,7 @@ function Products(props) {
|
|
|
16549
16590
|
}
|
|
16550
16591
|
|
|
16551
16592
|
// src/pages/admin/Offers.tsx
|
|
16552
|
-
import { createMemo as createMemo16, createResource as createResource16, createSignal as
|
|
16593
|
+
import { createMemo as createMemo16, createResource as createResource16, createSignal as createSignal29, For as For32, onMount as onMount5, Show as Show45 } from "solid-js";
|
|
16553
16594
|
|
|
16554
16595
|
// src/pages/admin/funnelShared.ts
|
|
16555
16596
|
var SEGMENT_KEYS = {
|
|
@@ -16637,17 +16678,17 @@ var linkAction = {
|
|
|
16637
16678
|
function OfferEditPanel(props) {
|
|
16638
16679
|
const editing = () => props.offer !== null;
|
|
16639
16680
|
const initial = props.offer;
|
|
16640
|
-
const [name, setName] =
|
|
16641
|
-
const [discountType, setDiscountType] =
|
|
16642
|
-
const [discountValueCents, setDiscountValueCents] =
|
|
16643
|
-
const [productIds, setProductIds] =
|
|
16644
|
-
const [isActive, setIsActive] =
|
|
16645
|
-
const [recurringMode, setRecurringMode] =
|
|
16681
|
+
const [name, setName] = createSignal29(initial?.name ?? "");
|
|
16682
|
+
const [discountType, setDiscountType] = createSignal29(initial?.discountType ?? "fixed");
|
|
16683
|
+
const [discountValueCents, setDiscountValueCents] = createSignal29(initial?.discountValueCents ?? 1e3);
|
|
16684
|
+
const [productIds, setProductIds] = createSignal29(initial?.productIds ?? []);
|
|
16685
|
+
const [isActive, setIsActive] = createSignal29(initial?.isActive ?? true);
|
|
16686
|
+
const [recurringMode, setRecurringMode] = createSignal29(
|
|
16646
16687
|
!initial || initial.recurringIndefinite ? "indefinite" : initial.recurringCharges > 0 ? "finite" : "none"
|
|
16647
16688
|
);
|
|
16648
|
-
const [recurringCharges, setRecurringCharges] =
|
|
16649
|
-
const [saving, setSaving] =
|
|
16650
|
-
const [error, setError] =
|
|
16689
|
+
const [recurringCharges, setRecurringCharges] = createSignal29(initial?.recurringCharges || 1);
|
|
16690
|
+
const [saving, setSaving] = createSignal29(false);
|
|
16691
|
+
const [error, setError] = createSignal29(null);
|
|
16651
16692
|
const displayValue = () => discountType() === "fixed" ? (discountValueCents() / 100).toFixed(2) : String(discountValueCents());
|
|
16652
16693
|
const handleDiscountValueInput = (raw) => {
|
|
16653
16694
|
const parsed = parseFloat(raw);
|
|
@@ -16893,12 +16934,12 @@ function OfferEditPanel(props) {
|
|
|
16893
16934
|
}
|
|
16894
16935
|
function OfferGrants(props) {
|
|
16895
16936
|
const nav = useAdminNav();
|
|
16896
|
-
const [grants, setGrants] =
|
|
16897
|
-
const [hasMore, setHasMore] =
|
|
16898
|
-
const [loadError, setLoadError] =
|
|
16899
|
-
const [busy, setBusy] =
|
|
16900
|
-
const [email, setEmail] =
|
|
16901
|
-
const [validDays, setValidDays] =
|
|
16937
|
+
const [grants, setGrants] = createSignal29(null);
|
|
16938
|
+
const [hasMore, setHasMore] = createSignal29(false);
|
|
16939
|
+
const [loadError, setLoadError] = createSignal29(null);
|
|
16940
|
+
const [busy, setBusy] = createSignal29(null);
|
|
16941
|
+
const [email, setEmail] = createSignal29("");
|
|
16942
|
+
const [validDays, setValidDays] = createSignal29(DEFAULT_VALID_DAYS);
|
|
16902
16943
|
const load = async (reset) => {
|
|
16903
16944
|
setLoadError(null);
|
|
16904
16945
|
try {
|
|
@@ -17071,11 +17112,11 @@ function OfferGrants(props) {
|
|
|
17071
17112
|
</div>;
|
|
17072
17113
|
}
|
|
17073
17114
|
function Offers() {
|
|
17074
|
-
const [refreshKey, setRefreshKey] =
|
|
17075
|
-
const [editing, setEditing] =
|
|
17076
|
-
const [viewingId, setViewingId] =
|
|
17077
|
-
const [loadError, setLoadError] =
|
|
17078
|
-
const [archiveError, setArchiveError] =
|
|
17115
|
+
const [refreshKey, setRefreshKey] = createSignal29(0);
|
|
17116
|
+
const [editing, setEditing] = createSignal29(null);
|
|
17117
|
+
const [viewingId, setViewingId] = createSignal29(null);
|
|
17118
|
+
const [loadError, setLoadError] = createSignal29(null);
|
|
17119
|
+
const [archiveError, setArchiveError] = createSignal29(null);
|
|
17079
17120
|
const refresh = () => {
|
|
17080
17121
|
setArchiveError(null);
|
|
17081
17122
|
setRefreshKey((k) => k + 1);
|
|
@@ -17250,24 +17291,24 @@ function Offers() {
|
|
|
17250
17291
|
}
|
|
17251
17292
|
|
|
17252
17293
|
// src/pages/admin/Sales.tsx
|
|
17253
|
-
import { createMemo as createMemo17, createResource as createResource17, createSignal as
|
|
17294
|
+
import { createMemo as createMemo17, createResource as createResource17, createSignal as createSignal30, For as For33, Show as Show46 } from "solid-js";
|
|
17254
17295
|
function SaleEditPanel(props) {
|
|
17255
17296
|
const editing = () => props.sale !== null;
|
|
17256
17297
|
const initial = props.sale;
|
|
17257
|
-
const [name, setName] =
|
|
17258
|
-
const [discountType, setDiscountType] =
|
|
17259
|
-
const [discountValueCents, setDiscountValueCents] =
|
|
17260
|
-
const [startDate, setStartDate] =
|
|
17261
|
-
const [endDate, setEndDate] =
|
|
17262
|
-
const [productIds, setProductIds] =
|
|
17263
|
-
const [isExclusive, setIsExclusive] =
|
|
17264
|
-
const [isActive, setIsActive] =
|
|
17265
|
-
const [recurringMode, setRecurringMode] =
|
|
17298
|
+
const [name, setName] = createSignal30(initial?.name ?? "");
|
|
17299
|
+
const [discountType, setDiscountType] = createSignal30(initial?.discountType ?? "percent");
|
|
17300
|
+
const [discountValueCents, setDiscountValueCents] = createSignal30(initial?.discountValueCents ?? 10);
|
|
17301
|
+
const [startDate, setStartDate] = createSignal30(isoToDatetimeLocal(initial?.startDate));
|
|
17302
|
+
const [endDate, setEndDate] = createSignal30(isoToDatetimeLocal(initial?.endDate));
|
|
17303
|
+
const [productIds, setProductIds] = createSignal30(initial?.productIds ?? []);
|
|
17304
|
+
const [isExclusive, setIsExclusive] = createSignal30(initial?.isExclusive ?? false);
|
|
17305
|
+
const [isActive, setIsActive] = createSignal30(initial?.isActive ?? true);
|
|
17306
|
+
const [recurringMode, setRecurringMode] = createSignal30(
|
|
17266
17307
|
initial?.recurringIndefinite ? "indefinite" : (initial?.recurringCharges ?? 0) > 0 ? "finite" : "none"
|
|
17267
17308
|
);
|
|
17268
|
-
const [recurringCharges, setRecurringCharges] =
|
|
17269
|
-
const [saving, setSaving] =
|
|
17270
|
-
const [error, setError] =
|
|
17309
|
+
const [recurringCharges, setRecurringCharges] = createSignal30(initial?.recurringCharges ?? 0);
|
|
17310
|
+
const [saving, setSaving] = createSignal30(false);
|
|
17311
|
+
const [error, setError] = createSignal30(null);
|
|
17271
17312
|
const displayValue = () => discountType() === "fixed" ? (discountValueCents() / 100).toFixed(2) : String(discountValueCents());
|
|
17272
17313
|
const handleDiscountValueInput = (raw) => {
|
|
17273
17314
|
const parsed = parseFloat(raw);
|
|
@@ -17532,8 +17573,8 @@ function SaleEditPanel(props) {
|
|
|
17532
17573
|
</div>;
|
|
17533
17574
|
}
|
|
17534
17575
|
function Sales() {
|
|
17535
|
-
const [refreshKey, setRefreshKey] =
|
|
17536
|
-
const [editing, setEditing] =
|
|
17576
|
+
const [refreshKey, setRefreshKey] = createSignal30(0);
|
|
17577
|
+
const [editing, setEditing] = createSignal30(null);
|
|
17537
17578
|
const refresh = () => setRefreshKey((k) => k + 1);
|
|
17538
17579
|
const [sales] = createResource17(refreshKey, async () => {
|
|
17539
17580
|
try {
|
|
@@ -17684,7 +17725,7 @@ function Sales() {
|
|
|
17684
17725
|
}
|
|
17685
17726
|
|
|
17686
17727
|
// src/pages/admin/Support.tsx
|
|
17687
|
-
import { createResource as createResource20, createSignal as
|
|
17728
|
+
import { createResource as createResource20, createSignal as createSignal32, For as For37, onCleanup as onCleanup5, onMount as onMount6, Show as Show50 } from "solid-js";
|
|
17688
17729
|
|
|
17689
17730
|
// src/pages/admin/support/format.ts
|
|
17690
17731
|
function customerLabel(thread) {
|
|
@@ -18046,7 +18087,7 @@ function SupportQueue(props) {
|
|
|
18046
18087
|
}
|
|
18047
18088
|
|
|
18048
18089
|
// src/pages/admin/support/SupportThreadPane.tsx
|
|
18049
|
-
import { createEffect as createEffect13, createResource as createResource19, createSignal as
|
|
18090
|
+
import { createEffect as createEffect13, createResource as createResource19, createSignal as createSignal31, For as For36, Show as Show49 } from "solid-js";
|
|
18050
18091
|
var STATUS_ACTIONS = [
|
|
18051
18092
|
{ value: "open", label: "Needs reply" },
|
|
18052
18093
|
{ value: "pending", label: "Awaiting customer" },
|
|
@@ -18071,15 +18112,15 @@ var CANNED_REPLIES = [
|
|
|
18071
18112
|
}
|
|
18072
18113
|
];
|
|
18073
18114
|
function SupportThreadPane(props) {
|
|
18074
|
-
const [reply, setReply] =
|
|
18075
|
-
const [sending, setSending] =
|
|
18076
|
-
const [error, setError] =
|
|
18077
|
-
const [pendingFile, setPendingFile] =
|
|
18078
|
-
const [transferModalOpen, setTransferModalOpen] =
|
|
18079
|
-
const [transferring, setTransferring] =
|
|
18080
|
-
const [transferError, setTransferError] =
|
|
18081
|
-
const [transferBanners, setTransferBanners] =
|
|
18082
|
-
const [blockedThreadIds, setBlockedThreadIds] =
|
|
18115
|
+
const [reply, setReply] = createSignal31("");
|
|
18116
|
+
const [sending, setSending] = createSignal31(false);
|
|
18117
|
+
const [error, setError] = createSignal31(null);
|
|
18118
|
+
const [pendingFile, setPendingFile] = createSignal31(null);
|
|
18119
|
+
const [transferModalOpen, setTransferModalOpen] = createSignal31(false);
|
|
18120
|
+
const [transferring, setTransferring] = createSignal31(false);
|
|
18121
|
+
const [transferError, setTransferError] = createSignal31(null);
|
|
18122
|
+
const [transferBanners, setTransferBanners] = createSignal31([]);
|
|
18123
|
+
const [blockedThreadIds, setBlockedThreadIds] = createSignal31(/* @__PURE__ */ new Set());
|
|
18083
18124
|
let replyBox;
|
|
18084
18125
|
const [detail, { refetch: refetchDetail, mutate: mutateDetail }] = createResource19(
|
|
18085
18126
|
() => props.threadId,
|
|
@@ -18270,8 +18311,8 @@ ${body}` : body);
|
|
|
18270
18311
|
</svg>;
|
|
18271
18312
|
const Attachment = (p) => {
|
|
18272
18313
|
const isImage = () => p.attachment.mimeType.startsWith("image/");
|
|
18273
|
-
const [url, setUrl] =
|
|
18274
|
-
const [failed, setFailed] =
|
|
18314
|
+
const [url, setUrl] = createSignal31(null);
|
|
18315
|
+
const [failed, setFailed] = createSignal31(false);
|
|
18275
18316
|
let retried = false;
|
|
18276
18317
|
createEffect13(() => {
|
|
18277
18318
|
if (!isImage() || url()) return;
|
|
@@ -18689,16 +18730,16 @@ function threadIdFromUrl() {
|
|
|
18689
18730
|
}
|
|
18690
18731
|
function Support(props = {}) {
|
|
18691
18732
|
const nav = useAdminNav();
|
|
18692
|
-
const [statusFilter, setStatusFilter] =
|
|
18693
|
-
const [categoryFilter, setCategoryFilter] =
|
|
18694
|
-
const [selectedId, setSelectedId] =
|
|
18733
|
+
const [statusFilter, setStatusFilter] = createSignal32("all");
|
|
18734
|
+
const [categoryFilter, setCategoryFilter] = createSignal32("all");
|
|
18735
|
+
const [selectedId, setSelectedId] = createSignal32(
|
|
18695
18736
|
props.initialThreadId ?? threadIdFromUrl()
|
|
18696
18737
|
);
|
|
18697
|
-
const [selectedUserId, setSelectedUserId] =
|
|
18698
|
-
const [olderPages, setOlderPages] =
|
|
18699
|
-
const [nextCursor, setNextCursor] =
|
|
18700
|
-
const [loadingMore, setLoadingMore] =
|
|
18701
|
-
const [threadReloadKey, setThreadReloadKey] =
|
|
18738
|
+
const [selectedUserId, setSelectedUserId] = createSignal32(null);
|
|
18739
|
+
const [olderPages, setOlderPages] = createSignal32([]);
|
|
18740
|
+
const [nextCursor, setNextCursor] = createSignal32();
|
|
18741
|
+
const [loadingMore, setLoadingMore] = createSignal32(false);
|
|
18742
|
+
const [threadReloadKey, setThreadReloadKey] = createSignal32(0);
|
|
18702
18743
|
const [stats, { refetch: refetchStats }] = createResource20(async () => {
|
|
18703
18744
|
try {
|
|
18704
18745
|
return await adminApi.getSupportStats();
|
|
@@ -18882,9 +18923,9 @@ function Support(props = {}) {
|
|
|
18882
18923
|
}
|
|
18883
18924
|
|
|
18884
18925
|
// src/pages/admin/Webhooks.tsx
|
|
18885
|
-
import { createResource as createResource21, createSignal as
|
|
18926
|
+
import { createResource as createResource21, createSignal as createSignal33, For as For38, Show as Show51 } from "solid-js";
|
|
18886
18927
|
function Webhooks() {
|
|
18887
|
-
const [expanded, setExpanded] =
|
|
18928
|
+
const [expanded, setExpanded] = createSignal33(null);
|
|
18888
18929
|
const [webhooks] = createResource21(async () => {
|
|
18889
18930
|
try {
|
|
18890
18931
|
const res = await adminApi.getWebhookEvents({ limit: 50 });
|
|
@@ -18977,13 +19018,13 @@ function Webhooks() {
|
|
|
18977
19018
|
}
|
|
18978
19019
|
|
|
18979
19020
|
// src/pages/admin/EmailTemplates.tsx
|
|
18980
|
-
import { createEffect as createEffect15, createSignal as
|
|
19021
|
+
import { createEffect as createEffect15, createSignal as createSignal36, createResource as createResource22, For as For41, Show as Show54 } from "solid-js";
|
|
18981
19022
|
|
|
18982
19023
|
// src/pages/admin/EmailTextEditor.tsx
|
|
18983
|
-
import { createSignal as
|
|
19024
|
+
import { createSignal as createSignal35, For as For40, Show as Show53 } from "solid-js";
|
|
18984
19025
|
|
|
18985
19026
|
// src/pages/admin/EmailBodyEditor.tsx
|
|
18986
|
-
import { createEffect as createEffect14, createSignal as
|
|
19027
|
+
import { createEffect as createEffect14, createSignal as createSignal34, For as For39, on as on8, onCleanup as onCleanup6, onMount as onMount7, Show as Show52 } from "solid-js";
|
|
18987
19028
|
import { Editor } from "@tiptap/core";
|
|
18988
19029
|
|
|
18989
19030
|
// src/pages/admin/emailBodyExtensions.ts
|
|
@@ -19189,10 +19230,10 @@ var CUSTOM_TARGET = "__custom__";
|
|
|
19189
19230
|
var placeholderKey = (list) => list.map((p) => p.token).join("|");
|
|
19190
19231
|
function EmailBodyEditor(props) {
|
|
19191
19232
|
let surface;
|
|
19192
|
-
const [editor, setEditor] =
|
|
19193
|
-
const [tick, setTick] =
|
|
19194
|
-
const [dialog, setDialog] =
|
|
19195
|
-
const [menuOpen, setMenuOpen] =
|
|
19233
|
+
const [editor, setEditor] = createSignal34(null);
|
|
19234
|
+
const [tick, setTick] = createSignal34(0);
|
|
19235
|
+
const [dialog, setDialog] = createSignal34(null);
|
|
19236
|
+
const [menuOpen, setMenuOpen] = createSignal34(false);
|
|
19196
19237
|
let shown = null;
|
|
19197
19238
|
let shownPlaceholders = "";
|
|
19198
19239
|
const lookup = (token) => props.placeholders.find((p) => p.token === token);
|
|
@@ -19545,7 +19586,7 @@ function EmailBodyEditor(props) {
|
|
|
19545
19586
|
// src/pages/admin/EmailTextEditor.tsx
|
|
19546
19587
|
var TEMPLATE_LIMITS = { subject: 200, body: 2e4 };
|
|
19547
19588
|
function TemplateTextEditor(props) {
|
|
19548
|
-
const [target, setTarget] =
|
|
19589
|
+
const [target, setTarget] = createSignal35("body");
|
|
19549
19590
|
let subjectEl;
|
|
19550
19591
|
let body;
|
|
19551
19592
|
const fitsSubject = (p) => (p.kind ?? "text") === "text";
|
|
@@ -19699,10 +19740,10 @@ function toInput(t) {
|
|
|
19699
19740
|
};
|
|
19700
19741
|
}
|
|
19701
19742
|
function EmailTemplates(props = {}) {
|
|
19702
|
-
const [refreshKey, setRefreshKey] =
|
|
19703
|
-
const [placeholders, setPlaceholders] =
|
|
19704
|
-
const [customTemplates, setCustomTemplates] =
|
|
19705
|
-
const [customPlaceholders, setCustomPlaceholders] =
|
|
19743
|
+
const [refreshKey, setRefreshKey] = createSignal36(0);
|
|
19744
|
+
const [placeholders, setPlaceholders] = createSignal36({});
|
|
19745
|
+
const [customTemplates, setCustomTemplates] = createSignal36([]);
|
|
19746
|
+
const [customPlaceholders, setCustomPlaceholders] = createSignal36([]);
|
|
19706
19747
|
let adoptServerCopy = false;
|
|
19707
19748
|
const [templates] = createResource22(refreshKey, async () => {
|
|
19708
19749
|
try {
|
|
@@ -19735,16 +19776,16 @@ function EmailTemplates(props = {}) {
|
|
|
19735
19776
|
if (other.length > 0) groups.push({ label: "Other", keys: other });
|
|
19736
19777
|
return groups;
|
|
19737
19778
|
};
|
|
19738
|
-
const [selection, setSelection] =
|
|
19779
|
+
const [selection, setSelection] = createSignal36(
|
|
19739
19780
|
props.initialCustomTemplateId ? { kind: "custom", id: props.initialCustomTemplateId } : { kind: "fixed", key: "" }
|
|
19740
19781
|
);
|
|
19741
|
-
const [draft, setDraft] =
|
|
19742
|
-
const [customDraft, setCustomDraft] =
|
|
19743
|
-
const [saving, setSaving] =
|
|
19744
|
-
const [resetting, setResetting] =
|
|
19745
|
-
const [deleting, setDeleting] =
|
|
19746
|
-
const [sendingTest, setSendingTest] =
|
|
19747
|
-
const [collapsed, setCollapsed] =
|
|
19782
|
+
const [draft, setDraft] = createSignal36(null);
|
|
19783
|
+
const [customDraft, setCustomDraft] = createSignal36(null);
|
|
19784
|
+
const [saving, setSaving] = createSignal36(false);
|
|
19785
|
+
const [resetting, setResetting] = createSignal36(false);
|
|
19786
|
+
const [deleting, setDeleting] = createSignal36(false);
|
|
19787
|
+
const [sendingTest, setSendingTest] = createSignal36(false);
|
|
19788
|
+
const [collapsed, setCollapsed] = createSignal36({});
|
|
19748
19789
|
const toggleCategory = (label3) => setCollapsed((c) => ({ ...c, [label3]: !c[label3] }));
|
|
19749
19790
|
const activeKey = () => {
|
|
19750
19791
|
const s = selection();
|
|
@@ -20182,10 +20223,10 @@ function EmailTemplates(props = {}) {
|
|
|
20182
20223
|
}
|
|
20183
20224
|
|
|
20184
20225
|
// src/pages/admin/Funnel.tsx
|
|
20185
|
-
import { createResource as createResource24, createSignal as
|
|
20226
|
+
import { createResource as createResource24, createSignal as createSignal38, For as For43, Show as Show56 } from "solid-js";
|
|
20186
20227
|
|
|
20187
20228
|
// src/pages/admin/Sequences.tsx
|
|
20188
|
-
import { createResource as createResource23, createSignal as
|
|
20229
|
+
import { createResource as createResource23, createSignal as createSignal37, For as For42, Index as Index2, Match as Match4, Show as Show55, Switch as Switch4 } from "solid-js";
|
|
20189
20230
|
var FALLBACK_LINKS = ["members", "resume_survey", "home", "none"];
|
|
20190
20231
|
var EMPTY_STEP = { waitHours: 24, templateId: "", link: "members" };
|
|
20191
20232
|
function blankSequence() {
|
|
@@ -20209,7 +20250,7 @@ var label = { "font-size": "0.8125rem", color: "var(--app-admin-fg-muted)" };
|
|
|
20209
20250
|
var field = { display: "grid", gap: "0.25rem" };
|
|
20210
20251
|
function SequenceQueue(props) {
|
|
20211
20252
|
const nav = useAdminNav();
|
|
20212
|
-
const [busy, setBusy] =
|
|
20253
|
+
const [busy, setBusy] = createSignal37(null);
|
|
20213
20254
|
const rows = () => props.rows ?? [];
|
|
20214
20255
|
const refetch = () => props.refetch();
|
|
20215
20256
|
const act = async (row, action) => {
|
|
@@ -20324,8 +20365,8 @@ function withOfferFields(s) {
|
|
|
20324
20365
|
}
|
|
20325
20366
|
function AddToSequence(props) {
|
|
20326
20367
|
const [sequences] = createResource23(() => apiFetch("/admin/funnel/sequences"));
|
|
20327
|
-
const [target, setTarget] =
|
|
20328
|
-
const [busy, setBusy] =
|
|
20368
|
+
const [target, setTarget] = createSignal37("");
|
|
20369
|
+
const [busy, setBusy] = createSignal37(false);
|
|
20329
20370
|
const add = async () => {
|
|
20330
20371
|
if (!target() || props.people.length === 0) return;
|
|
20331
20372
|
setBusy(true);
|
|
@@ -20418,9 +20459,9 @@ var checkboxRow = { "font-size": "0.8125rem", display: "flex", gap: "0.5rem", "a
|
|
|
20418
20459
|
function SequenceEditor(props) {
|
|
20419
20460
|
const nav = useAdminNav();
|
|
20420
20461
|
const baseline = () => withOfferFields(props.initial);
|
|
20421
|
-
const [draft, setDraft] =
|
|
20422
|
-
const [saving, setSaving] =
|
|
20423
|
-
const [error, setError] =
|
|
20462
|
+
const [draft, setDraft] = createSignal37(JSON.parse(JSON.stringify(baseline())));
|
|
20463
|
+
const [saving, setSaving] = createSignal37(false);
|
|
20464
|
+
const [error, setError] = createSignal37(null);
|
|
20424
20465
|
const isNew = () => !draft().id;
|
|
20425
20466
|
const dirty = () => JSON.stringify(draft()) !== JSON.stringify(baseline());
|
|
20426
20467
|
const [enrollments, { refetch: refetchEnrollments }] = createResource23(
|
|
@@ -20432,7 +20473,7 @@ function SequenceEditor(props) {
|
|
|
20432
20473
|
() => apiFetch("/admin/funnel/queue")
|
|
20433
20474
|
);
|
|
20434
20475
|
const dueRows = () => queue() ? queue().due.filter((r) => r.sequenceId === props.initial.id) : void 0;
|
|
20435
|
-
const [tab, setTab] =
|
|
20476
|
+
const [tab, setTab] = createSignal37(isNew() ? "settings" : "queue");
|
|
20436
20477
|
const tabKeys = () => isNew() ? ["steps", "settings"] : ["queue", "steps", "people", "settings"];
|
|
20437
20478
|
const TAB_LABEL = { queue: "Queue", steps: "Steps", people: "People", settings: "Settings" };
|
|
20438
20479
|
const tabCount = (key) => key === "queue" ? dueRows()?.length : key === "steps" ? draft().steps.length : key === "people" ? enrollments()?.enrollments.length : void 0;
|
|
@@ -20777,7 +20818,7 @@ function SequenceEditor(props) {
|
|
|
20777
20818
|
</div>;
|
|
20778
20819
|
}
|
|
20779
20820
|
function Sequences() {
|
|
20780
|
-
const [reload, setReload] =
|
|
20821
|
+
const [reload, setReload] = createSignal37(0);
|
|
20781
20822
|
const [list, { refetch }] = createResource23(reload, () => apiFetch("/admin/funnel/sequences"));
|
|
20782
20823
|
const [emailTemplates] = createResource23(() => adminApi.getEmailTemplates());
|
|
20783
20824
|
const customTemplates = () => emailTemplates()?.customTemplates ?? [];
|
|
@@ -20788,7 +20829,7 @@ function Sequences() {
|
|
|
20788
20829
|
return [];
|
|
20789
20830
|
}
|
|
20790
20831
|
});
|
|
20791
|
-
const [editing, setEditing] =
|
|
20832
|
+
const [editing, setEditing] = createSignal37(null);
|
|
20792
20833
|
const [queue, { refetch: refetchQueue }] = createResource23(reload, () => apiFetch("/admin/funnel/queue").catch(() => ({ due: [] })));
|
|
20793
20834
|
const dueFor = (id) => (queue()?.due ?? []).filter((d) => d.sequenceId === id).length;
|
|
20794
20835
|
const changed = () => {
|
|
@@ -20873,9 +20914,9 @@ function stoppedAt(p) {
|
|
|
20873
20914
|
}
|
|
20874
20915
|
function SegmentSection(props) {
|
|
20875
20916
|
const nav = useAdminNav();
|
|
20876
|
-
const [filter, setFilter] =
|
|
20877
|
-
const [savingsOnly, setSavingsOnly] =
|
|
20878
|
-
const [selected, setSelected] =
|
|
20917
|
+
const [filter, setFilter] = createSignal38("all");
|
|
20918
|
+
const [savingsOnly, setSavingsOnly] = createSignal38(false);
|
|
20919
|
+
const [selected, setSelected] = createSignal38({});
|
|
20879
20920
|
const [people, { refetch }] = createResource24(
|
|
20880
20921
|
() => ({ days: props.days, filter: filter(), savings: savingsOnly() }),
|
|
20881
20922
|
(q) => apiFetch(
|
|
@@ -21036,7 +21077,7 @@ function SegmentSection(props) {
|
|
|
21036
21077
|
</div>;
|
|
21037
21078
|
}
|
|
21038
21079
|
function Funnel() {
|
|
21039
|
-
const [days, setDays] =
|
|
21080
|
+
const [days, setDays] = createSignal38(30);
|
|
21040
21081
|
const [summary] = createResource24(
|
|
21041
21082
|
days,
|
|
21042
21083
|
(d) => apiFetch(`/admin/funnel/summary?days=${d}`)
|
|
@@ -21303,11 +21344,11 @@ function SequenceResults() {
|
|
|
21303
21344
|
}
|
|
21304
21345
|
|
|
21305
21346
|
// src/pages/admin/EmailNotifications.tsx
|
|
21306
|
-
import { createResource as createResource26, createSignal as
|
|
21347
|
+
import { createResource as createResource26, createSignal as createSignal40, For as For45, Show as Show58 } from "solid-js";
|
|
21307
21348
|
|
|
21308
21349
|
// src/pages/admin/supportChannelState.ts
|
|
21309
|
-
import { createSignal as
|
|
21310
|
-
var [supportChannelMode, setSupportChannelMode] =
|
|
21350
|
+
import { createSignal as createSignal39 } from "solid-js";
|
|
21351
|
+
var [supportChannelMode, setSupportChannelMode] = createSignal39(null);
|
|
21311
21352
|
|
|
21312
21353
|
// src/pages/admin/EmailNotifications.tsx
|
|
21313
21354
|
function humanize2(key) {
|
|
@@ -21345,9 +21386,9 @@ function Toggle(props) {
|
|
|
21345
21386
|
}
|
|
21346
21387
|
function NotificationsCard() {
|
|
21347
21388
|
const [saved, { mutate }] = createResource26(() => adminApi.getEmailNotifications());
|
|
21348
|
-
const [draft, setDraft] =
|
|
21349
|
-
const [newEmail, setNewEmail] =
|
|
21350
|
-
const [saving, setSaving] =
|
|
21389
|
+
const [draft, setDraft] = createSignal40(null);
|
|
21390
|
+
const [newEmail, setNewEmail] = createSignal40("");
|
|
21391
|
+
const [saving, setSaving] = createSignal40(false);
|
|
21351
21392
|
const current2 = () => draft() ?? saved() ?? null;
|
|
21352
21393
|
const update = (patch) => setDraft({ ...current2(), ...patch });
|
|
21353
21394
|
const dirty = () => !!draft() && JSON.stringify(draft()) !== JSON.stringify(saved());
|
|
@@ -21430,9 +21471,9 @@ function NotificationsCard() {
|
|
|
21430
21471
|
}
|
|
21431
21472
|
function BillingRemindersCard() {
|
|
21432
21473
|
const [saved, { mutate }] = createResource26(() => adminApi.getBillingReminders());
|
|
21433
|
-
const [draft, setDraft] =
|
|
21434
|
-
const [newDay, setNewDay] =
|
|
21435
|
-
const [saving, setSaving] =
|
|
21474
|
+
const [draft, setDraft] = createSignal40(null);
|
|
21475
|
+
const [newDay, setNewDay] = createSignal40("");
|
|
21476
|
+
const [saving, setSaving] = createSignal40(false);
|
|
21436
21477
|
const current2 = () => draft() ?? saved() ?? null;
|
|
21437
21478
|
const update = (patch) => setDraft({ ...current2(), ...patch });
|
|
21438
21479
|
const dirty = () => !!draft() && JSON.stringify(draft()) !== JSON.stringify(saved());
|
|
@@ -21519,8 +21560,8 @@ function SupportChannelCard() {
|
|
|
21519
21560
|
return null;
|
|
21520
21561
|
}
|
|
21521
21562
|
});
|
|
21522
|
-
const [draft, setDraft] =
|
|
21523
|
-
const [saving, setSaving] =
|
|
21563
|
+
const [draft, setDraft] = createSignal40(null);
|
|
21564
|
+
const [saving, setSaving] = createSignal40(false);
|
|
21524
21565
|
const current2 = () => draft() ?? saved() ?? null;
|
|
21525
21566
|
const update = (patch) => setDraft({ ...current2(), ...patch });
|
|
21526
21567
|
const dirty = () => !!draft() && JSON.stringify(draft()) !== JSON.stringify(saved());
|
|
@@ -21612,7 +21653,7 @@ function EmailNotifications() {
|
|
|
21612
21653
|
}
|
|
21613
21654
|
|
|
21614
21655
|
// src/pages/admin/Features.tsx
|
|
21615
|
-
import { createResource as createResource27, createSignal as
|
|
21656
|
+
import { createResource as createResource27, createSignal as createSignal41, For as For46, Show as Show59 } from "solid-js";
|
|
21616
21657
|
var muted2 = { "font-size": "0.8125rem", color: "var(--app-admin-fg-muted)" };
|
|
21617
21658
|
var MAX_NOTE_LENGTH = 1e3;
|
|
21618
21659
|
function formatDate2(iso) {
|
|
@@ -21654,10 +21695,10 @@ function Row(props) {
|
|
|
21654
21695
|
}
|
|
21655
21696
|
function Features() {
|
|
21656
21697
|
const [data, { mutate }] = createResource27(() => adminApi.getFeatures());
|
|
21657
|
-
const [busyKey, setBusyKey] =
|
|
21658
|
-
const [requesting, setRequesting] =
|
|
21659
|
-
const [note, setNote] =
|
|
21660
|
-
const [sending, setSending] =
|
|
21698
|
+
const [busyKey, setBusyKey] = createSignal41(null);
|
|
21699
|
+
const [requesting, setRequesting] = createSignal41(null);
|
|
21700
|
+
const [note, setNote] = createSignal41("");
|
|
21701
|
+
const [sending, setSending] = createSignal41(false);
|
|
21661
21702
|
const features = () => data.error ? [] : data()?.features ?? [];
|
|
21662
21703
|
const selfServe = () => features().filter((f) => f.access === "self_serve");
|
|
21663
21704
|
const onRequest = () => features().filter((f) => f.access === "request");
|
|
@@ -21822,196 +21863,609 @@ function Features() {
|
|
|
21822
21863
|
</div>;
|
|
21823
21864
|
}
|
|
21824
21865
|
|
|
21825
|
-
// src/pages/
|
|
21826
|
-
|
|
21827
|
-
|
|
21828
|
-
|
|
21829
|
-
|
|
21830
|
-
|
|
21831
|
-
|
|
21832
|
-
|
|
21833
|
-
|
|
21834
|
-
|
|
21835
|
-
|
|
21836
|
-
|
|
21837
|
-
|
|
21838
|
-
|
|
21839
|
-
|
|
21840
|
-
|
|
21841
|
-
|
|
21842
|
-
|
|
21843
|
-
|
|
21844
|
-
|
|
21845
|
-
|
|
21846
|
-
|
|
21847
|
-
|
|
21848
|
-
|
|
21849
|
-
|
|
21850
|
-
|
|
21851
|
-
|
|
21852
|
-
{ label: "Marketing", tabs: ["sales", "promo-codes", "offers", "affiliates", "funnel", "sequences", "sequence-results"] },
|
|
21853
|
-
// Everything transactional that leaves as email: the copy of each email, and
|
|
21854
|
-
// who gets admin copies and the reminder schedule.
|
|
21855
|
-
{ label: "Email", tabs: ["email-templates", "email-notifications"] },
|
|
21856
|
-
{ label: "Integrations", tabs: ["webhooks"] },
|
|
21857
|
-
// What this site has switched on, and what it can ask for.
|
|
21858
|
-
{ label: "Settings", tabs: ["features"] }
|
|
21859
|
-
];
|
|
21860
|
-
var filterEnabled = (tabs, enabled) => enabled ? tabs.filter((t) => enabled.includes(t)) : tabs;
|
|
21861
|
-
function AdminDashboard(props) {
|
|
21862
|
-
const withoutHidden = (tabs) => supportChannelMode() === "email" ? tabs.filter((t) => t !== "support") : tabs;
|
|
21863
|
-
const visibleTopTabs = () => withoutHidden(filterEnabled(props.topTabs ?? DEFAULT_TOP_TABS, props.enabledTabs));
|
|
21864
|
-
const visibleGroups = () => (props.tabGroups ?? DEFAULT_TAB_GROUPS).map((g) => ({ label: g.label, tabs: withoutHidden(filterEnabled(g.tabs, props.enabledTabs)) })).filter((g) => g.tabs.length > 0);
|
|
21865
|
-
const orderedTabs = () => [
|
|
21866
|
-
...visibleTopTabs(),
|
|
21867
|
-
...visibleGroups().flatMap((g) => g.tabs)
|
|
21868
|
-
];
|
|
21869
|
-
const isTabEnabled = (tab) => orderedTabs().includes(tab);
|
|
21870
|
-
const affiliatesEnabled = () => props.enabledTabs ? props.enabledTabs.includes("affiliates") : true;
|
|
21871
|
-
const fallbackTab = () => props.defaultTab ?? orderedTabs()[0] ?? "dashboard";
|
|
21872
|
-
const [internalTab, setInternalTab] = createSignal41(fallbackTab());
|
|
21873
|
-
const currentTab = () => props.activeTab ?? internalTab();
|
|
21874
|
-
const [drawerOpen, setDrawerOpen] = createSignal41(false);
|
|
21875
|
-
createEffect16(() => {
|
|
21876
|
-
setAdminToast(props.toast);
|
|
21877
|
-
});
|
|
21878
|
-
createEffect16(() => {
|
|
21879
|
-
const auth = props.auth;
|
|
21880
|
-
if (!auth) return;
|
|
21881
|
-
if (!auth.isAuthenticated()) {
|
|
21882
|
-
auth.onUnauthenticated?.();
|
|
21866
|
+
// src/pages/admin/Admins.tsx
|
|
21867
|
+
import { createResource as createResource28, createSignal as createSignal43, For as For47, Show as Show61 } from "solid-js";
|
|
21868
|
+
|
|
21869
|
+
// src/pages/AcceptAdminInvite.tsx
|
|
21870
|
+
import { createSignal as createSignal42, Show as Show60 } from "solid-js";
|
|
21871
|
+
function queryParam(name) {
|
|
21872
|
+
if (typeof window === "undefined") return "";
|
|
21873
|
+
return new URLSearchParams(window.location.search).get(name) ?? "";
|
|
21874
|
+
}
|
|
21875
|
+
var MIN_PASSWORD_LENGTH = 8;
|
|
21876
|
+
var ADMIN_INVITE_PARAM = "adminInvite";
|
|
21877
|
+
function isAdminInviteLink() {
|
|
21878
|
+
return typeof window !== "undefined" && new URLSearchParams(window.location.search).has(ADMIN_INVITE_PARAM);
|
|
21879
|
+
}
|
|
21880
|
+
function AcceptAdminInvitePage(props) {
|
|
21881
|
+
const token = () => props.token ?? queryParam("token");
|
|
21882
|
+
const email = () => props.email ?? queryParam("email");
|
|
21883
|
+
const [password, setPassword] = createSignal42("");
|
|
21884
|
+
const [confirm2, setConfirm] = createSignal42("");
|
|
21885
|
+
const [submitting, setSubmitting] = createSignal42(false);
|
|
21886
|
+
const [error, setError] = createSignal42(null);
|
|
21887
|
+
const [message, setMessage] = createSignal42(null);
|
|
21888
|
+
async function handleSubmit(e) {
|
|
21889
|
+
e.preventDefault();
|
|
21890
|
+
setError(null);
|
|
21891
|
+
if (!token() || !email()) {
|
|
21892
|
+
setError("This invite link is incomplete. Ask the person who invited you to send a new one.");
|
|
21883
21893
|
return;
|
|
21884
21894
|
}
|
|
21885
|
-
if (
|
|
21886
|
-
|
|
21895
|
+
if (password().length < MIN_PASSWORD_LENGTH) {
|
|
21896
|
+
setError(`Use at least ${MIN_PASSWORD_LENGTH} characters.`);
|
|
21897
|
+
return;
|
|
21887
21898
|
}
|
|
21888
|
-
|
|
21889
|
-
|
|
21890
|
-
|
|
21891
|
-
if (!auth) return true;
|
|
21892
|
-
return auth.isAuthenticated() && auth.isHydrated() && auth.isAdmin();
|
|
21893
|
-
};
|
|
21894
|
-
createEffect16(() => {
|
|
21895
|
-
if (!adminAllowed()) return;
|
|
21896
|
-
void adminApi.getSupportChannel().then((s) => setSupportChannelMode(s.mode)).catch(() => {
|
|
21897
|
-
});
|
|
21898
|
-
});
|
|
21899
|
-
const [pendingCustomerUid, setPendingCustomerUid] = createSignal41(null);
|
|
21900
|
-
const [pendingThreadId, setPendingThreadId] = createSignal41(null);
|
|
21901
|
-
const [pendingTemplateId, setPendingTemplateId] = createSignal41(null);
|
|
21902
|
-
const handleTabClick = (tab, opts) => {
|
|
21903
|
-
if (!opts?.keepPending) {
|
|
21904
|
-
setPendingCustomerUid(null);
|
|
21905
|
-
setPendingThreadId(null);
|
|
21899
|
+
if (password() !== confirm2()) {
|
|
21900
|
+
setError("Passwords do not match.");
|
|
21901
|
+
return;
|
|
21906
21902
|
}
|
|
21907
|
-
|
|
21908
|
-
|
|
21909
|
-
|
|
21910
|
-
|
|
21911
|
-
|
|
21912
|
-
|
|
21913
|
-
|
|
21914
|
-
|
|
21915
|
-
|
|
21916
|
-
|
|
21917
|
-
|
|
21918
|
-
|
|
21919
|
-
|
|
21920
|
-
handleTabClick("customers", { keepPending: true });
|
|
21921
|
-
},
|
|
21922
|
-
openSupportThread: (threadId) => {
|
|
21923
|
-
setPendingThreadId(threadId);
|
|
21924
|
-
handleTabClick("support", { keepPending: true });
|
|
21925
|
-
},
|
|
21926
|
-
openEmailTemplate: (templateId) => {
|
|
21927
|
-
setPendingTemplateId(templateId);
|
|
21928
|
-
handleTabClick("email-templates", { keepPending: true });
|
|
21903
|
+
setSubmitting(true);
|
|
21904
|
+
try {
|
|
21905
|
+
await authApi.acceptAdminInvite({
|
|
21906
|
+
email: email().trim().toLowerCase(),
|
|
21907
|
+
token: token(),
|
|
21908
|
+
password: password()
|
|
21909
|
+
});
|
|
21910
|
+
setMessage("You\u2019re all set. Sign in with this email and your new password.");
|
|
21911
|
+
props.onSuccess?.();
|
|
21912
|
+
} catch (err) {
|
|
21913
|
+
setError(err instanceof Error ? err.message : "Something went wrong");
|
|
21914
|
+
} finally {
|
|
21915
|
+
setSubmitting(false);
|
|
21929
21916
|
}
|
|
21930
|
-
}
|
|
21931
|
-
|
|
21932
|
-
|
|
21933
|
-
type="button"
|
|
21934
|
-
onClick={() => handleTabClick(btnProps.tab)}
|
|
21917
|
+
}
|
|
21918
|
+
return <div
|
|
21919
|
+
class="app-affiliate-root"
|
|
21935
21920
|
style={{
|
|
21921
|
+
background: "var(--app-affiliate-bg)",
|
|
21922
|
+
color: "var(--app-affiliate-fg)",
|
|
21923
|
+
"min-height": "100vh",
|
|
21936
21924
|
display: "flex",
|
|
21937
21925
|
"align-items": "center",
|
|
21938
|
-
|
|
21939
|
-
padding: "
|
|
21940
|
-
"border-radius": "var(--app-admin-radius-sm)",
|
|
21941
|
-
"font-size": "0.875rem",
|
|
21942
|
-
"font-weight": "500",
|
|
21943
|
-
"text-align": "left",
|
|
21944
|
-
border: "none",
|
|
21945
|
-
cursor: "pointer",
|
|
21946
|
-
background: currentTab() === btnProps.tab ? "var(--app-admin-primary-soft)" : "transparent",
|
|
21947
|
-
color: currentTab() === btnProps.tab ? "var(--app-admin-primary-soft-fg)" : "var(--app-admin-fg-muted)"
|
|
21926
|
+
"justify-content": "center",
|
|
21927
|
+
padding: "2rem 1rem"
|
|
21948
21928
|
}}
|
|
21949
21929
|
>
|
|
21950
|
-
<
|
|
21951
|
-
<span
|
|
21952
|
-
class={props.tabIcons[btnProps.tab]}
|
|
21953
|
-
style={{ "font-size": "1rem", opacity: 0.7, "flex-shrink": 0 }}
|
|
21954
|
-
/>
|
|
21955
|
-
</Show60>
|
|
21956
|
-
{TAB_LABELS[btnProps.tab]}
|
|
21957
|
-
</button>;
|
|
21958
|
-
return <Show60 when={adminAllowed()} fallback={<AdminGateSpinner topOffset={props.topOffset ?? "0px"} />}>
|
|
21959
|
-
<AdminNavContext.Provider value={adminNav}>
|
|
21960
|
-
{
|
|
21961
|
-
/* data-scrollable opts the whole admin out of a host page's smooth-scroll
|
|
21962
|
-
library (truemeds runs Lenis), which takes the wheel for the window. The
|
|
21963
|
-
shell is a fixed-height box that scrolls inside .app-admin-content, so
|
|
21964
|
-
without this the wheel does nothing anywhere in the admin. */
|
|
21965
|
-
}
|
|
21966
|
-
<div
|
|
21967
|
-
class="app-admin-root app-admin-shell"
|
|
21968
|
-
data-scrollable
|
|
21969
|
-
classList={{ "is-drawer-open": drawerOpen() }}
|
|
21930
|
+
<div
|
|
21970
21931
|
style={{
|
|
21971
|
-
|
|
21972
|
-
|
|
21973
|
-
|
|
21974
|
-
"--app-
|
|
21932
|
+
width: "100%",
|
|
21933
|
+
"max-width": "24rem",
|
|
21934
|
+
background: "var(--app-affiliate-surface)",
|
|
21935
|
+
border: "1px solid var(--app-affiliate-border)",
|
|
21936
|
+
"border-radius": "var(--app-affiliate-radius)",
|
|
21937
|
+
padding: "2rem",
|
|
21938
|
+
display: "flex",
|
|
21939
|
+
"flex-direction": "column",
|
|
21940
|
+
gap: "1.25rem"
|
|
21975
21941
|
}}
|
|
21976
21942
|
>
|
|
21977
|
-
|
|
21978
|
-
<button
|
|
21979
|
-
type="button"
|
|
21980
|
-
class="app-admin-shell-menu-trigger"
|
|
21981
|
-
onClick={() => setDrawerOpen(true)}
|
|
21982
|
-
aria-label="Open admin menu"
|
|
21983
|
-
aria-expanded={drawerOpen()}
|
|
21984
|
-
>
|
|
21985
|
-
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true">
|
|
21986
|
-
<line x1="3" y1="6" x2="21" y2="6" />
|
|
21987
|
-
<line x1="3" y1="12" x2="21" y2="12" />
|
|
21988
|
-
<line x1="3" y1="18" x2="21" y2="18" />
|
|
21989
|
-
</svg>
|
|
21990
|
-
</button>
|
|
21991
|
-
<span class="app-admin-shell-header-title">{TAB_LABELS[currentTab()]}</span>
|
|
21992
|
-
</div>
|
|
21993
|
-
<div
|
|
21994
|
-
class="app-admin-backdrop"
|
|
21995
|
-
onClick={() => setDrawerOpen(false)}
|
|
21996
|
-
aria-hidden="true"
|
|
21997
|
-
/>
|
|
21998
|
-
<aside class="app-admin-sidebar">
|
|
21999
|
-
<div style={{ padding: "1.25rem" }}>
|
|
22000
|
-
<h2
|
|
21943
|
+
<h1
|
|
22001
21944
|
style={{
|
|
22002
|
-
"font-
|
|
22003
|
-
|
|
22004
|
-
|
|
22005
|
-
"text-transform": "uppercase",
|
|
22006
|
-
"letter-spacing": "0.08em",
|
|
22007
|
-
margin: "0 0 1rem"
|
|
21945
|
+
"font-family": "var(--app-affiliate-font-display)",
|
|
21946
|
+
margin: 0,
|
|
21947
|
+
"font-size": "1.5rem"
|
|
22008
21948
|
}}
|
|
22009
21949
|
>
|
|
22010
|
-
|
|
21950
|
+
Accept your admin invite
|
|
21951
|
+
</h1>
|
|
21952
|
+
|
|
21953
|
+
<Show60
|
|
21954
|
+
when={!message()}
|
|
21955
|
+
fallback={<div
|
|
21956
|
+
style={{
|
|
21957
|
+
padding: "0.625rem 0.875rem",
|
|
21958
|
+
background: "var(--app-affiliate-surface-light)",
|
|
21959
|
+
"border-radius": "var(--app-affiliate-radius-sm)",
|
|
21960
|
+
"font-size": "0.875rem"
|
|
21961
|
+
}}
|
|
21962
|
+
>
|
|
21963
|
+
{message()}
|
|
21964
|
+
</div>}
|
|
21965
|
+
>
|
|
21966
|
+
<form
|
|
21967
|
+
onSubmit={handleSubmit}
|
|
21968
|
+
style={{ display: "flex", "flex-direction": "column", gap: "0.875rem" }}
|
|
21969
|
+
>
|
|
21970
|
+
<label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
|
|
21971
|
+
<span style={labelStyle()}>Choose a password</span>
|
|
21972
|
+
<input
|
|
21973
|
+
type="password"
|
|
21974
|
+
required
|
|
21975
|
+
value={password()}
|
|
21976
|
+
onInput={(e) => setPassword(e.currentTarget.value)}
|
|
21977
|
+
autocomplete="new-password"
|
|
21978
|
+
style={inputStyle()}
|
|
21979
|
+
/>
|
|
21980
|
+
</label>
|
|
21981
|
+
|
|
21982
|
+
<label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
|
|
21983
|
+
<span style={labelStyle()}>Confirm password</span>
|
|
21984
|
+
<input
|
|
21985
|
+
type="password"
|
|
21986
|
+
required
|
|
21987
|
+
value={confirm2()}
|
|
21988
|
+
onInput={(e) => setConfirm(e.currentTarget.value)}
|
|
21989
|
+
autocomplete="new-password"
|
|
21990
|
+
style={inputStyle()}
|
|
21991
|
+
/>
|
|
21992
|
+
</label>
|
|
21993
|
+
|
|
21994
|
+
<Show60 when={error()}>
|
|
21995
|
+
<div
|
|
21996
|
+
style={{
|
|
21997
|
+
padding: "0.625rem 0.875rem",
|
|
21998
|
+
background: "var(--app-affiliate-danger-bg)",
|
|
21999
|
+
color: "var(--app-affiliate-danger-fg)",
|
|
22000
|
+
"border-radius": "var(--app-affiliate-radius-sm)",
|
|
22001
|
+
"font-size": "0.875rem"
|
|
22002
|
+
}}
|
|
22003
|
+
>
|
|
22004
|
+
{error()}
|
|
22005
|
+
</div>
|
|
22006
|
+
</Show60>
|
|
22007
|
+
|
|
22008
|
+
<button
|
|
22009
|
+
type="submit"
|
|
22010
|
+
disabled={submitting()}
|
|
22011
|
+
style={{
|
|
22012
|
+
padding: "0.75rem 1rem",
|
|
22013
|
+
background: "var(--app-affiliate-primary)",
|
|
22014
|
+
color: "var(--app-affiliate-primary-fg)",
|
|
22015
|
+
border: "none",
|
|
22016
|
+
"border-radius": "var(--app-affiliate-radius-sm)",
|
|
22017
|
+
"font-weight": "600",
|
|
22018
|
+
cursor: submitting() ? "not-allowed" : "pointer",
|
|
22019
|
+
opacity: submitting() ? 0.7 : 1
|
|
22020
|
+
}}
|
|
22021
|
+
>
|
|
22022
|
+
{submitting() ? "Saving\u2026" : "Accept invite"}
|
|
22023
|
+
</button>
|
|
22024
|
+
</form>
|
|
22025
|
+
</Show60>
|
|
22026
|
+
</div>
|
|
22027
|
+
</div>;
|
|
22028
|
+
}
|
|
22029
|
+
function labelStyle() {
|
|
22030
|
+
return {
|
|
22031
|
+
"font-size": "0.75rem",
|
|
22032
|
+
"text-transform": "uppercase",
|
|
22033
|
+
"letter-spacing": "0.05em",
|
|
22034
|
+
color: "var(--app-affiliate-fg-muted)"
|
|
22035
|
+
};
|
|
22036
|
+
}
|
|
22037
|
+
function inputStyle() {
|
|
22038
|
+
return {
|
|
22039
|
+
width: "100%",
|
|
22040
|
+
padding: "0.625rem 0.75rem",
|
|
22041
|
+
background: "var(--app-affiliate-surface-light)",
|
|
22042
|
+
color: "var(--app-affiliate-fg)",
|
|
22043
|
+
border: "1px solid var(--app-affiliate-border)",
|
|
22044
|
+
"border-radius": "var(--app-affiliate-radius-sm)",
|
|
22045
|
+
"font-size": "0.9rem",
|
|
22046
|
+
"font-family": "inherit",
|
|
22047
|
+
"box-sizing": "border-box"
|
|
22048
|
+
};
|
|
22049
|
+
}
|
|
22050
|
+
|
|
22051
|
+
// src/pages/admin/Admins.tsx
|
|
22052
|
+
var ADMIN_ROLE_SUMMARY = {
|
|
22053
|
+
owner: "Everything, including managing admins",
|
|
22054
|
+
support: "Customers, patient records, support, subscriptions and refunds",
|
|
22055
|
+
accounting: "Payments, refunds and subscriptions \u2014 no patient prescription data",
|
|
22056
|
+
marketing: "Funnel, promotions, catalog and email copy \u2014 no patient data"
|
|
22057
|
+
};
|
|
22058
|
+
var ROLE_LABEL = {
|
|
22059
|
+
owner: "Owner",
|
|
22060
|
+
support: "Support agent",
|
|
22061
|
+
accounting: "Accounting",
|
|
22062
|
+
marketing: "Marketing"
|
|
22063
|
+
};
|
|
22064
|
+
function defaultAcceptUrl() {
|
|
22065
|
+
if (typeof window === "undefined") return "";
|
|
22066
|
+
return `${window.location.origin}${window.location.pathname}?${ADMIN_INVITE_PARAM}=1`;
|
|
22067
|
+
}
|
|
22068
|
+
function RoleSelect(props) {
|
|
22069
|
+
return <select
|
|
22070
|
+
class="app-admin-input"
|
|
22071
|
+
value={props.value ?? ""}
|
|
22072
|
+
disabled={props.disabled}
|
|
22073
|
+
onChange={(e) => props.onChange(e.currentTarget.value)}
|
|
22074
|
+
>
|
|
22075
|
+
<Show61 when={props.value === null}>
|
|
22076
|
+
<option value="" disabled>
|
|
22077
|
+
Unknown role
|
|
22078
|
+
</option>
|
|
22079
|
+
</Show61>
|
|
22080
|
+
<For47 each={ADMIN_ROLES}>{(r) => <option value={r}>{ROLE_LABEL[r]}</option>}</For47>
|
|
22081
|
+
</select>;
|
|
22082
|
+
}
|
|
22083
|
+
function Admins(props) {
|
|
22084
|
+
const [team, { refetch }] = createResource28(() => adminApi.listAdminTeam());
|
|
22085
|
+
const [email, setEmail] = createSignal43("");
|
|
22086
|
+
const [role, setRole] = createSignal43("marketing");
|
|
22087
|
+
const [inviting, setInviting] = createSignal43(false);
|
|
22088
|
+
const [apexNote, setApexNote] = createSignal43(null);
|
|
22089
|
+
async function run(action, success) {
|
|
22090
|
+
try {
|
|
22091
|
+
await action();
|
|
22092
|
+
toastSuccess(success);
|
|
22093
|
+
} catch (err) {
|
|
22094
|
+
toastError(err instanceof Error ? err.message : "Something went wrong");
|
|
22095
|
+
}
|
|
22096
|
+
await refetch();
|
|
22097
|
+
}
|
|
22098
|
+
async function invite(e) {
|
|
22099
|
+
e.preventDefault();
|
|
22100
|
+
const address = email().trim().toLowerCase();
|
|
22101
|
+
if (!address) return;
|
|
22102
|
+
setInviting(true);
|
|
22103
|
+
setApexNote(null);
|
|
22104
|
+
try {
|
|
22105
|
+
const result = await adminApi.inviteAdmin({
|
|
22106
|
+
email: address,
|
|
22107
|
+
adminRole: role(),
|
|
22108
|
+
acceptUrl: props.acceptInviteUrl ?? defaultAcceptUrl()
|
|
22109
|
+
});
|
|
22110
|
+
if (result.apexInviteRequired) {
|
|
22111
|
+
setApexNote(
|
|
22112
|
+
`${address} will be a ${ROLE_LABEL[role()]} once they sign in. This site's admins sign in with their Apex partner portal account, so also invite them as a user there.`
|
|
22113
|
+
);
|
|
22114
|
+
toastSuccess("Role saved for their first sign-in");
|
|
22115
|
+
} else {
|
|
22116
|
+
toastSuccess(`Invite sent to ${address}`);
|
|
22117
|
+
}
|
|
22118
|
+
setEmail("");
|
|
22119
|
+
setRole("marketing");
|
|
22120
|
+
} catch (err) {
|
|
22121
|
+
toastError(err instanceof Error ? err.message : "Failed to send invite");
|
|
22122
|
+
} finally {
|
|
22123
|
+
setInviting(false);
|
|
22124
|
+
await refetch();
|
|
22125
|
+
}
|
|
22126
|
+
}
|
|
22127
|
+
const changeRole = (a, next) => run(() => adminApi.setAdminRole(a.id, next), `${a.email} is now ${ROLE_LABEL[next]}`);
|
|
22128
|
+
const remove = (a) => {
|
|
22129
|
+
if (!window.confirm(`Remove admin access for ${a.email}? Their account stays; they just can't use the admin.`)) return;
|
|
22130
|
+
void run(() => adminApi.removeAdmin(a.id), `Removed ${a.email}`);
|
|
22131
|
+
};
|
|
22132
|
+
const changeInviteRole = (i, next) => run(() => adminApi.updateAdminInvite(i.id, next), `${i.email} will join as ${ROLE_LABEL[next]}`);
|
|
22133
|
+
const cancelInvite = (i) => {
|
|
22134
|
+
if (!window.confirm(`Withdraw the invite for ${i.email}?`)) return;
|
|
22135
|
+
void run(() => adminApi.cancelAdminInvite(i.id), `Invite for ${i.email} withdrawn`);
|
|
22136
|
+
};
|
|
22137
|
+
const isMe = (a) => adminMe()?.uid === a.id;
|
|
22138
|
+
return <div>
|
|
22139
|
+
<PageTitle subtitle="Who can use this admin, and what each person can see and do.">Admins</PageTitle>
|
|
22140
|
+
|
|
22141
|
+
<form onSubmit={invite} class="app-admin-card" style={{ padding: "1rem", "margin-bottom": "1.5rem" }}>
|
|
22142
|
+
<div class="app-admin-heading" style={{ "font-size": "1rem", "margin-bottom": "0.75rem" }}>
|
|
22143
|
+
Invite an admin
|
|
22144
|
+
</div>
|
|
22145
|
+
<div style={{ display: "flex", gap: "0.75rem", "flex-wrap": "wrap", "align-items": "flex-end" }}>
|
|
22146
|
+
<label style={{ display: "flex", "flex-direction": "column", gap: "0.25rem", flex: "1 1 16rem" }}>
|
|
22147
|
+
<span class="app-admin-label">Email</span>
|
|
22148
|
+
<input
|
|
22149
|
+
class="app-admin-input"
|
|
22150
|
+
type="email"
|
|
22151
|
+
required
|
|
22152
|
+
value={email()}
|
|
22153
|
+
onInput={(e) => setEmail(e.currentTarget.value)}
|
|
22154
|
+
placeholder="name@example.com"
|
|
22155
|
+
/>
|
|
22156
|
+
</label>
|
|
22157
|
+
<label style={{ display: "flex", "flex-direction": "column", gap: "0.25rem" }}>
|
|
22158
|
+
<span class="app-admin-label">Role</span>
|
|
22159
|
+
<RoleSelect value={role()} onChange={setRole} />
|
|
22160
|
+
</label>
|
|
22161
|
+
<button type="submit" class="app-admin-btn app-admin-btn-primary" disabled={inviting()}>
|
|
22162
|
+
{inviting() ? "Sending\u2026" : "Send invite"}
|
|
22163
|
+
</button>
|
|
22164
|
+
</div>
|
|
22165
|
+
<div class="app-admin-text-muted" style={{ "font-size": "0.8125rem", "margin-top": "0.5rem" }}>
|
|
22166
|
+
{ROLE_LABEL[role()]}: {ADMIN_ROLE_SUMMARY[role()]}
|
|
22167
|
+
</div>
|
|
22168
|
+
<Show61 when={apexNote()}>
|
|
22169
|
+
<div class="app-admin-card-soft" style={{ padding: "0.625rem 0.875rem", "margin-top": "0.75rem", "font-size": "0.875rem" }}>
|
|
22170
|
+
{apexNote()}
|
|
22171
|
+
</div>
|
|
22172
|
+
</Show61>
|
|
22173
|
+
</form>
|
|
22174
|
+
|
|
22175
|
+
<Show61 when={!team.loading} fallback={<LoadingSpinner />}>
|
|
22176
|
+
<Show61 when={!team.error} fallback={<EmptyState message="Couldn't load the admin team." />}>
|
|
22177
|
+
<table class="app-admin-table">
|
|
22178
|
+
<thead>
|
|
22179
|
+
<tr>
|
|
22180
|
+
<th>Admin</th>
|
|
22181
|
+
<th>Role</th>
|
|
22182
|
+
<th style={{ "text-align": "right" }} />
|
|
22183
|
+
</tr>
|
|
22184
|
+
</thead>
|
|
22185
|
+
<tbody>
|
|
22186
|
+
<For47 each={team()?.admins ?? []}>
|
|
22187
|
+
{(a) => <tr>
|
|
22188
|
+
<td>
|
|
22189
|
+
{a.email}
|
|
22190
|
+
<Show61 when={isMe(a)}>
|
|
22191
|
+
<span class="app-admin-text-muted"> (you)</span>
|
|
22192
|
+
</Show61>
|
|
22193
|
+
</td>
|
|
22194
|
+
<td>
|
|
22195
|
+
<RoleSelect value={a.adminRole} onChange={(r) => void changeRole(a, r)} />
|
|
22196
|
+
</td>
|
|
22197
|
+
<td style={{ "text-align": "right" }}>
|
|
22198
|
+
<button type="button" class="app-admin-btn app-admin-btn-ghost" onClick={() => remove(a)}>
|
|
22199
|
+
Remove
|
|
22200
|
+
</button>
|
|
22201
|
+
</td>
|
|
22202
|
+
</tr>}
|
|
22203
|
+
</For47>
|
|
22204
|
+
</tbody>
|
|
22205
|
+
</table>
|
|
22206
|
+
|
|
22207
|
+
<Show61 when={(team()?.invites ?? []).length > 0}>
|
|
22208
|
+
<div class="app-admin-heading" style={{ "font-size": "1rem", margin: "1.5rem 0 0.5rem" }}>
|
|
22209
|
+
Pending invites
|
|
22210
|
+
</div>
|
|
22211
|
+
<table class="app-admin-table">
|
|
22212
|
+
<thead>
|
|
22213
|
+
<tr>
|
|
22214
|
+
<th>Email</th>
|
|
22215
|
+
<th>Role when they join</th>
|
|
22216
|
+
<th>Expires</th>
|
|
22217
|
+
<th style={{ "text-align": "right" }} />
|
|
22218
|
+
</tr>
|
|
22219
|
+
</thead>
|
|
22220
|
+
<tbody>
|
|
22221
|
+
<For47 each={team()?.invites ?? []}>
|
|
22222
|
+
{(i) => <tr>
|
|
22223
|
+
<td>{i.email}</td>
|
|
22224
|
+
<td>
|
|
22225
|
+
<RoleSelect value={i.adminRole} onChange={(r) => void changeInviteRole(i, r)} />
|
|
22226
|
+
</td>
|
|
22227
|
+
<td class="app-admin-text-muted">
|
|
22228
|
+
{i.expiresAt ? new Date(i.expiresAt).toLocaleDateString() : "At first sign-in"}
|
|
22229
|
+
</td>
|
|
22230
|
+
<td style={{ "text-align": "right" }}>
|
|
22231
|
+
<button type="button" class="app-admin-btn app-admin-btn-ghost" onClick={() => cancelInvite(i)}>
|
|
22232
|
+
Withdraw
|
|
22233
|
+
</button>
|
|
22234
|
+
</td>
|
|
22235
|
+
</tr>}
|
|
22236
|
+
</For47>
|
|
22237
|
+
</tbody>
|
|
22238
|
+
</table>
|
|
22239
|
+
</Show61>
|
|
22240
|
+
</Show61>
|
|
22241
|
+
</Show61>
|
|
22242
|
+
</div>;
|
|
22243
|
+
}
|
|
22244
|
+
|
|
22245
|
+
// src/pages/AdminDashboard.tsx
|
|
22246
|
+
var TAB_LABELS = {
|
|
22247
|
+
dashboard: "Dashboard",
|
|
22248
|
+
customers: "Customers",
|
|
22249
|
+
payments: "Payments",
|
|
22250
|
+
subscriptions: "Subscriptions",
|
|
22251
|
+
products: "Products",
|
|
22252
|
+
categories: "Categories",
|
|
22253
|
+
sales: "Sales",
|
|
22254
|
+
"promo-codes": "Promo Codes",
|
|
22255
|
+
offers: "Offers",
|
|
22256
|
+
affiliates: "Affiliates",
|
|
22257
|
+
support: "Support",
|
|
22258
|
+
webhooks: "Webhooks",
|
|
22259
|
+
"email-templates": "Templates",
|
|
22260
|
+
"email-notifications": "Notifications",
|
|
22261
|
+
funnel: "Funnel",
|
|
22262
|
+
sequences: "Sequences",
|
|
22263
|
+
"sequence-results": "Results",
|
|
22264
|
+
features: "Features",
|
|
22265
|
+
admins: "Admins"
|
|
22266
|
+
};
|
|
22267
|
+
var TAB_PERMISSION = {
|
|
22268
|
+
dashboard: null,
|
|
22269
|
+
customers: "customers.read",
|
|
22270
|
+
payments: "billing.read",
|
|
22271
|
+
subscriptions: "customers.read",
|
|
22272
|
+
products: "catalog.read",
|
|
22273
|
+
categories: "catalog.read",
|
|
22274
|
+
sales: "promotions.read",
|
|
22275
|
+
"promo-codes": "promotions.read",
|
|
22276
|
+
offers: "promotions.read",
|
|
22277
|
+
affiliates: "affiliates.read",
|
|
22278
|
+
support: "patient.support",
|
|
22279
|
+
webhooks: "patient.support",
|
|
22280
|
+
"email-templates": "emailTemplates.write",
|
|
22281
|
+
funnel: "funnel.read",
|
|
22282
|
+
sequences: "funnel.read",
|
|
22283
|
+
"sequence-results": "funnel.read",
|
|
22284
|
+
"email-notifications": "settings.write",
|
|
22285
|
+
features: "settings.write",
|
|
22286
|
+
admins: "admins.manage"
|
|
22287
|
+
};
|
|
22288
|
+
var roleAllows = (tab) => {
|
|
22289
|
+
const permission = TAB_PERMISSION[tab];
|
|
22290
|
+
if (permission === null) return true;
|
|
22291
|
+
return adminMe() !== void 0 && adminCan(permission);
|
|
22292
|
+
};
|
|
22293
|
+
var DEFAULT_TOP_TABS = ["dashboard"];
|
|
22294
|
+
var DEFAULT_TAB_GROUPS = [
|
|
22295
|
+
{ label: "Customer Management", tabs: ["customers", "payments", "support"] },
|
|
22296
|
+
{ label: "Catalog", tabs: ["products", "categories"] },
|
|
22297
|
+
// The drip sequences sit with the Funnel tab that feeds them, followed by
|
|
22298
|
+
// what those sequences achieved.
|
|
22299
|
+
{ label: "Marketing", tabs: ["sales", "promo-codes", "offers", "affiliates", "funnel", "sequences", "sequence-results"] },
|
|
22300
|
+
// Everything transactional that leaves as email: the copy of each email, and
|
|
22301
|
+
// who gets admin copies and the reminder schedule.
|
|
22302
|
+
{ label: "Email", tabs: ["email-templates", "email-notifications"] },
|
|
22303
|
+
{ label: "Integrations", tabs: ["webhooks"] },
|
|
22304
|
+
// What this site has switched on, and what it can ask for.
|
|
22305
|
+
{ label: "Settings", tabs: ["features", "admins"] }
|
|
22306
|
+
];
|
|
22307
|
+
var filterEnabled = (tabs, enabled) => enabled ? tabs.filter((t) => enabled.includes(t)) : tabs;
|
|
22308
|
+
function AdminDashboard(props) {
|
|
22309
|
+
const withoutHidden = (tabs) => (supportChannelMode() === "email" ? tabs.filter((t) => t !== "support") : tabs).filter(roleAllows);
|
|
22310
|
+
const visibleTopTabs = () => withoutHidden(filterEnabled(props.topTabs ?? DEFAULT_TOP_TABS, props.enabledTabs));
|
|
22311
|
+
const visibleGroups = () => (props.tabGroups ?? DEFAULT_TAB_GROUPS).map((g) => ({ label: g.label, tabs: withoutHidden(filterEnabled(g.tabs, props.enabledTabs)) })).filter((g) => g.tabs.length > 0);
|
|
22312
|
+
const orderedTabs = () => [
|
|
22313
|
+
...visibleTopTabs(),
|
|
22314
|
+
...visibleGroups().flatMap((g) => g.tabs)
|
|
22315
|
+
];
|
|
22316
|
+
const isTabEnabled = (tab) => orderedTabs().includes(tab);
|
|
22317
|
+
const affiliatesEnabled = () => props.enabledTabs ? props.enabledTabs.includes("affiliates") : true;
|
|
22318
|
+
const fallbackTab = () => props.defaultTab ?? orderedTabs()[0] ?? "dashboard";
|
|
22319
|
+
const [internalTab, setInternalTab] = createSignal44(fallbackTab());
|
|
22320
|
+
const currentTab = () => props.activeTab ?? internalTab();
|
|
22321
|
+
const [drawerOpen, setDrawerOpen] = createSignal44(false);
|
|
22322
|
+
createEffect16(() => {
|
|
22323
|
+
setAdminToast(props.toast);
|
|
22324
|
+
});
|
|
22325
|
+
const inviteLink = isAdminInviteLink();
|
|
22326
|
+
createEffect16(() => {
|
|
22327
|
+
const auth = props.auth;
|
|
22328
|
+
if (!auth || inviteLink) return;
|
|
22329
|
+
if (!auth.isAuthenticated()) {
|
|
22330
|
+
auth.onUnauthenticated?.();
|
|
22331
|
+
return;
|
|
22332
|
+
}
|
|
22333
|
+
if (auth.isHydrated() && !auth.isAdmin()) {
|
|
22334
|
+
auth.onForbidden?.();
|
|
22335
|
+
}
|
|
22336
|
+
});
|
|
22337
|
+
const adminAllowed = () => {
|
|
22338
|
+
if (inviteLink) return false;
|
|
22339
|
+
const auth = props.auth;
|
|
22340
|
+
if (!auth) return true;
|
|
22341
|
+
return auth.isAuthenticated() && auth.isHydrated() && auth.isAdmin();
|
|
22342
|
+
};
|
|
22343
|
+
createEffect16(() => {
|
|
22344
|
+
if (!adminAllowed()) return;
|
|
22345
|
+
void Promise.resolve().then(() => adminApi.getMe()).then(setAdminMe).catch(() => setAdminMe(null));
|
|
22346
|
+
});
|
|
22347
|
+
createEffect16(() => {
|
|
22348
|
+
if (!adminAllowed()) return;
|
|
22349
|
+
void adminApi.getSupportChannel().then((s) => setSupportChannelMode(s.mode)).catch(() => {
|
|
22350
|
+
});
|
|
22351
|
+
});
|
|
22352
|
+
const [pendingCustomerUid, setPendingCustomerUid] = createSignal44(null);
|
|
22353
|
+
const [pendingThreadId, setPendingThreadId] = createSignal44(null);
|
|
22354
|
+
const [pendingTemplateId, setPendingTemplateId] = createSignal44(null);
|
|
22355
|
+
const handleTabClick = (tab, opts) => {
|
|
22356
|
+
if (!opts?.keepPending) {
|
|
22357
|
+
setPendingCustomerUid(null);
|
|
22358
|
+
setPendingThreadId(null);
|
|
22359
|
+
}
|
|
22360
|
+
setInternalTab(tab);
|
|
22361
|
+
setDrawerOpen(false);
|
|
22362
|
+
props.onTabChange?.(tab);
|
|
22363
|
+
};
|
|
22364
|
+
const adminNav = {
|
|
22365
|
+
selectTab: (tab) => handleTabClick(tab),
|
|
22366
|
+
isTabEnabled,
|
|
22367
|
+
openCustomer: (uid) => {
|
|
22368
|
+
if (props.customers?.onSelectCustomer) {
|
|
22369
|
+
props.customers.onSelectCustomer(uid);
|
|
22370
|
+
} else {
|
|
22371
|
+
setPendingCustomerUid(uid);
|
|
22372
|
+
}
|
|
22373
|
+
handleTabClick("customers", { keepPending: true });
|
|
22374
|
+
},
|
|
22375
|
+
openSupportThread: (threadId) => {
|
|
22376
|
+
setPendingThreadId(threadId);
|
|
22377
|
+
handleTabClick("support", { keepPending: true });
|
|
22378
|
+
},
|
|
22379
|
+
openEmailTemplate: (templateId) => {
|
|
22380
|
+
setPendingTemplateId(templateId);
|
|
22381
|
+
handleTabClick("email-templates", { keepPending: true });
|
|
22382
|
+
}
|
|
22383
|
+
};
|
|
22384
|
+
const topOffset = () => props.topOffset ?? "0px";
|
|
22385
|
+
const TabButton = (btnProps) => <button
|
|
22386
|
+
type="button"
|
|
22387
|
+
onClick={() => handleTabClick(btnProps.tab)}
|
|
22388
|
+
style={{
|
|
22389
|
+
display: "flex",
|
|
22390
|
+
"align-items": "center",
|
|
22391
|
+
gap: "0.75rem",
|
|
22392
|
+
padding: "0.625rem 0.75rem",
|
|
22393
|
+
"border-radius": "var(--app-admin-radius-sm)",
|
|
22394
|
+
"font-size": "0.875rem",
|
|
22395
|
+
"font-weight": "500",
|
|
22396
|
+
"text-align": "left",
|
|
22397
|
+
border: "none",
|
|
22398
|
+
cursor: "pointer",
|
|
22399
|
+
background: currentTab() === btnProps.tab ? "var(--app-admin-primary-soft)" : "transparent",
|
|
22400
|
+
color: currentTab() === btnProps.tab ? "var(--app-admin-primary-soft-fg)" : "var(--app-admin-fg-muted)"
|
|
22401
|
+
}}
|
|
22402
|
+
>
|
|
22403
|
+
<Show62 when={props.tabIcons?.[btnProps.tab]}>
|
|
22404
|
+
<span
|
|
22405
|
+
class={props.tabIcons[btnProps.tab]}
|
|
22406
|
+
style={{ "font-size": "1rem", opacity: 0.7, "flex-shrink": 0 }}
|
|
22407
|
+
/>
|
|
22408
|
+
</Show62>
|
|
22409
|
+
{TAB_LABELS[btnProps.tab]}
|
|
22410
|
+
</button>;
|
|
22411
|
+
if (inviteLink) return <AcceptAdminInvitePage />;
|
|
22412
|
+
return <Show62 when={adminAllowed()} fallback={<AdminGateSpinner topOffset={props.topOffset ?? "0px"} />}>
|
|
22413
|
+
<AdminNavContext.Provider value={adminNav}>
|
|
22414
|
+
{
|
|
22415
|
+
/* data-scrollable opts the whole admin out of a host page's smooth-scroll
|
|
22416
|
+
library (truemeds runs Lenis), which takes the wheel for the window. The
|
|
22417
|
+
shell is a fixed-height box that scrolls inside .app-admin-content, so
|
|
22418
|
+
without this the wheel does nothing anywhere in the admin. */
|
|
22419
|
+
}
|
|
22420
|
+
<div
|
|
22421
|
+
class="app-admin-root app-admin-shell"
|
|
22422
|
+
data-scrollable
|
|
22423
|
+
classList={{ "is-drawer-open": drawerOpen() }}
|
|
22424
|
+
style={{
|
|
22425
|
+
position: "sticky",
|
|
22426
|
+
top: topOffset(),
|
|
22427
|
+
height: `calc(100vh - ${topOffset()})`,
|
|
22428
|
+
"--app-admin-top-offset": topOffset()
|
|
22429
|
+
}}
|
|
22430
|
+
>
|
|
22431
|
+
<div class="app-admin-shell-header">
|
|
22432
|
+
<button
|
|
22433
|
+
type="button"
|
|
22434
|
+
class="app-admin-shell-menu-trigger"
|
|
22435
|
+
onClick={() => setDrawerOpen(true)}
|
|
22436
|
+
aria-label="Open admin menu"
|
|
22437
|
+
aria-expanded={drawerOpen()}
|
|
22438
|
+
>
|
|
22439
|
+
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true">
|
|
22440
|
+
<line x1="3" y1="6" x2="21" y2="6" />
|
|
22441
|
+
<line x1="3" y1="12" x2="21" y2="12" />
|
|
22442
|
+
<line x1="3" y1="18" x2="21" y2="18" />
|
|
22443
|
+
</svg>
|
|
22444
|
+
</button>
|
|
22445
|
+
<span class="app-admin-shell-header-title">{TAB_LABELS[currentTab()]}</span>
|
|
22446
|
+
</div>
|
|
22447
|
+
<div
|
|
22448
|
+
class="app-admin-backdrop"
|
|
22449
|
+
onClick={() => setDrawerOpen(false)}
|
|
22450
|
+
aria-hidden="true"
|
|
22451
|
+
/>
|
|
22452
|
+
<aside class="app-admin-sidebar">
|
|
22453
|
+
<div style={{ padding: "1.25rem" }}>
|
|
22454
|
+
<h2
|
|
22455
|
+
style={{
|
|
22456
|
+
"font-size": "0.7rem",
|
|
22457
|
+
"font-weight": "500",
|
|
22458
|
+
color: "var(--app-admin-fg-muted)",
|
|
22459
|
+
"text-transform": "uppercase",
|
|
22460
|
+
"letter-spacing": "0.08em",
|
|
22461
|
+
margin: "0 0 1rem"
|
|
22462
|
+
}}
|
|
22463
|
+
>
|
|
22464
|
+
Admin Panel
|
|
22011
22465
|
</h2>
|
|
22012
22466
|
<nav style={{ display: "flex", "flex-direction": "column", gap: "0.25rem" }}>
|
|
22013
|
-
<
|
|
22014
|
-
<
|
|
22467
|
+
<For48 each={visibleTopTabs()}>{(tab) => <TabButton tab={tab} />}</For48>
|
|
22468
|
+
<For48 each={visibleGroups()}>
|
|
22015
22469
|
{(group) => <>
|
|
22016
22470
|
<h3
|
|
22017
22471
|
style={{
|
|
@@ -22026,9 +22480,9 @@ function AdminDashboard(props) {
|
|
|
22026
22480
|
>
|
|
22027
22481
|
{group.label}
|
|
22028
22482
|
</h3>
|
|
22029
|
-
<
|
|
22483
|
+
<For48 each={group.tabs}>{(tab) => <TabButton tab={tab} />}</For48>
|
|
22030
22484
|
</>}
|
|
22031
|
-
</
|
|
22485
|
+
</For48>
|
|
22032
22486
|
</nav>
|
|
22033
22487
|
</div>
|
|
22034
22488
|
</aside>
|
|
@@ -22040,8 +22494,12 @@ function AdminDashboard(props) {
|
|
|
22040
22494
|
(which would wedge the sidebar nav), and switching tabs mounts a fresh
|
|
22041
22495
|
boundary that clears a prior tab's error. */
|
|
22042
22496
|
}
|
|
22043
|
-
<
|
|
22497
|
+
<Show62 when={currentTab()} keyed>
|
|
22044
22498
|
<ErrorBoundary fallback={(err, reset) => <AdminTabError error={err} reset={reset} />}>
|
|
22499
|
+
<Show62
|
|
22500
|
+
when={adminMe() === void 0 || roleAllows(currentTab())}
|
|
22501
|
+
fallback={<RoleForbidden />}
|
|
22502
|
+
>
|
|
22045
22503
|
<Switch5 fallback={<Dashboard onSelectTab={handleTabClick} isTabEnabled={isTabEnabled} />}>
|
|
22046
22504
|
<Match5 when={currentTab() === "dashboard"}>
|
|
22047
22505
|
<Dashboard onSelectTab={handleTabClick} isTabEnabled={isTabEnabled} />
|
|
@@ -22110,13 +22568,35 @@ function AdminDashboard(props) {
|
|
|
22110
22568
|
<Match5 when={currentTab() === "features"}>
|
|
22111
22569
|
<Features />
|
|
22112
22570
|
</Match5>
|
|
22571
|
+
<Match5 when={currentTab() === "admins"}>
|
|
22572
|
+
<Admins acceptInviteUrl={props.adminInviteAcceptUrl} />
|
|
22573
|
+
</Match5>
|
|
22113
22574
|
</Switch5>
|
|
22575
|
+
</Show62>
|
|
22114
22576
|
</ErrorBoundary>
|
|
22115
|
-
</
|
|
22577
|
+
</Show62>
|
|
22578
|
+
</div>
|
|
22579
|
+
</div>
|
|
22580
|
+
</AdminNavContext.Provider>
|
|
22581
|
+
</Show62>;
|
|
22582
|
+
}
|
|
22583
|
+
function RoleForbidden() {
|
|
22584
|
+
return <div
|
|
22585
|
+
role="alert"
|
|
22586
|
+
style={{
|
|
22587
|
+
margin: "1rem 0",
|
|
22588
|
+
padding: "1.25rem 1.5rem",
|
|
22589
|
+
border: "1px solid var(--app-admin-border)",
|
|
22590
|
+
"border-radius": "var(--app-admin-radius-sm)",
|
|
22591
|
+
background: "var(--app-admin-surface)",
|
|
22592
|
+
color: "var(--app-admin-fg)"
|
|
22593
|
+
}}
|
|
22594
|
+
>
|
|
22595
|
+
<div style={{ "font-weight": "600", "margin-bottom": "0.375rem" }}>Not available for your role</div>
|
|
22596
|
+
<div style={{ color: "var(--app-admin-fg-muted)", "font-size": "0.875rem" }}>
|
|
22597
|
+
Ask an owner of this site if you need access to this section.
|
|
22116
22598
|
</div>
|
|
22117
|
-
</div
|
|
22118
|
-
</AdminNavContext.Provider>
|
|
22119
|
-
</Show60>;
|
|
22599
|
+
</div>;
|
|
22120
22600
|
}
|
|
22121
22601
|
function AdminTabError(props) {
|
|
22122
22602
|
console.error("[AdminDashboard] tab failed to render:", props.error);
|
|
@@ -22211,7 +22691,8 @@ var ADMIN_TAB_SEGMENTS = {
|
|
|
22211
22691
|
sequences: "sequences",
|
|
22212
22692
|
"sequence-results": "sequence-results",
|
|
22213
22693
|
"email-notifications": "email-notifications",
|
|
22214
|
-
features: "features"
|
|
22694
|
+
features: "features",
|
|
22695
|
+
admins: "admins"
|
|
22215
22696
|
};
|
|
22216
22697
|
var AFFILIATE_SUB_TAB_SEGMENTS = {
|
|
22217
22698
|
overview: "",
|
|
@@ -22259,7 +22740,7 @@ function affiliateSubTabFromPath(pathname, base = "/admin") {
|
|
|
22259
22740
|
}
|
|
22260
22741
|
|
|
22261
22742
|
// src/pages/admin/PatientDashboardPreview.tsx
|
|
22262
|
-
import { Show as
|
|
22743
|
+
import { Show as Show63, For as For49 } from "solid-js";
|
|
22263
22744
|
function PatientDashboardPreview(props) {
|
|
22264
22745
|
const data = useDashboardData({ authToken: () => props.token });
|
|
22265
22746
|
return <div
|
|
@@ -22301,7 +22782,7 @@ function PatientDashboardPreview(props) {
|
|
|
22301
22782
|
/* A failed read is an error with a retry — never presented as an
|
|
22302
22783
|
empty dashboard (the customer may have plenty of data). */
|
|
22303
22784
|
}
|
|
22304
|
-
<
|
|
22785
|
+
<Show63 when={data.error()} keyed>
|
|
22305
22786
|
{(msg) => <div
|
|
22306
22787
|
style={{
|
|
22307
22788
|
display: "flex",
|
|
@@ -22326,10 +22807,10 @@ function PatientDashboardPreview(props) {
|
|
|
22326
22807
|
Retry
|
|
22327
22808
|
</button>
|
|
22328
22809
|
</div>}
|
|
22329
|
-
</
|
|
22810
|
+
</Show63>
|
|
22330
22811
|
|
|
22331
|
-
<
|
|
22332
|
-
<
|
|
22812
|
+
<Show63 when={!data.profile.loading} fallback={<LoadingSpinner />}>
|
|
22813
|
+
<Show63
|
|
22333
22814
|
when={data.profile()}
|
|
22334
22815
|
fallback={<p style={{ color: "var(--app-admin-fg-muted)", "font-size": "0.875rem" }}>
|
|
22335
22816
|
Could not load this customer's dashboard.
|
|
@@ -22362,7 +22843,7 @@ function PatientDashboardPreview(props) {
|
|
|
22362
22843
|
}
|
|
22363
22844
|
<div>
|
|
22364
22845
|
<h3 style={panelSectionHeader}>Subscription</h3>
|
|
22365
|
-
<
|
|
22846
|
+
<Show63
|
|
22366
22847
|
when={data.subscription()}
|
|
22367
22848
|
fallback={<p
|
|
22368
22849
|
style={{
|
|
@@ -22382,13 +22863,13 @@ function PatientDashboardPreview(props) {
|
|
|
22382
22863
|
}}
|
|
22383
22864
|
>
|
|
22384
22865
|
<span style={{ "font-size": "0.875rem", "font-weight": "500" }}>
|
|
22385
|
-
<
|
|
22866
|
+
<Show63 when={sub().amount != null} fallback="Subscription">
|
|
22386
22867
|
{centsToUsd(sub().amount)}/mo
|
|
22387
|
-
</
|
|
22868
|
+
</Show63>
|
|
22388
22869
|
</span>
|
|
22389
22870
|
<StatusBadge status={sub().status} />
|
|
22390
22871
|
</div>
|
|
22391
|
-
<
|
|
22872
|
+
<Show63 when={sub().nextBillingDate}>
|
|
22392
22873
|
<p
|
|
22393
22874
|
style={{
|
|
22394
22875
|
"font-size": "0.75rem",
|
|
@@ -22398,15 +22879,15 @@ function PatientDashboardPreview(props) {
|
|
|
22398
22879
|
>
|
|
22399
22880
|
Next charge {fmtDate(sub().nextBillingDate)}
|
|
22400
22881
|
</p>
|
|
22401
|
-
</
|
|
22882
|
+
</Show63>
|
|
22402
22883
|
</div>}
|
|
22403
|
-
</
|
|
22884
|
+
</Show63>
|
|
22404
22885
|
</div>
|
|
22405
22886
|
|
|
22406
22887
|
{
|
|
22407
22888
|
/* Prescription status */
|
|
22408
22889
|
}
|
|
22409
|
-
<
|
|
22890
|
+
<Show63 when={data.rxStatus()}>
|
|
22410
22891
|
{(rx) => <div>
|
|
22411
22892
|
<h3 style={panelSectionHeader}>Prescription status</h3>
|
|
22412
22893
|
<div class="app-admin-card-soft" style={{ padding: "0.75rem" }}>
|
|
@@ -22422,7 +22903,7 @@ function PatientDashboardPreview(props) {
|
|
|
22422
22903
|
</span>
|
|
22423
22904
|
<StatusBadge status={rx().status} />
|
|
22424
22905
|
</div>
|
|
22425
|
-
<
|
|
22906
|
+
<Show63 when={rx().reason}>
|
|
22426
22907
|
<p
|
|
22427
22908
|
style={{
|
|
22428
22909
|
"font-size": "0.75rem",
|
|
@@ -22432,17 +22913,17 @@ function PatientDashboardPreview(props) {
|
|
|
22432
22913
|
>
|
|
22433
22914
|
{rx().reason}
|
|
22434
22915
|
</p>
|
|
22435
|
-
</
|
|
22916
|
+
</Show63>
|
|
22436
22917
|
</div>
|
|
22437
22918
|
</div>}
|
|
22438
|
-
</
|
|
22919
|
+
</Show63>
|
|
22439
22920
|
|
|
22440
22921
|
{
|
|
22441
22922
|
/* Prescription requests */
|
|
22442
22923
|
}
|
|
22443
22924
|
<div>
|
|
22444
22925
|
<h3 style={panelSectionHeader}>Prescription requests</h3>
|
|
22445
|
-
<
|
|
22926
|
+
<Show63
|
|
22446
22927
|
when={(data.rxList() ?? []).length > 0}
|
|
22447
22928
|
fallback={<p
|
|
22448
22929
|
style={{
|
|
@@ -22454,7 +22935,7 @@ function PatientDashboardPreview(props) {
|
|
|
22454
22935
|
</p>}
|
|
22455
22936
|
>
|
|
22456
22937
|
<div style={{ display: "flex", "flex-direction": "column", gap: "0.5rem" }}>
|
|
22457
|
-
<
|
|
22938
|
+
<For49 each={data.rxList()}>
|
|
22458
22939
|
{(req) => <div class="app-admin-card-soft" style={{ padding: "0.75rem" }}>
|
|
22459
22940
|
<div
|
|
22460
22941
|
style={{
|
|
@@ -22469,7 +22950,7 @@ function PatientDashboardPreview(props) {
|
|
|
22469
22950
|
>
|
|
22470
22951
|
{req.drugName || req.drugId || "Prescription"}
|
|
22471
22952
|
</span>
|
|
22472
|
-
<
|
|
22953
|
+
<Show63 when={req.dosage}>
|
|
22473
22954
|
<span
|
|
22474
22955
|
style={{
|
|
22475
22956
|
"font-size": "0.75rem",
|
|
@@ -22479,7 +22960,7 @@ function PatientDashboardPreview(props) {
|
|
|
22479
22960
|
>
|
|
22480
22961
|
{req.dosage}
|
|
22481
22962
|
</span>
|
|
22482
|
-
</
|
|
22963
|
+
</Show63>
|
|
22483
22964
|
</div>
|
|
22484
22965
|
<StatusBadge status={req.status} />
|
|
22485
22966
|
</div>
|
|
@@ -22490,15 +22971,15 @@ function PatientDashboardPreview(props) {
|
|
|
22490
22971
|
"margin-top": "0.25rem"
|
|
22491
22972
|
}}
|
|
22492
22973
|
>
|
|
22493
|
-
<
|
|
22974
|
+
<Show63 when={req.priceCents != null}>
|
|
22494
22975
|
<span>{centsToUsd(req.priceCents)} · </span>
|
|
22495
|
-
</
|
|
22976
|
+
</Show63>
|
|
22496
22977
|
{fmtDate(req.createdAt)}
|
|
22497
22978
|
</div>
|
|
22498
22979
|
</div>}
|
|
22499
|
-
</
|
|
22980
|
+
</For49>
|
|
22500
22981
|
</div>
|
|
22501
|
-
</
|
|
22982
|
+
</Show63>
|
|
22502
22983
|
</div>
|
|
22503
22984
|
|
|
22504
22985
|
{
|
|
@@ -22506,7 +22987,7 @@ function PatientDashboardPreview(props) {
|
|
|
22506
22987
|
}
|
|
22507
22988
|
<div>
|
|
22508
22989
|
<h3 style={panelSectionHeader}>Pending surveys</h3>
|
|
22509
|
-
<
|
|
22990
|
+
<Show63
|
|
22510
22991
|
when={(data.pendingSurveys() ?? []).length > 0}
|
|
22511
22992
|
fallback={<p
|
|
22512
22993
|
style={{
|
|
@@ -22518,7 +22999,7 @@ function PatientDashboardPreview(props) {
|
|
|
22518
22999
|
</p>}
|
|
22519
23000
|
>
|
|
22520
23001
|
<div style={{ display: "flex", "flex-direction": "column", gap: "0.5rem" }}>
|
|
22521
|
-
<
|
|
23002
|
+
<For49 each={data.pendingSurveys()}>
|
|
22522
23003
|
{(survey) => <div class="app-admin-card-soft" style={{ padding: "0.75rem" }}>
|
|
22523
23004
|
<span style={{ "font-size": "0.875rem", "font-weight": "500" }}>
|
|
22524
23005
|
{survey.drugName || survey.drugId || "Renewal survey"}
|
|
@@ -22533,24 +23014,24 @@ function PatientDashboardPreview(props) {
|
|
|
22533
23014
|
Cycle {survey.cycleNumber}
|
|
22534
23015
|
</span>
|
|
22535
23016
|
</div>}
|
|
22536
|
-
</
|
|
23017
|
+
</For49>
|
|
22537
23018
|
</div>
|
|
22538
|
-
</
|
|
23019
|
+
</Show63>
|
|
22539
23020
|
</div>
|
|
22540
23021
|
</>}
|
|
22541
|
-
</
|
|
22542
|
-
</
|
|
23022
|
+
</Show63>
|
|
23023
|
+
</Show63>
|
|
22543
23024
|
</div>
|
|
22544
23025
|
</div>
|
|
22545
23026
|
</div>;
|
|
22546
23027
|
}
|
|
22547
23028
|
|
|
22548
23029
|
// src/pages/UpdatePaymentMethod.tsx
|
|
22549
|
-
import { Show as
|
|
23030
|
+
import { Show as Show64, createResource as createResource29 } from "solid-js";
|
|
22550
23031
|
var LIVE = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
|
|
22551
23032
|
function UpdatePaymentMethod(props) {
|
|
22552
23033
|
const { Heading, TextField, Button, Banner, Spinner } = usePrimitives();
|
|
22553
|
-
const [resolved] =
|
|
23034
|
+
const [resolved] = createResource29(
|
|
22554
23035
|
() => props.subscriptionId ? null : "fetch",
|
|
22555
23036
|
async () => {
|
|
22556
23037
|
try {
|
|
@@ -22578,21 +23059,21 @@ function UpdatePaymentMethod(props) {
|
|
|
22578
23059
|
Enter a new card for your subscription. Your current card stays active until this succeeds.
|
|
22579
23060
|
</p>
|
|
22580
23061
|
|
|
22581
|
-
<
|
|
23062
|
+
<Show64 when={resolving()}>
|
|
22582
23063
|
<Spinner />
|
|
22583
|
-
</
|
|
23064
|
+
</Show64>
|
|
22584
23065
|
|
|
22585
|
-
<
|
|
23066
|
+
<Show64 when={noSubscription()}>
|
|
22586
23067
|
<Banner variant="error">We couldn’t find an active subscription to update.</Banner>
|
|
22587
|
-
</
|
|
23068
|
+
</Show64>
|
|
22588
23069
|
|
|
22589
|
-
<
|
|
23070
|
+
<Show64 when={!resolving() && !noSubscription()}>
|
|
22590
23071
|
<form onSubmit={handleSubmit}>
|
|
22591
|
-
<
|
|
23072
|
+
<Show64 when={flow.error()}>
|
|
22592
23073
|
<div style={{ "margin-bottom": "1rem" }}>
|
|
22593
23074
|
<Banner variant="error">{flow.error()}</Banner>
|
|
22594
23075
|
</div>
|
|
22595
|
-
</
|
|
23076
|
+
</Show64>
|
|
22596
23077
|
|
|
22597
23078
|
<div style={{ display: "grid", gap: "1rem", "margin-bottom": "1.5rem" }}>
|
|
22598
23079
|
<TextField
|
|
@@ -22648,18 +23129,18 @@ function UpdatePaymentMethod(props) {
|
|
|
22648
23129
|
</Button>
|
|
22649
23130
|
</div>
|
|
22650
23131
|
</form>
|
|
22651
|
-
</
|
|
23132
|
+
</Show64>
|
|
22652
23133
|
</div>;
|
|
22653
23134
|
}
|
|
22654
23135
|
|
|
22655
23136
|
// src/pages/MemberPortal.tsx
|
|
22656
|
-
import { Show as
|
|
23137
|
+
import { Show as Show72, Switch as Switch7, Match as Match7, For as For55, createSignal as createSignal51, onMount as onMount8 } from "solid-js";
|
|
22657
23138
|
|
|
22658
23139
|
// src/pages/member/OrderTracker.tsx
|
|
22659
|
-
import { Show as
|
|
23140
|
+
import { Show as Show65, For as For50, createSignal as createSignal45 } from "solid-js";
|
|
22660
23141
|
function TrackingChip(props) {
|
|
22661
23142
|
let copied;
|
|
22662
|
-
const [announce, setAnnounce] =
|
|
23143
|
+
const [announce, setAnnounce] = createSignal45("");
|
|
22663
23144
|
const copy = async () => {
|
|
22664
23145
|
try {
|
|
22665
23146
|
await navigator.clipboard.writeText(props.number);
|
|
@@ -22685,18 +23166,18 @@ function TrackingChip(props) {
|
|
|
22685
23166
|
<i class="ph ph-copy ship__copy-icon" aria-hidden="true" />
|
|
22686
23167
|
<span class="ship__copied" ref={copied}>Copied ✓</span>
|
|
22687
23168
|
</button>
|
|
22688
|
-
<
|
|
23169
|
+
<Show65 when={props.url}>
|
|
22689
23170
|
<a class="ship__track" href={props.url} target="_blank" rel="noopener noreferrer">
|
|
22690
23171
|
Track{props.carrier ? ` with ${props.carrier}` : ""} ↗
|
|
22691
23172
|
</a>
|
|
22692
|
-
</
|
|
23173
|
+
</Show65>
|
|
22693
23174
|
</div>
|
|
22694
23175
|
<span class="portal-sr-only" role="status" aria-live="polite">{announce()}</span>
|
|
22695
23176
|
</div>;
|
|
22696
23177
|
}
|
|
22697
23178
|
function OrderTracker(props) {
|
|
22698
23179
|
const refill = () => buildRefillView(props.subscription);
|
|
22699
|
-
const RefillStrip = () => <
|
|
23180
|
+
const RefillStrip = () => <Show65 when={refill()}>
|
|
22700
23181
|
{(r) => <div class="refill" data-testid="refill-strip">
|
|
22701
23182
|
<div class="refill__head">
|
|
22702
23183
|
<span class="lab-label">Your plan</span>
|
|
@@ -22705,15 +23186,15 @@ function OrderTracker(props) {
|
|
|
22705
23186
|
awaiting the pharmacy there isn't one, so say what we're waiting
|
|
22706
23187
|
on instead of counting days against a date we don't have. */
|
|
22707
23188
|
}
|
|
22708
|
-
<
|
|
23189
|
+
<Show65
|
|
22709
23190
|
when={!r().pendingFill}
|
|
22710
23191
|
fallback={<span class="refill__cycle">Preparing your next fill</span>}
|
|
22711
23192
|
>
|
|
22712
23193
|
<span class="refill__cycle">Day {r().cycleDay} of {r().cycleLength}</span>
|
|
22713
|
-
</
|
|
23194
|
+
</Show65>
|
|
22714
23195
|
</div>
|
|
22715
23196
|
<div class="refill__rail" style={{ "--p": String(r().progress) }}>
|
|
22716
|
-
<
|
|
23197
|
+
<For50 each={r().events}>
|
|
22717
23198
|
{(e) => <div class={`refill__stone${e.nearest ? " is-near" : ""}`}>
|
|
22718
23199
|
<span class="refill__dot" aria-hidden="true" />
|
|
22719
23200
|
<span class="lab-label refill__label">{e.label}</span>
|
|
@@ -22725,16 +23206,16 @@ function OrderTracker(props) {
|
|
|
22725
23206
|
<span class="refill__rel">
|
|
22726
23207
|
{!r().precise && e.date ? `around ${e.relative}` : e.relative}
|
|
22727
23208
|
</span>
|
|
22728
|
-
<
|
|
23209
|
+
<Show65 when={e.key === "survey" ? props.pendingRenewalId : null} keyed>
|
|
22729
23210
|
{(rid) => <a href={props.renewHref(rid)} class="refill__action">
|
|
22730
23211
|
Complete check-in →
|
|
22731
23212
|
</a>}
|
|
22732
|
-
</
|
|
23213
|
+
</Show65>
|
|
22733
23214
|
</div>}
|
|
22734
|
-
</
|
|
23215
|
+
</For50>
|
|
22735
23216
|
</div>
|
|
22736
23217
|
</div>}
|
|
22737
|
-
</
|
|
23218
|
+
</Show65>;
|
|
22738
23219
|
const EmptyState2 = () => <div class="tracker">
|
|
22739
23220
|
<span class="lab-label">Your order</span>
|
|
22740
23221
|
<RefillStrip />
|
|
@@ -22743,17 +23224,17 @@ function OrderTracker(props) {
|
|
|
22743
23224
|
<span class="tracker__empty-bead" />
|
|
22744
23225
|
</div>
|
|
22745
23226
|
<h2 class="tracker__empty-title">Your journey starts here</h2>
|
|
22746
|
-
<
|
|
23227
|
+
<Show65 when={props.savingsMember}>
|
|
22747
23228
|
<p class="tracker__empty-text" data-testid="tracker-savings-note">
|
|
22748
23229
|
<strong>Member pricing is active on your account.</strong> It applies automatically when you check out.
|
|
22749
23230
|
</p>
|
|
22750
|
-
</
|
|
22751
|
-
<
|
|
23231
|
+
</Show65>
|
|
23232
|
+
<Show65 when={props.offers?.[0]}>
|
|
22752
23233
|
{(offer) => <p class="tracker__empty-text" data-testid="tracker-offer-note">
|
|
22753
23234
|
<strong>You have {offerSummaryText(offer())} waiting.</strong> It applies automatically at checkout —
|
|
22754
23235
|
finish your intake by {offer().deadlineText} to keep it.
|
|
22755
23236
|
</p>}
|
|
22756
|
-
</
|
|
23237
|
+
</Show65>
|
|
22757
23238
|
<p class="tracker__empty-text">
|
|
22758
23239
|
{props.savingsMember ? "Complete a short intake \u2014 about ten minutes \u2014 and a clinician reviews it from there. You\u2019ll watch every step come together right here, from review to delivery." : "Once you complete your intake, you\u2019ll watch every step of your prescription come together right here \u2014 from review to delivery."}
|
|
22759
23240
|
</p>
|
|
@@ -22771,30 +23252,30 @@ function OrderTracker(props) {
|
|
|
22771
23252
|
>
|
|
22772
23253
|
<div class="thread__rail">
|
|
22773
23254
|
<span class="thread__bead">
|
|
22774
|
-
<
|
|
23255
|
+
<Show65 when={isActive}><span class="thread__halo" aria-hidden="true" /></Show65>
|
|
22775
23256
|
</span>
|
|
22776
23257
|
</div>
|
|
22777
23258
|
<div class={`thread__content${isActive ? " thread__content--active" : ""}`}>
|
|
22778
23259
|
<div class="thread__top">
|
|
22779
23260
|
<span class="lab-label thread__label">{s.label}</span>
|
|
22780
|
-
<
|
|
23261
|
+
<Show65 when={s.timestamp}>
|
|
22781
23262
|
<time class="thread__time">{formatStageDate(s.timestamp)}</time>
|
|
22782
|
-
</
|
|
23263
|
+
</Show65>
|
|
22783
23264
|
</div>
|
|
22784
|
-
<
|
|
23265
|
+
<Show65 when={s.heroWord}>
|
|
22785
23266
|
<h2 class="thread__hero">{s.heroWord}</h2>
|
|
22786
|
-
</
|
|
22787
|
-
<
|
|
23267
|
+
</Show65>
|
|
23268
|
+
<Show65 when={s.subCaption}>
|
|
22788
23269
|
<p class="thread__caption">{s.subCaption}</p>
|
|
22789
|
-
</
|
|
22790
|
-
<
|
|
23270
|
+
</Show65>
|
|
23271
|
+
<Show65 when={s.state === "active" && s.key === "shipped" && sp.view.shipment}>
|
|
22791
23272
|
<TrackingChip
|
|
22792
23273
|
number={sp.view.shipment.trackingNumber}
|
|
22793
23274
|
carrier={sp.view.shipment.carrier}
|
|
22794
23275
|
url={sp.view.shipment.trackingUrl}
|
|
22795
23276
|
eta={sp.view.shipment.etaLabel}
|
|
22796
23277
|
/>
|
|
22797
|
-
<
|
|
23278
|
+
<Show65 when={props.messagingEnabled}>
|
|
22798
23279
|
<button
|
|
22799
23280
|
type="button"
|
|
22800
23281
|
class="portal-btn portal-btn--ghost thread__action"
|
|
@@ -22802,10 +23283,10 @@ function OrderTracker(props) {
|
|
|
22802
23283
|
>
|
|
22803
23284
|
Where's my order?
|
|
22804
23285
|
</button>
|
|
22805
|
-
</
|
|
22806
|
-
</
|
|
22807
|
-
<
|
|
22808
|
-
<
|
|
23286
|
+
</Show65>
|
|
23287
|
+
</Show65>
|
|
23288
|
+
<Show65 when={s.state === "consult"}>
|
|
23289
|
+
<Show65
|
|
22809
23290
|
when={props.messagingEnabled}
|
|
22810
23291
|
fallback={<p class="thread__caption thread__await" data-testid="await-messaging">
|
|
22811
23292
|
Your care team is reviewing your request. You’ll be able to message them here once your consult begins.
|
|
@@ -22818,10 +23299,10 @@ function OrderTracker(props) {
|
|
|
22818
23299
|
>
|
|
22819
23300
|
Message your care team
|
|
22820
23301
|
</button>
|
|
22821
|
-
</
|
|
22822
|
-
</
|
|
22823
|
-
<
|
|
22824
|
-
<
|
|
23302
|
+
</Show65>
|
|
23303
|
+
</Show65>
|
|
23304
|
+
<Show65 when={s.state === "denied"}>
|
|
23305
|
+
<Show65
|
|
22825
23306
|
when={props.messagingEnabled}
|
|
22826
23307
|
fallback={<p class="thread__caption thread__await" data-testid="await-messaging">
|
|
22827
23308
|
Your provider will follow up with you about next steps.
|
|
@@ -22834,12 +23315,12 @@ function OrderTracker(props) {
|
|
|
22834
23315
|
>
|
|
22835
23316
|
Talk to your provider
|
|
22836
23317
|
</button>
|
|
22837
|
-
</
|
|
22838
|
-
</
|
|
23318
|
+
</Show65>
|
|
23319
|
+
</Show65>
|
|
22839
23320
|
</div>
|
|
22840
23321
|
</li>;
|
|
22841
23322
|
};
|
|
22842
|
-
return <
|
|
23323
|
+
return <Show65 when={props.request} fallback={<EmptyState2 />}>
|
|
22843
23324
|
{(rx) => {
|
|
22844
23325
|
const view = buildTrackerView(rx());
|
|
22845
23326
|
return <div class="tracker" data-testid="order-tracker">
|
|
@@ -22847,7 +23328,7 @@ function OrderTracker(props) {
|
|
|
22847
23328
|
<span class="lab-label">Your order</span>
|
|
22848
23329
|
<p class="tracker__med">
|
|
22849
23330
|
{props.medicationName}
|
|
22850
|
-
<
|
|
23331
|
+
<Show65 when={rx().dosage}><span class="tracker__dose"> · {rx().dosage}</span></Show65>
|
|
22851
23332
|
</p>
|
|
22852
23333
|
</div>
|
|
22853
23334
|
|
|
@@ -22857,17 +23338,17 @@ function OrderTracker(props) {
|
|
|
22857
23338
|
class={`thread${view.branch ? ` thread--${view.branch}` : ""}`}
|
|
22858
23339
|
style={{ "--active": String(view.activeIndex), "--count": String(view.stages.length) }}
|
|
22859
23340
|
>
|
|
22860
|
-
<
|
|
23341
|
+
<For50 each={view.stages}>
|
|
22861
23342
|
{(stage, i) => <Stage stage={stage} index={i()} view={view} />}
|
|
22862
|
-
</
|
|
23343
|
+
</For50>
|
|
22863
23344
|
</ol>
|
|
22864
23345
|
</div>;
|
|
22865
23346
|
}}
|
|
22866
|
-
</
|
|
23347
|
+
</Show65>;
|
|
22867
23348
|
}
|
|
22868
23349
|
|
|
22869
23350
|
// src/pages/member/RxRow.tsx
|
|
22870
|
-
import { Show as
|
|
23351
|
+
import { Show as Show66, createSignal as createSignal46 } from "solid-js";
|
|
22871
23352
|
var STATUS_LABEL = {
|
|
22872
23353
|
pending: "Under review",
|
|
22873
23354
|
approved: "Approved",
|
|
@@ -22878,7 +23359,7 @@ var STATUS_LABEL = {
|
|
|
22878
23359
|
denied: "Not approved"
|
|
22879
23360
|
};
|
|
22880
23361
|
function RxRow(props) {
|
|
22881
|
-
const [open, setOpen] =
|
|
23362
|
+
const [open, setOpen] = createSignal46(false);
|
|
22882
23363
|
const label3 = () => {
|
|
22883
23364
|
if (props.rx.status === "approved" && props.rx.delivery?.trackingNumber) return "On its way";
|
|
22884
23365
|
return STATUS_LABEL[props.rx.status] ?? props.rx.status;
|
|
@@ -22892,14 +23373,14 @@ function RxRow(props) {
|
|
|
22892
23373
|
>
|
|
22893
23374
|
<span class="rx-row__med">
|
|
22894
23375
|
{props.rx.drugName ?? "Medication"}
|
|
22895
|
-
<
|
|
23376
|
+
<Show66 when={props.rx.dosage}>
|
|
22896
23377
|
<span class="rx-row__dose"> · {props.rx.dosage}</span>
|
|
22897
|
-
</
|
|
23378
|
+
</Show66>
|
|
22898
23379
|
</span>
|
|
22899
23380
|
<span class="rx-row__status">{label3()}</span>
|
|
22900
23381
|
<i class={`ph ph-caret-${open() ? "up" : "down"} rx-row__chevron`} aria-hidden="true" />
|
|
22901
23382
|
</button>
|
|
22902
|
-
<
|
|
23383
|
+
<Show66 when={open()}>
|
|
22903
23384
|
<div class="rx-row__body">
|
|
22904
23385
|
<OrderTracker
|
|
22905
23386
|
request={props.request}
|
|
@@ -22912,12 +23393,12 @@ function RxRow(props) {
|
|
|
22912
23393
|
renewHref={props.renewHref}
|
|
22913
23394
|
/>
|
|
22914
23395
|
</div>
|
|
22915
|
-
</
|
|
23396
|
+
</Show66>
|
|
22916
23397
|
</div>;
|
|
22917
23398
|
}
|
|
22918
23399
|
|
|
22919
23400
|
// src/pages/member/PlanBilling.tsx
|
|
22920
|
-
import { Show as
|
|
23401
|
+
import { Show as Show67, createSignal as createSignal47 } from "solid-js";
|
|
22921
23402
|
function formatCents(cents) {
|
|
22922
23403
|
if (cents == null || Number.isNaN(cents)) return "\u2014";
|
|
22923
23404
|
return `$${(cents / 100).toFixed(2)}`;
|
|
@@ -22938,9 +23419,9 @@ var STATUS_COPY = {
|
|
|
22938
23419
|
};
|
|
22939
23420
|
var LIVE_STATUSES = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
|
|
22940
23421
|
function PlanBilling(props) {
|
|
22941
|
-
const [action, setAction] =
|
|
22942
|
-
const [confirmCancel, setConfirmCancel] =
|
|
22943
|
-
const [error, setError] =
|
|
23422
|
+
const [action, setAction] = createSignal47(null);
|
|
23423
|
+
const [confirmCancel, setConfirmCancel] = createSignal47(false);
|
|
23424
|
+
const [error, setError] = createSignal47(null);
|
|
22944
23425
|
const primary = () => {
|
|
22945
23426
|
const subs = props.subscriptions;
|
|
22946
23427
|
return subs.find((s) => LIVE_STATUSES.has(s.status)) ?? subs[0] ?? null;
|
|
@@ -22960,7 +23441,7 @@ function PlanBilling(props) {
|
|
|
22960
23441
|
return <div class="plan" data-testid="plan-billing">
|
|
22961
23442
|
<span class="lab-label">Plan & billing</span>
|
|
22962
23443
|
|
|
22963
|
-
<
|
|
23444
|
+
<Show67
|
|
22964
23445
|
when={primary()}
|
|
22965
23446
|
fallback={<div class="plan__empty">
|
|
22966
23447
|
<h2 class="plan__empty-title">No active plan</h2>
|
|
@@ -22976,7 +23457,7 @@ function PlanBilling(props) {
|
|
|
22976
23457
|
<span class="membership__brand">{props.brandName}</span>
|
|
22977
23458
|
</div>
|
|
22978
23459
|
<h2 class="membership__med">{sub().medicationName ?? sub().medication}</h2>
|
|
22979
|
-
<
|
|
23460
|
+
<Show67 when={sub().dosage}><p class="membership__dose">{sub().dosage}</p></Show67>
|
|
22980
23461
|
<div class="membership__bottom">
|
|
22981
23462
|
<span class="membership__price">
|
|
22982
23463
|
{formatCents(sub().amountCents)}<span class="membership__per">/mo</span>
|
|
@@ -23002,7 +23483,7 @@ function PlanBilling(props) {
|
|
|
23002
23483
|
</div>
|
|
23003
23484
|
</dl>
|
|
23004
23485
|
|
|
23005
|
-
<
|
|
23486
|
+
<Show67 when={props.messagingEnabled}>
|
|
23006
23487
|
<p class="plan__note">
|
|
23007
23488
|
Question about billing?{" "}
|
|
23008
23489
|
<button
|
|
@@ -23013,14 +23494,14 @@ function PlanBilling(props) {
|
|
|
23013
23494
|
Message support
|
|
23014
23495
|
</button>
|
|
23015
23496
|
</p>
|
|
23016
|
-
</
|
|
23497
|
+
</Show67>
|
|
23017
23498
|
|
|
23018
|
-
<
|
|
23499
|
+
<Show67 when={error()}>
|
|
23019
23500
|
<p class="plan__error" role="alert">{error()}</p>
|
|
23020
|
-
</
|
|
23501
|
+
</Show67>
|
|
23021
23502
|
|
|
23022
23503
|
<div class="plan__actions">
|
|
23023
|
-
<
|
|
23504
|
+
<Show67 when={sub().status === "active"}>
|
|
23024
23505
|
<button
|
|
23025
23506
|
type="button"
|
|
23026
23507
|
class="plan__link-btn"
|
|
@@ -23029,8 +23510,8 @@ function PlanBilling(props) {
|
|
|
23029
23510
|
>
|
|
23030
23511
|
{action() === "pause" ? "Pausing\u2026" : "Pause subscription"}
|
|
23031
23512
|
</button>
|
|
23032
|
-
</
|
|
23033
|
-
<
|
|
23513
|
+
</Show67>
|
|
23514
|
+
<Show67 when={sub().status === "paused"}>
|
|
23034
23515
|
<button
|
|
23035
23516
|
type="button"
|
|
23036
23517
|
class="plan__link-btn"
|
|
@@ -23039,11 +23520,11 @@ function PlanBilling(props) {
|
|
|
23039
23520
|
>
|
|
23040
23521
|
{action() === "resume" ? "Resuming\u2026" : "Resume subscription"}
|
|
23041
23522
|
</button>
|
|
23042
|
-
</
|
|
23523
|
+
</Show67>
|
|
23043
23524
|
|
|
23044
23525
|
<a href={props.paymentMethodHref} class="plan__link-btn">Update payment method</a>
|
|
23045
23526
|
|
|
23046
|
-
<
|
|
23527
|
+
<Show67 when={sub().status !== "cancelled" && sub().status !== "expired"}>
|
|
23047
23528
|
<button
|
|
23048
23529
|
type="button"
|
|
23049
23530
|
class="plan__link-btn plan__link-btn--quiet"
|
|
@@ -23052,10 +23533,10 @@ function PlanBilling(props) {
|
|
|
23052
23533
|
>
|
|
23053
23534
|
Cancel subscription
|
|
23054
23535
|
</button>
|
|
23055
|
-
</
|
|
23536
|
+
</Show67>
|
|
23056
23537
|
</div>
|
|
23057
23538
|
|
|
23058
|
-
<
|
|
23539
|
+
<Show67 when={confirmCancel()}>
|
|
23059
23540
|
<div class="confirm" data-testid="cancel-confirm">
|
|
23060
23541
|
<p class="confirm__text">
|
|
23061
23542
|
Cancel your subscription? You’ll keep access until the end of your current billing period
|
|
@@ -23080,14 +23561,14 @@ function PlanBilling(props) {
|
|
|
23080
23561
|
</button>
|
|
23081
23562
|
</div>
|
|
23082
23563
|
</div>
|
|
23083
|
-
</
|
|
23564
|
+
</Show67>
|
|
23084
23565
|
</>}
|
|
23085
|
-
</
|
|
23566
|
+
</Show67>
|
|
23086
23567
|
</div>;
|
|
23087
23568
|
}
|
|
23088
23569
|
|
|
23089
23570
|
// src/pages/member/AccountPanel.tsx
|
|
23090
|
-
import { Show as
|
|
23571
|
+
import { Show as Show68, For as For51 } from "solid-js";
|
|
23091
23572
|
function pick(member, ...keys) {
|
|
23092
23573
|
if (!member) return "";
|
|
23093
23574
|
for (const k of keys) {
|
|
@@ -23123,19 +23604,19 @@ function AccountPanel(props) {
|
|
|
23123
23604
|
<h1 class="account__title">Your details</h1>
|
|
23124
23605
|
|
|
23125
23606
|
<dl class="account__fields">
|
|
23126
|
-
<
|
|
23607
|
+
<For51 each={fields()}>
|
|
23127
23608
|
{(f) => <div class="account__field">
|
|
23128
23609
|
<dt class="lab-label">{f.label}</dt>
|
|
23129
23610
|
<dd>{f.value}</dd>
|
|
23130
23611
|
</div>}
|
|
23131
|
-
</
|
|
23612
|
+
</For51>
|
|
23132
23613
|
</dl>
|
|
23133
23614
|
|
|
23134
|
-
<
|
|
23615
|
+
<Show68 when={fields().length === 0}>
|
|
23135
23616
|
<p class="account__empty">We don’t have your details on file yet.</p>
|
|
23136
|
-
</
|
|
23617
|
+
</Show68>
|
|
23137
23618
|
|
|
23138
|
-
<
|
|
23619
|
+
<Show68 when={props.messagingEnabled}>
|
|
23139
23620
|
<p class="account__note">
|
|
23140
23621
|
Need to update something?{" "}
|
|
23141
23622
|
<button
|
|
@@ -23147,17 +23628,17 @@ function AccountPanel(props) {
|
|
|
23147
23628
|
</button>{" "}
|
|
23148
23629
|
and we’ll take care of it.
|
|
23149
23630
|
</p>
|
|
23150
|
-
</
|
|
23631
|
+
</Show68>
|
|
23151
23632
|
|
|
23152
23633
|
<div class="account__support">
|
|
23153
|
-
<
|
|
23634
|
+
<Show68 when={props.messagingEnabled}>
|
|
23154
23635
|
<button type="button" class="account__support-link account__support-btn" onClick={() => props.onOpenMessages()}>
|
|
23155
23636
|
Messages
|
|
23156
23637
|
</button>
|
|
23157
|
-
</
|
|
23158
|
-
<
|
|
23638
|
+
</Show68>
|
|
23639
|
+
<For51 each={props.legalLinks ?? []}>
|
|
23159
23640
|
{(link) => <a href={link.href} class="account__support-link">{link.label}</a>}
|
|
23160
|
-
</
|
|
23641
|
+
</For51>
|
|
23161
23642
|
</div>
|
|
23162
23643
|
|
|
23163
23644
|
<button type="button" class="portal-btn portal-btn--ghost account__signout" onClick={props.onSignOut}>
|
|
@@ -23167,13 +23648,13 @@ function AccountPanel(props) {
|
|
|
23167
23648
|
}
|
|
23168
23649
|
|
|
23169
23650
|
// src/pages/member/MedicationGuide.tsx
|
|
23170
|
-
import { Show as
|
|
23651
|
+
import { Show as Show69, For as For52, createSignal as createSignal48 } from "solid-js";
|
|
23171
23652
|
function firstNumber(s) {
|
|
23172
23653
|
const m = (s || "").match(/\d+(\.\d+)?/);
|
|
23173
23654
|
return m ? m[0] : null;
|
|
23174
23655
|
}
|
|
23175
23656
|
function MedicationGuide(props) {
|
|
23176
|
-
const [showDisclaimers, setShowDisclaimers] =
|
|
23657
|
+
const [showDisclaimers, setShowDisclaimers] = createSignal48(false);
|
|
23177
23658
|
const activeTitrationIndex = () => {
|
|
23178
23659
|
const dose = firstNumber(props.currentDose);
|
|
23179
23660
|
if (!dose) return -1;
|
|
@@ -23210,7 +23691,7 @@ function MedicationGuide(props) {
|
|
|
23210
23691
|
<section class="leaflet__section leaflet__section--caution">
|
|
23211
23692
|
<h2 class="leaflet__h2">Do not use this medicine if…</h2>
|
|
23212
23693
|
<ul class="leaflet__list leaflet__list--caution">
|
|
23213
|
-
<
|
|
23694
|
+
<For52 each={props.guide.doNotUseIf}>{(item) => <li>{item}</li>}</For52>
|
|
23214
23695
|
</ul>
|
|
23215
23696
|
</section>
|
|
23216
23697
|
|
|
@@ -23221,7 +23702,7 @@ function MedicationGuide(props) {
|
|
|
23221
23702
|
<h2 class="leaflet__h2">Your dose over time</h2>
|
|
23222
23703
|
<p class="leaflet__note">A typical step-up. Your prescriber sets your exact doses and timing.</p>
|
|
23223
23704
|
<ol class="titration">
|
|
23224
|
-
<
|
|
23705
|
+
<For52 each={props.guide.titration}>
|
|
23225
23706
|
{(step, i) => <li class={`titration__step titration__step--${titrationState(i())}`}>
|
|
23226
23707
|
<span class="titration__bead" aria-hidden="true" />
|
|
23227
23708
|
<div class="titration__body">
|
|
@@ -23233,14 +23714,14 @@ function MedicationGuide(props) {
|
|
|
23233
23714
|
<p class="titration__note">{step.note}</p>
|
|
23234
23715
|
</div>
|
|
23235
23716
|
</li>}
|
|
23236
|
-
</
|
|
23717
|
+
</For52>
|
|
23237
23718
|
</ol>
|
|
23238
23719
|
</section>
|
|
23239
23720
|
|
|
23240
23721
|
<section class="leaflet__section">
|
|
23241
23722
|
<h2 class="leaflet__h2">Giving your injection</h2>
|
|
23242
23723
|
<ol class="steps">
|
|
23243
|
-
<
|
|
23724
|
+
<For52 each={props.guide.injectionSteps}>
|
|
23244
23725
|
{(step) => <li class="steps__item">
|
|
23245
23726
|
<span class="steps__num">{step.n}</span>
|
|
23246
23727
|
<div class="steps__body">
|
|
@@ -23248,7 +23729,7 @@ function MedicationGuide(props) {
|
|
|
23248
23729
|
<p class="steps__detail">{step.detail}</p>
|
|
23249
23730
|
</div>
|
|
23250
23731
|
</li>}
|
|
23251
|
-
</
|
|
23732
|
+
</For52>
|
|
23252
23733
|
</ol>
|
|
23253
23734
|
</section>
|
|
23254
23735
|
|
|
@@ -23256,7 +23737,7 @@ function MedicationGuide(props) {
|
|
|
23256
23737
|
<section class="leaflet__section">
|
|
23257
23738
|
<h2 class="leaflet__h2">Storing your medicine</h2>
|
|
23258
23739
|
<ul class="leaflet__list">
|
|
23259
|
-
<
|
|
23740
|
+
<For52 each={props.guide.storage}>{(item) => <li>{item}</li>}</For52>
|
|
23260
23741
|
</ul>
|
|
23261
23742
|
</section>
|
|
23262
23743
|
|
|
@@ -23266,25 +23747,25 @@ function MedicationGuide(props) {
|
|
|
23266
23747
|
</section>
|
|
23267
23748
|
</div>
|
|
23268
23749
|
|
|
23269
|
-
<
|
|
23750
|
+
<Show69 when={props.guide.contraception}>
|
|
23270
23751
|
<section class="leaflet__section leaflet__section--caution">
|
|
23271
23752
|
<h2 class="leaflet__h2">Birth control</h2>
|
|
23272
23753
|
<p class="leaflet__body">{props.guide.contraception}</p>
|
|
23273
23754
|
</section>
|
|
23274
|
-
</
|
|
23755
|
+
</Show69>
|
|
23275
23756
|
|
|
23276
23757
|
<div class="leaflet__grid">
|
|
23277
23758
|
<section class="leaflet__section">
|
|
23278
23759
|
<h2 class="leaflet__h2">Common side effects</h2>
|
|
23279
23760
|
<ul class="leaflet__list leaflet__list--check">
|
|
23280
|
-
<
|
|
23761
|
+
<For52 each={props.guide.sideEffectsCommon}>{(item) => <li>{item}</li>}</For52>
|
|
23281
23762
|
</ul>
|
|
23282
23763
|
</section>
|
|
23283
23764
|
|
|
23284
23765
|
<section class="leaflet__section leaflet__section--alert">
|
|
23285
23766
|
<h2 class="leaflet__h2">Call right away if you notice…</h2>
|
|
23286
23767
|
<ul class="leaflet__list leaflet__list--alert">
|
|
23287
|
-
<
|
|
23768
|
+
<For52 each={props.guide.sideEffectsSerious}>{(item) => <li>{item}</li>}</For52>
|
|
23288
23769
|
</ul>
|
|
23289
23770
|
</section>
|
|
23290
23771
|
</div>
|
|
@@ -23292,14 +23773,14 @@ function MedicationGuide(props) {
|
|
|
23292
23773
|
<section class="leaflet__section">
|
|
23293
23774
|
<h2 class="leaflet__h2">When to contact your care team</h2>
|
|
23294
23775
|
<ul class="leaflet__list">
|
|
23295
|
-
<
|
|
23776
|
+
<For52 each={props.guide.whenToCall}>{(item) => <li>{item}</li>}</For52>
|
|
23296
23777
|
</ul>
|
|
23297
23778
|
</section>
|
|
23298
23779
|
|
|
23299
23780
|
<section class="leaflet__section">
|
|
23300
23781
|
<h2 class="leaflet__h2">Tips for feeling your best</h2>
|
|
23301
23782
|
<ul class="leaflet__list leaflet__list--check">
|
|
23302
|
-
<
|
|
23783
|
+
<For52 each={props.guide.tips}>{(item) => <li>{item}</li>}</For52>
|
|
23303
23784
|
</ul>
|
|
23304
23785
|
</section>
|
|
23305
23786
|
|
|
@@ -23314,17 +23795,17 @@ function MedicationGuide(props) {
|
|
|
23314
23795
|
{showDisclaimers() ? "Hide" : "Read"} the important details
|
|
23315
23796
|
<i class={`ph ph-caret-${showDisclaimers() ? "up" : "down"}`} aria-hidden="true" />
|
|
23316
23797
|
</button>
|
|
23317
|
-
<
|
|
23798
|
+
<Show69 when={showDisclaimers()}>
|
|
23318
23799
|
<ul class="leaflet__disclaimers" id="leaflet-disclaimers">
|
|
23319
|
-
<
|
|
23800
|
+
<For52 each={props.guide.disclaimers}>{(item) => <li>{item}</li>}</For52>
|
|
23320
23801
|
</ul>
|
|
23321
|
-
</
|
|
23802
|
+
</Show69>
|
|
23322
23803
|
</section>
|
|
23323
23804
|
</div>;
|
|
23324
23805
|
}
|
|
23325
23806
|
|
|
23326
23807
|
// src/pages/member/MessagesPanel.tsx
|
|
23327
|
-
import { Show as
|
|
23808
|
+
import { Show as Show70, For as For53, Switch as Switch6, Match as Match6, createEffect as createEffect17, createSignal as createSignal49, on as on9 } from "solid-js";
|
|
23328
23809
|
import DOMPurify from "dompurify";
|
|
23329
23810
|
function sanitizeMessageHtml(html) {
|
|
23330
23811
|
return DOMPurify.sanitize(html, {
|
|
@@ -23379,11 +23860,11 @@ function rejectionReason(file) {
|
|
|
23379
23860
|
}
|
|
23380
23861
|
function MessagesPanel(props) {
|
|
23381
23862
|
const thread = () => props.thread;
|
|
23382
|
-
const [channel, setChannel] =
|
|
23383
|
-
const [threadNotFound, setThreadNotFound] =
|
|
23384
|
-
const [pendingThreadIntentId, setPendingThreadIntentId] =
|
|
23863
|
+
const [channel, setChannel] = createSignal49("gate");
|
|
23864
|
+
const [threadNotFound, setThreadNotFound] = createSignal49(false);
|
|
23865
|
+
const [pendingThreadIntentId, setPendingThreadIntentId] = createSignal49(null);
|
|
23385
23866
|
const emailSupport = () => thread().supportChannel() === "email";
|
|
23386
|
-
const [emailSent, setEmailSent] =
|
|
23867
|
+
const [emailSent, setEmailSent] = createSignal49(false);
|
|
23387
23868
|
function switchChannel(next) {
|
|
23388
23869
|
thread().clearSelection();
|
|
23389
23870
|
setEmailSent(false);
|
|
@@ -23395,17 +23876,17 @@ function MessagesPanel(props) {
|
|
|
23395
23876
|
setThreadNotFound(false);
|
|
23396
23877
|
setPendingThreadIntentId(null);
|
|
23397
23878
|
}
|
|
23398
|
-
const [composing, setComposing] =
|
|
23399
|
-
const [composeStep, setComposeStep] =
|
|
23879
|
+
const [composing, setComposing] = createSignal49(false);
|
|
23880
|
+
const [composeStep, setComposeStep] = createSignal49(
|
|
23400
23881
|
"support"
|
|
23401
23882
|
);
|
|
23402
|
-
const [newSubject, setNewSubject] =
|
|
23403
|
-
const [newBody, setNewBody] =
|
|
23404
|
-
const [newCategory, setNewCategory] =
|
|
23405
|
-
const [composeError, setComposeError] =
|
|
23406
|
-
const [pendingFile, setPendingFile] =
|
|
23407
|
-
const [newFile, setNewFile] =
|
|
23408
|
-
const [attachError, setAttachError] =
|
|
23883
|
+
const [newSubject, setNewSubject] = createSignal49("");
|
|
23884
|
+
const [newBody, setNewBody] = createSignal49("");
|
|
23885
|
+
const [newCategory, setNewCategory] = createSignal49(null);
|
|
23886
|
+
const [composeError, setComposeError] = createSignal49(null);
|
|
23887
|
+
const [pendingFile, setPendingFile] = createSignal49(null);
|
|
23888
|
+
const [newFile, setNewFile] = createSignal49(null);
|
|
23889
|
+
const [attachError, setAttachError] = createSignal49(null);
|
|
23409
23890
|
function stageFile(input, set) {
|
|
23410
23891
|
const file = input.files?.[0];
|
|
23411
23892
|
input.value = "";
|
|
@@ -23578,9 +24059,9 @@ function MessagesPanel(props) {
|
|
|
23578
24059
|
data-channel={p.source}
|
|
23579
24060
|
>
|
|
23580
24061
|
{p.source === "clinical" ? "Care team" : "Support"}
|
|
23581
|
-
<
|
|
24062
|
+
<Show70 when={p.source === "support" && categoryLabel(p.category)}>
|
|
23582
24063
|
{(label3) => <span class="channel-chip__category">{label3()}</span>}
|
|
23583
|
-
</
|
|
24064
|
+
</Show70>
|
|
23584
24065
|
</span>;
|
|
23585
24066
|
const channelConversations = () => thread().conversations().filter((c) => c.source === (channel() === "care" ? "clinical" : "support"));
|
|
23586
24067
|
const ConversationList = () => <>
|
|
@@ -23609,29 +24090,29 @@ function MessagesPanel(props) {
|
|
|
23609
24090
|
</div>
|
|
23610
24091
|
|
|
23611
24092
|
<div class="msg-list__scroll" data-scrollable>
|
|
23612
|
-
<
|
|
24093
|
+
<Show70 when={thread().loadingConversations()}>
|
|
23613
24094
|
<div class="msg-list__state">
|
|
23614
24095
|
<div class="request-status__spinner" />
|
|
23615
24096
|
</div>
|
|
23616
|
-
</
|
|
24097
|
+
</Show70>
|
|
23617
24098
|
|
|
23618
|
-
<
|
|
24099
|
+
<Show70 when={!thread().loadingConversations() && channelConversations().length === 0}>
|
|
23619
24100
|
<div class="msg-list__state msg-list__state--empty" data-testid="messages-empty">
|
|
23620
24101
|
<i class="ph-thin ph-chat-circle msg-list__empty-icon" aria-hidden="true" />
|
|
23621
24102
|
<p class="msg-list__empty-title">No conversations yet.</p>
|
|
23622
24103
|
<p class="msg-list__empty-hint">
|
|
23623
|
-
<
|
|
24104
|
+
<Show70
|
|
23624
24105
|
when={channel() === "care"}
|
|
23625
24106
|
fallback="Message support about your account, an order, billing or the site."
|
|
23626
24107
|
>
|
|
23627
24108
|
Your care team reviews and responds to anything about your treatment, medication
|
|
23628
24109
|
or side effects.
|
|
23629
|
-
</
|
|
24110
|
+
</Show70>
|
|
23630
24111
|
</p>
|
|
23631
24112
|
</div>
|
|
23632
|
-
</
|
|
24113
|
+
</Show70>
|
|
23633
24114
|
|
|
23634
|
-
<
|
|
24115
|
+
<For53 each={channelConversations()}>
|
|
23635
24116
|
{(convo) => <button
|
|
23636
24117
|
type="button"
|
|
23637
24118
|
class={`msg-list__item${thread().selectedId() === convo.id ? " is-active" : ""}`}
|
|
@@ -23647,17 +24128,17 @@ function MessagesPanel(props) {
|
|
|
23647
24128
|
</div>
|
|
23648
24129
|
<div class="msg-list__row">
|
|
23649
24130
|
<span class="msg-list__preview">{convo.lastMessage ?? "No messages yet"}</span>
|
|
23650
|
-
<
|
|
24131
|
+
<Show70 when={(convo.unreadCount ?? 0) > 0}>
|
|
23651
24132
|
<span class="msg-list__pip">{convo.unreadCount}</span>
|
|
23652
|
-
</
|
|
24133
|
+
</Show70>
|
|
23653
24134
|
</div>
|
|
23654
24135
|
</button>}
|
|
23655
|
-
</
|
|
24136
|
+
</For53>
|
|
23656
24137
|
</div>
|
|
23657
24138
|
</>;
|
|
23658
24139
|
const Attachment = (p) => {
|
|
23659
|
-
const [url, setUrl] =
|
|
23660
|
-
const [failed, setFailed] =
|
|
24140
|
+
const [url, setUrl] = createSignal49(p.attachment.url ?? null);
|
|
24141
|
+
const [failed, setFailed] = createSignal49(false);
|
|
23661
24142
|
let retried = false;
|
|
23662
24143
|
const resolve = async (force = false) => {
|
|
23663
24144
|
const next = await thread().resolveAttachmentUrl(p.attachment.id, force);
|
|
@@ -23672,7 +24153,7 @@ function MessagesPanel(props) {
|
|
|
23672
24153
|
const href = url() ?? await resolve();
|
|
23673
24154
|
if (href) window.open(href, "_blank", "noopener");
|
|
23674
24155
|
};
|
|
23675
|
-
return <
|
|
24156
|
+
return <Show70
|
|
23676
24157
|
when={isImageAttachment(p.attachment)}
|
|
23677
24158
|
fallback={<button
|
|
23678
24159
|
type="button"
|
|
@@ -23691,7 +24172,7 @@ function MessagesPanel(props) {
|
|
|
23691
24172
|
</span>
|
|
23692
24173
|
</button>}
|
|
23693
24174
|
>
|
|
23694
|
-
<
|
|
24175
|
+
<Show70
|
|
23695
24176
|
when={url() && !failed()}
|
|
23696
24177
|
fallback={<span class="msg-attachment__fallback">
|
|
23697
24178
|
{failed() ? "Attachment unavailable" : "Loading\u2026"}
|
|
@@ -23713,13 +24194,13 @@ function MessagesPanel(props) {
|
|
|
23713
24194
|
}}
|
|
23714
24195
|
/>
|
|
23715
24196
|
</button>
|
|
23716
|
-
</
|
|
23717
|
-
</
|
|
24197
|
+
</Show70>
|
|
24198
|
+
</Show70>;
|
|
23718
24199
|
};
|
|
23719
24200
|
const Bubble = (p) => {
|
|
23720
24201
|
const isOwn = () => p.msg.senderRole === "patient";
|
|
23721
24202
|
const body = () => p.msg.text || p.msg.content || "";
|
|
23722
|
-
return <
|
|
24203
|
+
return <Show70
|
|
23723
24204
|
when={p.msg.type !== "system"}
|
|
23724
24205
|
fallback={<p class="msg-thread__system" data-testid="system-message">
|
|
23725
24206
|
{body()}
|
|
@@ -23727,15 +24208,15 @@ function MessagesPanel(props) {
|
|
|
23727
24208
|
>
|
|
23728
24209
|
<div class={`msg-thread__line${isOwn() ? " msg-thread__line--own" : ""}`}>
|
|
23729
24210
|
<div class={`msg-thread__bubble${isOwn() ? " msg-thread__bubble--own" : ""}`}>
|
|
23730
|
-
<
|
|
24211
|
+
<Show70 when={!isOwn() && p.msg.senderName}>
|
|
23731
24212
|
<p class="msg-thread__sender">{p.msg.senderName}</p>
|
|
23732
|
-
</
|
|
24213
|
+
</Show70>
|
|
23733
24214
|
{
|
|
23734
24215
|
/* An attachment may arrive with no caption, so don't render an
|
|
23735
24216
|
empty paragraph in that case. */
|
|
23736
24217
|
}
|
|
23737
|
-
<
|
|
23738
|
-
<
|
|
24218
|
+
<Show70 when={body()}>
|
|
24219
|
+
<Show70
|
|
23739
24220
|
when={p.msg.type === "html"}
|
|
23740
24221
|
fallback={<p class="msg-thread__text">{body()}</p>}
|
|
23741
24222
|
>
|
|
@@ -23746,17 +24227,17 @@ function MessagesPanel(props) {
|
|
|
23746
24227
|
stored XSS in every one of them. */
|
|
23747
24228
|
}
|
|
23748
24229
|
<div class="msg-thread__text" innerHTML={sanitizeMessageHtml(body())} />
|
|
23749
|
-
</
|
|
23750
|
-
</
|
|
23751
|
-
<
|
|
24230
|
+
</Show70>
|
|
24231
|
+
</Show70>
|
|
24232
|
+
<Show70 when={p.msg.attachments?.length}>
|
|
23752
24233
|
<div class="msg-attachment">
|
|
23753
|
-
<
|
|
24234
|
+
<For53 each={p.msg.attachments}>{(a) => <Attachment attachment={a} />}</For53>
|
|
23754
24235
|
</div>
|
|
23755
|
-
</
|
|
24236
|
+
</Show70>
|
|
23756
24237
|
<p class="msg-thread__meta">{formatMessageTime(p.msg.createdAt)}</p>
|
|
23757
24238
|
</div>
|
|
23758
24239
|
</div>
|
|
23759
|
-
</
|
|
24240
|
+
</Show70>;
|
|
23760
24241
|
};
|
|
23761
24242
|
const NewSupportThread = () => <form class="msg-thread msg-thread--compose" onSubmit={submitCompose} data-testid="support-compose">
|
|
23762
24243
|
<div class="msg-thread__header">
|
|
@@ -23782,7 +24263,7 @@ function MessagesPanel(props) {
|
|
|
23782
24263
|
What's this about? <span class="msg-compose__label-optional">(optional)</span>
|
|
23783
24264
|
</label>
|
|
23784
24265
|
<div class="msg-compose__categories" role="group" aria-labelledby="support-category-label">
|
|
23785
|
-
<
|
|
24266
|
+
<For53 each={SUPPORT_CATEGORIES}>
|
|
23786
24267
|
{(c) => <button
|
|
23787
24268
|
type="button"
|
|
23788
24269
|
class={`msg-compose__category-chip${newCategory() === c.key ? " is-selected" : ""}`}
|
|
@@ -23792,7 +24273,7 @@ function MessagesPanel(props) {
|
|
|
23792
24273
|
>
|
|
23793
24274
|
{c.label}
|
|
23794
24275
|
</button>}
|
|
23795
|
-
</
|
|
24276
|
+
</For53>
|
|
23796
24277
|
</div>
|
|
23797
24278
|
|
|
23798
24279
|
<label class="msg-compose__label" for="support-subject">
|
|
@@ -23836,7 +24317,7 @@ function MessagesPanel(props) {
|
|
|
23836
24317
|
onChange={(e) => stageFile(e.currentTarget, setNewFile)}
|
|
23837
24318
|
/>
|
|
23838
24319
|
</label>
|
|
23839
|
-
<
|
|
24320
|
+
<Show70 when={newFile()}>
|
|
23840
24321
|
<button
|
|
23841
24322
|
type="button"
|
|
23842
24323
|
class="msg-compose__staged-remove msg-compose__staged-remove--inline"
|
|
@@ -23844,13 +24325,13 @@ function MessagesPanel(props) {
|
|
|
23844
24325
|
>
|
|
23845
24326
|
Remove file
|
|
23846
24327
|
</button>
|
|
23847
|
-
</
|
|
24328
|
+
</Show70>
|
|
23848
24329
|
|
|
23849
|
-
<
|
|
24330
|
+
<Show70 when={attachError() || composeError()}>
|
|
23850
24331
|
<p class="msg-compose__error" role="alert">
|
|
23851
24332
|
{attachError() ?? composeError()}
|
|
23852
24333
|
</p>
|
|
23853
|
-
</
|
|
24334
|
+
</Show70>
|
|
23854
24335
|
|
|
23855
24336
|
<button
|
|
23856
24337
|
type="submit"
|
|
@@ -23907,7 +24388,7 @@ function MessagesPanel(props) {
|
|
|
23907
24388
|
onChange={(e) => stageFile(e.currentTarget, setNewFile)}
|
|
23908
24389
|
/>
|
|
23909
24390
|
</label>
|
|
23910
|
-
<
|
|
24391
|
+
<Show70 when={newFile()}>
|
|
23911
24392
|
<button
|
|
23912
24393
|
type="button"
|
|
23913
24394
|
class="msg-compose__staged-remove msg-compose__staged-remove--inline"
|
|
@@ -23915,13 +24396,13 @@ function MessagesPanel(props) {
|
|
|
23915
24396
|
>
|
|
23916
24397
|
Remove file
|
|
23917
24398
|
</button>
|
|
23918
|
-
</
|
|
24399
|
+
</Show70>
|
|
23919
24400
|
|
|
23920
|
-
<
|
|
24401
|
+
<Show70 when={attachError() || composeError()}>
|
|
23921
24402
|
<p class="msg-compose__error" role="alert">
|
|
23922
24403
|
{attachError() ?? composeError()}
|
|
23923
24404
|
</p>
|
|
23924
|
-
</
|
|
24405
|
+
</Show70>
|
|
23925
24406
|
|
|
23926
24407
|
<button
|
|
23927
24408
|
type="submit"
|
|
@@ -23953,19 +24434,19 @@ function MessagesPanel(props) {
|
|
|
23953
24434
|
<i class="ph-thin ph-heartbeat msg-choice__option-icon" aria-hidden="true" />
|
|
23954
24435
|
<span class="msg-choice__option-title">My care team</span>
|
|
23955
24436
|
<span class="msg-choice__option-sub">Treatment, medication or side effects</span>
|
|
23956
|
-
<
|
|
24437
|
+
<Show70
|
|
23957
24438
|
when={!thread().loadingConversations()}
|
|
23958
24439
|
fallback={<span
|
|
23959
24440
|
class="msg-choice__option-spinner request-status__spinner"
|
|
23960
24441
|
data-testid="gate-care-loading"
|
|
23961
24442
|
/>}
|
|
23962
24443
|
>
|
|
23963
|
-
<
|
|
24444
|
+
<Show70 when={careUnreadCount() > 0}>
|
|
23964
24445
|
<span class="msg-choice__option-badge" data-testid="gate-care-badge">
|
|
23965
24446
|
{careUnreadCount()}
|
|
23966
24447
|
</span>
|
|
23967
|
-
</
|
|
23968
|
-
</
|
|
24448
|
+
</Show70>
|
|
24449
|
+
</Show70>
|
|
23969
24450
|
</button>
|
|
23970
24451
|
<button
|
|
23971
24452
|
type="button"
|
|
@@ -23976,27 +24457,27 @@ function MessagesPanel(props) {
|
|
|
23976
24457
|
<i class="ph-thin ph-lifebuoy msg-choice__option-icon" aria-hidden="true" />
|
|
23977
24458
|
<span class="msg-choice__option-title">Support</span>
|
|
23978
24459
|
<span class="msg-choice__option-sub">Account, orders, billing or the website</span>
|
|
23979
|
-
<
|
|
24460
|
+
<Show70
|
|
23980
24461
|
when={!thread().loadingConversations()}
|
|
23981
24462
|
fallback={<span
|
|
23982
24463
|
class="msg-choice__option-spinner request-status__spinner"
|
|
23983
24464
|
data-testid="gate-support-loading"
|
|
23984
24465
|
/>}
|
|
23985
24466
|
>
|
|
23986
|
-
<
|
|
24467
|
+
<Show70 when={supportUnreadCount() > 0 && !emailSupport()}>
|
|
23987
24468
|
<span class="msg-choice__option-badge" data-testid="gate-support-badge">
|
|
23988
24469
|
{supportUnreadCount()}
|
|
23989
24470
|
</span>
|
|
23990
|
-
</
|
|
23991
|
-
</
|
|
24471
|
+
</Show70>
|
|
24472
|
+
</Show70>
|
|
23992
24473
|
</button>
|
|
23993
24474
|
</div>
|
|
23994
24475
|
|
|
23995
|
-
<
|
|
24476
|
+
<Show70 when={threadNotFound()}>
|
|
23996
24477
|
<p class="msg-choice__notice-text" data-testid="messages-gate-note">
|
|
23997
24478
|
That conversation isn't available.
|
|
23998
24479
|
</p>
|
|
23999
|
-
</
|
|
24480
|
+
</Show70>
|
|
24000
24481
|
</div>;
|
|
24001
24482
|
const CareTeamNotice = () => <div class="msg-thread msg-choice" data-testid="care-team-notice">
|
|
24002
24483
|
<div class="msg-thread__header">
|
|
@@ -24072,9 +24553,9 @@ function MessagesPanel(props) {
|
|
|
24072
24553
|
<div>
|
|
24073
24554
|
<div class="msg-thread__title-row">
|
|
24074
24555
|
<h3 class="msg-thread__name">{selectedConvo()?.participantName ?? "Provider"}</h3>
|
|
24075
|
-
<
|
|
24556
|
+
<Show70 when={selectedConvo()}>
|
|
24076
24557
|
{(convo) => <ChannelChip source={convo().source} category={convo().category} />}
|
|
24077
|
-
</
|
|
24558
|
+
</Show70>
|
|
24078
24559
|
</div>
|
|
24079
24560
|
<p class="msg-thread__role">{selectedConvo()?.participantRole ?? "Prescriber"}</p>
|
|
24080
24561
|
</div>
|
|
@@ -24083,23 +24564,23 @@ function MessagesPanel(props) {
|
|
|
24083
24564
|
it — so this is a status cue, not a lock. A transferred one is
|
|
24084
24565
|
different: its content now lives with the care team, so it's read-only. */
|
|
24085
24566
|
}
|
|
24086
|
-
<
|
|
24567
|
+
<Show70 when={selectedConvo()?.source === "support" && selectedConvo()?.status === "closed"}>
|
|
24087
24568
|
<span class="msg-thread__status" data-testid="thread-status-closed">
|
|
24088
24569
|
Resolved
|
|
24089
24570
|
</span>
|
|
24090
|
-
</
|
|
24091
|
-
<
|
|
24571
|
+
</Show70>
|
|
24572
|
+
<Show70 when={selectedConvo()?.source === "support" && selectedConvo()?.status === "transferred"}>
|
|
24092
24573
|
<span class="msg-thread__status" data-testid="thread-status-transferred">
|
|
24093
24574
|
Moved to care team
|
|
24094
24575
|
</span>
|
|
24095
|
-
</
|
|
24576
|
+
</Show70>
|
|
24096
24577
|
</div>
|
|
24097
24578
|
|
|
24098
24579
|
{
|
|
24099
24580
|
/* A closed (often transferred-back) support thread offers a jump straight
|
|
24100
24581
|
to the care team, rather than making the customer find the gate. */
|
|
24101
24582
|
}
|
|
24102
|
-
<
|
|
24583
|
+
<Show70
|
|
24103
24584
|
when={selectedConvo()?.source === "support" && (selectedConvo()?.status === "closed" || selectedConvo()?.status === "transferred")}
|
|
24104
24585
|
>
|
|
24105
24586
|
<div class="msg-thread__banner">
|
|
@@ -24112,21 +24593,21 @@ function MessagesPanel(props) {
|
|
|
24112
24593
|
Continue with your care team
|
|
24113
24594
|
</button>
|
|
24114
24595
|
</div>
|
|
24115
|
-
</
|
|
24596
|
+
</Show70>
|
|
24116
24597
|
|
|
24117
24598
|
<div class="msg-thread__messages" data-scrollable>
|
|
24118
|
-
<
|
|
24599
|
+
<Show70 when={thread().loadingMessages()}>
|
|
24119
24600
|
<div class="msg-list__state">
|
|
24120
24601
|
<div class="request-status__spinner" />
|
|
24121
24602
|
</div>
|
|
24122
|
-
</
|
|
24123
|
-
<
|
|
24603
|
+
</Show70>
|
|
24604
|
+
<For53 each={thread().messages()}>{(msg) => <Bubble msg={msg} />}</For53>
|
|
24124
24605
|
<div ref={endRef} />
|
|
24125
24606
|
</div>
|
|
24126
24607
|
|
|
24127
|
-
<
|
|
24608
|
+
<Show70 when={pendingFile() || attachError()}>
|
|
24128
24609
|
<div class="msg-compose__staged">
|
|
24129
|
-
<
|
|
24610
|
+
<Show70 when={pendingFile()}>
|
|
24130
24611
|
{(file) => <span class="msg-compose__staged-file" data-testid="staged-file">
|
|
24131
24612
|
<i class="ph-thin ph-paperclip" aria-hidden="true" />
|
|
24132
24613
|
{file().name}
|
|
@@ -24140,27 +24621,27 @@ function MessagesPanel(props) {
|
|
|
24140
24621
|
×
|
|
24141
24622
|
</button>
|
|
24142
24623
|
</span>}
|
|
24143
|
-
</
|
|
24144
|
-
<
|
|
24624
|
+
</Show70>
|
|
24625
|
+
<Show70 when={attachError()}>
|
|
24145
24626
|
<span class="msg-compose__error" role="alert">
|
|
24146
24627
|
{attachError()}
|
|
24147
24628
|
</span>
|
|
24148
|
-
</
|
|
24629
|
+
</Show70>
|
|
24149
24630
|
</div>
|
|
24150
|
-
</
|
|
24631
|
+
</Show70>
|
|
24151
24632
|
|
|
24152
24633
|
{
|
|
24153
24634
|
/* A transferred support thread is read-only: the customer's messages were
|
|
24154
24635
|
moved to their care team, so the place to continue is that conversation
|
|
24155
24636
|
(the banner above), not a reply that would reopen this one. */
|
|
24156
24637
|
}
|
|
24157
|
-
<
|
|
24638
|
+
<Show70 when={!(selectedConvo()?.source === "support" && selectedConvo()?.status === "transferred")}>
|
|
24158
24639
|
<div class="msg-compose">
|
|
24159
24640
|
{
|
|
24160
24641
|
/* Support threads only: clinical conversations are an Apex proxy and
|
|
24161
24642
|
their attachment path isn't wired up here yet. */
|
|
24162
24643
|
}
|
|
24163
|
-
<
|
|
24644
|
+
<Show70 when={thread().selectedSource() === "support"}>
|
|
24164
24645
|
<label class="msg-compose__attach" title="Attach a file">
|
|
24165
24646
|
<i class="ph-thin ph-paperclip" aria-hidden="true" />
|
|
24166
24647
|
<span class="msg-compose__attach-label">Attach a file</span>
|
|
@@ -24172,7 +24653,7 @@ function MessagesPanel(props) {
|
|
|
24172
24653
|
onChange={(e) => stageFile(e.currentTarget, setPendingFile)}
|
|
24173
24654
|
/>
|
|
24174
24655
|
</label>
|
|
24175
|
-
</
|
|
24656
|
+
</Show70>
|
|
24176
24657
|
<textarea
|
|
24177
24658
|
ref={composerRef}
|
|
24178
24659
|
class="msg-compose__input"
|
|
@@ -24193,25 +24674,25 @@ function MessagesPanel(props) {
|
|
|
24193
24674
|
{thread().sending() ? "Sending\u2026" : "Send"}
|
|
24194
24675
|
</button>
|
|
24195
24676
|
</div>
|
|
24196
|
-
</
|
|
24677
|
+
</Show70>
|
|
24197
24678
|
</>;
|
|
24198
24679
|
return <div class="msg-panel" data-testid="messages-panel">
|
|
24199
|
-
<
|
|
24680
|
+
<Show70
|
|
24200
24681
|
when={channel() !== "gate"}
|
|
24201
24682
|
fallback={<div class="msg-panel__layout msg-panel__layout--gate">
|
|
24202
24683
|
<ChannelGate />
|
|
24203
24684
|
</div>}
|
|
24204
24685
|
>
|
|
24205
|
-
<
|
|
24686
|
+
<Show70
|
|
24206
24687
|
when={!(channel() === "support" && emailSupport() && thread().selectedId() == null)}
|
|
24207
24688
|
fallback={
|
|
24208
24689
|
// Email-channel support: the form (or its confirmation) and nothing
|
|
24209
24690
|
// else. A deep-linked thread that predates the switch still opens
|
|
24210
24691
|
// in the normal layout below, since it has a selection.
|
|
24211
24692
|
<div class="msg-panel__layout msg-panel__layout--gate">
|
|
24212
|
-
<
|
|
24693
|
+
<Show70 when={!emailSent()} fallback={<SupportEmailSent />}>
|
|
24213
24694
|
<NewSupportThread />
|
|
24214
|
-
</
|
|
24695
|
+
</Show70>
|
|
24215
24696
|
</div>
|
|
24216
24697
|
}
|
|
24217
24698
|
>
|
|
@@ -24220,7 +24701,7 @@ function MessagesPanel(props) {
|
|
|
24220
24701
|
<ConversationList />
|
|
24221
24702
|
</div>
|
|
24222
24703
|
<div class={`msg-panel__main${threadOpen() ? "" : " msg-panel__main--hidden-mobile"}`}>
|
|
24223
|
-
<
|
|
24704
|
+
<Show70 when={composing()}>
|
|
24224
24705
|
<Switch6>
|
|
24225
24706
|
<Match6 when={composeStep() === "care"}>
|
|
24226
24707
|
<NewCareTeamThread />
|
|
@@ -24232,26 +24713,26 @@ function MessagesPanel(props) {
|
|
|
24232
24713
|
<NewSupportThread />
|
|
24233
24714
|
</Match6>
|
|
24234
24715
|
</Switch6>
|
|
24235
|
-
</
|
|
24236
|
-
<
|
|
24237
|
-
<
|
|
24716
|
+
</Show70>
|
|
24717
|
+
<Show70 when={!composing()}>
|
|
24718
|
+
<Show70
|
|
24238
24719
|
when={thread().selectedId() != null}
|
|
24239
24720
|
fallback={<div class="msg-panel__placeholder" data-testid="messages-placeholder">
|
|
24240
24721
|
<p>Select a conversation to read and reply.</p>
|
|
24241
24722
|
</div>}
|
|
24242
24723
|
>
|
|
24243
24724
|
<Thread />
|
|
24244
|
-
</
|
|
24245
|
-
</
|
|
24725
|
+
</Show70>
|
|
24726
|
+
</Show70>
|
|
24246
24727
|
</div>
|
|
24247
24728
|
</div>
|
|
24248
|
-
</
|
|
24249
|
-
</
|
|
24729
|
+
</Show70>
|
|
24730
|
+
</Show70>
|
|
24250
24731
|
</div>;
|
|
24251
24732
|
}
|
|
24252
24733
|
|
|
24253
24734
|
// src/pages/member/SurveyHistory.tsx
|
|
24254
|
-
import { createSignal as
|
|
24735
|
+
import { createSignal as createSignal50, createResource as createResource30, For as For54, Show as Show71 } from "solid-js";
|
|
24255
24736
|
var MODE_LABELS = {
|
|
24256
24737
|
initial: "Intake questionnaire",
|
|
24257
24738
|
refill: "Refill check-in"
|
|
@@ -24267,21 +24748,21 @@ var asEmptyOn404 = (value) => (err) => {
|
|
|
24267
24748
|
throw err;
|
|
24268
24749
|
};
|
|
24269
24750
|
function SurveyHistory() {
|
|
24270
|
-
const [list] =
|
|
24751
|
+
const [list] = createResource30(
|
|
24271
24752
|
() => membersApi.getSurveyResponses().then((r) => r.responses).catch(asEmptyOn404([]))
|
|
24272
24753
|
);
|
|
24273
|
-
const [selectedId, setSelectedId] =
|
|
24274
|
-
const [detail] =
|
|
24754
|
+
const [selectedId, setSelectedId] = createSignal50(null);
|
|
24755
|
+
const [detail] = createResource30(
|
|
24275
24756
|
selectedId,
|
|
24276
24757
|
(id) => membersApi.getSurveyResponse(id).catch(asEmptyOn404(null))
|
|
24277
24758
|
);
|
|
24278
|
-
const ListView = () => <
|
|
24759
|
+
const ListView = () => <Show71
|
|
24279
24760
|
when={!list.error}
|
|
24280
24761
|
fallback={<div class="portal-state" data-testid="history-error">
|
|
24281
24762
|
<p>We couldn't load your submitted surveys. Please try again in a moment.</p>
|
|
24282
24763
|
</div>}
|
|
24283
24764
|
>
|
|
24284
|
-
<
|
|
24765
|
+
<Show71
|
|
24285
24766
|
when={(list() ?? []).length > 0}
|
|
24286
24767
|
fallback={<div class="portal-state" data-testid="history-empty">
|
|
24287
24768
|
<p>No submitted questionnaires yet.</p>
|
|
@@ -24291,7 +24772,7 @@ function SurveyHistory() {
|
|
|
24291
24772
|
</div>}
|
|
24292
24773
|
>
|
|
24293
24774
|
<ul class="history-list" data-testid="history-list">
|
|
24294
|
-
<
|
|
24775
|
+
<For54 each={list()}>
|
|
24295
24776
|
{(item) => <li>
|
|
24296
24777
|
<button type="button" class="history-row" onClick={() => setSelectedId(item.id)}>
|
|
24297
24778
|
<span class="history-row__mode">{MODE_LABELS[item.mode] ?? "Questionnaire"}</span>
|
|
@@ -24301,10 +24782,10 @@ function SurveyHistory() {
|
|
|
24301
24782
|
<i class="ph-thin ph-caret-right portal-icon" aria-hidden="true" />
|
|
24302
24783
|
</button>
|
|
24303
24784
|
</li>}
|
|
24304
|
-
</
|
|
24785
|
+
</For54>
|
|
24305
24786
|
</ul>
|
|
24306
|
-
</
|
|
24307
|
-
</
|
|
24787
|
+
</Show71>
|
|
24788
|
+
</Show71>;
|
|
24308
24789
|
const DetailView = () => <div data-testid="history-detail">
|
|
24309
24790
|
<button
|
|
24310
24791
|
type="button"
|
|
@@ -24313,14 +24794,14 @@ function SurveyHistory() {
|
|
|
24313
24794
|
>
|
|
24314
24795
|
<i class="ph-thin ph-caret-left portal-icon" aria-hidden="true" /> All questionnaires
|
|
24315
24796
|
</button>
|
|
24316
|
-
<
|
|
24797
|
+
<Show71
|
|
24317
24798
|
when={!detail.loading}
|
|
24318
24799
|
fallback={<div class="portal-state">
|
|
24319
24800
|
<div class="request-status__spinner" />
|
|
24320
24801
|
<p>Loading your answers…</p>
|
|
24321
24802
|
</div>}
|
|
24322
24803
|
>
|
|
24323
|
-
<
|
|
24804
|
+
<Show71
|
|
24324
24805
|
when={!detail.error && detail()}
|
|
24325
24806
|
fallback={<div class="portal-state" data-testid="history-detail-error">
|
|
24326
24807
|
<p>We couldn't load this questionnaire. Please try again in a moment.</p>
|
|
@@ -24334,33 +24815,33 @@ function SurveyHistory() {
|
|
|
24334
24815
|
shown exactly as they were at the time — they aren't updated afterwards.
|
|
24335
24816
|
</p>
|
|
24336
24817
|
</header>
|
|
24337
|
-
<
|
|
24818
|
+
<For54 each={t().sections}>
|
|
24338
24819
|
{(section) => <section class="history-section">
|
|
24339
24820
|
<h3 class="lab-label">{section.title}</h3>
|
|
24340
|
-
<
|
|
24821
|
+
<For54 each={section.items}>
|
|
24341
24822
|
{(item) => <div class="history-qa">
|
|
24342
24823
|
<p class="history-qa__q">{item.question}</p>
|
|
24343
24824
|
<p class="history-qa__a">{item.answer}</p>
|
|
24344
24825
|
</div>}
|
|
24345
|
-
</
|
|
24826
|
+
</For54>
|
|
24346
24827
|
</section>}
|
|
24347
|
-
</
|
|
24828
|
+
</For54>
|
|
24348
24829
|
</article>}
|
|
24349
|
-
</
|
|
24350
|
-
</
|
|
24830
|
+
</Show71>
|
|
24831
|
+
</Show71>
|
|
24351
24832
|
</div>;
|
|
24352
24833
|
return <div class="survey-history" data-testid="survey-history">
|
|
24353
|
-
<
|
|
24834
|
+
<Show71
|
|
24354
24835
|
when={!list.loading || selectedId()}
|
|
24355
24836
|
fallback={<div class="portal-state">
|
|
24356
24837
|
<div class="request-status__spinner" />
|
|
24357
24838
|
<p>Loading your submitted surveys…</p>
|
|
24358
24839
|
</div>}
|
|
24359
24840
|
>
|
|
24360
|
-
<
|
|
24841
|
+
<Show71 when={selectedId()} fallback={<ListView />}>
|
|
24361
24842
|
<DetailView />
|
|
24362
|
-
</
|
|
24363
|
-
</
|
|
24843
|
+
</Show71>
|
|
24844
|
+
</Show71>
|
|
24364
24845
|
</div>;
|
|
24365
24846
|
}
|
|
24366
24847
|
|
|
@@ -24423,15 +24904,15 @@ function MemberPortal(props) {
|
|
|
24423
24904
|
}
|
|
24424
24905
|
return null;
|
|
24425
24906
|
};
|
|
24426
|
-
const [tab, setTab] =
|
|
24427
|
-
const [intent, setIntent] =
|
|
24907
|
+
const [tab, setTab] = createSignal51(resolveTabFromUrl() ?? "tracker");
|
|
24908
|
+
const [intent, setIntent] = createSignal51(resolveIntentFromUrl());
|
|
24428
24909
|
onMount8(() => {
|
|
24429
24910
|
const resolved = resolveTabFromUrl();
|
|
24430
24911
|
if (resolved && resolved !== tab()) setTab(resolved);
|
|
24431
24912
|
const resolvedIntent = resolveIntentFromUrl();
|
|
24432
24913
|
if (resolvedIntent) setIntent(resolvedIntent);
|
|
24433
24914
|
});
|
|
24434
|
-
const [offers, setOffers] =
|
|
24915
|
+
const [offers, setOffers] = createSignal51([]);
|
|
24435
24916
|
onMount8(() => {
|
|
24436
24917
|
if (!props.auth.isAuthenticated()) return;
|
|
24437
24918
|
offersApi.mine().then((r) => setOffers(r.offers ?? [])).catch(() => setOffers([]));
|
|
@@ -24461,7 +24942,7 @@ function MemberPortal(props) {
|
|
|
24461
24942
|
} catch {
|
|
24462
24943
|
}
|
|
24463
24944
|
};
|
|
24464
|
-
const RailNav = (p) => <
|
|
24945
|
+
const RailNav = (p) => <For55 each={tabs()}>
|
|
24465
24946
|
{(item) => <button
|
|
24466
24947
|
type="button"
|
|
24467
24948
|
class={`portal-${p.variant}__item${tab() === item.key ? " is-active" : ""}`}
|
|
@@ -24471,17 +24952,17 @@ function MemberPortal(props) {
|
|
|
24471
24952
|
>
|
|
24472
24953
|
<i class={`${item.icon} portal-icon`} aria-hidden="true" />
|
|
24473
24954
|
<span class="portal-item__label">{item.label}</span>
|
|
24474
|
-
<
|
|
24955
|
+
<Show72 when={item.key === "tracker" && inMotion()}>
|
|
24475
24956
|
<span class="portal-item__live" aria-label="In progress" />
|
|
24476
|
-
</
|
|
24477
|
-
<
|
|
24957
|
+
</Show72>
|
|
24958
|
+
<Show72 when={item.key === "messages" && unreadTotal() > 0}>
|
|
24478
24959
|
<span class={`portal-item__badge${p.variant === "tabs" ? " portal-item__badge--tab" : ""}`}>
|
|
24479
24960
|
{unreadTotal() > 99 ? "99+" : unreadTotal()}
|
|
24480
24961
|
</span>
|
|
24481
|
-
</
|
|
24962
|
+
</Show72>
|
|
24482
24963
|
</button>}
|
|
24483
|
-
</
|
|
24484
|
-
const TrackerTab = () => <
|
|
24964
|
+
</For55>;
|
|
24965
|
+
const TrackerTab = () => <Show72
|
|
24485
24966
|
when={data.primaryRx()}
|
|
24486
24967
|
fallback={<OrderTracker
|
|
24487
24968
|
request={null}
|
|
@@ -24507,10 +24988,10 @@ function MemberPortal(props) {
|
|
|
24507
24988
|
intakeHref={props.routes.intake}
|
|
24508
24989
|
renewHref={props.routes.renew}
|
|
24509
24990
|
/>
|
|
24510
|
-
<
|
|
24991
|
+
<Show72 when={data.otherRx().length > 0}>
|
|
24511
24992
|
<div class="rx-others" data-testid="rx-others">
|
|
24512
24993
|
<span class="lab-label">Other orders</span>
|
|
24513
|
-
<
|
|
24994
|
+
<For55 each={data.otherRx()}>
|
|
24514
24995
|
{(rx) => <RxRow
|
|
24515
24996
|
rx={rx}
|
|
24516
24997
|
request={data.toTrackerRequest(rx)}
|
|
@@ -24520,19 +25001,19 @@ function MemberPortal(props) {
|
|
|
24520
25001
|
intakeHref={props.routes.intake}
|
|
24521
25002
|
renewHref={props.routes.renew}
|
|
24522
25003
|
/>}
|
|
24523
|
-
</
|
|
25004
|
+
</For55>
|
|
24524
25005
|
</div>
|
|
24525
|
-
</
|
|
25006
|
+
</Show72>
|
|
24526
25007
|
</div>}
|
|
24527
|
-
</
|
|
24528
|
-
const Content = () => <
|
|
25008
|
+
</Show72>;
|
|
25009
|
+
const Content = () => <Show72
|
|
24529
25010
|
when={!data.loading()}
|
|
24530
25011
|
fallback={<div class="portal-state">
|
|
24531
25012
|
<div class="request-status__spinner" />
|
|
24532
25013
|
<p>Loading your portal…</p>
|
|
24533
25014
|
</div>}
|
|
24534
25015
|
>
|
|
24535
|
-
<
|
|
25016
|
+
<Show72
|
|
24536
25017
|
when={!data.error()}
|
|
24537
25018
|
fallback={<div class="request-status__error portal-state">
|
|
24538
25019
|
<p class="request-status__error-text">{data.error()}</p>
|
|
@@ -24572,8 +25053,8 @@ function MemberPortal(props) {
|
|
|
24572
25053
|
<MessagesPanel thread={messages} intent={intent()} />
|
|
24573
25054
|
</Match7>
|
|
24574
25055
|
</Switch7>
|
|
24575
|
-
</
|
|
24576
|
-
</
|
|
25056
|
+
</Show72>
|
|
25057
|
+
</Show72>;
|
|
24577
25058
|
return <main
|
|
24578
25059
|
class="portal"
|
|
24579
25060
|
data-testid="member-portal"
|
|
@@ -24585,30 +25066,30 @@ function MemberPortal(props) {
|
|
|
24585
25066
|
<aside class="portal-rail">
|
|
24586
25067
|
<div class="portal-rail__brand">
|
|
24587
25068
|
<a href={props.brand.homeHref} class="portal-rail__logo">
|
|
24588
|
-
<
|
|
25069
|
+
<Show72
|
|
24589
25070
|
when={props.brand.logoSrc}
|
|
24590
25071
|
fallback={<span class="portal-rail__wordmark">{props.brand.name}</span>}
|
|
24591
25072
|
>
|
|
24592
25073
|
{(src) => <img src={src()} alt={props.brand.name} />}
|
|
24593
|
-
</
|
|
25074
|
+
</Show72>
|
|
24594
25075
|
</a>
|
|
24595
25076
|
<span class="portal-rail__dot" aria-hidden="true" />
|
|
24596
25077
|
</div>
|
|
24597
25078
|
|
|
24598
|
-
<
|
|
25079
|
+
<Show72 when={data.firstName() !== "Member"}>
|
|
24599
25080
|
<p class="portal-rail__hi">Hi, {data.firstName()}</p>
|
|
24600
|
-
</
|
|
25081
|
+
</Show72>
|
|
24601
25082
|
|
|
24602
25083
|
<nav class="portal-rail__nav" aria-label="Portal sections">
|
|
24603
25084
|
<RailNav variant="rail" />
|
|
24604
25085
|
</nav>
|
|
24605
25086
|
|
|
24606
25087
|
<div class="portal-rail__foot">
|
|
24607
|
-
<
|
|
25088
|
+
<Show72 when={showBackLink()}>
|
|
24608
25089
|
<a href={catalogHref()} class="portal-rail__back" data-testid="rail-back">
|
|
24609
25090
|
← Back to shop
|
|
24610
25091
|
</a>
|
|
24611
|
-
</
|
|
25092
|
+
</Show72>
|
|
24612
25093
|
<button type="button" class="portal-rail__signout" onClick={props.auth.onSignOut}>
|
|
24613
25094
|
— Sign out
|
|
24614
25095
|
</button>
|
|
@@ -24618,11 +25099,11 @@ function MemberPortal(props) {
|
|
|
24618
25099
|
{
|
|
24619
25100
|
/* ── Mobile back bar (the rail is hidden ≤900px, so nothing else links home) ── */
|
|
24620
25101
|
}
|
|
24621
|
-
<
|
|
25102
|
+
<Show72 when={showBackLink()}>
|
|
24622
25103
|
<a href={catalogHref()} class="portal-topbar-back" data-testid="mobile-back">
|
|
24623
25104
|
<span aria-hidden="true">←</span> Back to shop
|
|
24624
25105
|
</a>
|
|
24625
|
-
</
|
|
25106
|
+
</Show72>
|
|
24626
25107
|
|
|
24627
25108
|
{
|
|
24628
25109
|
/* ── Content ── */
|
|
@@ -24643,10 +25124,10 @@ function MemberPortal(props) {
|
|
|
24643
25124
|
}
|
|
24644
25125
|
|
|
24645
25126
|
// src/pages/AffiliatePortal.tsx
|
|
24646
|
-
import { createEffect as createEffect18, createSignal as
|
|
25127
|
+
import { createEffect as createEffect18, createSignal as createSignal53, Match as Match8, Show as Show78, Switch as Switch8, For as For60 } from "solid-js";
|
|
24647
25128
|
|
|
24648
25129
|
// src/pages/affiliate/Overview.tsx
|
|
24649
|
-
import { Show as
|
|
25130
|
+
import { Show as Show73, For as For56 } from "solid-js";
|
|
24650
25131
|
function formatMoney(cents) {
|
|
24651
25132
|
return `$${(cents / 100).toFixed(2)}`;
|
|
24652
25133
|
}
|
|
@@ -24680,7 +25161,7 @@ function AffiliateOverview() {
|
|
|
24680
25161
|
Overview
|
|
24681
25162
|
</h1>
|
|
24682
25163
|
|
|
24683
|
-
<
|
|
25164
|
+
<Show73 when={isPending()}>
|
|
24684
25165
|
<div
|
|
24685
25166
|
style={{
|
|
24686
25167
|
padding: "1rem 1.25rem",
|
|
@@ -24693,9 +25174,9 @@ function AffiliateOverview() {
|
|
|
24693
25174
|
Your affiliate account is awaiting approval. Once an admin
|
|
24694
25175
|
activates it, your referral link will start earning commissions.
|
|
24695
25176
|
</div>
|
|
24696
|
-
</
|
|
25177
|
+
</Show73>
|
|
24697
25178
|
|
|
24698
|
-
<
|
|
25179
|
+
<Show73
|
|
24699
25180
|
when={stats()}
|
|
24700
25181
|
fallback={<div style={{ color: "var(--app-affiliate-fg-muted)" }}>Loading stats…</div>}
|
|
24701
25182
|
>
|
|
@@ -24706,7 +25187,7 @@ function AffiliateOverview() {
|
|
|
24706
25187
|
gap: "1rem"
|
|
24707
25188
|
}}
|
|
24708
25189
|
>
|
|
24709
|
-
<
|
|
25190
|
+
<For56 each={cards(s())}>
|
|
24710
25191
|
{(card) => <div
|
|
24711
25192
|
style={{
|
|
24712
25193
|
padding: "1.25rem",
|
|
@@ -24736,14 +25217,14 @@ function AffiliateOverview() {
|
|
|
24736
25217
|
{card.value}
|
|
24737
25218
|
</div>
|
|
24738
25219
|
</div>}
|
|
24739
|
-
</
|
|
25220
|
+
</For56>
|
|
24740
25221
|
</div>}
|
|
24741
|
-
</
|
|
25222
|
+
</Show73>
|
|
24742
25223
|
</div>;
|
|
24743
25224
|
}
|
|
24744
25225
|
|
|
24745
25226
|
// src/pages/affiliate/Conversions.tsx
|
|
24746
|
-
import { Show as
|
|
25227
|
+
import { Show as Show74, For as For57 } from "solid-js";
|
|
24747
25228
|
function formatMoney2(cents) {
|
|
24748
25229
|
return `$${(cents / 100).toFixed(2)}`;
|
|
24749
25230
|
}
|
|
@@ -24772,7 +25253,7 @@ function AffiliateConversions() {
|
|
|
24772
25253
|
Conversions
|
|
24773
25254
|
</h1>
|
|
24774
25255
|
|
|
24775
|
-
<
|
|
25256
|
+
<Show74
|
|
24776
25257
|
when={(conversions() ?? []).length > 0}
|
|
24777
25258
|
fallback={<div
|
|
24778
25259
|
style={{
|
|
@@ -24806,12 +25287,12 @@ function AffiliateConversions() {
|
|
|
24806
25287
|
</tr>
|
|
24807
25288
|
</thead>
|
|
24808
25289
|
<tbody>
|
|
24809
|
-
<
|
|
25290
|
+
<For57 each={conversions()}>
|
|
24810
25291
|
{(c) => <tr style={{ "border-top": "1px solid var(--app-affiliate-border)" }}>
|
|
24811
25292
|
<td data-label="Date" style={td()}>{formatDate4(c.createdAt)}</td>
|
|
24812
25293
|
<td data-label="Type" style={td()}>
|
|
24813
25294
|
{c.paymentType}
|
|
24814
|
-
<
|
|
25295
|
+
<Show74 when={c.tier === 2}>
|
|
24815
25296
|
<span
|
|
24816
25297
|
style={{
|
|
24817
25298
|
"margin-left": "0.4rem",
|
|
@@ -24826,7 +25307,7 @@ function AffiliateConversions() {
|
|
|
24826
25307
|
>
|
|
24827
25308
|
Override
|
|
24828
25309
|
</span>
|
|
24829
|
-
</
|
|
25310
|
+
</Show74>
|
|
24830
25311
|
</td>
|
|
24831
25312
|
<td data-label="Order total" style={td()}>{formatMoney2(c.orderTotalCents)}</td>
|
|
24832
25313
|
<td data-label="Commission" style={{ ...td(), color: "var(--app-affiliate-fg)", "font-weight": "600" }}>
|
|
@@ -24847,11 +25328,11 @@ function AffiliateConversions() {
|
|
|
24847
25328
|
</span>
|
|
24848
25329
|
</td>
|
|
24849
25330
|
</tr>}
|
|
24850
|
-
</
|
|
25331
|
+
</For57>
|
|
24851
25332
|
</tbody>
|
|
24852
25333
|
</table>
|
|
24853
25334
|
</div>
|
|
24854
|
-
</
|
|
25335
|
+
</Show74>
|
|
24855
25336
|
</div>;
|
|
24856
25337
|
}
|
|
24857
25338
|
function th() {
|
|
@@ -24873,7 +25354,7 @@ function td() {
|
|
|
24873
25354
|
}
|
|
24874
25355
|
|
|
24875
25356
|
// src/pages/affiliate/Downline.tsx
|
|
24876
|
-
import { Show as
|
|
25357
|
+
import { Show as Show75, For as For58 } from "solid-js";
|
|
24877
25358
|
function formatDate5(iso) {
|
|
24878
25359
|
const d = new Date(iso);
|
|
24879
25360
|
if (Number.isNaN(d.getTime())) return iso;
|
|
@@ -24904,7 +25385,7 @@ function AffiliateDownline() {
|
|
|
24904
25385
|
make — those show up as “Override” rows on your Conversions.
|
|
24905
25386
|
</p>
|
|
24906
25387
|
|
|
24907
|
-
<
|
|
25388
|
+
<Show75
|
|
24908
25389
|
when={(downline() ?? []).length > 0}
|
|
24909
25390
|
fallback={<div
|
|
24910
25391
|
style={{
|
|
@@ -24940,7 +25421,7 @@ function AffiliateDownline() {
|
|
|
24940
25421
|
</tr>
|
|
24941
25422
|
</thead>
|
|
24942
25423
|
<tbody>
|
|
24943
|
-
<
|
|
25424
|
+
<For58 each={downline()}>
|
|
24944
25425
|
{(d) => <tr style={{ "border-top": "1px solid var(--app-affiliate-border)" }}>
|
|
24945
25426
|
<td
|
|
24946
25427
|
data-label="Code"
|
|
@@ -24969,11 +25450,11 @@ function AffiliateDownline() {
|
|
|
24969
25450
|
{formatDate5(d.createdAt)}
|
|
24970
25451
|
</td>
|
|
24971
25452
|
</tr>}
|
|
24972
|
-
</
|
|
25453
|
+
</For58>
|
|
24973
25454
|
</tbody>
|
|
24974
25455
|
</table>
|
|
24975
25456
|
</div>
|
|
24976
|
-
</
|
|
25457
|
+
</Show75>
|
|
24977
25458
|
</div>;
|
|
24978
25459
|
}
|
|
24979
25460
|
function th2() {
|
|
@@ -24995,10 +25476,10 @@ function td2() {
|
|
|
24995
25476
|
}
|
|
24996
25477
|
|
|
24997
25478
|
// src/pages/affiliate/ReferralLink.tsx
|
|
24998
|
-
import { Show as
|
|
25479
|
+
import { Show as Show76, createSignal as createSignal52, createMemo as createMemo18 } from "solid-js";
|
|
24999
25480
|
function AffiliateReferralLink() {
|
|
25000
25481
|
const { links } = useAffiliateLinks();
|
|
25001
|
-
const [copied, setCopied] =
|
|
25482
|
+
const [copied, setCopied] = createSignal52(false);
|
|
25002
25483
|
const homepageLink = createMemo18(() => {
|
|
25003
25484
|
const l = links();
|
|
25004
25485
|
const affiliate = affiliateAuth_default.affiliate();
|
|
@@ -25029,7 +25510,7 @@ function AffiliateReferralLink() {
|
|
|
25029
25510
|
Referral link
|
|
25030
25511
|
</h1>
|
|
25031
25512
|
|
|
25032
|
-
<
|
|
25513
|
+
<Show76
|
|
25033
25514
|
when={homepageLink()}
|
|
25034
25515
|
fallback={<div style={{ color: "var(--app-affiliate-fg-muted)" }}>
|
|
25035
25516
|
Your referral link will appear here once your account is approved.
|
|
@@ -25105,12 +25586,12 @@ function AffiliateReferralLink() {
|
|
|
25105
25586
|
the cookie window, you earn commission on the conversion.
|
|
25106
25587
|
</div>
|
|
25107
25588
|
</div>
|
|
25108
|
-
</
|
|
25589
|
+
</Show76>
|
|
25109
25590
|
</div>;
|
|
25110
25591
|
}
|
|
25111
25592
|
|
|
25112
25593
|
// src/pages/affiliate/Settings.tsx
|
|
25113
|
-
import { Show as
|
|
25594
|
+
import { Show as Show77, For as For59 } from "solid-js";
|
|
25114
25595
|
var STATUS_LABEL2 = {
|
|
25115
25596
|
pending: "Pending approval",
|
|
25116
25597
|
active: "Active",
|
|
@@ -25140,7 +25621,7 @@ function AffiliateSettings() {
|
|
|
25140
25621
|
Account
|
|
25141
25622
|
</h1>
|
|
25142
25623
|
|
|
25143
|
-
<
|
|
25624
|
+
<Show77
|
|
25144
25625
|
when={affiliate()}
|
|
25145
25626
|
fallback={<div style={{ color: "var(--app-affiliate-fg-muted)" }}>Loading…</div>}
|
|
25146
25627
|
>
|
|
@@ -25152,7 +25633,7 @@ function AffiliateSettings() {
|
|
|
25152
25633
|
overflow: "hidden"
|
|
25153
25634
|
}}
|
|
25154
25635
|
>
|
|
25155
|
-
<
|
|
25636
|
+
<For59 each={rows(a())}>
|
|
25156
25637
|
{(row) => <div
|
|
25157
25638
|
style={{
|
|
25158
25639
|
display: "flex",
|
|
@@ -25174,9 +25655,9 @@ function AffiliateSettings() {
|
|
|
25174
25655
|
</div>
|
|
25175
25656
|
<div style={{ color: "var(--app-affiliate-fg)" }}>{row.value}</div>
|
|
25176
25657
|
</div>}
|
|
25177
|
-
</
|
|
25658
|
+
</For59>
|
|
25178
25659
|
</div>}
|
|
25179
|
-
</
|
|
25660
|
+
</Show77>
|
|
25180
25661
|
|
|
25181
25662
|
<div>
|
|
25182
25663
|
<button
|
|
@@ -25226,9 +25707,9 @@ var TAB_ORDER = [
|
|
|
25226
25707
|
function AffiliatePortal(props) {
|
|
25227
25708
|
const orderedTabs = () => props.enabledTabs ? TAB_ORDER.filter((t) => props.enabledTabs.includes(t)) : TAB_ORDER;
|
|
25228
25709
|
const fallbackTab = () => props.defaultTab ?? orderedTabs()[0] ?? "overview";
|
|
25229
|
-
const [internalTab, setInternalTab] =
|
|
25710
|
+
const [internalTab, setInternalTab] = createSignal53(fallbackTab());
|
|
25230
25711
|
const currentTab = () => props.activeTab ?? internalTab();
|
|
25231
|
-
const [drawerOpen, setDrawerOpen] =
|
|
25712
|
+
const [drawerOpen, setDrawerOpen] = createSignal53(false);
|
|
25232
25713
|
createEffect18(() => {
|
|
25233
25714
|
const auth = props.auth;
|
|
25234
25715
|
if (!auth) return;
|
|
@@ -25247,7 +25728,7 @@ function AffiliatePortal(props) {
|
|
|
25247
25728
|
props.onTabChange?.(tab);
|
|
25248
25729
|
};
|
|
25249
25730
|
const topOffset = () => props.topOffset ?? "0px";
|
|
25250
|
-
return <
|
|
25731
|
+
return <Show78 when={allowed()} fallback={<AffiliateGateSpinner topOffset={topOffset()} />}>
|
|
25251
25732
|
<div
|
|
25252
25733
|
class="app-affiliate-root app-affiliate-shell"
|
|
25253
25734
|
classList={{ "is-drawer-open": drawerOpen() }}
|
|
@@ -25296,7 +25777,7 @@ function AffiliatePortal(props) {
|
|
|
25296
25777
|
Affiliate Portal
|
|
25297
25778
|
</h2>
|
|
25298
25779
|
<nav style={{ display: "flex", "flex-direction": "column", gap: "0.25rem" }}>
|
|
25299
|
-
<
|
|
25780
|
+
<For60 each={orderedTabs()}>
|
|
25300
25781
|
{(tab) => <button
|
|
25301
25782
|
type="button"
|
|
25302
25783
|
onClick={() => handleTabClick(tab)}
|
|
@@ -25315,15 +25796,15 @@ function AffiliatePortal(props) {
|
|
|
25315
25796
|
color: currentTab() === tab ? "var(--app-affiliate-primary-soft-fg)" : "var(--app-affiliate-fg-muted)"
|
|
25316
25797
|
}}
|
|
25317
25798
|
>
|
|
25318
|
-
<
|
|
25799
|
+
<Show78 when={props.tabIcons?.[tab]}>
|
|
25319
25800
|
<span
|
|
25320
25801
|
class={props.tabIcons[tab]}
|
|
25321
25802
|
style={{ "font-size": "1rem", opacity: 0.7, "flex-shrink": 0 }}
|
|
25322
25803
|
/>
|
|
25323
|
-
</
|
|
25804
|
+
</Show78>
|
|
25324
25805
|
{TAB_LABELS2[tab]}
|
|
25325
25806
|
</button>}
|
|
25326
|
-
</
|
|
25807
|
+
</For60>
|
|
25327
25808
|
</nav>
|
|
25328
25809
|
</div>
|
|
25329
25810
|
</aside>
|
|
@@ -25348,7 +25829,7 @@ function AffiliatePortal(props) {
|
|
|
25348
25829
|
</Switch8>
|
|
25349
25830
|
</div>
|
|
25350
25831
|
</div>
|
|
25351
|
-
</
|
|
25832
|
+
</Show78>;
|
|
25352
25833
|
}
|
|
25353
25834
|
function AffiliateGateSpinner(props) {
|
|
25354
25835
|
return <div
|
|
@@ -25380,12 +25861,12 @@ function AffiliateGateSpinner(props) {
|
|
|
25380
25861
|
}
|
|
25381
25862
|
|
|
25382
25863
|
// src/pages/AffiliateRegister.tsx
|
|
25383
|
-
import { createSignal as
|
|
25864
|
+
import { createSignal as createSignal55, Show as Show79 } from "solid-js";
|
|
25384
25865
|
|
|
25385
25866
|
// src/pages/AffiliatePasswordInput.tsx
|
|
25386
|
-
import { createSignal as
|
|
25867
|
+
import { createSignal as createSignal54 } from "solid-js";
|
|
25387
25868
|
function AffiliatePasswordInput(props) {
|
|
25388
|
-
const [visible, setVisible] =
|
|
25869
|
+
const [visible, setVisible] = createSignal54(false);
|
|
25389
25870
|
return <div style={{ position: "relative" }}>
|
|
25390
25871
|
<input
|
|
25391
25872
|
type={visible() ? "text" : "password"}
|
|
@@ -25394,7 +25875,7 @@ function AffiliatePasswordInput(props) {
|
|
|
25394
25875
|
value={props.value}
|
|
25395
25876
|
onInput={(e) => props.onInput(e.currentTarget.value)}
|
|
25396
25877
|
autocomplete={props.autocomplete}
|
|
25397
|
-
style={
|
|
25878
|
+
style={inputStyle2()}
|
|
25398
25879
|
/>
|
|
25399
25880
|
<button
|
|
25400
25881
|
type="button"
|
|
@@ -25422,7 +25903,7 @@ function AffiliatePasswordInput(props) {
|
|
|
25422
25903
|
</button>
|
|
25423
25904
|
</div>;
|
|
25424
25905
|
}
|
|
25425
|
-
function
|
|
25906
|
+
function inputStyle2() {
|
|
25426
25907
|
return {
|
|
25427
25908
|
width: "100%",
|
|
25428
25909
|
padding: "0.625rem 2.9rem 0.625rem 0.75rem",
|
|
@@ -25438,14 +25919,14 @@ function inputStyle() {
|
|
|
25438
25919
|
|
|
25439
25920
|
// src/pages/AffiliateRegister.tsx
|
|
25440
25921
|
function AffiliateRegister(props) {
|
|
25441
|
-
const [firstName, setFirstName] =
|
|
25442
|
-
const [lastName, setLastName] =
|
|
25443
|
-
const [email, setEmail] =
|
|
25444
|
-
const [password, setPassword] =
|
|
25445
|
-
const [affiliateCode, setAffiliateCode] =
|
|
25446
|
-
const [submitting, setSubmitting] =
|
|
25447
|
-
const [submitted, setSubmitted] =
|
|
25448
|
-
const [error, setError] =
|
|
25922
|
+
const [firstName, setFirstName] = createSignal55("");
|
|
25923
|
+
const [lastName, setLastName] = createSignal55("");
|
|
25924
|
+
const [email, setEmail] = createSignal55("");
|
|
25925
|
+
const [password, setPassword] = createSignal55("");
|
|
25926
|
+
const [affiliateCode, setAffiliateCode] = createSignal55("");
|
|
25927
|
+
const [submitting, setSubmitting] = createSignal55(false);
|
|
25928
|
+
const [submitted, setSubmitted] = createSignal55(false);
|
|
25929
|
+
const [error, setError] = createSignal55(null);
|
|
25449
25930
|
async function handleSubmit(e) {
|
|
25450
25931
|
e.preventDefault();
|
|
25451
25932
|
setError(null);
|
|
@@ -25512,7 +25993,7 @@ function AffiliateRegister(props) {
|
|
|
25512
25993
|
</p>
|
|
25513
25994
|
</div>
|
|
25514
25995
|
|
|
25515
|
-
<
|
|
25996
|
+
<Show79
|
|
25516
25997
|
when={!submitted()}
|
|
25517
25998
|
fallback={<div
|
|
25518
25999
|
style={{
|
|
@@ -25538,7 +26019,7 @@ function AffiliateRegister(props) {
|
|
|
25538
26019
|
value={firstName()}
|
|
25539
26020
|
onInput={(e) => setFirstName(e.currentTarget.value)}
|
|
25540
26021
|
autocomplete="given-name"
|
|
25541
|
-
style={
|
|
26022
|
+
style={inputStyle3()}
|
|
25542
26023
|
/>
|
|
25543
26024
|
</Row2>
|
|
25544
26025
|
<Row2 label="Last name">
|
|
@@ -25548,7 +26029,7 @@ function AffiliateRegister(props) {
|
|
|
25548
26029
|
value={lastName()}
|
|
25549
26030
|
onInput={(e) => setLastName(e.currentTarget.value)}
|
|
25550
26031
|
autocomplete="family-name"
|
|
25551
|
-
style={
|
|
26032
|
+
style={inputStyle3()}
|
|
25552
26033
|
/>
|
|
25553
26034
|
</Row2>
|
|
25554
26035
|
<Row2 label="Email">
|
|
@@ -25558,7 +26039,7 @@ function AffiliateRegister(props) {
|
|
|
25558
26039
|
value={email()}
|
|
25559
26040
|
onInput={(e) => setEmail(e.currentTarget.value)}
|
|
25560
26041
|
autocomplete="email"
|
|
25561
|
-
style={
|
|
26042
|
+
style={inputStyle3()}
|
|
25562
26043
|
/>
|
|
25563
26044
|
</Row2>
|
|
25564
26045
|
<Row2 label="Password" hint="At least 8 characters">
|
|
@@ -25577,7 +26058,7 @@ function AffiliateRegister(props) {
|
|
|
25577
26058
|
minLength={4}
|
|
25578
26059
|
value={affiliateCode()}
|
|
25579
26060
|
onInput={(e) => setAffiliateCode(e.currentTarget.value)}
|
|
25580
|
-
style={
|
|
26061
|
+
style={inputStyle3()}
|
|
25581
26062
|
/>
|
|
25582
26063
|
</Row2>
|
|
25583
26064
|
<div
|
|
@@ -25608,7 +26089,7 @@ function AffiliateRegister(props) {
|
|
|
25608
26089
|
the website address itself.
|
|
25609
26090
|
</div>
|
|
25610
26091
|
|
|
25611
|
-
<
|
|
26092
|
+
<Show79 when={error()}>
|
|
25612
26093
|
<div
|
|
25613
26094
|
style={{
|
|
25614
26095
|
padding: "0.625rem 0.875rem",
|
|
@@ -25620,7 +26101,7 @@ function AffiliateRegister(props) {
|
|
|
25620
26101
|
>
|
|
25621
26102
|
{error()}
|
|
25622
26103
|
</div>
|
|
25623
|
-
</
|
|
26104
|
+
</Show79>
|
|
25624
26105
|
|
|
25625
26106
|
<button
|
|
25626
26107
|
type="submit"
|
|
@@ -25639,7 +26120,7 @@ function AffiliateRegister(props) {
|
|
|
25639
26120
|
{submitting() ? "Submitting\u2026" : "Apply"}
|
|
25640
26121
|
</button>
|
|
25641
26122
|
|
|
25642
|
-
<
|
|
26123
|
+
<Show79 when={props.onNavigateLogin}>
|
|
25643
26124
|
<button
|
|
25644
26125
|
type="button"
|
|
25645
26126
|
onClick={() => props.onNavigateLogin?.()}
|
|
@@ -25647,9 +26128,9 @@ function AffiliateRegister(props) {
|
|
|
25647
26128
|
>
|
|
25648
26129
|
Already have an account? Log in
|
|
25649
26130
|
</button>
|
|
25650
|
-
</
|
|
26131
|
+
</Show79>
|
|
25651
26132
|
</form>
|
|
25652
|
-
</
|
|
26133
|
+
</Show79>
|
|
25653
26134
|
</div>
|
|
25654
26135
|
</div>;
|
|
25655
26136
|
}
|
|
@@ -25666,14 +26147,14 @@ function Row2(props) {
|
|
|
25666
26147
|
{props.label}
|
|
25667
26148
|
</span>
|
|
25668
26149
|
{props.children}
|
|
25669
|
-
<
|
|
26150
|
+
<Show79 when={props.hint}>
|
|
25670
26151
|
<span style={{ "font-size": "0.75rem", color: "var(--app-affiliate-fg-subtle)" }}>
|
|
25671
26152
|
{props.hint}
|
|
25672
26153
|
</span>
|
|
25673
|
-
</
|
|
26154
|
+
</Show79>
|
|
25674
26155
|
</label>;
|
|
25675
26156
|
}
|
|
25676
|
-
function
|
|
26157
|
+
function inputStyle3() {
|
|
25677
26158
|
return {
|
|
25678
26159
|
width: "100%",
|
|
25679
26160
|
padding: "0.625rem 0.75rem",
|
|
@@ -25700,12 +26181,12 @@ function linkStyle() {
|
|
|
25700
26181
|
}
|
|
25701
26182
|
|
|
25702
26183
|
// src/pages/AffiliateLogin.tsx
|
|
25703
|
-
import { createSignal as
|
|
26184
|
+
import { createSignal as createSignal56, Show as Show80 } from "solid-js";
|
|
25704
26185
|
function AffiliateLogin(props) {
|
|
25705
|
-
const [email, setEmail] =
|
|
25706
|
-
const [password, setPassword] =
|
|
25707
|
-
const [submitting, setSubmitting] =
|
|
25708
|
-
const [error, setError] =
|
|
26186
|
+
const [email, setEmail] = createSignal56("");
|
|
26187
|
+
const [password, setPassword] = createSignal56("");
|
|
26188
|
+
const [submitting, setSubmitting] = createSignal56(false);
|
|
26189
|
+
const [error, setError] = createSignal56(null);
|
|
25709
26190
|
async function handleSubmit(e) {
|
|
25710
26191
|
e.preventDefault();
|
|
25711
26192
|
setError(null);
|
|
@@ -25759,19 +26240,19 @@ function AffiliateLogin(props) {
|
|
|
25759
26240
|
style={{ display: "flex", "flex-direction": "column", gap: "0.875rem" }}
|
|
25760
26241
|
>
|
|
25761
26242
|
<label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
|
|
25762
|
-
<span style={
|
|
26243
|
+
<span style={labelStyle2()}>Email</span>
|
|
25763
26244
|
<input
|
|
25764
26245
|
type="email"
|
|
25765
26246
|
required
|
|
25766
26247
|
value={email()}
|
|
25767
26248
|
onInput={(e) => setEmail(e.currentTarget.value)}
|
|
25768
26249
|
autocomplete="email"
|
|
25769
|
-
style={
|
|
26250
|
+
style={inputStyle4()}
|
|
25770
26251
|
/>
|
|
25771
26252
|
</label>
|
|
25772
26253
|
|
|
25773
26254
|
<label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
|
|
25774
|
-
<span style={
|
|
26255
|
+
<span style={labelStyle2()}>Password</span>
|
|
25775
26256
|
<AffiliatePasswordInput
|
|
25776
26257
|
required
|
|
25777
26258
|
value={password()}
|
|
@@ -25780,7 +26261,7 @@ function AffiliateLogin(props) {
|
|
|
25780
26261
|
/>
|
|
25781
26262
|
</label>
|
|
25782
26263
|
|
|
25783
|
-
<
|
|
26264
|
+
<Show80 when={error()}>
|
|
25784
26265
|
<div
|
|
25785
26266
|
style={{
|
|
25786
26267
|
padding: "0.625rem 0.875rem",
|
|
@@ -25792,7 +26273,7 @@ function AffiliateLogin(props) {
|
|
|
25792
26273
|
>
|
|
25793
26274
|
{error()}
|
|
25794
26275
|
</div>
|
|
25795
|
-
</
|
|
26276
|
+
</Show80>
|
|
25796
26277
|
|
|
25797
26278
|
<button
|
|
25798
26279
|
type="submit"
|
|
@@ -25811,7 +26292,7 @@ function AffiliateLogin(props) {
|
|
|
25811
26292
|
{submitting() ? "Logging in\u2026" : "Log in"}
|
|
25812
26293
|
</button>
|
|
25813
26294
|
|
|
25814
|
-
<
|
|
26295
|
+
<Show80 when={props.onNavigateForgotPassword}>
|
|
25815
26296
|
<button
|
|
25816
26297
|
type="button"
|
|
25817
26298
|
onClick={() => props.onNavigateForgotPassword?.()}
|
|
@@ -25828,9 +26309,9 @@ function AffiliateLogin(props) {
|
|
|
25828
26309
|
>
|
|
25829
26310
|
Forgot your password?
|
|
25830
26311
|
</button>
|
|
25831
|
-
</
|
|
26312
|
+
</Show80>
|
|
25832
26313
|
|
|
25833
|
-
<
|
|
26314
|
+
<Show80 when={props.onNavigateRegister}>
|
|
25834
26315
|
<button
|
|
25835
26316
|
type="button"
|
|
25836
26317
|
onClick={() => props.onNavigateRegister?.()}
|
|
@@ -25847,12 +26328,12 @@ function AffiliateLogin(props) {
|
|
|
25847
26328
|
>
|
|
25848
26329
|
New affiliate? Apply
|
|
25849
26330
|
</button>
|
|
25850
|
-
</
|
|
26331
|
+
</Show80>
|
|
25851
26332
|
</form>
|
|
25852
26333
|
</div>
|
|
25853
26334
|
</div>;
|
|
25854
26335
|
}
|
|
25855
|
-
function
|
|
26336
|
+
function labelStyle2() {
|
|
25856
26337
|
return {
|
|
25857
26338
|
"font-size": "0.75rem",
|
|
25858
26339
|
"text-transform": "uppercase",
|
|
@@ -25860,7 +26341,7 @@ function labelStyle() {
|
|
|
25860
26341
|
color: "var(--app-affiliate-fg-muted)"
|
|
25861
26342
|
};
|
|
25862
26343
|
}
|
|
25863
|
-
function
|
|
26344
|
+
function inputStyle4() {
|
|
25864
26345
|
return {
|
|
25865
26346
|
width: "100%",
|
|
25866
26347
|
padding: "0.625rem 0.75rem",
|
|
@@ -25875,12 +26356,12 @@ function inputStyle3() {
|
|
|
25875
26356
|
}
|
|
25876
26357
|
|
|
25877
26358
|
// src/pages/ForgotPassword.tsx
|
|
25878
|
-
import { createSignal as
|
|
26359
|
+
import { createSignal as createSignal57, Show as Show81 } from "solid-js";
|
|
25879
26360
|
function ForgotPasswordPage(props) {
|
|
25880
|
-
const [email, setEmail] =
|
|
25881
|
-
const [submitting, setSubmitting] =
|
|
25882
|
-
const [error, setError] =
|
|
25883
|
-
const [message, setMessage] =
|
|
26361
|
+
const [email, setEmail] = createSignal57("");
|
|
26362
|
+
const [submitting, setSubmitting] = createSignal57(false);
|
|
26363
|
+
const [error, setError] = createSignal57(null);
|
|
26364
|
+
const [message, setMessage] = createSignal57(null);
|
|
25884
26365
|
async function handleSubmit(e) {
|
|
25885
26366
|
e.preventDefault();
|
|
25886
26367
|
setError(null);
|
|
@@ -25932,7 +26413,7 @@ function ForgotPasswordPage(props) {
|
|
|
25932
26413
|
Reset your password
|
|
25933
26414
|
</h1>
|
|
25934
26415
|
|
|
25935
|
-
<
|
|
26416
|
+
<Show81
|
|
25936
26417
|
when={!message()}
|
|
25937
26418
|
fallback={<>
|
|
25938
26419
|
<div
|
|
@@ -25949,7 +26430,7 @@ function ForgotPasswordPage(props) {
|
|
|
25949
26430
|
The link is good for one hour. If nothing arrives, check your spam folder — and make sure this is the
|
|
25950
26431
|
address you signed up with.
|
|
25951
26432
|
</p>
|
|
25952
|
-
<
|
|
26433
|
+
<Show81 when={props.onDone}>
|
|
25953
26434
|
<button
|
|
25954
26435
|
type="button"
|
|
25955
26436
|
onClick={() => props.onDone?.()}
|
|
@@ -25965,7 +26446,7 @@ function ForgotPasswordPage(props) {
|
|
|
25965
26446
|
>
|
|
25966
26447
|
Back to sign in
|
|
25967
26448
|
</button>
|
|
25968
|
-
</
|
|
26449
|
+
</Show81>
|
|
25969
26450
|
</>}
|
|
25970
26451
|
>
|
|
25971
26452
|
<form
|
|
@@ -25973,17 +26454,17 @@ function ForgotPasswordPage(props) {
|
|
|
25973
26454
|
style={{ display: "flex", "flex-direction": "column", gap: "0.875rem" }}
|
|
25974
26455
|
>
|
|
25975
26456
|
<label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
|
|
25976
|
-
<span style={
|
|
26457
|
+
<span style={labelStyle3()}>Email</span>
|
|
25977
26458
|
<input
|
|
25978
26459
|
type="email"
|
|
25979
26460
|
required
|
|
25980
26461
|
value={email()}
|
|
25981
26462
|
onInput={(e) => setEmail(e.currentTarget.value)}
|
|
25982
|
-
style={
|
|
26463
|
+
style={inputStyle5()}
|
|
25983
26464
|
/>
|
|
25984
26465
|
</label>
|
|
25985
26466
|
|
|
25986
|
-
<
|
|
26467
|
+
<Show81 when={error()}>
|
|
25987
26468
|
<div
|
|
25988
26469
|
style={{
|
|
25989
26470
|
padding: "0.625rem 0.875rem",
|
|
@@ -25995,7 +26476,7 @@ function ForgotPasswordPage(props) {
|
|
|
25995
26476
|
>
|
|
25996
26477
|
{error()}
|
|
25997
26478
|
</div>
|
|
25998
|
-
</
|
|
26479
|
+
</Show81>
|
|
25999
26480
|
|
|
26000
26481
|
<button
|
|
26001
26482
|
type="submit"
|
|
@@ -26014,11 +26495,11 @@ function ForgotPasswordPage(props) {
|
|
|
26014
26495
|
{submitting() ? "Sending\u2026" : "Send reset link"}
|
|
26015
26496
|
</button>
|
|
26016
26497
|
</form>
|
|
26017
|
-
</
|
|
26498
|
+
</Show81>
|
|
26018
26499
|
</div>
|
|
26019
26500
|
</div>;
|
|
26020
26501
|
}
|
|
26021
|
-
function
|
|
26502
|
+
function labelStyle3() {
|
|
26022
26503
|
return {
|
|
26023
26504
|
"font-size": "0.75rem",
|
|
26024
26505
|
"text-transform": "uppercase",
|
|
@@ -26026,7 +26507,7 @@ function labelStyle2() {
|
|
|
26026
26507
|
color: "var(--app-affiliate-fg-muted)"
|
|
26027
26508
|
};
|
|
26028
26509
|
}
|
|
26029
|
-
function
|
|
26510
|
+
function inputStyle5() {
|
|
26030
26511
|
return {
|
|
26031
26512
|
width: "100%",
|
|
26032
26513
|
padding: "0.625rem 0.75rem",
|
|
@@ -26041,19 +26522,19 @@ function inputStyle4() {
|
|
|
26041
26522
|
}
|
|
26042
26523
|
|
|
26043
26524
|
// src/pages/ResetPassword.tsx
|
|
26044
|
-
import { createSignal as
|
|
26045
|
-
function
|
|
26525
|
+
import { createSignal as createSignal58, Show as Show82 } from "solid-js";
|
|
26526
|
+
function queryParam2(name) {
|
|
26046
26527
|
if (typeof window === "undefined") return "";
|
|
26047
26528
|
return new URLSearchParams(window.location.search).get(name) ?? "";
|
|
26048
26529
|
}
|
|
26049
26530
|
function ResetPasswordPage(props) {
|
|
26050
|
-
const token = () => props.token ??
|
|
26051
|
-
const email = () => props.email ??
|
|
26052
|
-
const [password, setPassword] =
|
|
26053
|
-
const [confirm2, setConfirm] =
|
|
26054
|
-
const [submitting, setSubmitting] =
|
|
26055
|
-
const [error, setError] =
|
|
26056
|
-
const [message, setMessage] =
|
|
26531
|
+
const token = () => props.token ?? queryParam2("token");
|
|
26532
|
+
const email = () => props.email ?? queryParam2("email");
|
|
26533
|
+
const [password, setPassword] = createSignal58("");
|
|
26534
|
+
const [confirm2, setConfirm] = createSignal58("");
|
|
26535
|
+
const [submitting, setSubmitting] = createSignal58(false);
|
|
26536
|
+
const [error, setError] = createSignal58(null);
|
|
26537
|
+
const [message, setMessage] = createSignal58(null);
|
|
26057
26538
|
async function handleSubmit(e) {
|
|
26058
26539
|
e.preventDefault();
|
|
26059
26540
|
setError(null);
|
|
@@ -26115,7 +26596,7 @@ function ResetPasswordPage(props) {
|
|
|
26115
26596
|
Choose a new password
|
|
26116
26597
|
</h1>
|
|
26117
26598
|
|
|
26118
|
-
<
|
|
26599
|
+
<Show82
|
|
26119
26600
|
when={!message()}
|
|
26120
26601
|
fallback={<div
|
|
26121
26602
|
style={{
|
|
@@ -26133,30 +26614,30 @@ function ResetPasswordPage(props) {
|
|
|
26133
26614
|
style={{ display: "flex", "flex-direction": "column", gap: "0.875rem" }}
|
|
26134
26615
|
>
|
|
26135
26616
|
<label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
|
|
26136
|
-
<span style={
|
|
26617
|
+
<span style={labelStyle4()}>New password</span>
|
|
26137
26618
|
<input
|
|
26138
26619
|
type="password"
|
|
26139
26620
|
required
|
|
26140
26621
|
value={password()}
|
|
26141
26622
|
onInput={(e) => setPassword(e.currentTarget.value)}
|
|
26142
26623
|
autocomplete="new-password"
|
|
26143
|
-
style={
|
|
26624
|
+
style={inputStyle6()}
|
|
26144
26625
|
/>
|
|
26145
26626
|
</label>
|
|
26146
26627
|
|
|
26147
26628
|
<label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
|
|
26148
|
-
<span style={
|
|
26629
|
+
<span style={labelStyle4()}>Confirm password</span>
|
|
26149
26630
|
<input
|
|
26150
26631
|
type="password"
|
|
26151
26632
|
required
|
|
26152
26633
|
value={confirm2()}
|
|
26153
26634
|
onInput={(e) => setConfirm(e.currentTarget.value)}
|
|
26154
26635
|
autocomplete="new-password"
|
|
26155
|
-
style={
|
|
26636
|
+
style={inputStyle6()}
|
|
26156
26637
|
/>
|
|
26157
26638
|
</label>
|
|
26158
26639
|
|
|
26159
|
-
<
|
|
26640
|
+
<Show82 when={error()}>
|
|
26160
26641
|
<div
|
|
26161
26642
|
style={{
|
|
26162
26643
|
padding: "0.625rem 0.875rem",
|
|
@@ -26168,7 +26649,7 @@ function ResetPasswordPage(props) {
|
|
|
26168
26649
|
>
|
|
26169
26650
|
{error()}
|
|
26170
26651
|
</div>
|
|
26171
|
-
</
|
|
26652
|
+
</Show82>
|
|
26172
26653
|
|
|
26173
26654
|
<button
|
|
26174
26655
|
type="submit"
|
|
@@ -26187,11 +26668,11 @@ function ResetPasswordPage(props) {
|
|
|
26187
26668
|
{submitting() ? "Resetting\u2026" : "Reset password"}
|
|
26188
26669
|
</button>
|
|
26189
26670
|
</form>
|
|
26190
|
-
</
|
|
26671
|
+
</Show82>
|
|
26191
26672
|
</div>
|
|
26192
26673
|
</div>;
|
|
26193
26674
|
}
|
|
26194
|
-
function
|
|
26675
|
+
function labelStyle4() {
|
|
26195
26676
|
return {
|
|
26196
26677
|
"font-size": "0.75rem",
|
|
26197
26678
|
"text-transform": "uppercase",
|
|
@@ -26199,7 +26680,7 @@ function labelStyle3() {
|
|
|
26199
26680
|
color: "var(--app-affiliate-fg-muted)"
|
|
26200
26681
|
};
|
|
26201
26682
|
}
|
|
26202
|
-
function
|
|
26683
|
+
function inputStyle6() {
|
|
26203
26684
|
return {
|
|
26204
26685
|
width: "100%",
|
|
26205
26686
|
padding: "0.625rem 0.75rem",
|
|
@@ -26214,12 +26695,12 @@ function inputStyle5() {
|
|
|
26214
26695
|
}
|
|
26215
26696
|
|
|
26216
26697
|
// src/pages/AffiliateForgotPassword.tsx
|
|
26217
|
-
import { createSignal as
|
|
26698
|
+
import { createSignal as createSignal59, Show as Show83 } from "solid-js";
|
|
26218
26699
|
function AffiliateForgotPassword(props) {
|
|
26219
|
-
const [email, setEmail] =
|
|
26220
|
-
const [submitting, setSubmitting] =
|
|
26221
|
-
const [error, setError] =
|
|
26222
|
-
const [message, setMessage] =
|
|
26700
|
+
const [email, setEmail] = createSignal59("");
|
|
26701
|
+
const [submitting, setSubmitting] = createSignal59(false);
|
|
26702
|
+
const [error, setError] = createSignal59(null);
|
|
26703
|
+
const [message, setMessage] = createSignal59(null);
|
|
26223
26704
|
async function handleSubmit(e) {
|
|
26224
26705
|
e.preventDefault();
|
|
26225
26706
|
setError(null);
|
|
@@ -26240,7 +26721,7 @@ function AffiliateForgotPassword(props) {
|
|
|
26240
26721
|
<div style={cardStyle()}>
|
|
26241
26722
|
<h1 style={headingStyle()}>Reset your password</h1>
|
|
26242
26723
|
|
|
26243
|
-
<
|
|
26724
|
+
<Show83
|
|
26244
26725
|
when={!message()}
|
|
26245
26726
|
fallback={<p style={{ margin: 0, "font-size": "0.9rem" }}>{message()}</p>}
|
|
26246
26727
|
>
|
|
@@ -26249,32 +26730,32 @@ function AffiliateForgotPassword(props) {
|
|
|
26249
26730
|
style={{ display: "flex", "flex-direction": "column", gap: "0.875rem" }}
|
|
26250
26731
|
>
|
|
26251
26732
|
<label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
|
|
26252
|
-
<span style={
|
|
26733
|
+
<span style={labelStyle5()}>Email</span>
|
|
26253
26734
|
<input
|
|
26254
26735
|
type="email"
|
|
26255
26736
|
required
|
|
26256
26737
|
value={email()}
|
|
26257
26738
|
onInput={(e) => setEmail(e.currentTarget.value)}
|
|
26258
26739
|
autocomplete="email"
|
|
26259
|
-
style={
|
|
26740
|
+
style={inputStyle7()}
|
|
26260
26741
|
/>
|
|
26261
26742
|
</label>
|
|
26262
26743
|
|
|
26263
|
-
<
|
|
26744
|
+
<Show83 when={error()}>
|
|
26264
26745
|
<div style={errorStyle()}>{error()}</div>
|
|
26265
|
-
</
|
|
26746
|
+
</Show83>
|
|
26266
26747
|
|
|
26267
26748
|
<button type="submit" disabled={submitting()} style={primaryButtonStyle(submitting())}>
|
|
26268
26749
|
{submitting() ? "Sending\u2026" : "Send reset link"}
|
|
26269
26750
|
</button>
|
|
26270
26751
|
</form>
|
|
26271
|
-
</
|
|
26752
|
+
</Show83>
|
|
26272
26753
|
|
|
26273
|
-
<
|
|
26754
|
+
<Show83 when={props.onNavigateLogin}>
|
|
26274
26755
|
<button type="button" onClick={() => props.onNavigateLogin?.()} style={linkStyle2()}>
|
|
26275
26756
|
Back to login
|
|
26276
26757
|
</button>
|
|
26277
|
-
</
|
|
26758
|
+
</Show83>
|
|
26278
26759
|
</div>
|
|
26279
26760
|
</div>;
|
|
26280
26761
|
}
|
|
@@ -26309,7 +26790,7 @@ function headingStyle() {
|
|
|
26309
26790
|
"font-size": "1.5rem"
|
|
26310
26791
|
};
|
|
26311
26792
|
}
|
|
26312
|
-
function
|
|
26793
|
+
function labelStyle5() {
|
|
26313
26794
|
return {
|
|
26314
26795
|
"font-size": "0.75rem",
|
|
26315
26796
|
"text-transform": "uppercase",
|
|
@@ -26317,7 +26798,7 @@ function labelStyle4() {
|
|
|
26317
26798
|
color: "var(--app-affiliate-fg-muted)"
|
|
26318
26799
|
};
|
|
26319
26800
|
}
|
|
26320
|
-
function
|
|
26801
|
+
function inputStyle7() {
|
|
26321
26802
|
return {
|
|
26322
26803
|
width: "100%",
|
|
26323
26804
|
padding: "0.625rem 0.75rem",
|
|
@@ -26365,19 +26846,19 @@ function linkStyle2() {
|
|
|
26365
26846
|
}
|
|
26366
26847
|
|
|
26367
26848
|
// src/pages/AffiliateResetPassword.tsx
|
|
26368
|
-
import { createSignal as
|
|
26369
|
-
function
|
|
26849
|
+
import { createSignal as createSignal60, Show as Show84 } from "solid-js";
|
|
26850
|
+
function queryParam3(name) {
|
|
26370
26851
|
if (typeof window === "undefined") return "";
|
|
26371
26852
|
return new URLSearchParams(window.location.search).get(name) ?? "";
|
|
26372
26853
|
}
|
|
26373
26854
|
function AffiliateResetPassword(props) {
|
|
26374
|
-
const token = () => props.token ??
|
|
26375
|
-
const email = () => props.email ??
|
|
26376
|
-
const [password, setPassword] =
|
|
26377
|
-
const [confirm2, setConfirm] =
|
|
26378
|
-
const [submitting, setSubmitting] =
|
|
26379
|
-
const [error, setError] =
|
|
26380
|
-
const [done, setDone] =
|
|
26855
|
+
const token = () => props.token ?? queryParam3("token");
|
|
26856
|
+
const email = () => props.email ?? queryParam3("email");
|
|
26857
|
+
const [password, setPassword] = createSignal60("");
|
|
26858
|
+
const [confirm2, setConfirm] = createSignal60("");
|
|
26859
|
+
const [submitting, setSubmitting] = createSignal60(false);
|
|
26860
|
+
const [error, setError] = createSignal60(null);
|
|
26861
|
+
const [done, setDone] = createSignal60(false);
|
|
26381
26862
|
async function handleSubmit(e) {
|
|
26382
26863
|
e.preventDefault();
|
|
26383
26864
|
setError(null);
|
|
@@ -26412,7 +26893,7 @@ function AffiliateResetPassword(props) {
|
|
|
26412
26893
|
<div style={cardStyle2()}>
|
|
26413
26894
|
<h1 style={headingStyle2()}>Choose a new password</h1>
|
|
26414
26895
|
|
|
26415
|
-
<
|
|
26896
|
+
<Show84
|
|
26416
26897
|
when={!done()}
|
|
26417
26898
|
fallback={<p style={{ margin: 0, "font-size": "0.9rem" }}>
|
|
26418
26899
|
Your password has been reset. You can now log in with your new password.
|
|
@@ -26423,7 +26904,7 @@ function AffiliateResetPassword(props) {
|
|
|
26423
26904
|
style={{ display: "flex", "flex-direction": "column", gap: "0.875rem" }}
|
|
26424
26905
|
>
|
|
26425
26906
|
<label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
|
|
26426
|
-
<span style={
|
|
26907
|
+
<span style={labelStyle6()}>New password</span>
|
|
26427
26908
|
<AffiliatePasswordInput
|
|
26428
26909
|
required
|
|
26429
26910
|
minLength={8}
|
|
@@ -26434,7 +26915,7 @@ function AffiliateResetPassword(props) {
|
|
|
26434
26915
|
</label>
|
|
26435
26916
|
|
|
26436
26917
|
<label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
|
|
26437
|
-
<span style={
|
|
26918
|
+
<span style={labelStyle6()}>Confirm new password</span>
|
|
26438
26919
|
<AffiliatePasswordInput
|
|
26439
26920
|
required
|
|
26440
26921
|
minLength={8}
|
|
@@ -26444,15 +26925,15 @@ function AffiliateResetPassword(props) {
|
|
|
26444
26925
|
/>
|
|
26445
26926
|
</label>
|
|
26446
26927
|
|
|
26447
|
-
<
|
|
26928
|
+
<Show84 when={error()}>
|
|
26448
26929
|
<div style={errorStyle2()}>{error()}</div>
|
|
26449
|
-
</
|
|
26930
|
+
</Show84>
|
|
26450
26931
|
|
|
26451
26932
|
<button type="submit" disabled={submitting()} style={primaryButtonStyle2(submitting())}>
|
|
26452
26933
|
{submitting() ? "Saving\u2026" : "Set new password"}
|
|
26453
26934
|
</button>
|
|
26454
26935
|
</form>
|
|
26455
|
-
</
|
|
26936
|
+
</Show84>
|
|
26456
26937
|
</div>
|
|
26457
26938
|
</div>;
|
|
26458
26939
|
}
|
|
@@ -26487,7 +26968,7 @@ function headingStyle2() {
|
|
|
26487
26968
|
"font-size": "1.5rem"
|
|
26488
26969
|
};
|
|
26489
26970
|
}
|
|
26490
|
-
function
|
|
26971
|
+
function labelStyle6() {
|
|
26491
26972
|
return {
|
|
26492
26973
|
"font-size": "0.75rem",
|
|
26493
26974
|
"text-transform": "uppercase",
|
|
@@ -26527,6 +27008,7 @@ export {
|
|
|
26527
27008
|
RegisterPage,
|
|
26528
27009
|
SubscribePage,
|
|
26529
27010
|
EmailTemplates,
|
|
27011
|
+
AcceptAdminInvitePage,
|
|
26530
27012
|
AdminDashboard,
|
|
26531
27013
|
ADMIN_TAB_SEGMENTS,
|
|
26532
27014
|
AFFILIATE_SUB_TAB_SEGMENTS,
|
|
@@ -26545,4 +27027,4 @@ export {
|
|
|
26545
27027
|
AffiliateForgotPassword,
|
|
26546
27028
|
AffiliateResetPassword
|
|
26547
27029
|
};
|
|
26548
|
-
//# sourceMappingURL=
|
|
27030
|
+
//# sourceMappingURL=VUDLDIMS.jsx.map
|