44 |
45 |
46 |
47 | {componentRef.name}
48 |
49 |
50 |
51 | {Object.keys(ruleToInitiativeActionItem).map(rule => (
52 |
58 | ))}
59 |
60 | );
61 | };
62 |
--------------------------------------------------------------------------------
/src/components/Scorecards/ScorecardDetailsPage/ScorecardRuleExemptionsTab/RuleExemptionStatus.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2024 Cortex Applications, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | import { makeStyles, Box, Typography } from '@material-ui/core';
18 | import classnames from 'classnames';
19 | import React from 'react';
20 | import { ExemptionStatusResponseType } from '../../../../api/types';
21 | import { fallbackPalette } from '../../../../styles/styles';
22 |
23 | export interface RuleExemptionStatusProps {
24 | type: ExemptionStatusResponseType;
25 | }
26 |
27 | const useRuleExemptionStyles = makeStyles(theme => ({
28 | root: {
29 | display: 'block',
30 | width: 100,
31 | padding: theme.spacing(0.5, 1),
32 | marginRight: theme.spacing(1),
33 | },
34 | pending: {
35 | backgroundColor: fallbackPalette.common.grayLight,
36 | },
37 | approved: {
38 | backgroundColor: fallbackPalette.common.orange[100],
39 | },
40 | text: {
41 | color: fallbackPalette.common.black,
42 | },
43 | }));
44 |
45 | const typeToNameMap: Record