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:
@@ -104,7 +104,7 @@ export const DrawerService = {
|
||||
return session ?? null
|
||||
},
|
||||
|
||||
async addAdjustment(db: PostgresJsDatabase<any>, sessionId: string, input: DrawerAdjustmentInput, createdBy: string, approvedBy?: string) {
|
||||
async addAdjustment(db: PostgresJsDatabase<any>, sessionId: string, input: DrawerAdjustmentInput, createdBy: string, _approvedBy?: string) {
|
||||
const session = await this.getById(db, sessionId)
|
||||
if (!session) throw new NotFoundError('Drawer session')
|
||||
if (session.status === 'closed') throw new ConflictError('Cannot adjust a closed drawer')
|
||||
|
||||
Reference in New Issue
Block a user