Skip to content

Conversation

@mvolkmann
Copy link
Collaborator

No description provided.

@@ -1,17 +1,20 @@
import fileDownload from 'js-file-download';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Much of the new code in this file was moved here from Menu.jsx.

<Button startIcon={<PersonIcon />} onClick={handleOpen}>
Add Member
</Button>
{selectHasProfileReportPermission(state) && (
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This part adds the new button if the user has the required permission.

import React, { useContext, useEffect, useRef, useState } from 'react';

import { postEmployeeHours } from '../../api/hours';
import { reportAllMembersCsv } from '../../api/member';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

All the deleted lines moved to Users.jsx above.

)
);

export const selectHasProfileReportPermission = createSelector(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a new permission check that is used in Users.jsx.

Copy link
Contributor

@S78901 S78901 left a comment

Choose a reason for hiding this comment

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

Looking good!

@mkimberlin mkimberlin merged commit db8d07f into develop Apr 25, 2024
@mkimberlin mkimberlin deleted the feature-2242-download-members branch April 25, 2024 18:45
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.

4 participants