@dynamatix/cat-shared 0.0.64 → 0.0.66
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.
|
@@ -2,7 +2,9 @@ import mongoose from 'mongoose';
|
|
|
2
2
|
|
|
3
3
|
const optionSchema = new mongoose.Schema({
|
|
4
4
|
label: { type: mongoose.Schema.Types.Mixed },
|
|
5
|
-
value: { type: mongoose.Schema.Types.Mixed }
|
|
5
|
+
value: { type: mongoose.Schema.Types.Mixed },
|
|
6
|
+
text: { type: mongoose.Schema.Types.Mixed }
|
|
7
|
+
|
|
6
8
|
}, { _id: false });
|
|
7
9
|
|
|
8
10
|
const formfieldSchema = new mongoose.Schema({
|
|
@@ -43,7 +45,7 @@ const formfieldSchema = new mongoose.Schema({
|
|
|
43
45
|
dataType: {
|
|
44
46
|
type: String,
|
|
45
47
|
required: true,
|
|
46
|
-
enum: ['string', 'number', 'boolean-check', 'boolean-radio', 'percentage', 'date', 'array', 'object', 'select', 'radio', 'drop-down', 'sort-code', 'post-code', 'pound', 'lookup', 'multi-select'
|
|
48
|
+
enum: ['text-area', 'string', 'number', 'boolean-check', 'boolean-radio', 'percentage', 'date', 'array', 'object', 'select', 'radio', 'drop-down', 'sort-code', 'post-code', 'pound', 'lookup', 'multi-select', 'email', 'phone', 'internationalPhone'] // Added common form field types
|
|
47
49
|
},
|
|
48
50
|
isRequired: {
|
|
49
51
|
type: Boolean,
|
|
@@ -147,6 +149,14 @@ const formfieldSchema = new mongoose.Schema({
|
|
|
147
149
|
type: String,
|
|
148
150
|
default: null
|
|
149
151
|
},
|
|
152
|
+
shouldfilterOptionsAfterAdd: {
|
|
153
|
+
type : Boolean,
|
|
154
|
+
default : false
|
|
155
|
+
},
|
|
156
|
+
shouldfilterOptionsAfterDelete: {
|
|
157
|
+
type : Boolean,
|
|
158
|
+
default : false
|
|
159
|
+
}
|
|
150
160
|
}, { timestamps: true, _id: false });
|
|
151
161
|
|
|
152
162
|
const formConfigurationSchema = new mongoose.Schema({
|
|
@@ -160,6 +170,11 @@ const formConfigurationSchema = new mongoose.Schema({
|
|
|
160
170
|
type: String,
|
|
161
171
|
required: true
|
|
162
172
|
},
|
|
173
|
+
sectionLayout: {
|
|
174
|
+
type: String,
|
|
175
|
+
trim: true
|
|
176
|
+
},
|
|
177
|
+
parentKey: String,
|
|
163
178
|
populations: [Object],
|
|
164
179
|
visibilityCondition: {
|
|
165
180
|
type: mongoose.Schema.Types.Mixed,
|
|
@@ -178,6 +193,14 @@ const formConfigurationSchema = new mongoose.Schema({
|
|
|
178
193
|
type: Boolean,
|
|
179
194
|
default: false
|
|
180
195
|
},
|
|
196
|
+
isTable: {
|
|
197
|
+
type: Boolean,
|
|
198
|
+
default: false
|
|
199
|
+
},
|
|
200
|
+
dataFromSectionName: {
|
|
201
|
+
type: Boolean,
|
|
202
|
+
default: false
|
|
203
|
+
},
|
|
181
204
|
fields: [formfieldSchema],
|
|
182
205
|
order: {
|
|
183
206
|
type: Number,
|
|
@@ -201,6 +224,10 @@ const formConfigurationSchema = new mongoose.Schema({
|
|
|
201
224
|
type: Number,
|
|
202
225
|
default: 0
|
|
203
226
|
},
|
|
227
|
+
isTable: {
|
|
228
|
+
type: Boolean,
|
|
229
|
+
default: false
|
|
230
|
+
},
|
|
204
231
|
visibilityCondition: { // Added section-level visibility
|
|
205
232
|
type: mongoose.Schema.Types.Mixed,
|
|
206
233
|
default: null
|
|
@@ -211,6 +238,14 @@ const formConfigurationSchema = new mongoose.Schema({
|
|
|
211
238
|
type: Boolean,
|
|
212
239
|
default: true
|
|
213
240
|
},
|
|
241
|
+
isDeleteApprivoSync: {
|
|
242
|
+
type: Boolean,
|
|
243
|
+
default: true
|
|
244
|
+
},
|
|
245
|
+
isCreateApprivoSync: {
|
|
246
|
+
type: Boolean,
|
|
247
|
+
default: true
|
|
248
|
+
},
|
|
214
249
|
version: { // Consider adding versioning
|
|
215
250
|
type: Number,
|
|
216
251
|
default: 1
|