@blamejs/blamejs-shop 0.3.54 → 0.3.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +39 -2
- package/SECURITY.md +14 -0
- package/lib/admin.js +87 -77
- package/lib/asset-manifest.json +5 -5
- package/lib/email.js +169 -0
- package/lib/storefront.js +522 -47
- package/lib/wishlist-alerts.js +22 -0
- package/lib/wishlist-digest.js +18 -0
- package/package.json +1 -1
package/lib/admin.js
CHANGED
|
@@ -181,6 +181,16 @@ function _htmlEscape(s) {
|
|
|
181
181
|
return b.template.escapeHtml(String(s));
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
+
// Wrap a built data-table string in a horizontal-scroll container so a
|
|
185
|
+
// narrow viewport scrolls the table rather than the whole page (.table-wrap
|
|
186
|
+
// is defined in admin.css — WCAG 1.4.10 reflow). Layout-only tables
|
|
187
|
+
// (order-totals) are NOT wrapped — they never overflow. `tableHtml` is
|
|
188
|
+
// already-escaped markup assembled by the caller; this helper interpolates
|
|
189
|
+
// no untrusted data, so it is XSS-neutral.
|
|
190
|
+
function _tableWrap(tableHtml) {
|
|
191
|
+
return "<div class=\"table-wrap\">" + tableHtml + "</div>";
|
|
192
|
+
}
|
|
193
|
+
|
|
184
194
|
// Strict integer coercion for money / count form fields. Refuses
|
|
185
195
|
// "50abc" / "" / floats, unlike parseInt's loose prefix match (which
|
|
186
196
|
// silently turns "50abc" into 50). Accepts an already-numeric value
|
|
@@ -10508,7 +10518,7 @@ function renderDashboard(opts) {
|
|
|
10508
10518
|
}).join("");
|
|
10509
10519
|
otherCurrencies =
|
|
10510
10520
|
"<section><h2>Other currencies in window</h2><div class=\"panel\">" +
|
|
10511
|
-
"<table><thead><tr><th scope=\"col\">Currency</th><th scope=\"col\" class=\"num\">Orders</th><th scope=\"col\" class=\"num\">Revenue</th></tr></thead><tbody>" + rows + "</tbody></table>" +
|
|
10521
|
+
_tableWrap("<table><thead><tr><th scope=\"col\">Currency</th><th scope=\"col\" class=\"num\">Orders</th><th scope=\"col\" class=\"num\">Revenue</th></tr></thead><tbody>" + rows + "</tbody></table>") +
|
|
10512
10522
|
"</div></section>";
|
|
10513
10523
|
}
|
|
10514
10524
|
|
|
@@ -10542,11 +10552,11 @@ function renderDashboard(opts) {
|
|
|
10542
10552
|
"<section><h2>Catalog + activity</h2><div class=\"two-col\">" +
|
|
10543
10553
|
" <div class=\"panel\">" +
|
|
10544
10554
|
" <h3 class=\"subhead\">Top SKUs by units sold</h3>" +
|
|
10545
|
-
" <table><thead><tr><th scope=\"col\">SKU</th><th scope=\"col\" class=\"num\">Units</th><th scope=\"col\" class=\"num\">Revenue</th></tr></thead><tbody>" + topRows + "</tbody></table>" +
|
|
10555
|
+
" " + _tableWrap("<table><thead><tr><th scope=\"col\">SKU</th><th scope=\"col\" class=\"num\">Units</th><th scope=\"col\" class=\"num\">Revenue</th></tr></thead><tbody>" + topRows + "</tbody></table>") +
|
|
10546
10556
|
" </div>" +
|
|
10547
10557
|
" <div class=\"panel\">" +
|
|
10548
10558
|
" <h3 class=\"subhead\">Recent orders</h3>" +
|
|
10549
|
-
" <table><thead><tr><th scope=\"col\">Order</th><th scope=\"col\">Status</th><th scope=\"col\" class=\"num\">Total</th></tr></thead><tbody>" + recentRows + "</tbody></table>" +
|
|
10559
|
+
" " + _tableWrap("<table><thead><tr><th scope=\"col\">Order</th><th scope=\"col\">Status</th><th scope=\"col\" class=\"num\">Total</th></tr></thead><tbody>" + recentRows + "</tbody></table>") +
|
|
10550
10560
|
" </div>" +
|
|
10551
10561
|
"</div></section>";
|
|
10552
10562
|
|
|
@@ -10807,10 +10817,10 @@ function renderAdminIntegrations(opts) {
|
|
|
10807
10817
|
"<section>" +
|
|
10808
10818
|
"<h2>Integrations</h2>" +
|
|
10809
10819
|
"<p class=\"meta\">Every integration is off until you supply its credentials — set them as deployment secrets, then redeploy. Nothing is enabled without your keys.</p>" +
|
|
10810
|
-
"<div class=\"panel\"
|
|
10820
|
+
"<div class=\"panel\">" + _tableWrap("<table>" +
|
|
10811
10821
|
"<thead><tr><th scope=\"col\">Integration</th><th scope=\"col\">Status</th><th scope=\"col\">To enable</th></tr></thead>" +
|
|
10812
10822
|
"<tbody>" + rows + "</tbody>" +
|
|
10813
|
-
"</table
|
|
10823
|
+
"</table>") + "</div>" +
|
|
10814
10824
|
"<p class=\"meta mt-125\">Sign in with Apple and PayPal are planned. “Sign in with Shop” / Shop Pay isn't available to a self-hosted store. See the README “Optional integrations” section for full setup steps.</p>" +
|
|
10815
10825
|
"<div class=\"actions-row\"><a class=\"btn btn--ghost\" href=\"/admin\">Back</a></div>" +
|
|
10816
10826
|
"</section>";
|
|
@@ -10836,7 +10846,7 @@ function renderAdminProducts(opts) {
|
|
|
10836
10846
|
"</div></td></tr>";
|
|
10837
10847
|
}).join("");
|
|
10838
10848
|
var table = products.length
|
|
10839
|
-
? "<div class=\"panel\"
|
|
10849
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Title</th><th scope=\"col\">Slug</th><th scope=\"col\">Status</th><th scope=\"col\">Action</th></tr></thead><tbody>" + rows + "</tbody></table>") + "</div>"
|
|
10840
10850
|
: "<p class=\"empty\">No products yet — create your first one below.</p>";
|
|
10841
10851
|
var body =
|
|
10842
10852
|
"<section><h2>Products</h2>" + created + notice + table +
|
|
@@ -10892,7 +10902,7 @@ function renderAdminOrders(opts) {
|
|
|
10892
10902
|
}).join("");
|
|
10893
10903
|
|
|
10894
10904
|
var table = orders.length
|
|
10895
|
-
? "<div class=\"panel\"
|
|
10905
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Order</th><th scope=\"col\">Status</th><th scope=\"col\" class=\"num\">Items</th><th scope=\"col\" class=\"num\">Total</th><th scope=\"col\">Placed</th></tr></thead><tbody>" + rows + "</tbody></table>") + "</div>"
|
|
10896
10906
|
: "<p class=\"empty\">No orders" + (active ? " with status “" + _htmlEscape(active) + "”" : " yet") + ".</p>";
|
|
10897
10907
|
|
|
10898
10908
|
var body = "<section><h2>Orders</h2>" + notice + chips + table + "</section>";
|
|
@@ -10964,7 +10974,7 @@ function renderAdminAudit(opts) {
|
|
|
10964
10974
|
}).join("");
|
|
10965
10975
|
|
|
10966
10976
|
var table = rows.length
|
|
10967
|
-
? "<div class=\"panel\"
|
|
10977
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Time</th><th scope=\"col\">Action</th><th scope=\"col\">Outcome</th><th scope=\"col\">Actor</th><th scope=\"col\">Resource</th><th scope=\"col\">Details</th></tr></thead><tbody>" + bodyRows + "</tbody></table>") + "</div>"
|
|
10968
10978
|
: "<p class=\"empty\">No audit events match.</p>";
|
|
10969
10979
|
|
|
10970
10980
|
// Pager: Newer steps back one page (disabled at offset 0); Older steps
|
|
@@ -11055,7 +11065,7 @@ function renderAdminReports(opts) {
|
|
|
11055
11065
|
}).join("");
|
|
11056
11066
|
var funnelBlock =
|
|
11057
11067
|
"<section><h2>Order status</h2><div class=\"panel\">" +
|
|
11058
|
-
"<table><thead><tr><th scope=\"col\">Stage</th><th scope=\"col\" class=\"num\">Orders</th></tr></thead><tbody>" + funnelRows + "</tbody></table>" +
|
|
11068
|
+
_tableWrap("<table><thead><tr><th scope=\"col\">Stage</th><th scope=\"col\" class=\"num\">Orders</th></tr></thead><tbody>" + funnelRows + "</tbody></table>") +
|
|
11059
11069
|
"</div></section>";
|
|
11060
11070
|
|
|
11061
11071
|
// Top products by gross revenue across the window.
|
|
@@ -11069,7 +11079,7 @@ function renderAdminReports(opts) {
|
|
|
11069
11079
|
: "<tr><td colspan=\"3\" class=\"empty\">No sales in this window.</td></tr>";
|
|
11070
11080
|
var topBlock =
|
|
11071
11081
|
"<section><h2>Top products</h2><div class=\"panel\">" +
|
|
11072
|
-
"<table><thead><tr><th scope=\"col\">SKU</th><th scope=\"col\" class=\"num\">Units</th><th scope=\"col\" class=\"num\">Revenue</th></tr></thead><tbody>" + topRows + "</tbody></table>" +
|
|
11082
|
+
_tableWrap("<table><thead><tr><th scope=\"col\">SKU</th><th scope=\"col\" class=\"num\">Units</th><th scope=\"col\" class=\"num\">Revenue</th></tr></thead><tbody>" + topRows + "</tbody></table>") +
|
|
11073
11083
|
"</div></section>";
|
|
11074
11084
|
|
|
11075
11085
|
// By-day revenue series — one row per (day, currency) bucket.
|
|
@@ -11088,7 +11098,7 @@ function renderAdminReports(opts) {
|
|
|
11088
11098
|
: "<tr><td colspan=\"6\" class=\"empty\">No sales in this window.</td></tr>";
|
|
11089
11099
|
var dayBlock =
|
|
11090
11100
|
"<section><h2>By day</h2><div class=\"panel\">" +
|
|
11091
|
-
"<table><thead><tr><th scope=\"col\">Date</th><th scope=\"col\">Currency</th><th scope=\"col\" class=\"num\">Orders</th><th scope=\"col\" class=\"num\">Gross</th><th scope=\"col\" class=\"num\">Net</th><th scope=\"col\" class=\"num\">Refunds</th></tr></thead><tbody>" + dayRows + "</tbody></table>" +
|
|
11101
|
+
_tableWrap("<table><thead><tr><th scope=\"col\">Date</th><th scope=\"col\">Currency</th><th scope=\"col\" class=\"num\">Orders</th><th scope=\"col\" class=\"num\">Gross</th><th scope=\"col\" class=\"num\">Net</th><th scope=\"col\" class=\"num\">Refunds</th></tr></thead><tbody>" + dayRows + "</tbody></table>") +
|
|
11092
11102
|
"</div></section>";
|
|
11093
11103
|
|
|
11094
11104
|
var body =
|
|
@@ -11180,7 +11190,7 @@ function renderAdminExports(opts) {
|
|
|
11180
11190
|
"</tr>";
|
|
11181
11191
|
}).join("");
|
|
11182
11192
|
var jobTable = exportsRows.length
|
|
11183
|
-
? "<div class=\"panel\"
|
|
11193
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Format</th><th scope=\"col\">Window</th><th scope=\"col\">Status</th><th scope=\"col\" class=\"num\">Rows</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + jobRows + "</tbody></table>") + "</div>"
|
|
11184
11194
|
: "<p class=\"empty\">No scheduled exports yet.</p>";
|
|
11185
11195
|
|
|
11186
11196
|
var scheduleFmtOptions = formats.map(function (f) {
|
|
@@ -11283,7 +11293,7 @@ function renderAdminShippingLabels(opts) {
|
|
|
11283
11293
|
|
|
11284
11294
|
var rows = labels.map(_shippingLabelRow).join("");
|
|
11285
11295
|
var table = labels.length
|
|
11286
|
-
? "<div class=\"panel\"
|
|
11296
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Carrier</th><th scope=\"col\">Tracking</th><th scope=\"col\" class=\"num\">Cost</th><th scope=\"col\">Broker</th><th scope=\"col\">Status</th><th scope=\"col\">Label</th><th scope=\"col\">Created</th></tr></thead><tbody>" + rows + "</tbody></table>") + "</div>"
|
|
11287
11297
|
: "<p class=\"empty\">No " + _htmlEscape(status) + " labels" + (status === "voided" ? " in this window" : "") + ".</p>";
|
|
11288
11298
|
|
|
11289
11299
|
var body =
|
|
@@ -11305,7 +11315,7 @@ function renderAdminShippingLabelsPending(opts) {
|
|
|
11305
11315
|
var notice = opts.notice ? "<div class=\"banner banner--warn\">" + _htmlEscape(opts.notice) + "</div>" : "";
|
|
11306
11316
|
var rows = labels.map(_shippingLabelRow).join("");
|
|
11307
11317
|
var table = labels.length
|
|
11308
|
-
? "<div class=\"panel\"
|
|
11318
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Carrier</th><th scope=\"col\">Tracking</th><th scope=\"col\" class=\"num\">Cost</th><th scope=\"col\">Broker</th><th scope=\"col\">Status</th><th scope=\"col\">Label</th><th scope=\"col\">Created</th></tr></thead><tbody>" + rows + "</tbody></table>") + "</div>"
|
|
11309
11319
|
: "<p class=\"empty\">No labels awaiting a broker mint.</p>";
|
|
11310
11320
|
var body =
|
|
11311
11321
|
"<section><h2>Shipping labels</h2>" + notice +
|
|
@@ -11361,7 +11371,7 @@ function renderAdminShippingLabelCosts(opts) {
|
|
|
11361
11371
|
: "<tr><td colspan=\"4\" class=\"empty\">No labels purchased in this window.</td></tr>";
|
|
11362
11372
|
var brokerBlock =
|
|
11363
11373
|
"<section><h2>By broker</h2><div class=\"panel\">" +
|
|
11364
|
-
"<table><thead><tr><th scope=\"col\">Broker</th><th scope=\"col\">Currency</th><th scope=\"col\" class=\"num\">Labels</th><th scope=\"col\" class=\"num\">Spend</th></tr></thead><tbody>" + brokerRows + "</tbody></table>" +
|
|
11374
|
+
_tableWrap("<table><thead><tr><th scope=\"col\">Broker</th><th scope=\"col\">Currency</th><th scope=\"col\" class=\"num\">Labels</th><th scope=\"col\" class=\"num\">Spend</th></tr></thead><tbody>" + brokerRows + "</tbody></table>") +
|
|
11365
11375
|
"</div></section>";
|
|
11366
11376
|
|
|
11367
11377
|
var body =
|
|
@@ -11394,7 +11404,7 @@ function renderAdminOrder(opts) {
|
|
|
11394
11404
|
"</tr>";
|
|
11395
11405
|
}).join("");
|
|
11396
11406
|
var linesTable = (o.lines && o.lines.length)
|
|
11397
|
-
? "<table><thead><tr><th scope=\"col\">SKU</th><th scope=\"col\" class=\"num\">Qty</th><th scope=\"col\" class=\"num\">Unit</th><th scope=\"col\" class=\"num\">Line</th></tr></thead><tbody>" + lineRows + "</tbody></table>"
|
|
11407
|
+
? _tableWrap("<table><thead><tr><th scope=\"col\">SKU</th><th scope=\"col\" class=\"num\">Qty</th><th scope=\"col\" class=\"num\">Unit</th><th scope=\"col\" class=\"num\">Line</th></tr></thead><tbody>" + lineRows + "</tbody></table>")
|
|
11398
11408
|
: "<p class=\"empty\">No line items recorded.</p>";
|
|
11399
11409
|
|
|
11400
11410
|
function _total(label, minor, strong) {
|
|
@@ -11482,7 +11492,7 @@ function renderAdminOrder(opts) {
|
|
|
11482
11492
|
"<td>" + _htmlEscape(_fmtDate(e.occurred_at)) + "</td></tr>";
|
|
11483
11493
|
}).join("");
|
|
11484
11494
|
var eventsTable = (s.events && s.events.length)
|
|
11485
|
-
? "<table><thead><tr><th scope=\"col\">Status</th><th scope=\"col\">Location</th><th scope=\"col\">When</th></tr></thead><tbody>" + eventRows + "</tbody></table>"
|
|
11495
|
+
? _tableWrap("<table><thead><tr><th scope=\"col\">Status</th><th scope=\"col\">Location</th><th scope=\"col\">When</th></tr></thead><tbody>" + eventRows + "</tbody></table>")
|
|
11486
11496
|
: "<p class=\"empty\">No carrier events yet.</p>";
|
|
11487
11497
|
var statusOpts = statuses.map(function (st) {
|
|
11488
11498
|
return "<option value=\"" + _htmlEscape(st) + "\">" + _htmlEscape(st) + "</option>";
|
|
@@ -11608,7 +11618,7 @@ function _orderLabelPanel(orderId, shipment, carriers, packageTypes, purchasedVi
|
|
|
11608
11618
|
"</tr>";
|
|
11609
11619
|
}).join("");
|
|
11610
11620
|
var labelsTable = labels.length
|
|
11611
|
-
? "<table><thead><tr><th scope=\"col\">Carrier</th><th scope=\"col\">Tracking</th><th scope=\"col\" class=\"num\">Cost</th><th scope=\"col\">Status</th><th scope=\"col\">Label</th><th scope=\"col\"></th></tr></thead><tbody>" + labelRows + "</tbody></table>"
|
|
11621
|
+
? _tableWrap("<table><thead><tr><th scope=\"col\">Carrier</th><th scope=\"col\">Tracking</th><th scope=\"col\" class=\"num\">Cost</th><th scope=\"col\">Status</th><th scope=\"col\">Label</th><th scope=\"col\"></th></tr></thead><tbody>" + labelRows + "</tbody></table>")
|
|
11612
11622
|
: "<p class=\"empty\">No labels recorded for this shipment.</p>";
|
|
11613
11623
|
var carrierOpts = carriers.map(function (c) {
|
|
11614
11624
|
return "<option value=\"" + _htmlEscape(c) + "\">" + _htmlEscape(c) + "</option>";
|
|
@@ -11687,7 +11697,7 @@ function _orderSplitPanel(o, plans) {
|
|
|
11687
11697
|
? "<form method=\"post\" action=\"/admin/orders/" + _htmlEscape(o.id) + "/split/plan\" class=\"return-action\">" +
|
|
11688
11698
|
"<h4>Plan a manual split</h4>" +
|
|
11689
11699
|
"<p class=\"meta\">Assign each line to a parcel number (lines sharing a number ship together). Every unit must land in a parcel.</p>" +
|
|
11690
|
-
"<table><thead><tr><th scope=\"col\">Line (order qty)</th><th scope=\"col\">Parcel</th><th scope=\"col\">Qty</th></tr></thead><tbody>" + lineRows + "</tbody></table>" +
|
|
11700
|
+
_tableWrap("<table><thead><tr><th scope=\"col\">Line (order qty)</th><th scope=\"col\">Parcel</th><th scope=\"col\">Qty</th></tr></thead><tbody>" + lineRows + "</tbody></table>") +
|
|
11691
11701
|
"<button class=\"btn\" type=\"submit\">Propose split</button>" +
|
|
11692
11702
|
"</form>"
|
|
11693
11703
|
: "<p class=\"empty\">No order lines to split.</p>";
|
|
@@ -11720,7 +11730,7 @@ function renderAdminPickLists(opts) {
|
|
|
11720
11730
|
"</tr>";
|
|
11721
11731
|
}).join("");
|
|
11722
11732
|
var table = lists.length
|
|
11723
|
-
? "<table><thead><tr><th scope=\"col\">List</th><th scope=\"col\">Location</th><th scope=\"col\">Status</th><th scope=\"col\">Sort</th><th scope=\"col\">Generated</th></tr></thead><tbody>" + rows + "</tbody></table>"
|
|
11733
|
+
? _tableWrap("<table><thead><tr><th scope=\"col\">List</th><th scope=\"col\">Location</th><th scope=\"col\">Status</th><th scope=\"col\">Sort</th><th scope=\"col\">Generated</th></tr></thead><tbody>" + rows + "</tbody></table>")
|
|
11724
11734
|
: "<p class=\"empty\">No pick lists yet. Generate one from the open orders at a location.</p>";
|
|
11725
11735
|
|
|
11726
11736
|
var statusFilter = "<form method=\"get\" action=\"/admin/pick-lists\" class=\"form-inline\">" +
|
|
@@ -11807,7 +11817,7 @@ function renderAdminPickList(opts) {
|
|
|
11807
11817
|
"</tr>";
|
|
11808
11818
|
}).join("");
|
|
11809
11819
|
var linesTable = (l.lines && l.lines.length)
|
|
11810
|
-
? "<table><thead><tr><th scope=\"col\">Aisle/bin</th><th scope=\"col\">SKU</th><th scope=\"col\">Order</th><th scope=\"col\" class=\"num\">Expected</th><th scope=\"col\">Picked</th><th scope=\"col\"></th></tr></thead><tbody>" + lineRows + "</tbody></table>"
|
|
11820
|
+
? _tableWrap("<table><thead><tr><th scope=\"col\">Aisle/bin</th><th scope=\"col\">SKU</th><th scope=\"col\">Order</th><th scope=\"col\" class=\"num\">Expected</th><th scope=\"col\">Picked</th><th scope=\"col\"></th></tr></thead><tbody>" + lineRows + "</tbody></table>")
|
|
11811
11821
|
: "<p class=\"empty\">This worksheet has no lines.</p>";
|
|
11812
11822
|
|
|
11813
11823
|
// Variance summary — short / over picks only (the discrepancies feed
|
|
@@ -11822,7 +11832,7 @@ function renderAdminPickList(opts) {
|
|
|
11822
11832
|
}).join("");
|
|
11823
11833
|
var variancePanel = discRows
|
|
11824
11834
|
? "<div class=\"panel mt\"><h3 class=\"subhead\">Variances</h3>" +
|
|
11825
|
-
"<table><thead><tr><th scope=\"col\">SKU</th><th scope=\"col\" class=\"num\">Expected</th><th scope=\"col\" class=\"num\">Picked</th><th scope=\"col\" class=\"num\">Diff</th></tr></thead><tbody>" + discRows + "</tbody></table
|
|
11835
|
+
_tableWrap("<table><thead><tr><th scope=\"col\">SKU</th><th scope=\"col\" class=\"num\">Expected</th><th scope=\"col\" class=\"num\">Picked</th><th scope=\"col\" class=\"num\">Diff</th></tr></thead><tbody>" + discRows + "</tbody></table>") + "</div>"
|
|
11826
11836
|
: "";
|
|
11827
11837
|
|
|
11828
11838
|
// Complete / cancel actions — only on a non-terminal worksheet.
|
|
@@ -11946,7 +11956,7 @@ function renderAdminCustomers(opts) {
|
|
|
11946
11956
|
var notice = opts.notice ? "<div class=\"banner banner--warn\">" + _htmlEscape(opts.notice) + "</div>" : "";
|
|
11947
11957
|
|
|
11948
11958
|
var table = customers.length
|
|
11949
|
-
? "<div class=\"panel\"
|
|
11959
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Name</th><th scope=\"col\">ID</th><th scope=\"col\">Joined</th><th scope=\"col\">Sign-in method</th><th scope=\"col\" class=\"num\">Orders</th><th scope=\"col\"><span class=\"sr-only\">Manage</span></th></tr></thead><tbody>" + rows + "</tbody></table>") + "</div>"
|
|
11950
11960
|
: "<p class=\"empty\">No customers yet.</p>";
|
|
11951
11961
|
|
|
11952
11962
|
// Cursor pager — a Next link when the page filled and more rows remain.
|
|
@@ -11997,7 +12007,7 @@ function renderAdminCustomerDetail(opts) {
|
|
|
11997
12007
|
}).join("");
|
|
11998
12008
|
var ordersPanel = "<div class=\"panel\"><h3 class=\"subhead\">Recent orders</h3>" +
|
|
11999
12009
|
((opts.recent_orders || []).length
|
|
12000
|
-
? "<table><thead><tr><th scope=\"col\">Order</th><th scope=\"col\">Status</th><th scope=\"col\" class=\"num\">Total</th><th scope=\"col\">Placed</th></tr></thead><tbody>" + orderRows + "</tbody></table>"
|
|
12010
|
+
? _tableWrap("<table><thead><tr><th scope=\"col\">Order</th><th scope=\"col\">Status</th><th scope=\"col\" class=\"num\">Total</th><th scope=\"col\">Placed</th></tr></thead><tbody>" + orderRows + "</tbody></table>")
|
|
12001
12011
|
: "<p class=\"empty\">No orders yet.</p>") +
|
|
12002
12012
|
"</div>";
|
|
12003
12013
|
|
|
@@ -12021,7 +12031,7 @@ function renderAdminCustomerDetail(opts) {
|
|
|
12021
12031
|
"</tr>";
|
|
12022
12032
|
}).join("");
|
|
12023
12033
|
var histTable = (opts.store_credit_history || []).length
|
|
12024
|
-
? "<table><thead><tr><th scope=\"col\">Kind</th><th scope=\"col\" class=\"num\">Amount</th><th scope=\"col\" class=\"num\">Balance after</th><th scope=\"col\">Reason</th><th scope=\"col\">When</th></tr></thead><tbody>" + histRows + "</tbody></table>"
|
|
12034
|
+
? _tableWrap("<table><thead><tr><th scope=\"col\">Kind</th><th scope=\"col\" class=\"num\">Amount</th><th scope=\"col\" class=\"num\">Balance after</th><th scope=\"col\">Reason</th><th scope=\"col\">When</th></tr></thead><tbody>" + histRows + "</tbody></table>")
|
|
12025
12035
|
: "<p class=\"empty\">No store-credit activity yet.</p>";
|
|
12026
12036
|
creditPanel = "<div class=\"panel\"><h3 class=\"subhead\">Store credit</h3>" +
|
|
12027
12037
|
creditNotice +
|
|
@@ -12321,7 +12331,7 @@ function renderAdminReturns(opts) {
|
|
|
12321
12331
|
}).join("");
|
|
12322
12332
|
|
|
12323
12333
|
var table = rmas.length
|
|
12324
|
-
? "<div class=\"panel\"
|
|
12334
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">RMA</th><th scope=\"col\">Order</th><th scope=\"col\">Reason</th><th scope=\"col\">Status</th><th scope=\"col\" class=\"num\">Items</th><th scope=\"col\" class=\"num\">Refund</th><th scope=\"col\">Requested</th></tr></thead><tbody>" + rows + "</tbody></table>") + "</div>"
|
|
12325
12335
|
: "<p class=\"empty\">No “" + _htmlEscape(active) + "” returns.</p>";
|
|
12326
12336
|
|
|
12327
12337
|
var body = "<section><h2>Returns</h2>" + notice + chips + table + "</section>";
|
|
@@ -12341,7 +12351,7 @@ function renderAdminReturn(opts) {
|
|
|
12341
12351
|
"<td>" + _htmlEscape(l.reason || "—") + "</td></tr>";
|
|
12342
12352
|
}).join("");
|
|
12343
12353
|
var linesTable = (r.lines && r.lines.length)
|
|
12344
|
-
? "<table><thead><tr><th scope=\"col\">SKU</th><th scope=\"col\" class=\"num\">Qty</th><th scope=\"col\">Reason</th></tr></thead><tbody>" + lineRows + "</tbody></table>"
|
|
12354
|
+
? _tableWrap("<table><thead><tr><th scope=\"col\">SKU</th><th scope=\"col\" class=\"num\">Qty</th><th scope=\"col\">Reason</th></tr></thead><tbody>" + lineRows + "</tbody></table>")
|
|
12345
12355
|
: "<p class=\"empty\">No line items recorded.</p>";
|
|
12346
12356
|
|
|
12347
12357
|
function _field(label, value) {
|
|
@@ -12483,7 +12493,7 @@ function renderAdminSupport(opts) {
|
|
|
12483
12493
|
}).join("");
|
|
12484
12494
|
|
|
12485
12495
|
var table = tickets.length
|
|
12486
|
-
? "<div class=\"panel\"
|
|
12496
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Subject</th><th scope=\"col\">Category</th><th scope=\"col\">Status</th><th scope=\"col\">Priority</th><th scope=\"col\">Assignee</th><th scope=\"col\">Opened</th></tr></thead><tbody>" + rows + "</tbody></table>") + "</div>"
|
|
12487
12497
|
: "<p class=\"empty\">No “" + _htmlEscape(active) + "” tickets.</p>";
|
|
12488
12498
|
|
|
12489
12499
|
var body = "<section><h2>Support</h2>" + notice + chips + table + "</section>";
|
|
@@ -12641,7 +12651,7 @@ function renderAdminDsr(opts) {
|
|
|
12641
12651
|
}).join("");
|
|
12642
12652
|
|
|
12643
12653
|
var table = requests.length
|
|
12644
|
-
? "<div class=\"panel\"
|
|
12654
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Customer</th><th scope=\"col\">Kind</th><th scope=\"col\">Jurisdiction</th><th scope=\"col\">Scope</th><th scope=\"col\">Status</th><th scope=\"col\">Requested</th></tr></thead><tbody>" + rows + "</tbody></table>") + "</div>"
|
|
12645
12655
|
: "<p class=\"empty\">No “" + _htmlEscape(active) + "” privacy requests.</p>";
|
|
12646
12656
|
|
|
12647
12657
|
var body = "<section><h2>Privacy requests</h2>" +
|
|
@@ -12724,7 +12734,7 @@ function renderAdminDsrDetail(opts) {
|
|
|
12724
12734
|
previewHtml =
|
|
12725
12735
|
"<div class=\"panel mt\"><h3 class=\"subhead\">Erasure preview (dry run — nothing was changed)</h3>" +
|
|
12726
12736
|
(dRows
|
|
12727
|
-
? "<table><thead><tr><th scope=\"col\">Table</th><th scope=\"col\">Affected</th></tr></thead><tbody>" + dRows + "</tbody></table>"
|
|
12737
|
+
? _tableWrap("<table><thead><tr><th scope=\"col\">Table</th><th scope=\"col\">Affected</th></tr></thead><tbody>" + dRows + "</tbody></table>")
|
|
12728
12738
|
: "<p class=\"empty\">No per-domain handlers wired.</p>") +
|
|
12729
12739
|
(absent ? "<p class=\"meta\">Domains without a deletion handler: " + absent + "</p>" : "") +
|
|
12730
12740
|
"<p class=\"meta\">Total affected: " + _htmlEscape(String(preview.total_affected)) + "</p>" +
|
|
@@ -12740,7 +12750,7 @@ function renderAdminDsrDetail(opts) {
|
|
|
12740
12750
|
"</tr>";
|
|
12741
12751
|
}).join("");
|
|
12742
12752
|
var historyHtml = history.length
|
|
12743
|
-
? "<table><thead><tr><th scope=\"col\">Request</th><th scope=\"col\">Kind</th><th scope=\"col\">Status</th><th scope=\"col\">Requested</th></tr></thead><tbody>" + histRows + "</tbody></table>"
|
|
12753
|
+
? _tableWrap("<table><thead><tr><th scope=\"col\">Request</th><th scope=\"col\">Kind</th><th scope=\"col\">Status</th><th scope=\"col\">Requested</th></tr></thead><tbody>" + histRows + "</tbody></table>")
|
|
12744
12754
|
: "<p class=\"empty\">No prior requests.</p>";
|
|
12745
12755
|
|
|
12746
12756
|
var body =
|
|
@@ -12814,7 +12824,7 @@ function renderAdminExchanges(opts) {
|
|
|
12814
12824
|
}).join("");
|
|
12815
12825
|
|
|
12816
12826
|
var table = list.length
|
|
12817
|
-
? "<div class=\"panel\"
|
|
12827
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Exchange</th><th scope=\"col\">Order</th><th scope=\"col\">Swap</th><th scope=\"col\">Reason</th><th scope=\"col\">Status</th><th scope=\"col\">Requested</th></tr></thead><tbody>" + rows + "</tbody></table>") + "</div>"
|
|
12818
12828
|
: "<p class=\"empty\">No “" + _htmlEscape(active) + "” exchanges.</p>";
|
|
12819
12829
|
|
|
12820
12830
|
var body = "<section><h2>Exchanges</h2>" + notice + chips + table + "</section>";
|
|
@@ -12962,7 +12972,7 @@ function renderAdminPickupLocations(opts) {
|
|
|
12962
12972
|
}).join("");
|
|
12963
12973
|
|
|
12964
12974
|
var table = list.length
|
|
12965
|
-
? "<div class=\"panel\"
|
|
12975
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Code</th><th scope=\"col\">Name</th><th scope=\"col\">Address</th><th scope=\"col\">Capacity</th><th scope=\"col\">Lead time</th><th scope=\"col\">Action</th></tr></thead><tbody>" + rows + "</tbody></table>") + "</div>"
|
|
12966
12976
|
: "<p class=\"empty\">No active pickup locations yet. Add one below.</p>";
|
|
12967
12977
|
|
|
12968
12978
|
var form =
|
|
@@ -13058,7 +13068,7 @@ function renderAdminPickups(opts) {
|
|
|
13058
13068
|
var table = !selected
|
|
13059
13069
|
? "<p class=\"empty\">Add a pickup location first.</p>"
|
|
13060
13070
|
: (list.length
|
|
13061
|
-
? "<div class=\"panel\"
|
|
13071
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Order</th><th scope=\"col\">Status</th><th scope=\"col\">Window</th><th scope=\"col\">Picked up</th><th scope=\"col\">Action</th></tr></thead><tbody>" + rows + "</tbody></table>") + "</div>"
|
|
13062
13072
|
: "<p class=\"empty\">No pickups in this window for this location.</p>");
|
|
13063
13073
|
|
|
13064
13074
|
var body = "<section><h2>Pickups</h2>" + moved + notice + selector + chips + table + "</section>";
|
|
@@ -13104,7 +13114,7 @@ function renderAdminGiftWraps(opts) {
|
|
|
13104
13114
|
}).join("");
|
|
13105
13115
|
|
|
13106
13116
|
var table = list.length
|
|
13107
|
-
? "<div class=\"panel\"
|
|
13117
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">SKU</th><th scope=\"col\">Image</th><th scope=\"col\">Title</th><th scope=\"col\">Fee</th><th scope=\"col\">State</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + rows + "</tbody></table>") + "</div>"
|
|
13108
13118
|
: "<p class=\"empty\">No gift wraps yet. Define one below — the SKU must be a real catalog variant.</p>";
|
|
13109
13119
|
|
|
13110
13120
|
var form =
|
|
@@ -13443,7 +13453,7 @@ function renderAdminInventory(opts) {
|
|
|
13443
13453
|
}).join("");
|
|
13444
13454
|
|
|
13445
13455
|
var table = rows.length
|
|
13446
|
-
? "<div class=\"panel\"
|
|
13456
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">SKU</th><th scope=\"col\" class=\"num\">On hand</th><th scope=\"col\" class=\"num\">Held</th><th scope=\"col\" class=\"num\">Available</th><th scope=\"col\">Restock / threshold</th></tr></thead><tbody>" + body + "</tbody></table>") + "</div>"
|
|
13447
13457
|
: "<p class=\"empty\">No inventory rows" + (opts.low ? " below threshold" : " yet") + ".</p>";
|
|
13448
13458
|
|
|
13449
13459
|
var createForm =
|
|
@@ -13550,7 +13560,7 @@ function renderAdminSubscriptionPlans(opts) {
|
|
|
13550
13560
|
}).join("");
|
|
13551
13561
|
|
|
13552
13562
|
var table = rows.length
|
|
13553
|
-
? "<div class=\"panel\"
|
|
13563
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Price / interval</th><th scope=\"col\">Stripe price</th><th scope=\"col\">Variant</th><th scope=\"col\">Status</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + bodyRows + "</tbody></table>") + "</div>"
|
|
13554
13564
|
: "<p class=\"empty\">No subscription plans" + (af === "0" ? " archived" : af === "1" ? " active" : " yet") + ".</p>";
|
|
13555
13565
|
|
|
13556
13566
|
var intervalOpts = ["month", "year", "week", "day"].map(function (iv) {
|
|
@@ -13651,7 +13661,7 @@ function renderAdminTaxRates(opts) {
|
|
|
13651
13661
|
"</tr>";
|
|
13652
13662
|
}).join("");
|
|
13653
13663
|
table = rows.length
|
|
13654
|
-
? "<div class=\"panel\"
|
|
13664
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Category</th><th scope=\"col\" class=\"num\">Rate</th><th scope=\"col\">From</th><th scope=\"col\">Until</th><th scope=\"col\">Source</th><th scope=\"col\">Status</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + bodyRows + "</tbody></table>") + "</div>"
|
|
13655
13665
|
: "<p class=\"empty\">No rates for " + _htmlEscape(jurisdiction) + " yet.</p>";
|
|
13656
13666
|
}
|
|
13657
13667
|
|
|
@@ -13734,7 +13744,7 @@ function renderAdminTaxFilings(opts) {
|
|
|
13734
13744
|
}).join("");
|
|
13735
13745
|
var dueBlock = upcoming.length
|
|
13736
13746
|
? "<section><h2>Due soon or overdue</h2><div class=\"panel\">" +
|
|
13737
|
-
"<table><thead><tr><th scope=\"col\">Jurisdiction</th><th scope=\"col\">Period</th><th scope=\"col\">Status</th><th scope=\"col\">Due</th></tr></thead><tbody>" + dueRows + "</tbody></table>" +
|
|
13747
|
+
_tableWrap("<table><thead><tr><th scope=\"col\">Jurisdiction</th><th scope=\"col\">Period</th><th scope=\"col\">Status</th><th scope=\"col\">Due</th></tr></thead><tbody>" + dueRows + "</tbody></table>") +
|
|
13738
13748
|
"</div></section>"
|
|
13739
13749
|
: "";
|
|
13740
13750
|
|
|
@@ -13751,7 +13761,7 @@ function renderAdminTaxFilings(opts) {
|
|
|
13751
13761
|
"</tr>";
|
|
13752
13762
|
}).join("");
|
|
13753
13763
|
var table = filings.length
|
|
13754
|
-
? "<div class=\"panel\"
|
|
13764
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Jurisdiction</th><th scope=\"col\">Kind</th><th scope=\"col\">Period</th><th scope=\"col\">Due</th><th scope=\"col\">Status</th><th scope=\"col\" class=\"num\">Collected</th><th scope=\"col\" class=\"num\">Owed</th></tr></thead><tbody>" + rows + "</tbody></table>") + "</div>"
|
|
13755
13765
|
: "<p class=\"empty\">No filings" + (jurisdiction ? " for " + _htmlEscape(jurisdiction) : "") + " yet. Open a period below.</p>";
|
|
13756
13766
|
|
|
13757
13767
|
// Open-a-period form.
|
|
@@ -13841,7 +13851,7 @@ function renderAdminTaxFiling(opts) {
|
|
|
13841
13851
|
"</tr>";
|
|
13842
13852
|
}).join("");
|
|
13843
13853
|
var breakdownBlock = bkeys.length
|
|
13844
|
-
? "<section><h2>By rate</h2><div class=\"panel\"
|
|
13854
|
+
? "<section><h2>By rate</h2><div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Rate</th><th scope=\"col\" class=\"num\">Orders</th><th scope=\"col\" class=\"num\">Taxable</th><th scope=\"col\" class=\"num\">Tax</th></tr></thead><tbody>" + breakdownRows + "</tbody></table>") + "</div></section>"
|
|
13845
13855
|
: "";
|
|
13846
13856
|
|
|
13847
13857
|
// Audit trail — submission + payment + amendment columns once recorded.
|
|
@@ -13862,7 +13872,7 @@ function renderAdminTaxFiling(opts) {
|
|
|
13862
13872
|
trailRows += "<tr><td>Amended</td><td>" + _htmlEscape(f.amended_reason) +
|
|
13863
13873
|
(f.amended_at != null ? " <span class=\"meta\">" + _htmlEscape(_fmtDate(f.amended_at)) + "</span>" : "") + "</td></tr>";
|
|
13864
13874
|
}
|
|
13865
|
-
trail = "<section><h2>Audit trail</h2><div class=\"panel\"
|
|
13875
|
+
trail = "<section><h2>Audit trail</h2><div class=\"panel\">" + _tableWrap("<table><tbody>" + trailRows + "</tbody></table>") + "</div></section>";
|
|
13866
13876
|
}
|
|
13867
13877
|
|
|
13868
13878
|
// Lifecycle actions — gated on the FSM. draft → compute; computed →
|
|
@@ -13937,7 +13947,7 @@ function renderAdminTaxFilingReport(opts) {
|
|
|
13937
13947
|
"</tr>";
|
|
13938
13948
|
}).join("");
|
|
13939
13949
|
var table = (report.filings || []).length
|
|
13940
|
-
? "<div class=\"panel\"
|
|
13950
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Period</th><th scope=\"col\">Window</th><th scope=\"col\">Status</th><th scope=\"col\" class=\"num\">Collected</th><th scope=\"col\" class=\"num\">Owed</th></tr></thead><tbody>" + rows + "</tbody></table>") + "</div>"
|
|
13941
13951
|
: "<p class=\"empty\">No filings intersect this window.</p>";
|
|
13942
13952
|
|
|
13943
13953
|
var body =
|
|
@@ -13981,7 +13991,7 @@ function renderAdminShipping(opts) {
|
|
|
13981
13991
|
}).join("");
|
|
13982
13992
|
|
|
13983
13993
|
var table = rows.length
|
|
13984
|
-
? "<div class=\"panel\"
|
|
13994
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Title</th><th scope=\"col\">Slug</th><th scope=\"col\">Regions</th><th scope=\"col\" class=\"num\">Rates</th><th scope=\"col\">Status</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + bodyRows + "</tbody></table>") + "</div>"
|
|
13985
13995
|
: "<p class=\"empty\">No shipping zones yet.</p>";
|
|
13986
13996
|
|
|
13987
13997
|
var createForm =
|
|
@@ -14031,7 +14041,7 @@ function renderAdminShippingZone(opts) {
|
|
|
14031
14041
|
"</tr>";
|
|
14032
14042
|
}).join("");
|
|
14033
14043
|
var rateTable = (z.rates || []).length
|
|
14034
|
-
? "<div class=\"panel\"
|
|
14044
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Service</th><th scope=\"col\" class=\"num\">Rate</th><th scope=\"col\">Bucket</th></tr></thead><tbody>" + rateRows + "</tbody></table>") + "</div>"
|
|
14035
14045
|
: "<p class=\"empty\">No rate rows.</p>";
|
|
14036
14046
|
|
|
14037
14047
|
var head = "<p class=\"meta\"><a href=\"/admin/shipping\">← Shipping</a> · <code class=\"order-id\">" + _htmlEscape(z.slug) + "</code> · " +
|
|
@@ -14193,7 +14203,7 @@ function renderAdminDiscounts(opts) {
|
|
|
14193
14203
|
"</tr>";
|
|
14194
14204
|
}).join("");
|
|
14195
14205
|
var ruleTable = rules.length
|
|
14196
|
-
? "<div class=\"panel\"
|
|
14206
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Rule</th><th scope=\"col\">Trigger</th><th scope=\"col\">Value</th><th scope=\"col\" class=\"num\">Priority</th><th scope=\"col\">Status</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + ruleRows + "</tbody></table>") + "</div>"
|
|
14197
14207
|
: "<p class=\"empty\">No automatic discount rules yet.</p>";
|
|
14198
14208
|
|
|
14199
14209
|
var TRIGGERS = [
|
|
@@ -14256,7 +14266,7 @@ function renderAdminDiscounts(opts) {
|
|
|
14256
14266
|
"</tr>";
|
|
14257
14267
|
}).join("");
|
|
14258
14268
|
var polTable = policies.length
|
|
14259
|
-
? "<div class=\"panel\"
|
|
14269
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Policy</th><th scope=\"col\" class=\"num\">Max codes</th><th scope=\"col\">Combines with</th><th scope=\"col\" class=\"num\">Order min</th><th scope=\"col\">Status</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + polRows + "</tbody></table>") + "</div>"
|
|
14260
14270
|
: "<p class=\"empty\">No stacking policies yet — without one, only one code applies per order.</p>";
|
|
14261
14271
|
var polForm =
|
|
14262
14272
|
"<div class=\"panel mt mw-40\">" +
|
|
@@ -14362,7 +14372,7 @@ function renderAdminSegments(opts) {
|
|
|
14362
14372
|
}).join("");
|
|
14363
14373
|
|
|
14364
14374
|
var table = segments.length
|
|
14365
|
-
? "<div class=\"panel\"
|
|
14375
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Segment</th><th scope=\"col\">Rules</th><th scope=\"col\" class=\"num\">Members</th><th scope=\"col\">Status</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + rows + "</tbody></table>") + "</div>"
|
|
14366
14376
|
: "<p class=\"empty\">No " + (filter === "archived" ? "archived " : (filter === "all" ? "" : "active ")) + "segments yet. Define one to start grouping customers for campaigns.</p>";
|
|
14367
14377
|
|
|
14368
14378
|
var body = "<section><h2>Customer segments</h2>" + created + updated + archived + unarchived + recomputed + notice +
|
|
@@ -14504,7 +14514,7 @@ function renderAdminGiftCards(opts) {
|
|
|
14504
14514
|
}).join("");
|
|
14505
14515
|
|
|
14506
14516
|
var table = rows.length
|
|
14507
|
-
? "<div class=\"panel\"
|
|
14517
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Code</th><th scope=\"col\" class=\"num\">Issued</th><th scope=\"col\" class=\"num\">Remaining</th><th scope=\"col\">Status</th><th scope=\"col\">Issued on</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + bodyRows + "</tbody></table>") + "</div>"
|
|
14508
14518
|
: "<p class=\"empty\">No gift cards" + (sf ? " " + _htmlEscape(sf) : " yet") + ".</p>";
|
|
14509
14519
|
|
|
14510
14520
|
// The issue form composes the giftcards primitive's issue() — the
|
|
@@ -14571,7 +14581,7 @@ function renderAdminGiftCard(opts) {
|
|
|
14571
14581
|
"</tr>";
|
|
14572
14582
|
}).join("");
|
|
14573
14583
|
var ledgerTable = ledger.length
|
|
14574
|
-
? "<div class=\"panel\"
|
|
14584
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Type</th><th scope=\"col\" class=\"num\">Amount</th><th scope=\"col\" class=\"num\">Balance after</th><th scope=\"col\">Detail</th><th scope=\"col\">When</th></tr></thead><tbody>" + ledgerRows + "</tbody></table>") + "</div>"
|
|
14575
14585
|
: "<p class=\"empty\">No ledger transactions recorded for this card yet.</p>";
|
|
14576
14586
|
|
|
14577
14587
|
// Void is offered only while the card is active — a redeemed card has
|
|
@@ -14613,7 +14623,7 @@ function renderAdminWebhooks(opts) {
|
|
|
14613
14623
|
}).join("");
|
|
14614
14624
|
|
|
14615
14625
|
var table = rows.length
|
|
14616
|
-
? "<div class=\"panel\"
|
|
14626
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">URL</th><th scope=\"col\">Events</th><th scope=\"col\">Status</th><th scope=\"col\" class=\"num\">Rate</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + bodyRows + "</tbody></table>") + "</div>"
|
|
14617
14627
|
: "<p class=\"empty\">No webhook endpoints yet.</p>";
|
|
14618
14628
|
|
|
14619
14629
|
var eventChecks = known.map(function (ev) {
|
|
@@ -14690,7 +14700,7 @@ function renderAdminWebhookDeliveries(opts) {
|
|
|
14690
14700
|
}).join("");
|
|
14691
14701
|
|
|
14692
14702
|
var table = rows.length
|
|
14693
|
-
? "<div class=\"panel\"
|
|
14703
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Event</th><th scope=\"col\">Status</th><th scope=\"col\" class=\"num\">Code</th><th scope=\"col\" class=\"num\">Attempts</th><th scope=\"col\">Last error</th><th scope=\"col\">Created</th><th scope=\"col\"></th></tr></thead><tbody>" + bodyRows + "</tbody></table>") + "</div>"
|
|
14694
14704
|
: "<p class=\"empty\">No deliveries recorded for this endpoint yet.</p>";
|
|
14695
14705
|
|
|
14696
14706
|
var head = "<p class=\"meta\">Endpoint <code class=\"order-id\">" + _htmlEscape(e.url) + "</code></p>";
|
|
@@ -14734,7 +14744,7 @@ function renderAdminCollections(opts) {
|
|
|
14734
14744
|
}).join("");
|
|
14735
14745
|
|
|
14736
14746
|
var table = rows.length
|
|
14737
|
-
? "<div class=\"panel\"
|
|
14747
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Title</th><th scope=\"col\">Slug</th><th scope=\"col\">Type</th><th scope=\"col\">Status</th><th scope=\"col\" class=\"num\">Products</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + bodyRows + "</tbody></table>") + "</div>"
|
|
14738
14748
|
: "<p class=\"empty\">No collections" + (af === "0" ? " archived" : af === "1" ? " active" : " yet") + ".</p>";
|
|
14739
14749
|
|
|
14740
14750
|
// The create form toggles between a manual and a smart shape. Manual
|
|
@@ -14813,7 +14823,7 @@ function renderAdminDiscountAllocation(opts) {
|
|
|
14813
14823
|
"</tr>";
|
|
14814
14824
|
}).join("");
|
|
14815
14825
|
var lineTable = breakdown.length
|
|
14816
|
-
? "<table><thead><tr><th scope=\"col\">Line</th><th scope=\"col\" class=\"num\">Allocated (minor)</th><th scope=\"col\" class=\"num\">Remaining (minor)</th></tr></thead><tbody>" + lineRows + "</tbody></table>"
|
|
14826
|
+
? _tableWrap("<table><thead><tr><th scope=\"col\">Line</th><th scope=\"col\" class=\"num\">Allocated (minor)</th><th scope=\"col\" class=\"num\">Remaining (minor)</th></tr></thead><tbody>" + lineRows + "</tbody></table>")
|
|
14817
14827
|
: "<p class=\"empty\">This allocation has no recorded lines.</p>";
|
|
14818
14828
|
return "<div class=\"panel mt\">" +
|
|
14819
14829
|
"<h3 class=\"subhead\">" + _htmlEscape(a.source || "—") + "</h3>" +
|
|
@@ -15125,7 +15135,7 @@ function renderAdminAnnouncements(opts) {
|
|
|
15125
15135
|
}).join("");
|
|
15126
15136
|
|
|
15127
15137
|
var table = rows.length
|
|
15128
|
-
? "<div class=\"panel\"
|
|
15138
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Slug</th><th scope=\"col\">Message</th><th scope=\"col\">Theme</th><th scope=\"col\">Audience</th><th scope=\"col\">Status</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + bodyRows + "</tbody></table>") + "</div>"
|
|
15129
15139
|
: "<p class=\"empty\">No announcements" + (af === "1" ? " active right now" : " yet") + ".</p>";
|
|
15130
15140
|
|
|
15131
15141
|
var themeOpts = ["urgency", "promo", "info", "success"].map(function (t) {
|
|
@@ -15199,7 +15209,7 @@ function renderAdminSearchRanking(opts) {
|
|
|
15199
15209
|
"</tr>";
|
|
15200
15210
|
}).join("");
|
|
15201
15211
|
var table = weights.length
|
|
15202
|
-
? "<div class=\"panel\"
|
|
15212
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Slug</th><th scope=\"col\">Name</th><th scope=\"col\">Weights</th><th scope=\"col\">Status</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + rows + "</tbody></table>") + "</div>"
|
|
15203
15213
|
: "<p class=\"empty\">No weight sets yet. Create one below and make it active to rerank storefront search.</p>";
|
|
15204
15214
|
|
|
15205
15215
|
var createForm =
|
|
@@ -15234,7 +15244,7 @@ function renderAdminSearchRanking(opts) {
|
|
|
15234
15244
|
"</form>";
|
|
15235
15245
|
var pinTable = pinsQuery
|
|
15236
15246
|
? (pins.length
|
|
15237
|
-
? "<div class=\"panel\"
|
|
15247
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Product id</th><th scope=\"col\">Position</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + pinRows + "</tbody></table>") + "</div>"
|
|
15238
15248
|
: "<p class=\"empty\">No pins for “" + _htmlEscape(pinsQuery) + "” yet.</p>")
|
|
15239
15249
|
: "";
|
|
15240
15250
|
var pinCreateForm = pinsQuery
|
|
@@ -15309,7 +15319,7 @@ function renderAdminTrustBadges(opts) {
|
|
|
15309
15319
|
"</tr>";
|
|
15310
15320
|
}).join("");
|
|
15311
15321
|
var table = badges.length
|
|
15312
|
-
? "<div class=\"panel\"
|
|
15322
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Slug</th><th scope=\"col\">Title</th><th scope=\"col\">Kind</th><th scope=\"col\">Placements</th><th scope=\"col\">Priority</th><th scope=\"col\">Status</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + rows + "</tbody></table>") + "</div>"
|
|
15313
15323
|
: "<p class=\"empty\">No trust badges yet. Create one below.</p>";
|
|
15314
15324
|
|
|
15315
15325
|
var placementChecks = trustBadgesModule.ALLOWED_PLACEMENTS.map(function (pl) {
|
|
@@ -15449,11 +15459,11 @@ function renderAdminPreorders(opts) {
|
|
|
15449
15459
|
}).join("");
|
|
15450
15460
|
|
|
15451
15461
|
var table = rows.length
|
|
15452
|
-
? "<div class=\"panel\"
|
|
15462
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr>" +
|
|
15453
15463
|
"<th scope=\"col\">Slug</th><th scope=\"col\">SKU</th><th scope=\"col\">Ships</th>" +
|
|
15454
15464
|
"<th scope=\"col\">Price</th><th scope=\"col\">Reserved / cap</th><th scope=\"col\">Remaining</th>" +
|
|
15455
15465
|
"<th scope=\"col\">Status</th><th scope=\"col\">Actions</th>" +
|
|
15456
|
-
"</tr></thead><tbody>" + bodyRows + "</tbody></table
|
|
15466
|
+
"</tr></thead><tbody>" + bodyRows + "</tbody></table>") + "</div>"
|
|
15457
15467
|
: "<p class=\"empty\">No pre-order campaigns yet.</p>";
|
|
15458
15468
|
|
|
15459
15469
|
var createForm =
|
|
@@ -15622,7 +15632,7 @@ function renderAdminHelp(opts) {
|
|
|
15622
15632
|
}).join("");
|
|
15623
15633
|
|
|
15624
15634
|
var table = rows.length
|
|
15625
|
-
? "<div class=\"panel\"
|
|
15635
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Title</th><th scope=\"col\">Slug</th><th scope=\"col\">Category</th><th scope=\"col\">Status</th><th scope=\"col\">Views</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + bodyRows + "</tbody></table>") + "</div>"
|
|
15626
15636
|
: "<p class=\"empty\">No articles" + (sf ? " " + _htmlEscape(sf) : " yet") + ". Write your first one.</p>";
|
|
15627
15637
|
|
|
15628
15638
|
var newBtn = "<div class=\"actions-row\"><a class=\"btn\" href=\"/admin/help/new\">New article</a></div>";
|
|
@@ -15774,7 +15784,7 @@ function renderAdminBlog(opts) {
|
|
|
15774
15784
|
}).join("");
|
|
15775
15785
|
|
|
15776
15786
|
var table = rows.length
|
|
15777
|
-
? "<div class=\"panel\"
|
|
15787
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Title</th><th scope=\"col\">Slug</th><th scope=\"col\">Status</th><th scope=\"col\">Published</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + bodyRows + "</tbody></table>") + "</div>"
|
|
15778
15788
|
: "<p class=\"empty\">No posts" + (sf ? " " + _htmlEscape(sf) : " yet") + ". Write your first one.</p>";
|
|
15779
15789
|
|
|
15780
15790
|
var newBtn = "<div class=\"actions-row\"><a class=\"btn\" href=\"/admin/blog/new\">New post</a></div>";
|
|
@@ -15975,7 +15985,7 @@ function renderAdminPages(opts) {
|
|
|
15975
15985
|
}).join("");
|
|
15976
15986
|
|
|
15977
15987
|
var table = rows.length
|
|
15978
|
-
? "<div class=\"panel\"
|
|
15988
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Title</th><th scope=\"col\">Slug</th><th scope=\"col\">Status</th><th scope=\"col\">Published</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + bodyRows + "</tbody></table>") + "</div>"
|
|
15979
15989
|
: "<p class=\"empty\">No pages" + (sf ? " " + _htmlEscape(sf) : " yet") + ". Write your first one.</p>";
|
|
15980
15990
|
|
|
15981
15991
|
var newBtn = "<div class=\"actions-row\"><a class=\"btn\" href=\"/admin/pages/new\">New page</a></div>";
|
|
@@ -16129,7 +16139,7 @@ function renderAdminSurveys(opts) {
|
|
|
16129
16139
|
}).join("");
|
|
16130
16140
|
|
|
16131
16141
|
var table = rows.length
|
|
16132
|
-
? "<div class=\"panel\"
|
|
16142
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Title</th><th scope=\"col\">Slug</th><th scope=\"col\">Kind</th><th scope=\"col\">Trigger</th><th scope=\"col\">Status</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + bodyRows + "</tbody></table>") + "</div>"
|
|
16133
16143
|
: "<p class=\"empty\">No surveys" + (af === "1" ? " active" : " yet") + ".</p>";
|
|
16134
16144
|
|
|
16135
16145
|
var kindOpts = [["nps", "NPS — recommend score"], ["csat", "CSAT — satisfaction"], ["ces", "CES — ease of effort"], ["custom", "Custom — open feedback"]]
|
|
@@ -16192,7 +16202,7 @@ function renderAdminSurveyDetail(opts) {
|
|
|
16192
16202
|
var rollupPanel =
|
|
16193
16203
|
"<div class=\"panel\">" +
|
|
16194
16204
|
"<p class=\"meta\">" + _htmlEscape(String(roll.response_count)) + " response(s)." + (headline ? " " + headline : "") + "</p>" +
|
|
16195
|
-
(qRows ? "<table><thead><tr><th scope=\"col\">Question</th><th scope=\"col\">Kind</th><th scope=\"col\">Result</th></tr></thead><tbody>" + qRows + "</tbody></table>" : "") +
|
|
16205
|
+
(qRows ? _tableWrap("<table><thead><tr><th scope=\"col\">Question</th><th scope=\"col\">Kind</th><th scope=\"col\">Result</th></tr></thead><tbody>" + qRows + "</tbody></table>") : "") +
|
|
16196
16206
|
"</div>";
|
|
16197
16207
|
|
|
16198
16208
|
var enc = _htmlEscape(encodeURIComponent(survey.slug));
|
|
@@ -16258,7 +16268,7 @@ function renderAdminHours(opts) {
|
|
|
16258
16268
|
}).join("");
|
|
16259
16269
|
|
|
16260
16270
|
var table = rows.length
|
|
16261
|
-
? "<div class=\"panel\"
|
|
16271
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Schedule</th><th scope=\"col\">Timezone</th><th scope=\"col\" class=\"num\">Days</th><th scope=\"col\">Status</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + bodyRows + "</tbody></table>") + "</div>"
|
|
16262
16272
|
: "<p class=\"empty\">No schedules yet.</p>";
|
|
16263
16273
|
|
|
16264
16274
|
var dayFields = DOW.map(function (label, d) {
|
|
@@ -16358,7 +16368,7 @@ function renderAdminCollection(opts) {
|
|
|
16358
16368
|
"</tr>";
|
|
16359
16369
|
}).join("");
|
|
16360
16370
|
var memberTable = members.length
|
|
16361
|
-
? "<div class=\"panel\"
|
|
16371
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\" class=\"num\">#</th><th scope=\"col\">Product id</th><th scope=\"col\"></th></tr></thead><tbody>" + memberRows + "</tbody></table>") + "</div>"
|
|
16362
16372
|
: "<p class=\"empty\">No members yet — add a product below.</p>";
|
|
16363
16373
|
|
|
16364
16374
|
// Reorder: a single field of the current ids, comma-joined, that the
|
|
@@ -16398,7 +16408,7 @@ function renderAdminCollection(opts) {
|
|
|
16398
16408
|
"</tr>";
|
|
16399
16409
|
}).join("");
|
|
16400
16410
|
var previewTable = preview.length
|
|
16401
|
-
? "<div class=\"panel\"
|
|
16411
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Title</th><th scope=\"col\">Slug</th><th scope=\"col\">Status</th></tr></thead><tbody>" + previewCards + "</tbody></table>") + "</div>"
|
|
16402
16412
|
: "<p class=\"empty\">No products match these rules yet.</p>";
|
|
16403
16413
|
detailBody = "<section class=\"mt\"><h3 class=\"fs-105\">Matched products (live preview)</h3>" +
|
|
16404
16414
|
"<p class=\"meta\">The first " + _htmlEscape(String(preview.length)) + " products the rules match right now.</p>" +
|
|
@@ -16490,7 +16500,7 @@ function renderAdminQuantityDiscounts(opts) {
|
|
|
16490
16500
|
}).join("");
|
|
16491
16501
|
|
|
16492
16502
|
var table = rows.length
|
|
16493
|
-
? "<div class=\"panel\"
|
|
16503
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Scope</th><th scope=\"col\">Scope id</th><th scope=\"col\" class=\"num\">Tiers</th><th scope=\"col\">Stacking</th><th scope=\"col\">Status</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + bodyRows + "</tbody></table>") + "</div>"
|
|
16494
16504
|
: "<p class=\"empty\">No quantity breaks" + (af === "1" ? " archived" : af === "0" ? " active" : " yet") + ".</p>";
|
|
16495
16505
|
|
|
16496
16506
|
var scopeOpts = scopes.map(function (sc) {
|
|
@@ -16581,7 +16591,7 @@ function renderAdminQuantityDiscount(opts) {
|
|
|
16581
16591
|
"</tr>";
|
|
16582
16592
|
}).join("");
|
|
16583
16593
|
var previewTable = previewRows
|
|
16584
|
-
? "<div class=\"panel\"
|
|
16594
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\" class=\"num\">Min qty</th><th scope=\"col\">Kind</th><th scope=\"col\" class=\"num\">Value</th><th scope=\"col\" class=\"num\">Unit @ min</th><th scope=\"col\" class=\"num\">Line saved</th><th scope=\"col\" class=\"num\">Line total</th></tr></thead><tbody>" + previewRows + "</tbody></table>") + "</div>"
|
|
16585
16595
|
: "<p class=\"empty\">No active rules to preview for this scope.</p>";
|
|
16586
16596
|
var previewForm =
|
|
16587
16597
|
"<form method=\"get\" action=\"/admin/quantity-discounts/" + _htmlEscape(enc) + "\" class=\"actions-row m-04\">" +
|
|
@@ -16664,8 +16674,8 @@ function renderAdminLoyalty(opts) {
|
|
|
16664
16674
|
"<p class=\"meta\">Lifetime points (never decremented) place a customer in a tier. " +
|
|
16665
16675
|
"Earning $1 grants " + _htmlEscape(String(opts.points_per_usd)) + " points; " +
|
|
16666
16676
|
_htmlEscape(String(opts.redemption_points_per_usd)) + " points redeem for $1 of value.</p>" +
|
|
16667
|
-
"<table><thead><tr><th scope=\"col\">Tier</th><th scope=\"col\" class=\"num\">Lifetime points to reach</th></tr></thead>" +
|
|
16668
|
-
"<tbody>" + tierRows + "</tbody></table
|
|
16677
|
+
_tableWrap("<table><thead><tr><th scope=\"col\">Tier</th><th scope=\"col\" class=\"num\">Lifetime points to reach</th></tr></thead>" +
|
|
16678
|
+
"<tbody>" + tierRows + "</tbody></table>") + "</div>";
|
|
16669
16679
|
|
|
16670
16680
|
// Earn-rule summary.
|
|
16671
16681
|
var earnSummary;
|
|
@@ -16686,7 +16696,7 @@ function renderAdminLoyalty(opts) {
|
|
|
16686
16696
|
earnSummary = "<div class=\"panel\"><div class=\"actions-row\"><h3 class=\"subhead\">Earn rules</h3>" +
|
|
16687
16697
|
"<a class=\"btn btn--ghost\" href=\"/admin/loyalty/earn-rules\">Manage earn rules</a></div>" +
|
|
16688
16698
|
(earnRules.length
|
|
16689
|
-
? "<table><thead><tr><th scope=\"col\">Slug</th><th scope=\"col\">Trigger</th><th scope=\"col\" class=\"num\">Points/unit</th><th scope=\"col\">Status</th></tr></thead><tbody>" + earnRows + "</tbody></table>"
|
|
16699
|
+
? _tableWrap("<table><thead><tr><th scope=\"col\">Slug</th><th scope=\"col\">Trigger</th><th scope=\"col\" class=\"num\">Points/unit</th><th scope=\"col\">Status</th></tr></thead><tbody>" + earnRows + "</tbody></table>")
|
|
16690
16700
|
: "<p class=\"empty\">No earn rules yet. Customers only earn points from active rules.</p>") +
|
|
16691
16701
|
"</div>";
|
|
16692
16702
|
}
|
|
@@ -16710,7 +16720,7 @@ function renderAdminLoyalty(opts) {
|
|
|
16710
16720
|
rewardSummary = "<div class=\"panel\"><div class=\"actions-row\"><h3 class=\"subhead\">Rewards catalog</h3>" +
|
|
16711
16721
|
"<a class=\"btn btn--ghost\" href=\"/admin/loyalty/rewards\">Manage rewards</a></div>" +
|
|
16712
16722
|
(rewards.length
|
|
16713
|
-
? "<table><thead><tr><th scope=\"col\">Slug</th><th scope=\"col\">Title</th><th scope=\"col\" class=\"num\">Point cost</th><th scope=\"col\">Status</th></tr></thead><tbody>" + rewardRows + "</tbody></table>"
|
|
16723
|
+
? _tableWrap("<table><thead><tr><th scope=\"col\">Slug</th><th scope=\"col\">Title</th><th scope=\"col\" class=\"num\">Point cost</th><th scope=\"col\">Status</th></tr></thead><tbody>" + rewardRows + "</tbody></table>")
|
|
16714
16724
|
: "<p class=\"empty\">No rewards yet. Customers only see active rewards in their catalog.</p>") +
|
|
16715
16725
|
"</div>";
|
|
16716
16726
|
}
|
|
@@ -16778,7 +16788,7 @@ function renderAdminLoyaltyEarnRules(opts) {
|
|
|
16778
16788
|
"</tr>";
|
|
16779
16789
|
}).join("");
|
|
16780
16790
|
var table = rules.length
|
|
16781
|
-
? "<div class=\"panel\"
|
|
16791
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Slug</th><th scope=\"col\">Trigger</th><th scope=\"col\" class=\"num\">Points/unit</th><th scope=\"col\" class=\"num\">Max/event</th><th scope=\"col\">Statuses</th><th scope=\"col\">Status</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + bodyRows + "</tbody></table>") + "</div>"
|
|
16782
16792
|
: "<p class=\"empty\">No earn rules yet.</p>";
|
|
16783
16793
|
|
|
16784
16794
|
var triggerOpts = triggers.map(function (t) {
|
|
@@ -16881,7 +16891,7 @@ function renderAdminLoyaltyRewards(opts) {
|
|
|
16881
16891
|
"</tr>";
|
|
16882
16892
|
}).join("");
|
|
16883
16893
|
var table = rewards.length
|
|
16884
|
-
? "<div class=\"panel\"
|
|
16894
|
+
? "<div class=\"panel\">" + _tableWrap("<table><thead><tr><th scope=\"col\">Slug</th><th scope=\"col\">Title</th><th scope=\"col\">Kind</th><th scope=\"col\">Value</th><th scope=\"col\" class=\"num\">Point cost</th><th scope=\"col\">Status</th><th scope=\"col\">Actions</th></tr></thead><tbody>" + bodyRows + "</tbody></table>") + "</div>"
|
|
16885
16895
|
: "<p class=\"empty\">No rewards yet.</p>";
|
|
16886
16896
|
|
|
16887
16897
|
var kindOpts = kinds.map(function (k) {
|
|
@@ -17039,7 +17049,7 @@ function renderAdminProduct(opts) {
|
|
|
17039
17049
|
"</tr>";
|
|
17040
17050
|
}).join("");
|
|
17041
17051
|
var histTable = (pc.history && pc.history.length)
|
|
17042
|
-
? "<table><thead><tr><th scope=\"col\" class=\"num\">Amount</th><th scope=\"col\">From</th><th scope=\"col\">Until</th></tr></thead><tbody>" + histRows + "</tbody></table>"
|
|
17052
|
+
? _tableWrap("<table><thead><tr><th scope=\"col\" class=\"num\">Amount</th><th scope=\"col\">From</th><th scope=\"col\">Until</th></tr></thead><tbody>" + histRows + "</tbody></table>")
|
|
17043
17053
|
: "";
|
|
17044
17054
|
return "<div class=\"m-04\">" +
|
|
17045
17055
|
"<span class=\"u-mute\">" + _htmlEscape(pc.currency) + "</span> · " + current +
|