Audit-Log als Karten, Geburtsdatum-Wheel-Picker, Sticky-Quickbar

Drei gezielte Mobile-Verbesserungen nach Nutzer-Feedback:

- Audit-Log (bisher .audit-row Flex-Liste mit festen min-width, auf
  Handy unlesbar zusammengequetscht) zu einer echten Tabelle mit
  class="tw rtable" umgebaut - erbt automatisch das bestehende Karten-
  Akkordeon (nur ein Eintrag offen, Rest kompakt gestapelt)
- Neuer Geburtsdatum-Wheel-Picker (Tag/Monat/Jahr-Spalten mit CSS
  scroll-snap, openGebDatumPicker/dwConfirm/dwTriggerLabel) ersetzt
  natives <input type=date> gezielt nur bei echten Geburtsdatum-Feldern
  (Interview-Wizard, Widerspruch-Generator, Musterbrief) - erspart bei
  60-100 Jahre zurückliegenden Daten das endlose Monat-für-Monat-
  Zurückklicken, auf PC (Mausrad) wie Touch gleich schnell. Andere
  Datumsfelder (Antragsdatum, Bescheiddatum etc.) bleiben nativ, da dort
  ein normaler Kalender fuer nahe Termine schneller ist. Default-
  Scrollposition ist heute-75 Jahre statt heute.
- Schnellzugriff-Kachel wird auf dem Dashboard unter 560px zur
  fixierten Bottom-Bar (Icon-Tab-Leiste) statt Teil des scrollbaren
  Bento-Grids zu sein - Hauptaktionen immer ohne Scrollen erreichbar

Verifiziert per Playwright: Wheel-Picker-Interaktion (Scroll per
Mausrad, Bestätigen, korrekter ISO-Wert im hidden Input), Audit-Log-
Karten auf 390px, Sticky-Bar sichtbar+fixiert im Viewport-Screenshot,
Widerspruch/Musterbrief-Trigger inkl. Live-Vorschau-Aktualisierung.
This commit is contained in:
admin committed 2026-07-18 13:13:17 +02:00
1 parent 8dd141ea35
commit 7cb6191e83
2 files changed
+151 -26

No files matched your search

