feat(ui): autosuggest Scope on CompanyEditView#21
Merged
Conversation
Replace the free-text v-text-field for the company Scope with a server-backed v-autocomplete that preloads all valid scopes for companies from rest/service/id/container-scope/COMPANY at mount, then filters locally on each keystroke (300ms debounce for consistency with the User Company/Group autosuggest pattern). The v-model stays a string (item-value="name") so the existing save payload contract is unchanged. Demo fallback gated behind import.meta.env.DEV (per Fabrice's review pattern on PR #20) so demo data NEVER reaches production bundles. Includes the same ligojLight theme workaround for v-autocomplete dropdown visibility (to be folded into a global theme fix later).
|
|
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.



Replace the free-text Scope (Portée) field on CompanyEditView with a
server-backed v-autocomplete. Mirrors the autosuggest pattern from PR #20
(UserEditView Company + Group) with one local optimization since the
scope dataset is small.
Implementation
rest/service/id/container-scope/COMPANY(smalldataset, ~3-5 entries)
with the User Company/Group autosuggest)
item-title="name"+item-value="name"→ v-model stays a string,save() payload contract unchanged
item?.name, noitem.raw.*)onBeforeUnmountDemo fallback gated dès l'écriture initiale
Per the review pattern on PR #20:
import.meta.env.DEV && …ensuresdemo data NEVER leaks to production bundles. In dev (no LDAP node),
a small list (Functional / Project / Enterprise) is surfaced for
visual validation.
Tested
With the real LDAP node configured locally (plugin-iam-node +
plugin-id-ldap + 1000 bench users):
department1→ Portée prefilled withInternal, dropdownopens with 3 valid scopes from ContainerScope endpoint
Theme workaround included
Same
.v-autocomplete__content !importantcolor override as in PR #20to keep dropdown items readable on the ligojLight theme. To be folded
into a proper global theme fix later (separate PR).