Fix preferred powder selection and expand company settings export
- customer-details.js: encode double quotes in JSON.stringify output as " so onclick attributes parse correctly when powder names contain double quotes - ToolsController: add company_settings CSV to ExportAllCsv ZIP archive (was missing entirely) - ToolsController: add ~30 missing fields to GenerateCompanySettingsCsv — AccountingMethod, timeclock settings, all shop capability/blast/coat rate fields, complexity surcharge percents, pricing mode, invoice number prefix, email-from fields, per-event notification flags, payment reminder settings, document accent colors/terms/footer notes, kiosk intake output - Update GenerateCompanySettingsTemplate to match so import template stays in sync with export Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -111,8 +111,8 @@ function searchInventoryItems(term) {
|
||||
if (!dropdown) return;
|
||||
dropdown.innerHTML = data.length === 0
|
||||
? '<div class="dropdown-item text-muted small">No results</div>'
|
||||
: data.map(i => `<button type="button" class="dropdown-item small"
|
||||
onclick="selectPowder(${i.id}, ${JSON.stringify(i.name + (i.colorName ? ' — ' + i.colorName : ''))})">${i.name}${i.colorName ? ' <span class=\'text-muted\'>' + i.colorName + '</span>' : ''} <span class="badge bg-light text-muted border">${i.sku ?? ''}</span></button>`).join('');
|
||||
: data.map(i => { const label = JSON.stringify(i.name + (i.colorName ? ' — ' + i.colorName : '')).replace(/"/g, '"'); return `<button type="button" class="dropdown-item small"
|
||||
onclick="selectPowder(${i.id}, ${label})">${i.name}${i.colorName ? ' <span class=\'text-muted\'>' + i.colorName + '</span>' : ''} <span class="badge bg-light text-muted border">${i.sku ?? ''}</span></button>`; }).join('');
|
||||
dropdown.style.display = 'block';
|
||||
} catch { /* silent */ }
|
||||
}, 300);
|
||||
|
||||
Reference in New Issue
Block a user