summaryrefslogtreecommitdiffstats
path: root/models/customFields.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/customFields.js')
-rw-r--r--models/customFields.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/models/customFields.js b/models/customFields.js
index 5e76db35..8b0abef4 100644
--- a/models/customFields.js
+++ b/models/customFields.js
@@ -9,6 +9,24 @@ CustomFields.attachSchema(new SimpleSchema({
},
type: {
type: String,
+ allowedValues: ['text', 'number', 'checkbox', 'date', 'dropdown']
+ },
+ settings: {
+ type: Object,
+ },
+ 'settings.dropdownItems': {
+ type: [Object],
+ optional: true
+ },
+ 'settings.dropdownItems.$': {
+ type: new SimpleSchema({
+ _id: {
+ type: String,
+ },
+ name: {
+ type: String,
+ },
+ })
},
showOnCard: {
type: Boolean,
@@ -83,6 +101,7 @@ if (Meteor.isServer) {
const id = CustomFields.direct.insert({
name: req.body.name,
type: req.body.type,
+ settings: req.body.settings,
showOnCard: req.body.showOnCard,
boardId: paramBoardId,
});