Debug: KI-Bericht save_count + save_error im Response, Toast-Feedback (SW by-v808)
This commit is contained in:
parent
891e11df65
commit
3acb7aa874
6 changed files with 21 additions and 12 deletions
|
|
@ -2793,7 +2793,10 @@ window.Page_health = (() => {
|
|||
UI.setLoading(btn, true);
|
||||
|
||||
try {
|
||||
const { zusammenfassung } = await API.health.kiZusammenfassung(_appState.activeDog.id);
|
||||
const res = await API.health.kiZusammenfassung(_appState.activeDog.id);
|
||||
const zusammenfassung = res.zusammenfassung ?? res;
|
||||
if (res.save_error) UI.toast.warning(`Speichern fehlgeschlagen: ${res.save_error}`);
|
||||
else if (res.saved_count !== undefined) UI.toast.info(`${res.saved_count} Bericht(e) gespeichert`);
|
||||
UI.modal.open({
|
||||
title: `${UI.icon('star')} KI-Gesundheitsbericht`,
|
||||
body: `<div style="white-space:pre-wrap;line-height:1.7;font-size:var(--text-sm)">${_esc(zusammenfassung)}</div>`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue