Fix passkey login tracking, add email opt-out UI guards, and add Quick/Full quote mode toggle
- PasskeyController: set LastLoginDate on passkey sign-in so Company Health and audit pages show accurate last-login times (was always showing 'Never') - Jobs/Index status modal: disable 'Notify customer' email toggle and show warning when customer has notifications turned off; CustomerNotifyByEmail added to JobListDto + JobProfile mapping + data-customer-notify attribute - Quotes/Create: disable 'Send quote via email' checkbox with 'Notifications off' badge when selected customer has email opt-out; ViewBag.CustomerEmailOptOutIds added alongside existing CustomerTaxExemptIds pattern - Quotes/Create: Quick Quote / Full Quote segmented toggle at top of form; hides non-essential fields (dates, notes, tags, oven, discount, photos) in Quick mode; selection persisted in localStorage - InvoicesController Send action: improved error logging and user-facing warning when PDF generation or email dispatch fails after status is saved - item-wizard.js: guard item restoration with try/catch; ensure writeHiddenFields always runs on form submit via capture-phase listener - Help docs and AI knowledge base updated for all new features Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -65,11 +65,23 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
// Restore items from server round-trip (validation failure re-render)
|
||||
const existingEl = document.getElementById('existingItemsData');
|
||||
if (existingEl) {
|
||||
quoteItems = JSON.parse(existingEl.textContent);
|
||||
renderAllCards();
|
||||
writeHiddenFields();
|
||||
window.scrollTo({ top: 0, behavior: 'instant' });
|
||||
scheduleAutoPricing();
|
||||
try {
|
||||
quoteItems = JSON.parse(existingEl.textContent);
|
||||
renderAllCards();
|
||||
writeHiddenFields();
|
||||
window.scrollTo({ top: 0, behavior: 'instant' });
|
||||
scheduleAutoPricing();
|
||||
} catch (err) {
|
||||
console.error('item-wizard: failed to restore items from server model:', err);
|
||||
}
|
||||
}
|
||||
|
||||
// Guarantee hidden fields are always written on form submission, even if the wizard
|
||||
// was never interacted with (e.g. validation round-trip with pre-existing items).
|
||||
const hfc = document.getElementById('hiddenFieldsContainer');
|
||||
const ownerForm = hfc?.closest('form');
|
||||
if (ownerForm) {
|
||||
ownerForm.addEventListener('submit', writeHiddenFields, { capture: true });
|
||||
}
|
||||
|
||||
// Close any open powder combobox dropdown when clicking outside it
|
||||
|
||||
Reference in New Issue
Block a user