Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat:Disable content type from dropdown if it is already mapped in ex…
…isting stack case
  • Loading branch information
AishDani committed Apr 30, 2024
commit 4aed700f4cacd0fc9ad59cb2042c9888de117351
23 changes: 8 additions & 15 deletions ui/src/components/AdvancePropertise/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import {
ModalBody,
ModalFooter,
ModalHeader,
Button,
ButtonGroup,
FieldLabel,
TextInput,
ToggleSwitch
Expand All @@ -13,9 +10,13 @@ import './index.scss';

export interface SchemaProps {
fieldtype: string;
value: any,
rowId:string
closeModal: () => void;
}
const AdvancePropertise = (props: SchemaProps) => {
console.log("prope : ",props);

return (
<>
<ModalHeader title={`${props.fieldtype} propertise`} closeModal={props.closeModal} />
Expand All @@ -33,24 +34,16 @@ const AdvancePropertise = (props: SchemaProps) => {
Options
</FieldLabel>
<div className="options-class">
<ToggleSwitch label="Mandatory" labelColor="primary" labelPosition="right" />
<ToggleSwitch label="Multiple" labelColor="primary" labelPosition="right" />
<ToggleSwitch label="Unique" labelColor="primary" labelPosition="right" />
<ToggleSwitch label="Non-localizable" labelColor="primary" labelPosition="right" />
<ToggleSwitch label="Mandatory" labelColor="primary" labelPosition="right" checked={props?.value?.mandatory}/>
<ToggleSwitch label="Multiple" labelColor="primary" labelPosition="right" checked={props?.value?.multiple} />
<ToggleSwitch label="Unique" labelColor="primary" labelPosition="right" checked={props?.value?.unique}/>
<ToggleSwitch label="Non-localizable" labelColor="primary" labelPosition="right" checked={props?.value?.non_localizable}/>
<p className="non-localizable-message">
If enabled, editing this field is restricted in localized entries. The field will use
the value of the master-language entry in all localized entries.
</p>
</div>
</ModalBody>
{/* <ModalFooter>
<ButtonGroup>
<Button buttonType="light" onClick={() => props.closeModal()}>
Cancel
</Button>
<Button>Save and proceed</Button>
</ButtonGroup>
</ModalFooter> */}
</>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ export interface ContentTypeList {

export interface optionsType {
label?: string;
value?: string;
value?: object;
isDisabled?: boolean;
}

export interface ExstingContentTypeMatch {
[key: string]: string;
}
Loading