@7365admin1/core 3.32.2-staging.102 → 3.32.2-staging.103
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.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +14 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -80291,6 +80291,10 @@ function MFormEntry(value) {
|
|
|
80291
80291
|
}
|
|
80292
80292
|
var residentFormEntry = import_joi156.default.object({
|
|
80293
80293
|
_id: import_joi156.default.string().hex().optional().allow("", null),
|
|
80294
|
+
// The same PUT /form-entries/id/:id endpoint is also used to edit an
|
|
80295
|
+
// online form's own template config (admin builder), which sends
|
|
80296
|
+
// `formType` rather than `typeOfForm` — allow both.
|
|
80297
|
+
formType: import_joi156.default.string().optional().allow("", null),
|
|
80294
80298
|
typeOfForm: import_joi156.default.string().optional().allow("", null),
|
|
80295
80299
|
unitNumber: import_joi156.default.string().optional().allow(null, ""),
|
|
80296
80300
|
fields: import_joi156.default.object().pattern(
|
|
@@ -80449,17 +80453,17 @@ function useFormEntryRepo() {
|
|
|
80449
80453
|
if (!onlineFormRequest) {
|
|
80450
80454
|
throw new import_node_server_utils275.NotFoundError("Online form not found.");
|
|
80451
80455
|
}
|
|
80452
|
-
|
|
80453
|
-
|
|
80454
|
-
|
|
80456
|
+
if (onlineFormRequest.userId) {
|
|
80457
|
+
const user = await getUserById(onlineFormRequest.userId.toString());
|
|
80458
|
+
if (user?._id) {
|
|
80459
|
+
await NotificationService.onlineFormRequestStatusUpdated({
|
|
80460
|
+
to: user._id.toString(),
|
|
80461
|
+
onlineFormId: onlineFormRequest._id,
|
|
80462
|
+
status: onlineFormRequest.status,
|
|
80463
|
+
siteId: onlineFormRequest.site
|
|
80464
|
+
});
|
|
80465
|
+
}
|
|
80455
80466
|
}
|
|
80456
|
-
const userId = user._id.toString();
|
|
80457
|
-
await NotificationService.onlineFormRequestStatusUpdated({
|
|
80458
|
-
to: userId,
|
|
80459
|
-
onlineFormId: onlineFormRequest._id,
|
|
80460
|
-
status: onlineFormRequest.status,
|
|
80461
|
-
siteId: onlineFormRequest.site
|
|
80462
|
-
});
|
|
80463
80467
|
return res.modifiedCount;
|
|
80464
80468
|
} catch (error) {
|
|
80465
80469
|
throw error;
|