mirror of
https://github.com/strapi/strapi.git
synced 2025-11-08 14:19:40 +00:00
Disable content type properties for ce
Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
parent
fb28853848
commit
9f4a19fe3f
@ -2,6 +2,7 @@ import React, { useMemo, useState } from 'react';
|
|||||||
import { get } from 'lodash';
|
import { get } from 'lodash';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Flex, Padded } from '@buffetjs/core';
|
import { Flex, Padded } from '@buffetjs/core';
|
||||||
|
import IS_DISABLED from 'ee_else_ce/components/Roles/ContentTypeCollapse/Collapse/utils/constants';
|
||||||
import { usePermissionsDataManager } from '../../../../hooks';
|
import { usePermissionsDataManager } from '../../../../hooks';
|
||||||
import { getCheckboxState, removeConditionKeyFromData } from '../../utils';
|
import { getCheckboxState, removeConditionKeyFromData } from '../../utils';
|
||||||
import CheckboxWithCondition from '../../CheckboxWithCondition';
|
import CheckboxWithCondition from '../../CheckboxWithCondition';
|
||||||
@ -98,7 +99,7 @@ const Collapse = ({
|
|||||||
return (
|
return (
|
||||||
<CheckboxWithCondition
|
<CheckboxWithCondition
|
||||||
key={actionId}
|
key={actionId}
|
||||||
disabled={isFormDisabled}
|
disabled={isFormDisabled || IS_DISABLED}
|
||||||
hasConditions={hasConditions}
|
hasConditions={hasConditions}
|
||||||
name={checkboxName}
|
name={checkboxName}
|
||||||
onChange={onChangeParentCheckbox}
|
onChange={onChangeParentCheckbox}
|
||||||
@ -111,7 +112,7 @@ const Collapse = ({
|
|||||||
return (
|
return (
|
||||||
<CheckboxWithCondition
|
<CheckboxWithCondition
|
||||||
key={actionId}
|
key={actionId}
|
||||||
disabled={isFormDisabled}
|
disabled={isFormDisabled || IS_DISABLED}
|
||||||
hasConditions={hasConditions}
|
hasConditions={hasConditions}
|
||||||
name={checkboxName}
|
name={checkboxName}
|
||||||
onChange={onChangeSimpleCheckbox}
|
onChange={onChangeSimpleCheckbox}
|
||||||
|
|||||||
@ -0,0 +1,3 @@
|
|||||||
|
const IS_DISABLED = true;
|
||||||
|
|
||||||
|
export default IS_DISABLED;
|
||||||
@ -2,6 +2,7 @@ import React, { memo, useState, useMemo, useCallback } from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { get } from 'lodash';
|
import { get } from 'lodash';
|
||||||
import { Padded, Flex } from '@buffetjs/core';
|
import { Padded, Flex } from '@buffetjs/core';
|
||||||
|
import IS_DISABLED from 'ee_else_ce/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/ActionRow/utils/constants';
|
||||||
import { usePermissionsDataManager } from '../../../../../hooks';
|
import { usePermissionsDataManager } from '../../../../../hooks';
|
||||||
import { getCheckboxState } from '../../../utils';
|
import { getCheckboxState } from '../../../utils';
|
||||||
import CheckboxWithCondition from '../../../CheckboxWithCondition';
|
import CheckboxWithCondition from '../../../CheckboxWithCondition';
|
||||||
@ -95,7 +96,7 @@ const ActionRow = ({
|
|||||||
return (
|
return (
|
||||||
<CheckboxWithCondition
|
<CheckboxWithCondition
|
||||||
key={actionId}
|
key={actionId}
|
||||||
disabled={isFormDisabled}
|
disabled={isFormDisabled || IS_DISABLED}
|
||||||
name={checkboxName.join('..')}
|
name={checkboxName.join('..')}
|
||||||
onChange={onChangeSimpleCheckbox}
|
onChange={onChangeSimpleCheckbox}
|
||||||
value={checkboxValue}
|
value={checkboxValue}
|
||||||
@ -110,7 +111,7 @@ const ActionRow = ({
|
|||||||
return (
|
return (
|
||||||
<CheckboxWithCondition
|
<CheckboxWithCondition
|
||||||
key={label}
|
key={label}
|
||||||
disabled={isFormDisabled}
|
disabled={isFormDisabled || IS_DISABLED}
|
||||||
name={checkboxName.join('..')}
|
name={checkboxName.join('..')}
|
||||||
onChange={onChangeParentCheckbox}
|
onChange={onChangeParentCheckbox}
|
||||||
value={hasAllActionsSelected}
|
value={hasAllActionsSelected}
|
||||||
|
|||||||
@ -0,0 +1,3 @@
|
|||||||
|
const IS_DISABLED = true;
|
||||||
|
|
||||||
|
export default IS_DISABLED;
|
||||||
@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
|||||||
import { get } from 'lodash';
|
import { get } from 'lodash';
|
||||||
import { Flex, Text } from '@buffetjs/core';
|
import { Flex, Text } from '@buffetjs/core';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
import IS_DISABLED from 'ee_else_ce/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/SubActionRow/utils/constants';
|
||||||
import { usePermissionsDataManager } from '../../../../../hooks';
|
import { usePermissionsDataManager } from '../../../../../hooks';
|
||||||
import { getCheckboxState } from '../../../utils';
|
import { getCheckboxState } from '../../../utils';
|
||||||
import CheckboxWithCondition from '../../../CheckboxWithCondition';
|
import CheckboxWithCondition from '../../../CheckboxWithCondition';
|
||||||
@ -115,7 +116,7 @@ const SubActionRow = ({
|
|||||||
return (
|
return (
|
||||||
<CheckboxWithCondition
|
<CheckboxWithCondition
|
||||||
key={label}
|
key={label}
|
||||||
disabled={isFormDisabled}
|
disabled={isFormDisabled || IS_DISABLED}
|
||||||
name={checkboxName.join('..')}
|
name={checkboxName.join('..')}
|
||||||
onChange={onChangeSimpleCheckbox}
|
onChange={onChangeSimpleCheckbox}
|
||||||
value={checkboxValue}
|
value={checkboxValue}
|
||||||
@ -130,7 +131,7 @@ const SubActionRow = ({
|
|||||||
return (
|
return (
|
||||||
<CheckboxWithCondition
|
<CheckboxWithCondition
|
||||||
key={label}
|
key={label}
|
||||||
disabled={isFormDisabled}
|
disabled={isFormDisabled || IS_DISABLED}
|
||||||
name={checkboxName.join('..')}
|
name={checkboxName.join('..')}
|
||||||
onChange={onChangeParentCheckbox}
|
onChange={onChangeParentCheckbox}
|
||||||
value={hasAllActionsSelected}
|
value={hasAllActionsSelected}
|
||||||
|
|||||||
@ -0,0 +1,3 @@
|
|||||||
|
const IS_DISABLED = true;
|
||||||
|
|
||||||
|
export default IS_DISABLED;
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
const IS_DISABLED = false;
|
||||||
|
|
||||||
|
export default IS_DISABLED;
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
const IS_DISABLED = false;
|
||||||
|
|
||||||
|
export default IS_DISABLED;
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
const IS_DISABLED = false;
|
||||||
|
|
||||||
|
export default IS_DISABLED;
|
||||||
Loading…
x
Reference in New Issue
Block a user