diff --git a/frontend/dashboard.css b/frontend/dashboard.css index 111174c..4c70f78 100644 --- a/frontend/dashboard.css +++ b/frontend/dashboard.css @@ -241,6 +241,8 @@ textarea { resize: vertical; min-height: 120px; } .my-work-card-title { display:block; margin:5px 0; font-weight:650; } .update-selection-controls { display:flex; align-items:center; gap:8px; flex-wrap:wrap; } .update-selection-controls button { min-height:44px; } +.selection-scope-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; max-width:100%; } +.selection-scope-actions button { min-height:44px; max-width:100%; } .update-selector { min-height:44px; } .work-selector { min-height:44px; } .update-selector, .work-selector { display:flex; align-items:center; gap:10px; padding:6px; border:1px solid #31577f; border-radius:8px; cursor:pointer; } diff --git a/frontend/dashboard.js b/frontend/dashboard.js index 1243408..930f143 100644 --- a/frontend/dashboard.js +++ b/frontend/dashboard.js @@ -2540,6 +2540,21 @@ selectionControls.hidden = !planningQueue && (selectedWorkFilter !== 'update' || updateIds.length === 0); qs('#select-work').hidden = !planningQueue || workSelectionState.active || selection.active; qs('#cancel-work-selection').hidden = !workSelectionState.active; + const selectionScopeActions = qs('#selection-scope-actions'); + selectionScopeActions.hidden = !workSelectionState.active; + qs('#select-matching-work').disabled = visible.length === 0 || workSelectionState.count >= workSelection.limit; + qs('#clear-work-selection').disabled = workSelectionState.count === 0; + qs('#select-matching-work').onclick = () => { + const result = workSelection.selectMany(visible); + qs('#my-work-action-status').textContent = result.status === 'limit' ? + result.count + ' matches selected. Selection is capped at ' + result.limit + ' items.' : + result.count + ' matches selected from the current queue and search.'; + }; + qs('#clear-work-selection').onclick = () => { + workSelection.clear(); + qs('#my-work-action-status').textContent = 'Selection cleared. Choose new matches or individual work.'; + qs('#select-matching-work').focus(); + }; qs('#select-updates').hidden = selectedWorkFilter !== 'update' || selection.active || workSelectionState.active; qs('#cancel-update-selection').hidden = !selection.active; qs('#update-selection-status').textContent = workSelectionState.active ? diff --git a/frontend/index.html b/frontend/index.html index 0391cff..c9fa368 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -169,6 +169,10 @@ +