@dynamatix/cat-shared 0.0.27 → 0.0.29
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,
|
|
@@ -52,12 +52,13 @@ const formfieldSchema = new mongoose.Schema({
|
|
|
52
52
|
type: mongoose.Schema.Types.Mixed,
|
|
53
53
|
default: {}
|
|
54
54
|
}],
|
|
55
|
-
visibilityCondition: {
|
|
55
|
+
visibilityCondition: { // (LendingType=='BTL' || ApplicationType=='Company')
|
|
56
56
|
type: mongoose.Schema.Types.Mixed,
|
|
57
57
|
default: null
|
|
58
58
|
},
|
|
59
59
|
options: [{
|
|
60
|
-
|
|
60
|
+
key: mongoose.Schema.Types.Number | String,
|
|
61
|
+
value: mongoose.Schema.Types.String | Number,
|
|
61
62
|
}],
|
|
62
63
|
section: {
|
|
63
64
|
type: String,
|
|
@@ -116,7 +117,7 @@ const formConfigurationSchema = new mongoose.Schema({
|
|
|
116
117
|
trim: true,
|
|
117
118
|
unique: true // Consider making form names unique
|
|
118
119
|
},
|
|
119
|
-
collectionName:{
|
|
120
|
+
collectionName: {
|
|
120
121
|
type: String,
|
|
121
122
|
required: true
|
|
122
123
|
},
|
|
@@ -141,7 +142,26 @@ const formConfigurationSchema = new mongoose.Schema({
|
|
|
141
142
|
visibilityCondition: { // Added section-level visibility
|
|
142
143
|
type: mongoose.Schema.Types.Mixed,
|
|
143
144
|
default: null
|
|
144
|
-
}
|
|
145
|
+
},
|
|
146
|
+
sections: [{
|
|
147
|
+
sectionName: {
|
|
148
|
+
type: String,
|
|
149
|
+
trim: true
|
|
150
|
+
},
|
|
151
|
+
sectionLabel: {
|
|
152
|
+
type: String,
|
|
153
|
+
trim: true
|
|
154
|
+
},
|
|
155
|
+
fields: [formfieldSchema],
|
|
156
|
+
order: {
|
|
157
|
+
type: Number,
|
|
158
|
+
default: 0
|
|
159
|
+
},
|
|
160
|
+
visibilityCondition: { // Added section-level visibility
|
|
161
|
+
type: mongoose.Schema.Types.Mixed,
|
|
162
|
+
default: null
|
|
163
|
+
}
|
|
164
|
+
}]
|
|
145
165
|
}],
|
|
146
166
|
isActive: { // Consider adding status flag
|
|
147
167
|
type: Boolean,
|