feat: add per-user behavior override UI and endpoint (#452)#7
Merged
Conversation
628c0e1 to
abbbc00
Compare
- New UpdateUsuarioBehaviorDto for PUT /usuario/{id}/behavior
- DefaultController: inject settings service and usuario metadata
repository; expose behavior overrides per user in index(); add
updateUsuarioBehavior() endpoint
- Template: behavior card with dropdowns for callTicketByService and
callTicketOutOfOrder (null = inherit global)
- JS: updateUsuarioBehavior() method calling the new PUT endpoint
- Translations: add label.yes, label.no, settings.user.behavior,
settings.user.call_ticket_by_service,
settings.user.call_ticket_out_of_order, settings.user.use_global
for en, en_US, es, es_AR, pt_BR, pt_PT
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
abbbc00 to
fe995b4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: novosga/novosga#452
Summary
UpdateUsuarioBehaviorDtowith?bool $callTicketByServiceand?bool $callTicketOutOfOrderDefaultController::index(): injectsApplicationSettingsServiceInterfaceandUsuarioMetadataRepositoryInterface; appendsbehaviorkey (with nullable overrides) to each user's data array; passesglobalBehaviorto the templatePUT /usuario/{id}/behavior: validates payload viaMapRequestPayload, callssaveUserBehaviorSettings()callTicketByServiceandcallTicketOutOfOrder; thenulloption label shows the effective global valueupdateUsuarioBehavior(usuario)methodlabel.yes,label.no,settings.user.behavior,settings.user.call_ticket_by_service,settings.user.call_ticket_out_of_order,settings.user.use_globaladded foren,en_US,es,es_AR,pt_BR,pt_PTPart of #452 — see also PRs in
core,novosga, andattendance-bundle.Test plan
/admin→ tab Atendimento → select a userPUT /usuario/{id}/behaviorfires and returns 200null→ reverts to global behavior🤖 Generated with Claude Code