File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
redisinsight/ui/src/components/consents-settings Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -86,15 +86,15 @@ const ConsentsSettings = ({ onSubmitted }: Props) => {
86
86
if ( e . target . checked ) {
87
87
const newBufferValues :Values = { }
88
88
consents . forEach ( ( consent ) => {
89
- if ( ! consent . required ) {
89
+ if ( ! consent . required && ! consent . disabled ) {
90
90
newBufferValues [ consent . agreementName ] = formik . values [ consent . agreementName ]
91
91
formik . setFieldValue ( consent . agreementName , true )
92
92
}
93
93
setValuesBuffer ( newBufferValues )
94
94
} )
95
95
} else {
96
96
consents . forEach ( ( consent ) => {
97
- if ( ! consent . required ) {
97
+ if ( ! consent . required && ! consent . disabled ) {
98
98
formik . setFieldValue ( consent . agreementName , valuesBuffer [ consent . agreementName ] )
99
99
}
100
100
} )
@@ -153,14 +153,14 @@ const ConsentsSettings = ({ onSubmitted }: Props) => {
153
153
const checkIsRecommended = ( ) => {
154
154
let recommended = true
155
155
forEach ( privacyConsents , ( consent ) => {
156
- if ( ! formik . values [ consent ?. agreementName ] ) {
156
+ if ( ! formik . values [ consent ?. agreementName ] && ! consent . disabled ) {
157
157
recommended = false
158
158
return false
159
159
}
160
160
} )
161
161
162
162
forEach ( notificationConsents , ( consent ) => {
163
- if ( ! formik . values [ consent ?. agreementName ] ) {
163
+ if ( ! formik . values [ consent ?. agreementName ] && ! consent . disabled ) {
164
164
recommended = false
165
165
return false
166
166
}
You can’t perform that action at this time.
0 commit comments