Clean deprecated code
This commit is contained in:
parent
6096f106b3
commit
7f6236852e
|
@ -205,24 +205,6 @@ export const createActions = context => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adds schema mutations for multiple fields at once
|
|
||||||
const addSchemaMutations = mutations => {
|
|
||||||
const fields = Object.keys(mutations || {})
|
|
||||||
if (!fields.length) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
schemaMutations.update($schemaMutations => {
|
|
||||||
let newSchemaMutations = { ...$schemaMutations }
|
|
||||||
fields.forEach(field => {
|
|
||||||
newSchemaMutations[field] = {
|
|
||||||
...newSchemaMutations[field],
|
|
||||||
...mutations[field],
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return newSchemaMutations
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// Saves schema changes to the server, if possible
|
// Saves schema changes to the server, if possible
|
||||||
const saveSchemaMutations = async () => {
|
const saveSchemaMutations = async () => {
|
||||||
// If we can't save schema changes then we just want to keep this in memory
|
// If we can't save schema changes then we just want to keep this in memory
|
||||||
|
@ -312,7 +294,6 @@ export const createActions = context => {
|
||||||
changePrimaryDisplay,
|
changePrimaryDisplay,
|
||||||
addSchemaMutation,
|
addSchemaMutation,
|
||||||
addSubSchemaMutation,
|
addSubSchemaMutation,
|
||||||
addSchemaMutations,
|
|
||||||
saveSchemaMutations,
|
saveSchemaMutations,
|
||||||
resetSchemaMutations,
|
resetSchemaMutations,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue