Save button now closes dialog and update label to "Save and Close"

The previous Save button only persisted data without dismissing the
dialog, requiring a second click. Now it flushes the note and all dirty
rows, then closes the dialog in the same interaction. The label change
makes the combined action explicit to the user.
This commit is contained in:
Brian Fertig 2026-09-29 07:48:58 -06:00
parent f204f41b68
commit 05a633458d
1 changed files with 7 additions and 2 deletions

View File

@ -364,7 +364,12 @@ export function GroupSessionDialog({
</Button>
</div>
<Button
onClick={handleSaveAll}
onClick={() => {
// Save first (flushing the note + every dirty row), then
// close -- handleOpenChange's own background flush is a
// no-op at that point.
void handleSaveAll().then(() => handleOpenChange(false));
}}
disabled={savingAll}
className="hover:brightness-110"
style={{
@ -376,7 +381,7 @@ export function GroupSessionDialog({
color: isDark ? "#18181b" : "#ffffff",
}}
>
{savingAll ? "Saving…" : "Save"}
{savingAll ? "Saving…" : "Save and Close"}
</Button>
</div>
</DialogContent>