Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CM-138: User Groups Management implementation #1

Merged
merged 18 commits into from
Jun 27, 2023
Merged

Conversation

olewandowski1
Copy link
Collaborator

@olewandowski1 olewandowski1 commented Jun 23, 2023

CM-138

REQUIRED ADMIN PR

REQUIRED BE PR

Changes:

  • Added the 'Task Executioner Groups' route to the Administration.
  • Created a Task Group overview page.
  • Created a logic to create, edit and delete Task Groups.
  • Possibility to select users that will form a new group and to filter them.

NOTE: Some of implemented logic relates to the CM-139.

usergroups

@olewandowski1 olewandowski1 marked this pull request as ready for review June 27, 2023 08:17
Copy link
Contributor

@dborowiecki dborowiecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments. We need to move BenefitPlan logic to the proper module.

src/actions.js Show resolved Hide resolved
src/actions.js Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be added as a contribution from the benefit plan js to the TaskManagement view ContributionPoint. Same goes for BenefitPlanTaskSearcher.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving all benefit plan logic to the other modules will be handled in scope of the CM-139.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Task Table, Preview Cells and Panels are quite tricky components as content as well as format will depend on the specific task type (or task group). In our case this view will be predetermined by the fact that we're working on tasks that are BenefitPlanTasks.
Let me know if we could refactor it and use ContributionPoint that would be extended by the BenefitPlanTask preview cell with conditional rendering (it would be renedered only when incoming task has benefit plan as a source, or meets other conditions that we can manage from the benefit plan module.

src/constants.js Outdated Show resolved Hide resolved
src/pages/TaskTriageDetailsPage.js Outdated Show resolved Hide resolved
src/pages/TasksManagementPage.js Show resolved Hide resolved
src/pickers/TaskExecutorsPicker.js Outdated Show resolved Hide resolved
src/pickers/TaskExecutorsPicker.js Outdated Show resolved Hide resolved
Comment on lines +39 to +48
const filterOptions = (users, { inputValue }) => {
const filteredUsers = users?.filter((user) => {
const username = user.username.toLowerCase();
const lastName = user.lastName.toLowerCase();
const input = inputValue.toLowerCase();

return username.includes(input) || lastName.includes(input);
});
return filteredUsers.filter((user, i, arr) => arr.findIndex((u) => u.id === user.id) === i);
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this should be resolved on the graphql level. If logic is not compliant with the users query then we can create custom search query for task triage candidate purposes

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned before, I didn't want to solve this via graphql filters. Let me know if this approach is acceptable for you.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as we pull all entries in one query it's fine but I don't think that solution is sustainable in the long term. Please create ticket in the OP board to address dropdowns that pull everything.

@olewandowski1
Copy link
Collaborator Author

@dborowiecki I've addressed your comments.

@dborowiecki dborowiecki merged commit 71d904b into develop Jun 27, 2023
3 checks passed
@dborowiecki dborowiecki deleted the feature/CM-138 branch June 27, 2023 14:33
delcroip added a commit that referenced this pull request Dec 16, 2023
* CM-147: use fe-template

* CM-147: workflows added, minor changes

* CM-147: workflows update

* CM-138: User Groups Management implementation (#1)

* CM-139: base project configuration, eslint, main route

* CM-139: basic structure of tasks view

* CM-139: basic view of task traiage

* CM-139: basic view of task triage

* CM-139: task preview improvements

* CM-139: import fix

* CM-138: user groups management page and basic searcher

* CM-138: reducer, actions, fetchTaskGroups, searcher

* CM-138: taskExecutorsPicker, taskGroupPage, taskGroupHeadPanel

* CM-138: fetch task group, clear on unmount

* OTC-138: remove package-lock json

* CM-138: implementation of create/update mutation, executors picker fix

* CM-138: removal of console log

* CM-138: filtering, sorting, searching improvements, executorsPicker fixes

* CM-138: create PERFORM_MUTATION and adjust existing logic, constants fix

* CM-138: name of function changed

* CM-138: TaskExecutorsPicker fixes

* CM-138: component name changed - TaskDetailsPage

* CM-139: add core tasks fe (#2)

* CM-139: add core tasks fe

* CM-143: fix eslint

* CM-139: add styles

* CM-139: address PR comments

* CM-139: remove intl

* CM-144: add my tasks fe (#3)

* CM-144: add my tasks fe

* CM-144: remove unused variables

* CM-139: fix issues from QA (#4)

* CM-139: fix comparing edited and fetch object

* CM-139: fix formatting of taskGroup

* CM-231: Added Admin main menu contribution

* CM-145: make initial policy empty (#7)

* CM-145: make initial policy empty

* CM-145: fix eslint

* CM-138: fix mutation label and action type (#6)

* add-server-deploy-workflow: add file (#9)

* CM-139: change perms on frontend (#8)

* CM-139: fix comparing edited and fetch object

* CM-139: fix formatting of taskGroup

* CM-139: change perms to search tasks

* CM-232: use IDs in mutation label (#11)

* CM-144: fix tasks (#10)

* CM-144: add my tasks fe

* CM-144: remove unused variables

* CM-144: fix tasks

* CM-144: fix eslint

* Update README.md

* CM-230: tasks refactor (#12)

* CM-230: fix modularity of the module

* CM-230: refactor code

* CM-230: refactor code

* CM-230: fix headers

* CM-230: add beneficiary crud tasks

* CM-230: eslint

* CM-230: address pr review

* CM-230: address pr review

* CM-230: fix eslint

* CM-299: show business status on searcher (#13)

* CM-332: fetch tasks only for particular searcher (#14)

* CM-332: fetch tasks only for particular searcher

* CM-332: fix eslint

---------

Co-authored-by: Jan <j.dolkowski@soldevelo.com>

* CM-327: change the way how task updates are fetched (#15)

Co-authored-by: Jan <j.dolkowski@soldevelo.com>

* hotfix: fix parsing schema in task (#16)

Co-authored-by: Jan <j.dolkowski@soldevelo.com>

* CM-327: fetch task only after it is updated (#18)

* CM-327: change the way how task updates are fetched

* CM-327: make sure task is fetched after it is uploaded

---------

Co-authored-by: Jan <j.dolkowski@soldevelo.com>

* hotfix: fix displaying deleted groups (#17)

Co-authored-by: Jan <j.dolkowski@soldevelo.com>

* add-sonar-ci: add sonar files (#20)

Co-authored-by: Jan <j.dolkowski@soldevelo.com>

* MERGING RELEASE branches (#19)

* CM-332: fetch tasks only for particular searcher (#14)

* CM-332: fetch tasks only for particular searcher

* CM-332: fix eslint

---------

Co-authored-by: Jan <j.dolkowski@soldevelo.com>

* CM-327: change the way how task updates are fetched (#15)

Co-authored-by: Jan <j.dolkowski@soldevelo.com>

* hotfix: fix parsing schema in task (#16)

Co-authored-by: Jan <j.dolkowski@soldevelo.com>

* CM-327: fetch task only after it is updated (#18)

* CM-327: change the way how task updates are fetched

* CM-327: make sure task is fetched after it is uploaded

---------

Co-authored-by: Jan <j.dolkowski@soldevelo.com>

* hotfix: fix displaying deleted groups (#17)

Co-authored-by: Jan <j.dolkowski@soldevelo.com>

* add-sonar-ci: add sonar files (#20)

Co-authored-by: Jan <j.dolkowski@soldevelo.com>

---------

Co-authored-by: Jan <jdolkowski@soldevelo.com>
Co-authored-by: Jan <j.dolkowski@soldevelo.com>

---------

Co-authored-by: olewandowski <olewandowski@soldevelo.com>
Co-authored-by: olewandowski1 <109145288+olewandowski1@users.noreply.github.com>
Co-authored-by: Jan <jdolkowski@soldevelo.com>
Co-authored-by: Damian Borowiecki <dborowiecki@soldevelo.com>
Co-authored-by: sniedzielski <52816247+sniedzielski@users.noreply.github.com>
Co-authored-by: Jan <j.dolkowski@soldevelo.com>
Co-authored-by: Dragos DOBRE <dragos.dobre@swisstph.ch>
Co-authored-by: Hiren Soni <65155846+hirensoni913@users.noreply.github.com>
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