mirror of
https://github.com/Sea-Haven-Industries/meal-order-manager.git
synced 2026-10-07 16:18:54 +00:00
Compare commits
1 commit
502e15792e
...
009ce7b6f8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
009ce7b6f8 |
3 changed files with 2 additions and 12 deletions
|
|
@ -38,13 +38,8 @@ def latest_menu() -> dict:
|
|||
|
||||
|
||||
def _json_for_script(value) -> str:
|
||||
"""Serialize for embedding in a <script> tag; escape < and JS line separators."""
|
||||
return (
|
||||
json.dumps(value, separators=(",", ":"))
|
||||
.replace("<", "\\u003c")
|
||||
.replace("\u2028", "\\u2028")
|
||||
.replace("\u2029", "\\u2029")
|
||||
)
|
||||
"""Serialize for embedding in a <script> tag; escape </ to avoid early close."""
|
||||
return json.dumps(value, separators=(",", ":")).replace("</", "<\\/")
|
||||
|
||||
|
||||
def generate_form(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
/* ADMIN_JS_MARKER */
|
||||
(() => {
|
||||
const ADMIN_URL = window.ADMIN_URL;
|
||||
const ADMIN_PDF_URL = window.ADMIN_PDF_URL;
|
||||
const MEALS = window.MEALS;
|
||||
|
|
@ -445,4 +444,3 @@ function adminInit() {
|
|||
}
|
||||
|
||||
adminInit();
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -259,9 +259,6 @@ class TestGenerateFormPlaywright:
|
|||
yield page
|
||||
browser.close()
|
||||
|
||||
def test_admin_bundle_loads(self, browser_page):
|
||||
assert browser_page.evaluate("typeof window.loadWeekOrders") == "function"
|
||||
|
||||
def test_qty_plus_updates_total_without_list_teardown(self, browser_page):
|
||||
page = browser_page
|
||||
card = page.locator('[data-meal-index="0"]')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue