Fix auto-populate: wait for model + (machine OR CSF name)

Printer name only generates when there's enough info:
- Model must be selected (vendor available)
- AND either CSF name entered OR machine selected

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
cproudlock
2025-12-08 15:18:57 -05:00
parent 3ca48469fc
commit db797cb60f

View File

@@ -333,6 +333,11 @@
var machineAlias = machineOption.data('alias') || '';
var machineNumber = machineOption.data('number') || '';
// Only generate if we have model AND (machine OR CSF name)
if (!vendor || (!csfName && !machineAlias && !machineNumber)) {
return; // Not enough info yet
}
// Use alias if available, otherwise machine number
var location = machineAlias || machineNumber;
location = location.replace(/\s+/g, '').replace('Machine', '');