@dynamatix/cat-shared 0.0.27 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,7 +6,7 @@ const formfieldSchema = new mongoose.Schema({
|
|
|
6
6
|
required: true,
|
|
7
7
|
trim: true
|
|
8
8
|
},
|
|
9
|
-
isHidden:{
|
|
9
|
+
isHidden: {
|
|
10
10
|
type: Boolean,
|
|
11
11
|
default: false
|
|
12
12
|
},
|
|
@@ -31,7 +31,7 @@ const formfieldSchema = new mongoose.Schema({
|
|
|
31
31
|
dataType: {
|
|
32
32
|
type: String,
|
|
33
33
|
required: true,
|
|
34
|
-
enum: ['string', 'number', 'boolean-check','boolean-radio', 'date', 'array', 'object', 'select', 'radio', 'drop-down', 'sort-code','post-code','pound','lookup','multi-select'
|
|
34
|
+
enum: ['string', 'number', 'boolean-check', 'boolean-radio', 'date', 'array', 'object', 'select', 'radio', 'drop-down', 'sort-code', 'post-code', 'pound', 'lookup', 'multi-select'] // Added common form field types
|
|
35
35
|
},
|
|
36
36
|
isRequired: {
|
|
37
37
|
type: Boolean,
|
|
@@ -57,7 +57,7 @@ const formfieldSchema = new mongoose.Schema({
|
|
|
57
57
|
default: null
|
|
58
58
|
},
|
|
59
59
|
options: [{
|
|
60
|
-
type:
|
|
60
|
+
type: mongoose.Schema.Types.Mixed
|
|
61
61
|
}],
|
|
62
62
|
section: {
|
|
63
63
|
type: String,
|
|
@@ -116,7 +116,7 @@ const formConfigurationSchema = new mongoose.Schema({
|
|
|
116
116
|
trim: true,
|
|
117
117
|
unique: true // Consider making form names unique
|
|
118
118
|
},
|
|
119
|
-
collectionName:{
|
|
119
|
+
collectionName: {
|
|
120
120
|
type: String,
|
|
121
121
|
required: true
|
|
122
122
|
},
|
|
@@ -141,7 +141,26 @@ const formConfigurationSchema = new mongoose.Schema({
|
|
|
141
141
|
visibilityCondition: { // Added section-level visibility
|
|
142
142
|
type: mongoose.Schema.Types.Mixed,
|
|
143
143
|
default: null
|
|
144
|
-
}
|
|
144
|
+
},
|
|
145
|
+
sections: [{
|
|
146
|
+
sectionName: {
|
|
147
|
+
type: String,
|
|
148
|
+
trim: true
|
|
149
|
+
},
|
|
150
|
+
sectionLabel: {
|
|
151
|
+
type: String,
|
|
152
|
+
trim: true
|
|
153
|
+
},
|
|
154
|
+
fields: [formfieldSchema],
|
|
155
|
+
order: {
|
|
156
|
+
type: Number,
|
|
157
|
+
default: 0
|
|
158
|
+
},
|
|
159
|
+
visibilityCondition: { // Added section-level visibility
|
|
160
|
+
type: mongoose.Schema.Types.Mixed,
|
|
161
|
+
default: null
|
|
162
|
+
}
|
|
163
|
+
}]
|
|
145
164
|
}],
|
|
146
165
|
isActive: { // Consider adding status flag
|
|
147
166
|
type: Boolean,
|