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

CBIIT / bento-c3dc-frontend / 21959353841

12 Feb 2026 06:33PM UTC coverage: 0.154%. Remained the same
21959353841

push

github

web-flow
Merge pull request #488 from CBIIT/C3DC-2103

C3DC-2103 added unsaved changes check when duplicating cohorts

6 of 4086 branches covered (0.15%)

Branch coverage included in aggregate %.

0 of 47 new or added lines in 10 files covered. (0.0%)

3 existing lines in 3 files now uncovered.

10 of 6325 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';
×
NEW
3
import { confirmationTypes } from '../../../../bento/cohortModalData';
×
4

5
export { confirmationTypes };
6

NEW
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
                            :
27
                            <>
28
                                <span> Are you sure you want to {deletionType} </span>
29
                                {deletionType !== confirmationTypes.DELETE_ALL_PARTICIPANTS && <span>{deletionType === confirmationTypes.CLEAR_UNSAVED_CHANGES && 'You will lose all unsaved changes. ' }This action cannot be undone.</span>}
×
30
                                {deletionType !== confirmationTypes.DELETE_ALL_PARTICIPANTS && <span>Press Confirm or Cancel. </span>}
×
31
                            </>
32
                        }
33

34
                    </div>
35
                    <div className={classes.modalButtons}>
36
                        {message ?
37
                            <button className={classes.confirmButton}
×
38
                                onClick={() => {
39
                                    setOpen(false);
×
40

41
                                }}
42
                            >Ok</button>
43
                            :
44
                            <>
45
                                <button
46
                                    className={classes.cancelButton}
47
                                    onClick={() => setOpen(false)}
×
48
                                >
49
                                    Cancel
50
                                </button>
51
                                <button
52
                                    className={classes.confirmButton}
53
                                    onClick={() => {
NEW
54
                                        handleConfirm();
×
55
                                        setOpen(false);
×
56
                                    }}
57
                                >
58
                                    Confirm
59
                                </button>
60
                            </>
61
                        }
62

63
                    </div>
64
                </div>
65
            </div>
66
        </Modal>
67
    );
68
};
69

70

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

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

135
});
×
136

137
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