@dynamatix/cat-shared 0.0.134 → 0.0.137

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.
@@ -291,7 +291,7 @@ function applyAuditMiddleware(schema, collectionName) {
291
291
  console.log("hasChanged", hasChanged);
292
292
  if (hasChanged) {
293
293
  const newValue = getNestedProperty(update?.$set, field) ?? getNestedProperty(update, field);
294
- const oldValue = this._originalDoc ? getNestedProperty(this._originalDoc, field) : '';
294
+ const oldValue = this._originalDoc ? getNestedProperty(this._originalDoc, field) : undefined;
295
295
  let lookupOldName;
296
296
  let lookupNewName;
297
297
  if (field.endsWith('Lid')) {
@@ -161,6 +161,10 @@ const formfieldSchema = new mongoose.Schema({
161
161
  type: Boolean,
162
162
  default: false
163
163
  },
164
+ isShowHiddenFields: {
165
+ type: Boolean,
166
+ default: false
167
+ },
164
168
  readOnlyCondition: { // (LendingType=='BTL' || ApplicationType=='Company')
165
169
  type: mongoose.Schema.Types.Mixed,
166
170
  default: null
@@ -49,6 +49,7 @@ propertyMetadataSchema.index({ collectionName: 1, propertyName: 1 }, { unique: t
49
49
  propertyMetadataSchema.index({ collectionName: 1, isActive: 1 });
50
50
  propertyMetadataSchema.index({ type: 1, isActive: 1 });
51
51
  propertyMetadataSchema.index({ category: 1, isActive: 1 });
52
+ propertyMetadataSchema.index({ createdAt: 1 });
52
53
 
53
54
  // Apply audit middleware
54
55
  applyAuditMiddleware(propertyMetadataSchema, "PropertyMetaData");
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@dynamatix/cat-shared",
3
- "version": "0.0.134",
3
+ "version": "0.0.137",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
- "test": "echo \"Error: no test specified\" && exit 1"
6
+ "test": "echo \"Error: no test specified\" && exit 1",
7
+ "patch": "npm version patch && npm publish --access public && exit 0"
7
8
  },
8
9
  "author": "",
9
10
  "license": "ISC",