• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CBIIT / bento-c3dc-frontend / 22187159768

19 Feb 2026 03:02PM UTC coverage: 0.153% (-0.001%) from 0.154%
22187159768

Pull #495

github

web-flow
Merge 76616030f into f1916fb5c
Pull Request #495: C3DC-2136

6 of 4107 branches covered (0.15%)

Branch coverage included in aggregate %.

0 of 4 new or added lines in 2 files covered. (0.0%)

108 existing lines in 7 files now uncovered.

10 of 6339 relevant lines covered (0.16%)

0.08 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/components/CohortModal/components/shared/ConfirmationModal.js
1
import React from 'react';
×
2
import { Modal, withStyles } from '@material-ui/core';
×
3
import { confirmationTypes } from '../../../../bento/cohortModalData';
×
4

5
export { confirmationTypes };
6

7
const ConfirmationModal = (props) => {
×
8
    const {
9
        classes,
10
        open,
11
        setOpen,
12
        handleConfirm,
13
        deletionType,
14
        message
15
    } = props;
×
16
    return (
×
17
        <Modal
18
            open={open}
19
            onClose={() => setOpen(false)}
×
20
        >
21
            <div className={classes.modal}>
22
                <div className={classes.modalContent}>
23
                    <div className={classes.modalHeading}>
24
                        {message ?
25
                            <span>{message}</span>
×
26
                            : deletionType === confirmationTypes.DELETE_SINGLE_COHORT ?
27
                            <>
×
28
                                <span>Are you sure you want to delete this cohort?</span>
29
                                <span>This will permanently delete the cohort and all associated participants.</span>
30
                                <span>Please confirm or cancel.</span>
31
                            </>
32
                            :
33
                            <>
34
                                <span> Are you sure you want to {deletionType} </span>
35
                                {deletionType !== confirmationTypes.DELETE_ALL_PARTICIPANTS && <span>{deletionType === confirmationTypes.CLEAR_UNSAVED_CHANGES && 'You will lose all unsaved changes. ' }This action cannot be undone.</span>}
×
36
                                {deletionType !== confirmationTypes.DELETE_ALL_PARTICIPANTS && <span>Press Confirm or Cancel. </span>}
×
37
                            </>
38
                        }
39

40
                    </div>
41
                    <div className={classes.modalButtons}>
42
                        {message ?
43
                            <button className={classes.confirmButton}
×
44
                                onClick={() => {
UNCOV
45
                                    setOpen(false);
×
46

47
                                }}
48
                            >Ok</button>
49
                            :
50
                            <>
51
                                <button
52
                                    className={classes.cancelButton}
UNCOV
53
                                    onClick={() => setOpen(false)}
×
54
                                >
55
                                    Cancel
56
                                </button>
57
                                <button
58
                                    className={classes.confirmButton}
59
                                    onClick={() => {
UNCOV
60
                                        handleConfirm();
×
UNCOV
61
                                        setOpen(false);
×
62
                                    }}
63
                                >
64
                                    Confirm
65
                                </button>
66
                            </>
67
                        }
68

69
                    </div>
70
                </div>
71
            </div>
72
        </Modal>
73
    );
74
};
75

76

UNCOV
77
const styles = () => ({
×
78
    modal: {
79
        position: 'absolute',
80
        left: '50%',
81
        top: '50%',
82
        transform: 'translate(-50%, -50%)',
83
    },
84
    modalContent: {
85
        height: '213px',
86
        width: '573px',
87
        backgroundColor: '#782424',
88
        display: 'flex',
89
        alignItems: 'center',
90
        justifyContent: 'center',
91
        flexDirection: 'column',
92
    },
93
    modalHeading: {
94
        display: 'flex',
95
        alignItems: 'center',
96
        justifyContent: 'center',
97
        flexDirection: 'column',
98
        textAlign: 'center',
99
        color: '#FFFFFF',
100
        fontFamily: "Open Sans",
101
        fontSize: '14px',
102
        fontWeight: '400',
103
        lineHeight: '16.8px',
104
    },
105
    modalButtons: {
106
        display: 'flex',
107
        flexDirection: 'row',
108
        gap: '14px',
109
        flex: '0 0 auto',
110
        paddingTop: '30px',
111

112
        '& button': {
113
            fontFamily: 'Poppins',
114
            fontSize: '12px',
115
            fontWeight: '600',
116
            lineHeight: '16px',
117
            textAlign: 'center',
118
            width: '97px',
119
            height: '41px',
120
            borderRadius: '5px',
121
            border: '1.5px solid #FFFFFF',
122
            color: '#FFFFFF',
123
            '&:hover': {
124
                cursor: 'pointer',
125
            },
126
        },
127
    },
128
    cancelButton: {
129
        backgroundColor: '#4F5D69',
130
        '&:hover': {
131
            backgroundColor: '#374149',
132
        },
133
    },
134
    confirmButton: {
135
        backgroundColor: '#0C534C',
136
        '&:hover': {
137
            backgroundColor: '#003B35',
138
        },
139
    },
140

UNCOV
141
});
×
142

143
export default withStyles(styles, { withTheme: true })(ConfirmationModal);
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc