mirror of
https://github.com/kbenestad/ClubLedger.git
synced 2026-06-18 09:44:33 +00:00
Replace literal em-dashes with — HTML entities
Fixes garbled display ("â€"") on Windows where the UTF-8 bytes for U+2014
were being misread as Windows-1252. All em-dash occurrences in index.html,
app.js, and common.js are now expressed as HTML entities.
https://claude.ai/code/session_01JuRTR5Xjx8emQsyerBgGU7
This commit is contained in:
parent
4125972b67
commit
79ae833fa9
3 changed files with 11 additions and 11 deletions
|
|
@ -67,7 +67,7 @@ function populateTransferTypes() {
|
|||
const sel = document.getElementById(id);
|
||||
if (!sel) return;
|
||||
const prev = sel.value;
|
||||
sel.innerHTML = '<option value="">— select —</option>' +
|
||||
sel.innerHTML = '<option value="">— select —</option>' +
|
||||
types.map(t => `<option value="${esc(t)}">${esc(t)}</option>`).join('');
|
||||
if (prev && types.includes(prev)) sel.value = prev;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ async function loadStaffInto(selectId) {
|
|||
try {
|
||||
const data = await apiFetch('/staff');
|
||||
const saved = sessionStorage.getItem('lastStaff') || '';
|
||||
sel.innerHTML = '<option value="">— select staff —</option>' +
|
||||
sel.innerHTML = '<option value="">— select staff —</option>' +
|
||||
data.staff.map(n => `<option value="${esc(n)}"${n === saved ? ' selected' : ''}>${esc(n)}</option>`).join('');
|
||||
sel.addEventListener('change', () => {
|
||||
if (sel.value) sessionStorage.setItem('lastStaff', sel.value);
|
||||
|
|
@ -67,7 +67,7 @@ async function refreshAllStaffDropdowns() {
|
|||
const data = await apiFetch('/staff');
|
||||
const saved = sessionStorage.getItem('lastStaff') || '';
|
||||
document.querySelectorAll('select[id$="Staff"]').forEach(sel => {
|
||||
sel.innerHTML = '<option value="">— select staff —</option>' +
|
||||
sel.innerHTML = '<option value="">— select staff —</option>' +
|
||||
data.staff.map(n => `<option value="${esc(n)}"${n === saved ? ' selected' : ''}>${esc(n)}</option>`).join('');
|
||||
});
|
||||
renderStaffChips(data.staff);
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@
|
|||
<div class="form-row">
|
||||
<label>Transfer Type</label>
|
||||
<select id="cashierTransferType">
|
||||
<option value="">— select —</option>
|
||||
<option value="">— select —</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
|
|
@ -128,7 +128,7 @@
|
|||
<div class="form-row">
|
||||
<label>Transfer Type</label>
|
||||
<select id="withdrawalTransferType">
|
||||
<option value="">— select —</option>
|
||||
<option value="">— select —</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
|
|
@ -209,9 +209,9 @@
|
|||
<select id="s-overdraft-policy">
|
||||
<option value="never">Not allowed</option>
|
||||
<option value="always">Allowed for all</option>
|
||||
<option value="staff_override">Default not allowed — staff may override per charge</option>
|
||||
<option value="admin_override">Default not allowed — admin may override per charge</option>
|
||||
<option value="staff_block">Default allowed — staff may block per charge</option>
|
||||
<option value="staff_override">Default not allowed — staff may override per charge</option>
|
||||
<option value="admin_override">Default not allowed — admin may override per charge</option>
|
||||
<option value="staff_block">Default allowed — staff may block per charge</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
|
@ -268,11 +268,11 @@
|
|||
|
||||
<div class="panel-divider"></div>
|
||||
<h3 class="sub-heading">Receipt Footers</h3>
|
||||
<div class="form-row"><label>Footer — all <span class="label-hint">(fallback for all receipts and statement)</span></label>
|
||||
<div class="form-row"><label>Footer — all <span class="label-hint">(fallback for all receipts and statement)</span></label>
|
||||
<textarea id="s-receipt-footer" rows="2" placeholder="Printed at the bottom of every receipt and statement"></textarea></div>
|
||||
<div class="form-row"><label>Footer — charge receipts <span class="label-hint">(overrides all-footer for bar charges)</span></label>
|
||||
<div class="form-row"><label>Footer — charge receipts <span class="label-hint">(overrides all-footer for bar charges)</span></label>
|
||||
<textarea id="s-receipt-footer-charge" rows="2"></textarea></div>
|
||||
<div class="form-row"><label>Footer — cashier receipts <span class="label-hint">(overrides all-footer for top-ups and withdrawals)</span></label>
|
||||
<div class="form-row"><label>Footer — cashier receipts <span class="label-hint">(overrides all-footer for top-ups and withdrawals)</span></label>
|
||||
<textarea id="s-receipt-footer-cashier" rows="2"></textarea></div>
|
||||
|
||||
<button type="submit" class="btn btn-primary" style="margin-top:8px">Save Settings</button>
|
||||
|
|
|
|||
Loading…
Reference in a new issue