Skip to content

Commit

Permalink
chore: update signature for storeElement in toggleLocked of element c…
Browse files Browse the repository at this point in the history
…omponents

Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
  • Loading branch information
MyPyDavid committed May 15, 2024
1 parent c56f53b commit 65ef10e
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion rdmo/management/assets/js/components/element/Attribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Attribute = ({ config, attribute, elementActions, display='list', indent=0
const fetchEdit = () => elementActions.fetchElement('attributes', attribute.id)
const fetchCopy = () => elementActions.fetchElement('attributes', attribute.id, 'copy')
const fetchNested = () => elementActions.fetchElement('attributes', attribute.id, 'nested')
const toggleLocked = () => elementActions.storeElement('attributes', {...attribute, locked: !attribute.locked })
const toggleLocked = () => elementActions.storeElement('attributes', {...attribute, locked: !attribute.locked }, null, false)

const createAttribute = () => elementActions.createElement('attributes', { attribute })

Expand Down
2 changes: 1 addition & 1 deletion rdmo/management/assets/js/components/element/Condition.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Condition = ({ config, condition, elementActions, filter=false, filterEdit

const fetchEdit = () => elementActions.fetchElement('conditions', condition.id)
const fetchCopy = () => elementActions.fetchElement('conditions', condition.id, 'copy')
const toggleLocked = () => elementActions.storeElement('conditions', {...condition, locked: !condition.locked })
const toggleLocked = () => elementActions.storeElement('conditions', {...condition, locked: !condition.locked }, null, false)

return showElement && (
<li className="list-group-item">
Expand Down
2 changes: 1 addition & 1 deletion rdmo/management/assets/js/components/element/Option.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Option = ({ config, option, elementActions, display='list', indent=0, filt

const fetchEdit = () => elementActions.fetchElement('options', option.id)
const fetchCopy = () => elementActions.fetchElement('options', option.id, 'copy')
const toggleLocked = () => elementActions.storeElement('options', {...option, locked: !option.locked })
const toggleLocked = () => elementActions.storeElement('options', {...option, locked: !option.locked }, null, false)

const elementNode = (
<div className="element">
Expand Down
2 changes: 1 addition & 1 deletion rdmo/management/assets/js/components/element/OptionSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const OptionSet = ({ config, optionset, elementActions, display='list', filter=f
const fetchEdit = () => elementActions.fetchElement('optionsets', optionset.id)
const fetchCopy = () => elementActions.fetchElement('optionsets', optionset.id, 'copy')
const fetchNested = () => elementActions.fetchElement('optionsets', optionset.id, 'nested')
const toggleLocked = () => elementActions.storeElement('optionsets', {...optionset, locked: !optionset.locked })
const toggleLocked = () => elementActions.storeElement('optionsets', {...optionset, locked: !optionset.locked }, null, false)

const createOption = () => elementActions.createElement('options', { optionset })

Expand Down
2 changes: 1 addition & 1 deletion rdmo/management/assets/js/components/element/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const Page = ({ config, page, configActions, elementActions, display='list', ind
const fetchEdit = () => elementActions.fetchElement('pages', page.id)
const fetchCopy = () => elementActions.fetchElement('pages', page.id, 'copy')
const fetchNested = () => elementActions.fetchElement('pages', page.id, 'nested')
const toggleLocked = () => elementActions.storeElement('pages', {...page, locked: !page.locked })
const toggleLocked = () => elementActions.storeElement('pages', {...page, locked: !page.locked }, null, false)
const toggleElements = () => configActions.toggleElements(page)

const createQuestionSet = () => elementActions.createElement('questionsets', { page })
Expand Down
2 changes: 1 addition & 1 deletion rdmo/management/assets/js/components/element/Question.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Question = ({ config, question, elementActions, display='list', indent=0,

const fetchEdit = () => elementActions.fetchElement('questions', question.id)
const fetchCopy = () => elementActions.fetchElement('questions', question.id, 'copy')
const toggleLocked = () => elementActions.storeElement('questions', {...question, locked: !question.locked })
const toggleLocked = () => elementActions.storeElement('questions', {...question, locked: !question.locked }, null, false)

const fetchAttribute = () => elementActions.fetchElement('attributes', question.attribute)
const fetchCondition = (index) => elementActions.fetchElement('conditions', question.conditions[index])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const QuestionSet = ({ config, questionset, configActions, elementActions, displ
const fetchEdit = () => elementActions.fetchElement('questionsets', questionset.id)
const fetchCopy = () => elementActions.fetchElement('questionsets', questionset.id, 'copy')
const fetchNested = () => elementActions.fetchElement('questionsets', questionset.id, 'nested')
const toggleLocked = () => elementActions.storeElement('questionsets', {...questionset, locked: !questionset.locked })
const toggleLocked = () => elementActions.storeElement('questionsets', {...questionset, locked: !questionset.locked }, null, false)
const toggleElements = () => configActions.toggleElements(questionset)

const createQuestionSet = () => elementActions.createElement('questionsets', { questionset })
Expand Down
2 changes: 1 addition & 1 deletion rdmo/management/assets/js/components/element/Section.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Section = ({ config, section, configActions, elementActions, display='list
const fetchEdit = () => elementActions.fetchElement('sections', section.id)
const fetchCopy = () => elementActions.fetchElement('sections', section.id, 'copy')
const fetchNested = () => elementActions.fetchElement('sections', section.id, 'nested')
const toggleLocked = () => elementActions.storeElement('sections', {...section, locked: !section.locked })
const toggleLocked = () => elementActions.storeElement('sections', {...section, locked: !section.locked }, null, false)
const toggleElements = () => configActions.toggleElements(section)

const createPage = () => elementActions.createElement('pages', { section })
Expand Down

0 comments on commit 65ef10e

Please sign in to comment.