Fix Quick-Buchen visibility: always show on negative buffer, hide when buf >= daily
Rules: - buf < 0 (behind) → always visible to catch up - buf >= daily (more than a day ahead) → hidden - otherwise → visible only if today not yet reached daily goal Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
88cc05e999
commit
61d07d09b9
1 changed files with 1 additions and 1 deletions
|
|
@ -773,7 +773,7 @@ function buildCard(g){
|
||||||
// ── Quick-Buchen ──────────────────────────────────────────────────────────────
|
// ── Quick-Buchen ──────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
function buildQuickBook(){
|
function buildQuickBook(){
|
||||||
var active=goals.filter(function(g){ var c=calc(g); return tOff(g)<g.days&&!c.ok&&c.buf<g.daily; });
|
var active=goals.filter(function(g){ var c=calc(g); return tOff(g)<g.days&&(c.buf<0||(c.tdone<g.daily&&c.buf<g.daily)); });
|
||||||
if(!active.length) return null;
|
if(!active.length) return null;
|
||||||
var frag=document.createDocumentFragment();
|
var frag=document.createDocumentFragment();
|
||||||
var lbl=document.createElement('div'); lbl.className='sec-lbl'; lbl.textContent=tr('qbLabel');
|
var lbl=document.createElement('div'); lbl.className='sec-lbl'; lbl.textContent=tr('qbLabel');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue