Replace goto-grid button with clickable grid cell label in component detail
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -443,14 +443,14 @@ function build_detail_inv_entry(entry) {
|
||||
type_el.className = `type-pill type-${entry.location_type}`;
|
||||
type_el.textContent = LOCATION_TYPE_LABEL[entry.location_type] ?? entry.location_type;
|
||||
|
||||
set_text(el, '.detail-inv-ref', entry.location_type === 'grid' ? grid_cell_label(entry) : (entry.location_ref || '—'));
|
||||
set_text(el, '.detail-inv-qty', entry.quantity ? `×${entry.quantity}` : '');
|
||||
set_text(el, '.detail-inv-notes', entry.notes || '');
|
||||
|
||||
if (entry.location_type === 'grid' && entry.grid_id) {
|
||||
const goto_btn = qs(el, '.detail-inv-goto-grid');
|
||||
goto_btn.hidden = false;
|
||||
goto_btn.addEventListener('click', () => navigate(`/grids/viewer/${entry.grid_id}`));
|
||||
const ref_el = qs(el, '.detail-inv-ref');
|
||||
ref_el.textContent = grid_cell_label(entry);
|
||||
ref_el.classList.add('detail-inv-ref-link');
|
||||
ref_el.addEventListener('click', () => navigate(`/grids/viewer/${entry.grid_id}`));
|
||||
|
||||
// Show the grid cell image as a read-only thumbnail
|
||||
const grid = all_grids.find(g => g.id === entry.grid_id);
|
||||
|
||||
Reference in New Issue
Block a user