app/javascript/vue/tasks/observation_matrices/matrix_column_coder/store/mutations/setContinuousValue.js
import mergeIntoObservation from '../../helpers/mergeIntoObservation'
import setRowObjectUnsaved from '../../helpers/setRowObjectUnsaved'
export default function (state, args) {
const {
rowObjectId,
rowObjectType,
continuousValue,
observationId
} = args
mergeIntoObservation(state.observations.find(o =>
o.rowObjectId === rowObjectId &&
o.rowObjectType === rowObjectType &&
(o.id === observationId || o.internalId === observationId)
), {
continuousValue,
isUnsaved: true
})
setRowObjectUnsaved(state.rowObjects.find(r => r.id === rowObjectId && r.type === rowObjectType))
}