Allow user-member association in edit/create views closes #168 #207
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
question
S
UX research
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: local-it/mitgliederverwaltung#207
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/user-linking"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description of the implemented changes
The changes were:
#168
Definition of Done
Code Quality
Accessibility
Testing
ad51a226f7to1819a1e2d11819a1e2d1to62d472cee662d472cee6to90ad6a1a0290ad6a1a02toadc6608e54WIP: Allow user-member association in edit/create views closes #168to Allow user-member association in edit/create views closes #168Nice work 👍
I just have the two aspects I mentioned, but they can be also handled in other issues:
And you would also add that to member form right?
@ -363,2 +436,3 @@# Fuzzy Search function that can be called by live view and calls search action@doc """Performs fuzzy search on members using PostgreSQL trigram similarity.In the future we could maybe move fuzzy search to an helper function if we use it in multiple places?
I tried it, but unfortunately the
apply_linking_filtersfunction and the:searchaction contain slightly different Ash Queries and I couldn't figure out how to build an Ash Query by checking different conditions.Should we figure that out in a different issue?
@ -123,0 +125,4 @@<div class="mt-6"><h2 class="text-base font-semibold mb-3">{gettext("Linked Member")}</h2><%= if @user && @user.member && !@unlink_member do %>Nice that you considered user information :)
@ -123,0 +173,4 @@aria-label={gettext("Search for member to link")}aria-describedby={if @selected_member_name, do: "member-selected", else: nil}aria-autocomplete="list"aria-controls="member-dropdown"if we also use it in members, maybe we can use it as dropdown component in core components to reuse it?
If we really want to reuse it, we can extract it as component, but at the moment I wouldn't use it in members.
@ -123,0 +176,4 @@aria-controls="member-dropdown"aria-expanded={to_string(@show_member_dropdown)}autocomplete="off"/>Nice work!
One thing: I cannot select a member via enter...For me it would be also fine to handle the accessibility of the dropdown in a seperate issue. Up to you :)
I am also a bit confused that we need to add JS for a simple dropdown actually....
@ -173,3 +305,3 @@case AshPhoenix.Form.submit(socket.assigns.form, params: user_params) do{:ok, user} ->notify_parent({:saved, user})# Then handle member linking/unlinking as a separate stepWill you also add that to the member form? :)
I think it's an admin function to link a user to a member. And only admins can edit the users. To have a clear separation of the permission model I wouldn't add it to members as well.
e5d4e84bd2to3da0ebcb3f