Refactored all forms to disable all fields without edit permission
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import createListOfProperties from '/imports/ui/properties/forms/shared/lists/createListOfProperties.js'
|
||||
|
||||
const saveListMixin = {
|
||||
meteor: {
|
||||
saveList(){
|
||||
return createListOfProperties({type: 'skill', skillType: 'save'});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default saveListMixin;
|
||||
20
app/imports/ui/properties/forms/shared/propertyFormMixin.js
Normal file
20
app/imports/ui/properties/forms/shared/propertyFormMixin.js
Normal file
@@ -0,0 +1,20 @@
|
||||
export default {
|
||||
props: {
|
||||
model: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
errors: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
change(path, value, ack){
|
||||
if (!Array.isArray(path)){
|
||||
path = [path];
|
||||
}
|
||||
this.$emit('change', {path, value, ack});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user