mirror of
https://github.com/qlik-oss/nebula.js.git
synced 2025-12-23 11:44:10 -05:00
* test: base test renderer * test: `<ConnectionStep />` * test: `<AppList /> tests` * test: `<ConnectionGuid />` * test: `<HubLayout />` * test: `<ConnectionHistory />` * test: `<ConnectionOptions />` done * test: `<Error />` done * test: `<SelectEngine />` done
21 lines
431 B
JavaScript
21 lines
431 B
JavaScript
export const checkIfConnectionOptionDisabled = ({ label, info }) => {
|
|
if (!info) return false;
|
|
|
|
const labelKey = label
|
|
.split(' ')
|
|
.map((x) => x.toLowerCase())
|
|
.join('-');
|
|
|
|
if (info.isWebIntegrationIdProvided) {
|
|
if (labelKey === 'web-integration-id') return false;
|
|
return true;
|
|
}
|
|
|
|
if (info.isClientIdProvided) {
|
|
if (labelKey === 'client-id') return false;
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
};
|