Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add reset user password action#1320

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
BrunoQuaresma merged 18 commits intomainfrombq/fe/update-user-password
May 6, 2022
Merged

Conversation

BrunoQuaresma
Copy link
Collaborator

Closes#733

BrunoQuaresmaand others added18 commitsMay 4, 2022 19:47
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
@BrunoQuaresmaBrunoQuaresma self-assigned thisMay 6, 2022
@BrunoQuaresmaBrunoQuaresma requested review frompresleyp anda team ascode ownersMay 6, 2022 15:07
@codecov
Copy link

codecovbot commentedMay 6, 2022
edited
Loading

Codecov Report

Merging#1320 (e388f8a) intomain (57bb108) willincrease coverage by8.39%.
The diff coverage is85.71%.

@@            Coverage Diff             @@##             main    #1320      +/-   ##==========================================+ Coverage   58.09%   66.48%   +8.39%==========================================  Files         282      284       +2       Lines       18521    18569      +48       Branches      231      235       +4     ==========================================+ Hits        10759    12345    +1586+ Misses       6601     4959    -1642- Partials     1161     1265     +104
FlagCoverage Δ
unittest-go-macos-latest53.64% <100.00%> (-0.04%)⬇️
unittest-go-postgres-65.07% <100.00%> (?)
unittest-go-ubuntu-latest56.07% <100.00%> (+0.01%)⬆️
unittest-go-windows-202252.05% <100.00%> (+0.03%)⬆️
unittest-js73.67% <84.61%> (+0.52%)⬆️
Impacted FilesCoverage Δ
site/src/api/index.ts71.23% <50.00%> (-0.60%)⬇️
site/src/pages/UsersPage/UsersPageView.tsx93.33% <50.00%> (+0.47%)⬆️
site/src/pages/UsersPage/UsersPage.tsx75.86% <66.66%> (-3.31%)⬇️
site/src/xServices/users/usersXService.ts75.00% <66.66%> (-4.17%)⬇️
coderd/users.go61.36% <100.00%> (ø)
site/src/components/CodeBlock/CodeBlock.tsx100.00% <100.00%> (ø)
...onents/ResetPasswordDialog/ResetPasswordDialog.tsx100.00% <100.00%> (ø)
site/src/components/UsersTable/UsersTable.tsx100.00% <100.00%> (ø)
site/src/util/random.ts100.00% <100.00%> (ø)
codersdk/provisionerdaemons.go61.97% <0.00%> (-5.64%)⬇️
... and16 more

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update57bb108...e388f8a. Read thecomment docs.


export const Language = {
createUserSuccess: "Successfully created user.",
suspendUserSuccess: "Successfully suspended the user.",
suspendUserError: "Error on suspend the user",
suspendUserError: "Error on suspend the user.",
Copy link
Contributor

Choose a reason for hiding this comment

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

nice catch

BrunoQuaresma reacted with heart emoji
| { type: "SUSPEND_USER"; userId: TypesGen.User["id"] }
| { type: "CONFIRM_USER_SUSPENSION" }
| { type: "CANCEL_USER_SUSPENSION" }
// Reset password events
| { type: "RESET_USER_PASSWORD"; userId: TypesGen.User["id"] }
Copy link
Contributor

Choose a reason for hiding this comment

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

I like how you useTypesGen.User["id"], we should do that more

BrunoQuaresma reacted with heart emoji
const navigate = useNavigate()
const userToBeSuspended = users?.find((u) => u.id === userIdToSuspend)
const userToResetPassword = users?.find((u) => u.id === userIdToResetPassword)
Copy link
Contributor

Choose a reason for hiding this comment

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

In the future we may want to find a way to make the XService give the component the user instead of the user id, but this is fine for now.

BrunoQuaresma reacted with thumbs up emoji
Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

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

Yes, I've been wondering about that, instead of passing a userId, we could just send the full user object to make things easier but it makes it hard to sync, if we need it, in case the same user is updated by any other action. Using the ID we keep the reference to the user in the list which is always updated since it is the source of the truth. Makes sense?

presleyp reacted with thumbs up emoji
Copy link
Contributor

@presleyppresleyp left a comment

Choose a reason for hiding this comment

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

Looks great!

@missknissmisskniss added this to theV2 Beta milestoneMay 15, 2022
kylecarbs pushed a commit that referenced this pull requestJun 10, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@presleyppresleyppresleyp approved these changes

Assignees

@BrunoQuaresmaBrunoQuaresma

Labels
None yet
Projects
None yet
Milestone
V2 Beta
Development

Successfully merging this pull request may close these issues.

Frontend User Update - Reset Password
3 participants
@BrunoQuaresma@presleyp@misskniss

[8]ページ先頭

©2009-2025 Movatter.jp