Add USB policy improvements and emprestimos details modal

- Add cron job to cleanup stale pending USB policies every 30 min
- Add cleanupStalePendingPolicies mutation to usbPolicy.ts
- Add USB policy fields to machines listByTenant query
- Display USB status chip in device details and bulk control modal
- Add details modal for emprestimos with all loan information
- Add observacoesDevolucao field to preserve original observations
- Fix status text size in details modal title

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
rever-tecnologia 2025-12-05 08:24:56 -03:00
parent e493ec9d5d
commit 7469d3b5e6
7 changed files with 346 additions and 66 deletions

View file

@ -25,4 +25,12 @@ if (autoPauseCronEnabled) {
)
}
// Cleanup de policies USB pendentes por mais de 1 hora (sem flag, sempre ativo)
crons.interval(
"cleanup-stale-usb-policies",
{ minutes: 30 },
api.usbPolicy.cleanupStalePendingPolicies,
{}
)
export default crons