Skip to content

Commit

Permalink
Temporary changes so related_items appears
Browse files Browse the repository at this point in the history
  • Loading branch information
thecalcc committed Mar 14, 2024
1 parent 58ceff9 commit b5facb7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
8 changes: 7 additions & 1 deletion client/components/ContentProfiles/ContentProfileModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,13 @@ class ContentProfileModalComponent extends React.Component<IProps, IState> {
>
<FieldTab
ref={this.fieldTab}
profile={this.state.profile}
profile={{
...this.state.profile,
editor: {
...this.state.profile.editor,
related_items: {enabled: true}
}
}}
groupFields={true}
systemRequiredFields={this.props.mainProfile.systemRequiredFields}
disableMinMaxFields={this.props.mainProfile.disableMinMaxFields}
Expand Down
10 changes: 8 additions & 2 deletions client/components/ContentProfiles/FieldTab/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ interface IState {
}

export class FieldTab extends React.Component<IProps, IState> {
profile: any;
constructor(props) {
super(props);

Expand All @@ -50,6 +51,13 @@ export class FieldTab extends React.Component<IProps, IState> {
this.updateFieldOrder = this.updateFieldOrder.bind(this);
this.insertField = this.insertField.bind(this);
this.removeField = this.removeField.bind(this);
this.profile = {
...this.props.profile,
editor: {
...this.props.profile.editor,
related_items: {enabled: false}
}
};
}

openEditor(field: IProfileFieldEntry) {
Expand Down Expand Up @@ -222,11 +230,9 @@ export class FieldTab extends React.Component<IProps, IState> {
}

render() {
debugger
const unusedFields = getUnusedProfileFields(this.props.profile, this.props.groupFields);
const systemRequiredFields = this.getSystemRequiredFields();

console.log(this.props.profile);
return (
<div className="sd-column-box--2">
<div className="sd-column-box__main-column">
Expand Down
2 changes: 1 addition & 1 deletion client/components/fields/editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const FIELD_TO_EDITOR_COMPONENT = {
contacts: EditorFieldContacts,
event_contact_info: EditorFieldContacts,
occur_status: EditorFieldEventOccurenceStatus,
related_plannings: EditorFieldEventRelatedPlannings,
related_plannings: EditorFieldEventRelatedItems,
related_items: EditorFieldEventRelatedItems,
planning_date: EditorFieldPlanningDateTime,
'flags.marked_for_not_publication': EditorFieldNotForPublication,
Expand Down

0 comments on commit b5facb7

Please sign in to comment.