Skip to content

Conversation

@mvolkmann
Copy link
Collaborator

No description provided.

CAN_DELETE_REVIEW_PERIOD("Delete review period", "Review Period"),
CAN_ADMINISTER_SETTINGS("Add or edit settings", "Settings"),
CAN_VIEW_SETTINGS("View settings", "Settings"),
CAN_VIEW_ALL_PULSE_RESPONSES("View all pulse responses", "Pulse");
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I moved this permission to the Reporting category since it is a kind of report and we don't have anything else in the Pulse category.

@@ -1,8 +1,7 @@
import { useMediaQuery } from '@mui/material';
import React, { useState } from 'react';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

useState is not used here.

import React from 'react';
import DesktopTable from './DesktopTable';
import MobileTable from './MobileTable';
import { allPermissions, roles } from './sample-data';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

allPermissions and roles are not used here.


// TODO: Uncomment this check after PR #2429 is merged.
//if (selectHasViewPulseReportPermission(state)) {
if (selectHasViewPulseReportPermission(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 is working now.

export const selectReviewPeriods = state => state.reviewPeriods;
export const selectPermissions = state => state.permissions;

const hasPermission = permissionName => 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.

Prettier made lots of formatting changes in this file.


useEffect(() => {
const getRolePermissions = async () => {
let res = await getRolePermissionsList(csrf);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

let -> const


// Mock the date if under test so the snapshot stays consistent
const today = process?.env?.VITEST_WORKER_ID ? new Date(2024, 5, 4) : new Date();
const today = import.meta.env.VITEST_WORKER_ID
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 good change that Josh made in a separate PR.

@mvolkmann mvolkmann merged commit 110cde6 into develop Jun 5, 2024
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