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

Addition of Kudos #2504

Merged
merged 117 commits into from
Jul 23, 2024
Merged

Addition of Kudos #2504

merged 117 commits into from
Jul 23, 2024

Conversation

mkimberlin
Copy link
Member

No description provided.

pieperm and others added 30 commits January 10, 2023 12:16
…alter design of kudos cards, organize pending/approved kudos on Manage Kudos page
Co-authored-by: Jesse Hanner <jahanner7@gmail.com>
Copy link
Collaborator

@timyates timyates left a comment

Choose a reason for hiding this comment

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

I'm not 100% sure the front end is right, but I've been through the back end

Comment on lines +148 to +166
@Override
public List<KudosResponseDTO> findByValues(@Nullable UUID recipientId, @Nullable UUID senderId, @Nullable Boolean isPending) {
if (isPending != null) {
return findByPending(Boolean.TRUE.equals(isPending));
} else if (recipientId != null) {
return findAllToMember(recipientId);
} else if (senderId != null) {
return findAllFromMember(senderId);
} else {
if (!currentUserServices.isAdmin()) {
throw new PermissionException(NOT_AUTHORIZED_MSG);
}

return kudosRepository.findAll()
.stream()
.map(this::constructKudosResponseDTO)
.toList();
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not 100% sure does what is expected...

So if isPending is set to true or false, then findByPending is called, and recipientId and senderId are effectively ignored...

I'm not sure if there's a requirement for different behavior, but I just wanted to mention the point

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah this is non-ideal. Not broken from a frontend perspective, but not ideal. I'll likely open an issue for this.


const loadKudos = useCallback(async () => {
setKudosLoading(true);
const res = await getAllKudos(csrf, true);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this right? We want to be showing isPending=true kudos on the home screen?

}

@Put
@Secured(RoleType.Constants.ADMIN_ROLE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this warrant a new permission, or is ADMIN_ROLE sufficient? I can see why having non-admins who can approve Kudos may be useful

Copy link
Member Author

Choose a reason for hiding this comment

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

This warrants an issue as well. Pulling into develop as is for now.

@mkimberlin mkimberlin merged commit e68e4a6 into develop Jul 23, 2024
1 check failed
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.

None yet

5 participants