+3 -1
View File
@@ -68,9 +68,11 @@ The frontend was originally desktop-only (zero `@media` queries, fixed 228px sid
- **Glass design system**: `:root` defines a dedicated token set — `--glass`/`--glass-strong` (translucent white fills), `--glass-border`, `--glass-blur`, `--glass-shadow`/`--glass-shadow-lg`, plus four `--bento-*` gradient tokens (mint/lavender/peach/rose) for tile accents. `body` has a fixed multi-blob `radial-gradient` background (`background-attachment:fixed`) that the translucent, `backdrop-filter:blur(...)` cards/sidebar/topbar/modal/login-box float over. Regular form inputs stay solid (`var(--surface)`, opaque white) — only container-level chrome (`.card`, `.modal`, `.sb`, `.topbar`, `.lo-box`) is glassy, intentionally, for text legibility. Always pair `backdrop-filter` with `-webkit-backdrop-filter` (Safari).
- **Dashboard is a real Bento grid**, not just a relabeled stat row: `.bento` is a 4-column CSS grid with **explicit** `grid-column`/`grid-row` line placement per tile class (`.bento-stat`, `.bento-hero`, `.bento-aufg`, `.bento-quick`) — deliberately not relying on grid auto-placement, which does not reliably fill remaining same-row cells the way you'd expect when items of different spans are mixed. If you add/resize tiles, keep using explicit line numbers (or verify auto-placement with the debug technique below) rather than assuming `span N` will pack tiles the way you expect.
- **Responsive tables → cards**: any live-UI (non-PDF-export) table that needs to stay usable at phone width gets `class="tw rtable"` on its wrapper and `data-label="…"` on every `<td>`. Below 700px, `.rtable` CSS turns each `<tr>` into its own glass card (label stacked above value per cell, via `td[data-label]::before{content:attr(data-label)}`) instead of squeezing table columns. Applied to: Dashboard's recent-patients table, `renderPT` (Patientenliste), `pgAufgaben`, `renderAdminDash`'s Konten table, and the Patientenakte Anträge table. Follow this pattern for any new data table — don't ship a raw `<table>` without it.
- **Responsive tables → cards**: any live-UI (non-PDF-export) table that needs to stay usable at phone width gets `class="tw rtable"` on its wrapper and `data-label="…"` on every `<td>`. Below 700px, `.rtable` CSS turns each `<tr>` into its own glass card (label stacked above value per cell, via `td[data-label]::before{content:attr(data-label)}`) instead of squeezing table columns. Applied to: Dashboard's recent-patients table, `renderPT` (Patientenliste), `pgAufgaben`, `renderAdminDash`'s Konten table **and** its Audit-Log (originally a fixed-min-width flex list — converted to an `.rtable` specifically because flex rows with `min-width` don't degrade gracefully, unlike this pattern), and the Patientenakte Anträge table. Follow this pattern for any new data table — don't ship a raw `<table>` (or a fixed-width flex row list) without it.
- **Accordion on the card view**: within `.rtable`, exactly one row is expanded at a time — the rest collapse to a single header line (`td.rt-head`, marked explicitly per table since it's usually the first `data-label` cell) and stack tightly, so scanning many rows needs far less scrolling. `rtInit()` (shared helper, defined near `escH`) wires this up: on load the first row gets `.rt-open`; clicking any row's header toggles it open and closes the others (clicks on nested `button,a,select,input,textarea,.tl` are ignored so action buttons/links inside a row still work independently of the accordion). **Every function that renders an `.rtable` must call `rtInit()` after the DOM is in place** (see `pgDash`, `renderPT`, `pgAufgaben`, `renderAdminDash`, `loadPat`) — a new table using this pattern that forgets the call will render but never expand/collapse. Cells without `data-label` (action-button columns) are never hidden by the accordion, so those buttons stay reachable even on a collapsed row. The `.rt-chev` chevron icon is `display:none` by default and only shown inside the `max-width:700px` breakpoint — without that base rule it leaks into the plain desktop/tablet `<table>` as a stray icon.
- **Birth-date fields use a scroll-wheel picker, not native `<input type="date">`**: for a care app, birth years are routinely 60-100 years in the past, and a native calendar widget forces endless "previous month" clicking. `openGebDatumPicker(hiddenId, dispId)` opens an `OM()` modal with three CSS-scroll-snap columns (Tag/Monat/Jahr, `.dwheel`/`.dwheel-col`/`.dwheel-item`, `DW_ITEM_H=38`); the centered item per column is read on confirm (`dwConfirm()`), clamped for invalid day/month combos, and written back as an ISO string. The pattern is: a visible `.dw-trigger` div (click opens the picker, shows the formatted date via `dwTriggerLabel(hiddenId, dispId)`) plus a paired `<input type="hidden">` that holds the real `YYYY-MM-DD` value everything else in the codebase already expects — so `neuCollect()`/`fillWP()`/`fillM()`/`updM()` etc. needed no changes beyond calling `dwTriggerLabel()` after programmatically setting the hidden input (e.g. when a patient is selected and auto-fills the form). Applied only to actual birth-date fields — `fgeb` (interview wizard), `wgeb` (Widerspruch-Generator), `mpgeb` (Musterbrief) — **not** to near-term admin dates (Antragsdatum, Bescheiddatum, Fällig-am, etc.), which stay native `<input type="date">` since a normal calendar is faster for dates within the last/next few months. Defaults to *today − 75 years* rather than today, since that's a much better starting scroll position for this app's typical patient age. If you wire the picker to a field with existing live-update behavior (Musterbrief's `updM()` was previously triggered via `oninput`), you must call that update function explicitly from `dwConfirm()` — switching to `type="hidden"` removes the inline `oninput` handler, and events dispatched on a hidden input don't automatically reach anything unless something explicitly listens for them.
- **Mobile/tablet nav**: below 900px the `.sb` sidebar becomes a fixed off-canvas panel (`transform:translateX(-100%)`, slides in via `.sb.open`), toggled by a hamburger button (`#sb-toggle`, only visible in that breakpoint) and a `#sb-backdrop` overlay that closes it on tap. `toggleSidebar()`/`closeSidebar()` manage this; every nav-item click auto-closes it. Form grids (`.fg.c2/.c3`), stat grids (`.g4`), and the bento grid collapse to fewer columns at 900px/700px/560px. Modals go full-screen below 560px. Form inputs are forced to `font-size:16px` on phones to stop iOS Safari's auto-zoom-on-focus.
- **Dashboard quick-actions become a sticky bottom bar on phones**: below 560px, `.bento-quick` (the "Schnellzugriff" tile) switches from a normal bento grid cell to `position:fixed;bottom:0`, a horizontal icon-only tab bar (`.bq-hd` heading hidden, `.bq-list` buttons go icon-over-2-line-label via `-webkit-line-clamp:2`), so the primary actions never require scrolling to reach. `.bento{padding-bottom:80px}` in that same breakpoint reserves the space the fixed bar would otherwise cover — this is scoped to `.bento` specifically (not a global `#content` padding) since `.bento-quick`/`.bento` only ever exist on the Dashboard page.
- **Verification gotcha #1 — internal scroll**: `.content` scrolls internally (`overflow-y:auto` inside a `height:100vh` shell), so Playwright's `page.screenshot({fullPage:true})` does **not** capture content below the fold — only the viewport. Scroll `.content` itself (`document.querySelector('.content').scrollTop = ...`) before screenshotting to see the rest.
- **Verification gotcha #2 — stale template cache**: `start.py` runs with `debug=False`, so Flask's `TEMPLATES_AUTO_RELOAD` is off and Jinja caches the compiled `index.html` **in memory for the life of the process**, from the first request after startup. Editing the template while a `python start.py` process is still running from before your edit is invisible to the browser no matter how many times you reload — you'll see stale HTML/JS and it's easy to misdiagnose as a CSS/JS bug. **Always restart the server after editing `templates/index.html`** before taking verification screenshots or you'll debug a ghost.
@@ -64,9 +64,6 @@ body{
.ni[data-p="backend"]:hover{background:var(--blbg);color:var(--bltx)}
.ni[data-p="admindash"].on{background:var(--rdbg);color:var(--rdtx);border-left-color:var(--rdtx)}
.ni[data-p="admindash"]:hover{background:var(--rdbg);color:var(--rdtx)}
.audit-row{display:flex;gap:10px;padding:9px 0;border-bottom:1px solid var(--border);font-size:13px}
.audit-row:last-child{border-bottom:none}
.audit-aktion{font-weight:500;flex-shrink:0;min-width:130px}
.admin-pill{font-size:10px;padding:1px 7px;border-radius:9px;background:var(--ambg);color:var(--amtx);margin-left:auto;font-weight:500}
.api-token-wrap{position:relative}
.api-token-wrap input{padding-right:38px}
@@ -137,8 +134,20 @@ body{
.bento-quick{grid-column:2/3;grid-row:auto}
}
@media (max-width:560px){
.bento{grid-template-columns:1fr}
.bento-hero,.bento-aufg,.bento-quick{grid-column:1/2;grid-row:auto}
.bento{grid-template-columns:1fr;padding-bottom:80px}
.bento-hero,.bento-aufg{grid-column:1/2;grid-row:auto}
/* Schnellzugriff wird zur fixierten Bottom-Bar - kein Scrollen mehr noetig,
um an die Schnellaktionen zu kommen (siehe .bento oben: padding-bottom
reserviert den Platz, den die Bar sonst verdecken wuerde). */
.bento-quick{
position:fixed;left:8px;right:8px;bottom:8px;z-index:150;
grid-column:unset;grid-row:unset;padding:6px;
}
.bento-quick .bq-hd{display:none}
.bento-quick .bq-list{flex-direction:row!important;gap:2px}
.bento-quick .bq-list button{flex:1;flex-direction:column;gap:3px;padding:8px 2px;border:none;background:transparent;min-width:0}
.bento-quick .bq-list button i{font-size:19px}
.bento-quick .bq-list button span{font-size:9px;line-height:1.15;white-space:normal;text-align:center;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
}
.metric{background:rgba(255,255,255,.5);border-radius:var(--r);padding:14px 16px;border:1px solid var(--glass-border)}
.ml{font-size:12px;color:var(--muted)}
@@ -278,6 +287,24 @@ textarea{resize:vertical;min-height:80px}
.kk-tab.active{background:var(--green);color:#fff;font-weight:600}
.pat-foto-btn{cursor:pointer;flex-shrink:0;border-radius:50%;transition:box-shadow .12s}
.pat-foto-btn:hover{box-shadow:0 0 0 3px rgba(29,158,117,.22)}
/* ── Geburtsdatum: Scroll-Wheel-Picker statt nativem Kalender ──
Native Datepicker zwingen bei Geburtsdaten (oft 60-100 Jahre zurück)
zu endlosem Zurückblättern. Drei scrollbare Tag/Monat/Jahr-Spalten mit
scroll-snap sind auf PC (Mausrad) wie Touch (Wisch) gleich schnell. */
.dw-trigger{display:flex;align-items:center;gap:8px;border:1px solid var(--border2);border-radius:var(--r);padding:7px 10px;font-size:13px;background:var(--surface);cursor:pointer;color:var(--text)}
.dw-trigger:hover{border-color:var(--green)}
.dw-trigger i{color:var(--muted);font-size:15px}
.dw-trigger .dw-ph{color:var(--hint)}
.dwheel{display:flex;gap:2px;position:relative;height:190px;background:var(--bg);border-radius:var(--r);overflow:hidden;margin-bottom:4px}
.dwheel-col{flex:1;overflow-y:scroll;scroll-snap-type:y mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none;position:relative;z-index:2}
.dwheel-col::-webkit-scrollbar{display:none}
.dwheel-item{height:38px;display:flex;align-items:center;justify-content:center;scroll-snap-align:center;font-size:15px;color:var(--hint);transition:color .1s,font-size .1s;font-family:'IBM Plex Mono',monospace}
.dwheel-item.sel{color:var(--text);font-weight:600;font-size:17px}
.dwheel-highlight{position:absolute;left:6px;right:6px;top:50%;transform:translateY(-50%);height:38px;border-radius:8px;background:var(--gbg);pointer-events:none;z-index:1}
.dwheel-fade{position:absolute;left:0;right:0;height:56px;pointer-events:none;z-index:3}
.dwheel-fade.top{top:0;background:linear-gradient(var(--bg),transparent)}
.dwheel-fade.bot{bottom:0;background:linear-gradient(transparent,var(--bg))}
.dw-hint{text-align:center;font-size:11px;color:var(--muted);margin-top:6px}
.pat-foto-img{width:52px;height:52px;border-radius:50%;object-fit:cover;border:2px solid var(--border);display:block}
.pat-foto-empty{width:52px!important;height:52px!important;font-size:16px!important}
/* ── Login-Overlay ── */
@@ -481,6 +508,91 @@ function rtInit(){
});
});
}
// ── Geburtsdatum-Wheel-Picker (Tag/Monat/Jahr-Scroll-Spalten) ───────────────
const DW_MONATE=['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'];
const DW_ITEM_H=38;
let _dwHidden=null,_dwDisp=null;
function dwTriggerLabel(hiddenId,dispId){
const el=document.getElementById(dispId);
const hid=document.getElementById(hiddenId);
if(!el)return;
el.innerHTML=hid&&hid.value?'<i class="ti ti-cake"></i>'+fdate(hid.value):'<i class="ti ti-cake"></i><span class="dw-ph">Datum wählen…</span>';
}
function openGebDatumPicker(hiddenId,dispId){
_dwHidden=hiddenId;_dwDisp=dispId;
const cur=document.getElementById(hiddenId)?.value||'';
const heute=new Date();
let d=heute.getDate(),m=heute.getMonth()+1,y=heute.getFullYear()-75; // sinnvoller Default für Pflege-Patienten statt "heute"
if(cur){const parts=cur.split('-');if(parts.length===3){y=parseInt(parts[0]);m=parseInt(parts[1]);d=parseInt(parts[2]);}}
const dayItems=Array.from({length:31},(_,i)=>({v:i+1,label:String(i+1)}));
const monthItems=DW_MONATE.map((n,i)=>({v:i+1,label:n}));
const yearItems=[];for(let yy=heute.getFullYear();yy>=1900;yy--)yearItems.push({v:yy,label:String(yy)});
OM('Geburtsdatum wählen',
'<div class="dwheel">'+
'<div class="dwheel-col" id="dw-day"></div>'+
'<div class="dwheel-col" id="dw-month"></div>'+
'<div class="dwheel-col" id="dw-year"></div>'+
'<div class="dwheel-highlight"></div>'+
'<div class="dwheel-fade top"></div><div class="dwheel-fade bot"></div>'+
'</div>'+
'<div class="dw-hint">Scrollen oder mit dem Mausrad auswählen</div>'+
'<div class="fl g8 mt3" style="justify-content:flex-end">'+
'<button class="btn" onclick="CM()">Abbrechen</button>'+
'<button class="btn btn-p" onclick="dwConfirm()"><i class="ti ti-check"></i>Übernehmen</button></div>'
);
dwBuildCol('dw-day',dayItems);
dwBuildCol('dw-month',monthItems);
dwBuildCol('dw-year',yearItems);
const dIdx=Math.max(0,dayItems.findIndex(x=>x.v===d));
const mIdx=Math.max(0,monthItems.findIndex(x=>x.v===m));
const yIdx=Math.max(0,yearItems.findIndex(x=>x.v===y));
requestAnimationFrame(()=>{
dwScrollTo('dw-day',dIdx);dwScrollTo('dw-month',mIdx);dwScrollTo('dw-year',yIdx);
['dw-day','dw-month','dw-year'].forEach(id=>dwHighlight(document.getElementById(id)));
});
['dw-day','dw-month','dw-year'].forEach(id=>{
const col=document.getElementById(id);
let t=null;
col.onscroll=()=>{
dwHighlight(col);
clearTimeout(t);
t=setTimeout(()=>{
const idx=Math.round(col.scrollTop/DW_ITEM_H);
col.scrollTo({top:idx*DW_ITEM_H,behavior:'smooth'});
},130);
};
});
}
function dwBuildCol(id,items){
const col=document.getElementById(id);
const pad=(190-DW_ITEM_H)/2;
col.innerHTML='<div style="height:'+pad+'px"></div>'+
items.map(it=>'<div class="dwheel-item" data-v="'+it.v+'">'+it.label+'</div>').join('')+
'<div style="height:'+pad+'px"></div>';
col.dataset.items=JSON.stringify(items);
}
function dwScrollTo(id,idx){document.getElementById(id).scrollTop=idx*DW_ITEM_H;}
function dwHighlight(col){
const idx=Math.round(col.scrollTop/DW_ITEM_H);
col.querySelectorAll('.dwheel-item').forEach((el,i)=>el.classList.toggle('sel',i===idx));
}
function dwRead(id){
const col=document.getElementById(id);
const items=JSON.parse(col.dataset.items);
const idx=Math.max(0,Math.min(Math.round(col.scrollTop/DW_ITEM_H),items.length-1));
return items[idx].v;
}
function dwConfirm(){
let d=dwRead('dw-day'),m=dwRead('dw-month'),y=dwRead('dw-year');
const maxDay=new Date(y,m,0).getDate(); // Tag begrenzen, falls z.B. 31. Februar gewählt wurde
if(d>maxDay)d=maxDay;
const iso=y+'-'+String(m).padStart(2,'0')+'-'+String(d).padStart(2,'0');
const hid=document.getElementById(_dwHidden);
if(hid){hid.value=iso;hid.dispatchEvent(new Event('change'));}
dwTriggerLabel(_dwHidden,_dwDisp);
if(_dwHidden==='mpgeb'&&typeof updM==='function')updM(); // Musterbrief-Vorschau live nachziehen
CM();
}
function editNotizen(pid){
const el=document.getElementById('notiz-display-'+pid);
const current=el?el.dataset.notiz:'';
@@ -1301,15 +1413,18 @@ function renderAdminDash(nutzer,log,patienten){
'</td></tr>';
}).join('');
const patOptions=(patienten||[]).map(p=>'<option value="'+p.id+'">'+escH(p.vorname+' '+p.nachname)+' (#'+p.id+')</option>').join('');
const logRows=(log||[]).length?(log||[]).map(l=>
'<div class="audit-row">'+
'<div class="mono sm muted" style="min-width:135px">'+fdate(l.erstellt_am)+'</div>'+
'<div class="audit-aktion">'+(ADMIN_AKTION_LABEL[l.aktion]||l.aktion)+'</div>'+
'<div style="flex:1">'+
'<div>'+escH(l.ziel_bezeichnung||'')+' <span class="muted sm">('+l.ziel_typ+' #'+l.ziel_id+')</span></div>'+
'<div class="sm muted">von '+escH(l.admin_name||'–')+' – '+escH(l.begruendung||'')+'</div>'+
'</div></div>'
).join(''):'<div class="muted sm">Noch keine Einträge.</div>';
const logRows=(log||[]).length?
'<div class="tw rtable"><table><thead><tr><th>Aktion</th><th>Zeitpunkt</th><th>Ziel</th><th>Begründung</th></tr></thead><tbody>'+
(log||[]).map(l=>
'<tr><td data-label="Aktion" class="rt-head"><div><div class="w5">'+(ADMIN_AKTION_LABEL[l.aktion]||l.aktion)+'</div>'+
'<div class="sm muted">'+fdate(l.erstellt_am)+'</div></div><i class="ti ti-chevron-down rt-chev"></i></td>'+
'<td data-label="Zeitpunkt" class="mono">'+fdate(l.erstellt_am)+'</td>'+
'<td data-label="Ziel">'+escH(l.ziel_bezeichnung||'')+' <span class="muted sm">('+l.ziel_typ+' #'+l.ziel_id+')</span></td>'+
'<td data-label="Begründung"><div>'+escH(l.begruendung||'')+'</div><div class="sm muted">von '+escH(l.admin_name||'–')+'</div></td>'+
'</tr>'
).join('')+
'</tbody></table></div>'
:'<div class="muted sm">Noch keine Einträge.</div>';
R('<div class="card mb4">'+
'<div class="slabel mb3">Konten</div>'+
'<div class="tw rtable"><table><thead><tr><th></th><th>Name</th><th>Rolle</th><th>Status</th><th>Patienten</th><th>Abo</th><th>Aktionen</th></tr></thead>'+
@@ -1421,13 +1536,13 @@ async function pgDash(){
d.aufgaben.map(a=>'<div class="step"><div class="si '+(a.prioritaet==='hoch'?'s-go':'s-no')+'"><i class="ti ti-clock"></i></div>'+
'<div class="sb2"><div class="t">'+a.titel+'</div><div class="d">'+(a.patient_name||'')+' · '+fdate(a.faellig_am)+'</div></div></div>').join(''))+'</div></div>'+
'<div class="card bento-quick"><div class="ch"><span class="ct">Schnellzugriff</span></div>'+
'<div class="fl g8" style="flex-direction:column;align-items:stretch">'+
'<button class="btn" style="justify-content:flex-start" onclick="go(\'katalog\')"><i class="ti ti-list-details"></i>Leistungskatalog (82)</button>'+
'<button class="btn" style="justify-content:flex-start" onclick="go(\'widerspruch\')"><i class="ti ti-gavel"></i>Widerspruch erstellen</button>'+
'<button class="btn" style="justify-content:flex-start" onclick="go(\'antrag\')"><i class="ti ti-file-plus"></i>Neuer Antrag</button>'+
'<button class="btn" style="justify-content:flex-start" onclick="go(\'rechner\')"><i class="ti ti-calculator"></i>Leistungsrechner</button>'+
'<button class="btn" style="justify-content:flex-start" onclick="go(\'musterbrief\')"><i class="ti ti-mail"></i>Musterbrief</button>'+
'<div class="card bento-quick"><div class="ch bq-hd"><span class="ct">Schnellzugriff</span></div>'+
'<div class="fl g8 bq-list" style="flex-direction:column;align-items:stretch">'+
'<button class="btn" style="justify-content:flex-start" onclick="go(\'katalog\')"><i class="ti ti-list-details"></i><span>Leistungskatalog (82)</span></button>'+
'<button class="btn" style="justify-content:flex-start" onclick="go(\'widerspruch\')"><i class="ti ti-gavel"></i><span>Widerspruch erstellen</span></button>'+
'<button class="btn" style="justify-content:flex-start" onclick="go(\'antrag\')"><i class="ti ti-file-plus"></i><span>Neuer Antrag</span></button>'+
'<button class="btn" style="justify-content:flex-start" onclick="go(\'rechner\')"><i class="ti ti-calculator"></i><span>Leistungsrechner</span></button>'+
'<button class="btn" style="justify-content:flex-start" onclick="go(\'musterbrief\')"><i class="ti ti-mail"></i><span>Musterbrief</span></button>'+
'</div></div>'+
'</div>',
'Dashboard',
@@ -1703,7 +1818,10 @@ function neuRender(){
<div class="fg c3 mb4">
<div class="fgrp"><label>Vorname *</label><input id="fvn" value="${d.vorname||''}" placeholder="Vorname"></div>
<div class="fgrp"><label>Nachname *</label><input id="fnn" value="${d.nachname||''}" placeholder="Nachname"></div>
<div class="fgrp"><label>Geburtsdatum</label><input id="fgeb" type="date" value="${d.geburtsdatum||''}"></div>
<div class="fgrp"><label>Geburtsdatum</label>
<div class="dw-trigger" id="fgeb_disp" onclick="openGebDatumPicker('fgeb','fgeb_disp')">${d.geburtsdatum?'<i class="ti ti-cake"></i>'+fdate(d.geburtsdatum):'<i class="ti ti-cake"></i><span class="dw-ph">Datum wählen…</span>'}</div>
<input type="hidden" id="fgeb" value="${d.geburtsdatum||''}">
</div>
</div>`;
}else if(step===2){
body=`<div class="wiz-title">Wo wohnt die Person?</div>
@@ -2057,7 +2175,9 @@ async function pgWiderspruch(prefillPid){
'<div class="fgrp"><label>Name</label><input id="wname" placeholder="Vorname Nachname"></div>'+
'</div>'+
'<div class="fg c2">'+
'<div class="fgrp"><label>Geburtsdatum</label><input id="wgeb" type="date"></div>'+
'<div class="fgrp"><label>Geburtsdatum</label>'+
'<div class="dw-trigger" id="wgeb_disp" onclick="openGebDatumPicker(\'wgeb\',\'wgeb_disp\')"><i class="ti ti-cake"></i><span class="dw-ph">Datum wählen…</span></div>'+
'<input type="hidden" id="wgeb"></div>'+
'<div class="fgrp"><label>Versichertennummer</label><input id="wvnr" placeholder="A000000000"></div>'+
'</div>'+
'<div class="fgrp"><label>Krankenkasse (Empfänger)</label><div class="kk-wrap"><input id="wkk_s" placeholder="Krankenkasse suchen…" autocomplete="off"><input type="hidden" id="wkk"></div></div>'+
@@ -2107,7 +2227,7 @@ async function fillWP(){
const pid=document.getElementById('wpid')?.value;if(!pid)return;
const d=await api('/api/patienten/'+pid);const p=d.patient;
const sv=(id,v)=>{const e=document.getElementById(id);if(e&&v)e.value=v;};
sv('wname',p.vorname+' '+p.nachname);sv('wgeb',p.geburtsdatum);sv('wvnr',p.versichertennummer);
sv('wname',p.vorname+' '+p.nachname);sv('wgeb',p.geburtsdatum);dwTriggerLabel('wgeb','wgeb_disp');sv('wvnr',p.versichertennummer);
sv('waddr',(p.strasse?p.strasse+', ':'')+p.plz+' '+p.ort);
if(p.krankenkasse)selKK('wkk_s','wkk',p.krankenkasse);
if(p.pflegegrad)sv('wist',p.pflegegrad);
@@ -2310,7 +2430,9 @@ async function pgMuster(){
'</div>'+
'<div class="slabel mb3">Versicherte Person</div><div class="fg mb4">'+
'<div class="fg c2"><div class="fgrp"><label>Name</label><input id="mpn" oninput="updM()"></div>'+
'<div class="fgrp"><label>Geburtsdatum</label><input id="mpgeb" type="date" oninput="updM()"></div></div>'+
'<div class="fgrp"><label>Geburtsdatum</label>'+
'<div class="dw-trigger" id="mpgeb_disp" onclick="openGebDatumPicker(\'mpgeb\',\'mpgeb_disp\')"><i class="ti ti-cake"></i><span class="dw-ph">Datum wählen…</span></div>'+
'<input type="hidden" id="mpgeb"></div></div>'+
'<div class="fgrp"><label>Versichertennummer</label><input id="mpvnr" oninput="updM()"></div></div>'+
'<div class="slabel mb3">Antragstyp</div>'+
'<div class="fg mb4"><div class="fgrp"><label>Typ</label><select id="mtyp" onchange="updM()">'+
@@ -2338,6 +2460,7 @@ async function fillM(pid){
const sv=(id,v)=>{const e=document.getElementById(id);if(e&&v!==undefined)e.value=v;};
sv('mn',p.vorname+' '+p.nachname);sv('ms',p.strasse||'');sv('mpo',(p.plz||'')+' '+(p.ort||''));
sv('mtel',p.telefon||'');sv('mpn',p.vorname+' '+p.nachname);sv('mpgeb',p.geburtsdatum||'');sv('mpvnr',p.versichertennummer||'');
dwTriggerLabel('mpgeb','mpgeb_disp');
if(p.krankenkasse)selKK('mkk_s','mkk',p.krankenkasse);
updM();
}