fix: use single braces in loadRoster JS nested string

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Adam Moussa 2026-05-13 15:52:07 -04:00
parent b1530c04a2
commit 26e1f5bbb4

View file

@ -514,35 +514,35 @@ function updateTotal() {{
{ {
"" ""
if use_google_auth if use_google_auth
else '''async function loadRoster() {{ else '''async function loadRoster() {
try {{ try {
const res = await fetch(ROSTER_URL); const res = await fetch(ROSTER_URL);
const data = await res.json(); const data = await res.json();
const select = document.getElementById('emp-name'); const select = document.getElementById('emp-name');
select.innerHTML = '<option value="">Select your name</option>'; select.innerHTML = '<option value="">Select your name</option>';
(data.employees || ROSTER).forEach(emp => {{ (data.employees || ROSTER).forEach(emp => {
const opt = document.createElement('option'); const opt = document.createElement('option');
opt.value = emp.name; opt.value = emp.name;
opt.dataset.email = emp.email; opt.dataset.email = emp.email;
opt.textContent = emp.name; opt.textContent = emp.name;
select.appendChild(opt); select.appendChild(opt);
}}); });
select.addEventListener('change', () => {{ select.addEventListener('change', () => {
const selected = select.options[select.selectedIndex]; const selected = select.options[select.selectedIndex];
document.getElementById('emp-email').value = selected?.dataset?.email || ''; document.getElementById('emp-email').value = selected?.dataset?.email || '';
}}); });
}} catch (e) {{ } catch (e) {
const select = document.getElementById('emp-name'); const select = document.getElementById('emp-name');
select.innerHTML = '<option value="">Select your name</option>'; select.innerHTML = '<option value="">Select your name</option>';
ROSTER.forEach(emp => {{ ROSTER.forEach(emp => {
const opt = document.createElement('option'); const opt = document.createElement('option');
opt.value = emp.name; opt.value = emp.name;
opt.dataset.email = emp.email; opt.dataset.email = emp.email;
opt.textContent = emp.name; opt.textContent = emp.name;
select.appendChild(opt); select.appendChild(opt);
}}); });
}} }
}} }
''' '''
} }
async function checkFormStatus() {{ async function checkFormStatus() {{