Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Fixes in /admin/groups route and admin/user route fixes( user role update ) #5007

Merged
merged 13 commits into from
Feb 4, 2022

Conversation

kimenyikevin
Copy link

@kimenyikevin kimenyikevin commented Feb 1, 2022

Summary

A summary of changes being made in this PR

Checklist

  • Pre-push checks pass npm run check
    • Linter passing via npm run lint
    • Unit & Integration tests passing via npm run test:packages
    • Docker build process passing via npm run build-client
  • If this PR is still a WIP, convert to a draft
  • When this PR is ready, mark it as "Ready for review"
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewers

References

References to pertaining issue(s)

QA Steps

  1. git checkout pr_branch_name
  2. npm install
  3. npm run dev-reinit
  4. npm run dev

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

Reviewers

Reviewers for this PR

Task to be complete

  • Fix update user role manually refresh
  • Fix update user role for your own account
  • Refactor group /route
  • Fix grate user access from group /route
  • Fix search group functionality

This was linked to issues Feb 2, 2022
@kimenyikevin kimenyikevin marked this pull request as ready for review February 2, 2022 22:05
@zulqarnainhanif
Copy link
Contributor

@kimenyikevin admin user is unable to update role of other users as well now, need to fix that.

@zulqarnainhanif
Copy link
Contributor

@kimenyikevin pagination count of groups table is wrong

Screenshot 2022-02-03 at 12 01 56 PM

@zulqarnainhanif
Copy link
Contributor

@kimenyikevin layout font sizes and spacing needs to be adjusted for View group

Screenshot 2022-02-03 at 12 01 06 PM

@zulqarnainhanif
Copy link
Contributor

@HexaField how do we add more users in a group?

}

const scopeData: ScopeData[] = []
adminScopeTypeState.scopeTypes.value.forEach((el) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

you can use map here to declare and initialise the scopeData at the same time.

avoid usage of forEach as much as possible it use callback returns in the backend and doesn't stop execution.

}

const scopeData: ScopeData[] = []
adminScopeTypeState.scopeTypes.value.forEach((el) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above

@@ -184,81 +154,49 @@ const CreateUser = (props: Props) => {
})
})

const staticResourceMenu: InputSelectProps[] = []
staticResourceData.value.forEach((el) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above

})

const userRoleData: InputSelectProps[] = []
userRole.userRole.value.forEach((el) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above

@@ -174,6 +185,14 @@ const ViewUser = (props: Props) => {
})
})

const userRoleData: InputSelectProps[] = []
userRole.userRole.value.forEach((el) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above

@zulqarnainhanif
Copy link
Contributor

@kimenyikevin we are able to add same scope multiple times in the AutoComplete Component, fix that where ever AutoComplete Component is used. (Either disable selected one in the list or unselect them if already selected)

Screenshot 2022-02-03 at 9 37 17 PM

Screenshot 2022-02-03 at 9 36 49 PM

@HexaField
Copy link
Member

@HexaField how do we add more users in a group?

they need to be invited

@zulqarnainhanif
Copy link
Contributor

@kimenyikevin 1 small use-case

Click view user
Click edit button
Edit some scopes from autocomplete
Press Cancel
Press Edit again

Problem: The values are no reset in this case as the cancel should reset fields. This is working fine with groups.

@zulqarnainhanif zulqarnainhanif merged commit 1779c8c into dev Feb 4, 2022
@zulqarnainhanif zulqarnainhanif deleted the admin-group-fix branch February 4, 2022 20:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

admin/user route fixes Fixes in /admin/groups route
3 participants