Skip to content

feat(delegate): popup dialog + list polish (D3+D5+D6+D7+D8)#35

Merged
fdaugan merged 1 commit into
feature/vuejsfrom
norman/feat-delegate-v2
May 26, 2026
Merged

feat(delegate): popup dialog + list polish (D3+D5+D6+D7+D8)#35
fdaugan merged 1 commit into
feature/vuejsfrom
norman/feat-delegate-v2

Conversation

@Terracosmos
Copy link
Copy Markdown
Collaborator

Contexte

Refonte de l'écran Délégué :

  • D3 — convertir DelegateEditView (page routée) en popup
  • D5 — icônes type sur les colonnes Receiver et Resource
  • D6 — réordonner les colonnes
  • D7 — tooltips Admin/Écriture avec textes longs explicatifs
  • D8 — fusionner Type et Ressource (le type devient l'icône de ligne)

Détail des changements

Composable partagé (prérequis D5)

  • ui/src/composables/delegateTypes.jsTYPE_ICONS, RECEIVER_TYPES, RESOURCE_TYPES, helper useTypeIcon. Source unique de vérité partagée entre la dialog et la liste.

Dialog (D3 + D7)

  • Renommé DelegateEditView.vueDelegateEditDialog.vue
  • Wrappe le formulaire existant dans <v-dialog> + <v-card>, reprend le pattern de UserEditDialog :
    • defineProps({ modelValue: Boolean, delegateId: [Number, String] })
    • defineEmits(['update:modelValue', 'saved'])
    • useRoute()/useRouter() remplacés par props.delegateId + emits
    • onMounted remplacé par watch(props.modelValue)loadOnOpen()
    • Veto useFormGuard sur close (requestClose / onDialogModel / pendingClose)
    • appStore.setBreadcrumbs supprimés
  • Logique métier intacte : autocomplete debounce 250 ms, TREE handling, watchers, normalizeEntity, nextTick au load.
  • Tooltips D7 : v-tooltip dans le #label slot des v-checkbox.

Liste (D3 wiring + D5 + D6 + D8)

  • Branchement de la dialog (state editDialog / editDelegateId + openDialog())
  • Headers révisés : Receiver, Resource (fusion type+name), Admin, Write, actions
  • Slots #item.receiver et #item.name rendent l'icône type + libellé
  • Slot #item.type + helper typeColor supprimés
  • Normalisation ?.toUpperCase() sur le lookup TYPE_ICONS (le backend renvoie certaines valeurs en minuscules)
  • Largeur colonne actions alignée sur les autres vues (120 px, center)

Routes

  • /id/delegate/new et /id/delegate/:id supprimées (remplacées par la dialog), /id/delegate conservée
  • Test des routes mis à jour (12 → 10)

i18n

  • Ajout de delegate.admin, delegate.write, delegate.adminHelp, delegate.writeHelp (FR + EN) — textes longs récupérés du plugin-id legacy

Test plan

  • npm run build → 28 modules, 117 kB JS
  • vitest run → 14/14
  • mvn install -DskipTests → BUILD SUCCESS
  • Smoke test UI : D3 (popup + veto unsaved), D5 (icônes par type), D6 (ordre), D7 (tooltips FR), D8 (fusion)
  • Création / édition / suppression / cas TREE (DN libre) / changement de receiverType (reset OK)
  • Alignement vertical pencil/trash dans la colonne actions

- D3: convert DelegateEditView to dialog (pattern I.2 user edit)
- D5: add type icons to Receiver and Resource columns on the list
  (lookup normalizes lowercase enum values from the backend)
- D6+D8: fuse Type and Resource columns into one — the type becomes
  the row's leading icon
- D7: add Admin/Write checkbox tooltips with i18n texts recovered
  from the legacy plugin-id

Also: rename DelegateEditView → DelegateEditDialog, drop the now-unused
/id/delegate/new and /id/delegate/:id routes, align the actions column
width on the existing Groups/Users/Companies views (120 px, center).
@sonarqubecloud
Copy link
Copy Markdown

@sonarqubecloud
Copy link
Copy Markdown

@Terracosmos Terracosmos requested a review from fdaugan May 26, 2026 14:34
@fdaugan fdaugan merged commit 16e3b32 into feature/vuejs May 26, 2026
4 of 5 checks passed
Terracosmos added a commit that referenced this pull request May 27, 2026
- D1: align action gears (UserListView column actions -> align: end,
  row gear sized x-small to match the table tools gear in the header).
  Status column header centered above the lock icons.
- D2: bold+red name in all sensitive confirmations
  (lock/unlock/isolate/restore/resetPassword + delete) across
  UserListView, UserEditDialog (in-popup action menu) and
  GroupMembersView, using the LigojConfirmDialog default slot.
  Bulk-delete count also rendered bold+red via two plugin-local
  fragments. CompanyEditView and GroupEditView already follow the
  pattern, no-op there.
- D4: emails as a list (v-chip in UserListView + v-combobox multiple
  in UserEditDialog). Fixes a latent bug where editing a user with
  multiple emails would drop all but the first at save time.

Note: the equivalent upgrade on DelegateEditDialog (introduced by
PR #35) is intentionally deferred to a follow-up mini-commit once
#35 has merged, to keep the two PRs independent.
Terracosmos added a commit that referenced this pull request May 27, 2026
Both delete dialogs of the Delegate screen now render the receiver
name in <strong class="text-error"> via the LigojConfirmDialog
default slot, matching the pattern of PR #39 for User / Company /
Group / GroupMembers:

- DelegateListView: the trash-icon dialog from each row (inline
  <v-dialog> converted to LigojConfirmDialog + slot)
- DelegateEditDialog: the "Delete" button inside the edit popup
  (existing LigojConfirmDialog with :message= switched to the slot)

The host's monolithic delegate.deleteConfirm key stays intact; two
plugin-local fragments (delegate.deleteConfirmBefore/After) are
added in FR + EN to wrap the name.

Mini-commit deliberately split from PR #39 because the Delegate
dialog files did not exist on feature/vuejs until PR #35 was merged.

Closes #37
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