Skip to content

feat(ui): autosuggest Scope on CompanyEditView#21

Merged
fdaugan merged 1 commit into
feature/vuejsfrom
norman/auto-suggest-company-scope
May 18, 2026
Merged

feat(ui): autosuggest Scope on CompanyEditView#21
fdaugan merged 1 commit into
feature/vuejsfrom
norman/auto-suggest-company-scope

Conversation

@Terracosmos
Copy link
Copy Markdown
Collaborator

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

  • Preload at mount via rest/service/id/container-scope/COMPANY (small
    dataset, ~3-5 entries)
  • Local filtering on keystroke (still 300ms debounced for consistency
    with the User Company/Group autosuggest)
  • item-title="name" + item-value="name" → v-model stays a string,
    save() payload contract unchanged
  • Vuetify v4 compatible (item?.name, no item.raw.*)
  • Cleanup of debounce timer on onBeforeUnmount

Demo fallback gated dès l'écriture initiale
Per the review pattern on PR #20: import.meta.env.DEV && … ensures
demo 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):

  • Edit department1 → Portée prefilled with Internal, dropdown
    opens with 3 valid scopes from ContainerScope endpoint
  • New company → Portée starts empty, dropdown still functional

Theme workaround included
Same .v-autocomplete__content !important color override as in PR #20
to keep dropdown items readable on the ligojLight theme. To be folded
into a proper global theme fix later (separate PR).

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).
@Terracosmos Terracosmos requested a review from fdaugan May 18, 2026 11:25
@sonarqubecloud
Copy link
Copy Markdown

@sonarqubecloud
Copy link
Copy Markdown

@fdaugan fdaugan merged commit 93c0bd1 into feature/vuejs May 18, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants