Cutsheet: show the next free cable ID as a hint, not a placeholder
Lint / JS (eslint) (push) Successful in 7s
Lint / Python (flake8) (push) Successful in 48s
Lint / Notify on failure (push) Skipped
Lint / Deploy (push) Skipped
Lint / Python (flake8) (pull_request) Successful in 55s
Lint / JS (eslint) (pull_request) Successful in 14s
Lint / Notify on failure (pull_request) Skipped
Lint / Deploy (pull_request) Skipped
Security / Python Security (bandit) (pull_request) Successful in 1m45s
Security / Python Security (bandit) (push) Successful in 1m22s
Test / Python Tests (pytest) (pull_request) Successful in 1m6s
Test / Python Tests (pytest) (push) Successful in 1m0s
Lint / JS (eslint) (push) Successful in 7s
Lint / Python (flake8) (push) Successful in 48s
Lint / Notify on failure (push) Skipped
Lint / Deploy (push) Skipped
Lint / Python (flake8) (pull_request) Successful in 55s
Lint / JS (eslint) (pull_request) Successful in 14s
Lint / Notify on failure (pull_request) Skipped
Lint / Deploy (pull_request) Skipped
Security / Python Security (bandit) (pull_request) Successful in 1m45s
Security / Python Security (bandit) (push) Successful in 1m22s
Test / Python Tests (pytest) (pull_request) Successful in 1m6s
Test / Python Tests (pytest) (push) Successful in 1m0s
A placeholder of C01 in the empty ID field looked like a real value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -370,6 +370,7 @@ function openCable(cable, prefill) {
|
||||
form.b_side.value = data.b_side || 'front';
|
||||
form.label_applied.checked = !!data.label_applied;
|
||||
form.querySelector('.cs-delete').hidden = !cable;
|
||||
document.getElementById('cs-next-label').textContent = _cs.next_label;
|
||||
document.getElementById('cs-cable-title').textContent = cable ? `Edit ${cable.label || 'cable'}` : 'New cable';
|
||||
fillPorts('a');
|
||||
fillPorts('b');
|
||||
@@ -510,6 +511,7 @@ document.addEventListener('click', e => {
|
||||
else if (action === 'edit-item') openItem(_cs.items.find(i => String(i.id) === btn.dataset.id));
|
||||
else if (action === 'edit-port-label') openPortLabel(btn.dataset.item, btn.dataset.port);
|
||||
else if (action === 'print-labels') printLabels();
|
||||
else if (action === 'use-next-label') document.getElementById('cs-label').value = _cs.next_label;
|
||||
else if (action === 'toggle-suggestions') { _showAllSuggestions = !_showAllSuggestions; renderSuggestions(); }
|
||||
else if (action === 'import-check') importCsv(null, true);
|
||||
else if (action === 'add-suggestion') {
|
||||
|
||||
@@ -105,8 +105,9 @@
|
||||
<div class="form-row">
|
||||
<div class="lt-form-group">
|
||||
<label class="lt-label" for="cs-label">Cable ID</label>
|
||||
<input class="lt-input" id="cs-label" name="label" maxlength="32" placeholder="C01">
|
||||
<div class="lt-field-hint">Leave blank for a cable you haven't labeled.</div>
|
||||
<input class="lt-input" id="cs-label" name="label" maxlength="32">
|
||||
<div class="lt-field-hint">Blank if the cable has no ID yet. Next free:
|
||||
<span id="cs-next-label"></span> <button type="button" class="cs-link-btn" data-action="use-next-label">use</button></div>
|
||||
</div>
|
||||
<div class="lt-form-group">
|
||||
<label class="lt-label" for="cs-status">Status</label>
|
||||
|
||||
Reference in New Issue
Block a user