@dynamatix/cat-shared 0.0.26 → 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
|
},
|
|
@@ -133,9 +133,7 @@ const formConfigurationSchema = new mongoose.Schema({
|
|
|
133
133
|
type: String,
|
|
134
134
|
trim: true
|
|
135
135
|
},
|
|
136
|
-
fields: [
|
|
137
|
-
type: [formfieldSchema]
|
|
138
|
-
}],
|
|
136
|
+
fields: [formfieldSchema],
|
|
139
137
|
order: {
|
|
140
138
|
type: Number,
|
|
141
139
|
default: 0
|
|
@@ -143,7 +141,26 @@ const formConfigurationSchema = new mongoose.Schema({
|
|
|
143
141
|
visibilityCondition: { // Added section-level visibility
|
|
144
142
|
type: mongoose.Schema.Types.Mixed,
|
|
145
143
|
default: null
|
|
146
|
-
}
|
|
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
|
+
}]
|
|
147
164
|
}],
|
|
148
165
|
isActive: { // Consider adding status flag
|
|
149
166
|
type: Boolean,
|