fix: drawer open/close updates UI immediately without refresh

- Return null instead of throwing on 404 for drawer current query
- Sync drawer session ID to null when drawer closes
- Await query invalidation before closing dialog
- Fix unused approvedBy lint error

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
ryan
2026-04-04 20:44:27 +00:00
parent 12a3e170de
commit 6505b2dcb9
4 changed files with 14 additions and 6 deletions

View File

@@ -44,6 +44,8 @@ export function POSRegister() {
useEffect(() => {
if (drawer?.id && drawer.status === 'open') {
setDrawerSession(drawer.id)
} else {
setDrawerSession(null)
}
}, [drawer, setDrawerSession])