@dynamatix/cat-shared 0.0.76 → 0.0.78
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.
|
@@ -123,11 +123,14 @@ function applyAuditMiddleware(schema, collectionName) {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
async function updateContextAuditCount(contextId, count) {
|
|
126
|
-
|
|
126
|
+
count = Number(count);
|
|
127
|
+
if (!contextId || isNaN(count)) return;
|
|
127
128
|
const model = mongoose.models['Application'];
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
await model.findByIdAndUpdate(
|
|
130
|
+
{ _id: contextId },
|
|
131
|
+
{ $inc: { newAuditRecordsCount: count } },
|
|
132
|
+
{ new: true, upsert: true }
|
|
133
|
+
);
|
|
131
134
|
}
|
|
132
135
|
|
|
133
136
|
export function registerAuditHook(callback) {
|
|
@@ -79,6 +79,14 @@ const formfieldSchema = new mongoose.Schema({
|
|
|
79
79
|
type: String,
|
|
80
80
|
default: null
|
|
81
81
|
},
|
|
82
|
+
keyIconClass: {
|
|
83
|
+
type: String,
|
|
84
|
+
default: null
|
|
85
|
+
},
|
|
86
|
+
keyIconStyle: {
|
|
87
|
+
type: Object,
|
|
88
|
+
default: null
|
|
89
|
+
},
|
|
82
90
|
// Ex: sort-code, post-code, pound, drop-down, lookup
|
|
83
91
|
uiHint: {
|
|
84
92
|
type: String
|