@7365admin1/core 3.127.2-staging.426 → 3.127.2-staging.428
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 +3 -1
- package/dist/index.js +83 -57
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +83 -57
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -518,6 +518,7 @@ declare function useMemberRepo(): {
|
|
|
518
518
|
_id: string | ObjectId;
|
|
519
519
|
name: string;
|
|
520
520
|
} | null) => Promise<number>;
|
|
521
|
+
detachUnitsOfOrgAtSite: (org: string | ObjectId, site: string | ObjectId) => Promise<number>;
|
|
521
522
|
detachUnit: (unit: string | ObjectId) => Promise<number>;
|
|
522
523
|
getByUserIdTypeOrg: (user: string | ObjectId, type: string, org: string | ObjectId) => Promise<TMember>;
|
|
523
524
|
completeOnboardingById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
|
|
@@ -2891,7 +2892,7 @@ declare function MServiceProvider(value: TServiceProvider): {
|
|
|
2891
2892
|
};
|
|
2892
2893
|
|
|
2893
2894
|
declare function useServiceProviderRepo(): {
|
|
2894
|
-
getProviderMembersBySite: (site: string | ObjectId, orgIds: string[]) => Promise<bson.Document[]>;
|
|
2895
|
+
getProviderMembersBySite: (site: string | ObjectId, orgIds: string[], unit?: string) => Promise<bson.Document[]>;
|
|
2895
2896
|
createTextIndex: () => Promise<void>;
|
|
2896
2897
|
createUniqueIndex: () => Promise<void>;
|
|
2897
2898
|
createServiceProvider: (value: TServiceProvider, session?: ClientSession) => Promise<ObjectId>;
|
|
@@ -2943,6 +2944,7 @@ declare function useServiceProviderRepo(): {
|
|
|
2943
2944
|
declare function useServiceProviderController(): {
|
|
2944
2945
|
createServiceProvider: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2945
2946
|
getSiteProviderMembers: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2947
|
+
updateSiteMemberUnit: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2946
2948
|
getServiceProviders: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2947
2949
|
getByProviderOrg: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2948
2950
|
getByEmail: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -5523,6 +5523,19 @@ function useMemberRepo() {
|
|
|
5523
5523
|
}
|
|
5524
5524
|
return res.modifiedCount;
|
|
5525
5525
|
}
|
|
5526
|
+
async function detachUnitsOfOrgAtSite(org, site) {
|
|
5527
|
+
const both2 = (id) => import_mongodb15.ObjectId.isValid(id) ? [new import_mongodb15.ObjectId(id), id.toString()] : [id.toString()];
|
|
5528
|
+
const res = await collection.updateMany(
|
|
5529
|
+
{ org: { $in: both2(org) }, siteId: { $in: both2(site) }, unit: { $nin: [null, ""] } },
|
|
5530
|
+
{ $set: { unit: null, unitName: "", updatedAt: /* @__PURE__ */ new Date() } }
|
|
5531
|
+
);
|
|
5532
|
+
if (res.modifiedCount) {
|
|
5533
|
+
delNamespace().catch((err) => {
|
|
5534
|
+
import_node_server_utils16.logger.error(`Failed to clear cache for namespace: ${namespace_collection3}`, err);
|
|
5535
|
+
});
|
|
5536
|
+
}
|
|
5537
|
+
return res.modifiedCount;
|
|
5538
|
+
}
|
|
5526
5539
|
async function updateSiteById(_id, siteId, siteName) {
|
|
5527
5540
|
try {
|
|
5528
5541
|
_id = new import_mongodb15.ObjectId(_id);
|
|
@@ -5757,6 +5770,7 @@ function useMemberRepo() {
|
|
|
5757
5770
|
getByRoles,
|
|
5758
5771
|
updateSiteById,
|
|
5759
5772
|
updateUnitById,
|
|
5773
|
+
detachUnitsOfOrgAtSite,
|
|
5760
5774
|
detachUnit,
|
|
5761
5775
|
getByUserIdTypeOrg,
|
|
5762
5776
|
completeOnboardingById,
|
|
@@ -13803,7 +13817,7 @@ function useServiceProviderRepo() {
|
|
|
13803
13817
|
)
|
|
13804
13818
|
};
|
|
13805
13819
|
}
|
|
13806
|
-
async function getProviderMembersBySite(site, orgIds) {
|
|
13820
|
+
async function getProviderMembersBySite(site, orgIds, unit = "") {
|
|
13807
13821
|
try {
|
|
13808
13822
|
site = new import_mongodb37.ObjectId(site);
|
|
13809
13823
|
} catch {
|
|
@@ -13823,7 +13837,8 @@ function useServiceProviderRepo() {
|
|
|
13823
13837
|
org: { $in: orgs },
|
|
13824
13838
|
siteId: { $in: [site, site.toString()] },
|
|
13825
13839
|
status: { $nin: ["deleted"] },
|
|
13826
|
-
deletedAt: { $in: [null, ""] }
|
|
13840
|
+
deletedAt: { $in: [null, ""] },
|
|
13841
|
+
...unit ? { unit: unitQuery(unit) } : {}
|
|
13827
13842
|
}
|
|
13828
13843
|
},
|
|
13829
13844
|
{ $sort: { _id: 1 } },
|
|
@@ -13861,7 +13876,9 @@ function useServiceProviderRepo() {
|
|
|
13861
13876
|
$ifNull: [{ $arrayElemAt: ["$_user.email", 0] }, "$email"]
|
|
13862
13877
|
},
|
|
13863
13878
|
roleName: { $ifNull: [{ $arrayElemAt: ["$_role.name", 0] }, ""] },
|
|
13864
|
-
lastLoginAt: { $arrayElemAt: ["$_user.lastLoginAt", 0] }
|
|
13879
|
+
lastLoginAt: { $arrayElemAt: ["$_user.lastLoginAt", 0] },
|
|
13880
|
+
unit: 1,
|
|
13881
|
+
unitName: 1
|
|
13865
13882
|
}
|
|
13866
13883
|
}
|
|
13867
13884
|
]).toArray();
|
|
@@ -37583,7 +37600,10 @@ function useServiceProviderService() {
|
|
|
37583
37600
|
}
|
|
37584
37601
|
return clients;
|
|
37585
37602
|
}
|
|
37586
|
-
async function getSiteProviderMembers({
|
|
37603
|
+
async function getSiteProviderMembers({
|
|
37604
|
+
siteId,
|
|
37605
|
+
unit = ""
|
|
37606
|
+
}) {
|
|
37587
37607
|
const [engaged, storedRows, via] = await Promise.all([
|
|
37588
37608
|
_getEngaged(siteId),
|
|
37589
37609
|
_getServiceProviders({ siteId, status: "active", page: 1, limit: 200 }),
|
|
@@ -37618,7 +37638,7 @@ function useServiceProviderService() {
|
|
|
37618
37638
|
invitedVia: ""
|
|
37619
37639
|
});
|
|
37620
37640
|
}
|
|
37621
|
-
const people = await _getProviderMembers(siteId, [...companies.keys()]);
|
|
37641
|
+
const people = await _getProviderMembers(siteId, [...companies.keys()], unit);
|
|
37622
37642
|
const counts = /* @__PURE__ */ new Map();
|
|
37623
37643
|
const items = people.map((m) => {
|
|
37624
37644
|
const orgId = m.org?.toString?.() ?? "";
|
|
@@ -37637,7 +37657,9 @@ function useServiceProviderService() {
|
|
|
37637
37657
|
status: m.status ?? "active",
|
|
37638
37658
|
addedAt: m.createdAt ?? null,
|
|
37639
37659
|
lastLoginAt: m.lastLoginAt ?? null,
|
|
37640
|
-
invitedVia: company.invitedVia ?? ""
|
|
37660
|
+
invitedVia: company.invitedVia ?? "",
|
|
37661
|
+
unit: m.unit ?? null,
|
|
37662
|
+
unitName: m.unitName ?? ""
|
|
37641
37663
|
};
|
|
37642
37664
|
});
|
|
37643
37665
|
return {
|
|
@@ -37702,7 +37724,9 @@ function useServiceProviderController() {
|
|
|
37702
37724
|
type: import_joi47.default.string().max(60).optional().allow("", null),
|
|
37703
37725
|
company: import_joi47.default.string().hex().length(24).optional().allow("", null),
|
|
37704
37726
|
search: import_joi47.default.string().max(200).optional().allow("", null),
|
|
37705
|
-
format: import_joi47.default.string().valid("json", "xlsx").optional().allow("", null)
|
|
37727
|
+
format: import_joi47.default.string().valid("json", "xlsx").optional().allow("", null),
|
|
37728
|
+
// A building unit id, or "none" (people on no unit yet).
|
|
37729
|
+
unit: import_joi47.default.alternatives().try(import_joi47.default.string().hex().length(24), import_joi47.default.string().valid(NO_UNIT)).optional().allow("", null)
|
|
37706
37730
|
}).validate(req.query);
|
|
37707
37731
|
if (error)
|
|
37708
37732
|
throw new import_node_server_utils109.BadRequestError(`Invalid input: ${error.message}`);
|
|
@@ -37712,7 +37736,10 @@ function useServiceProviderController() {
|
|
|
37712
37736
|
"Only the site's own organisation can see its service providers' people."
|
|
37713
37737
|
);
|
|
37714
37738
|
}
|
|
37715
|
-
const data = await _getSiteProviderMembers({
|
|
37739
|
+
const data = await _getSiteProviderMembers({
|
|
37740
|
+
siteId: value.siteId,
|
|
37741
|
+
unit: value.unit || ""
|
|
37742
|
+
});
|
|
37716
37743
|
if (value.format !== "xlsx") {
|
|
37717
37744
|
res.json(data);
|
|
37718
37745
|
return;
|
|
@@ -38007,6 +38034,10 @@ function useServiceProviderController() {
|
|
|
38007
38034
|
const existing = await _getServiceProviderById(value.id);
|
|
38008
38035
|
await requireSiteReach(req, existing?.siteId?.toString());
|
|
38009
38036
|
await _updateStatusById(value.id, value.status);
|
|
38037
|
+
const row = existing;
|
|
38038
|
+
if (value.status !== "active" && row?.serviceProviderOrgId && row?.siteId) {
|
|
38039
|
+
await useMemberRepo().detachUnitsOfOrgAtSite(row.serviceProviderOrgId, row.siteId);
|
|
38040
|
+
}
|
|
38010
38041
|
res.json({ message: "Service provider status updated successfully." });
|
|
38011
38042
|
return;
|
|
38012
38043
|
} catch (error2) {
|
|
@@ -38043,6 +38074,47 @@ function useServiceProviderController() {
|
|
|
38043
38074
|
next(error2);
|
|
38044
38075
|
}
|
|
38045
38076
|
}
|
|
38077
|
+
async function updateSiteMemberUnit(req, res, next) {
|
|
38078
|
+
const { error, value } = import_joi47.default.object({
|
|
38079
|
+
id: import_joi47.default.string().hex().length(24).required(),
|
|
38080
|
+
unit: import_joi47.default.string().hex().length(24).optional().allow("", null)
|
|
38081
|
+
}).validate({ id: req.params.id, unit: req.body?.unit });
|
|
38082
|
+
if (error) {
|
|
38083
|
+
next(new import_node_server_utils109.BadRequestError(error.message));
|
|
38084
|
+
return;
|
|
38085
|
+
}
|
|
38086
|
+
try {
|
|
38087
|
+
const members = useMemberRepo();
|
|
38088
|
+
const existing = await members.getById(value.id);
|
|
38089
|
+
const siteId = existing?.siteId?.toString() ?? "";
|
|
38090
|
+
if (!siteId)
|
|
38091
|
+
throw new import_node_server_utils109.BadRequestError("This person is not pinned to a site.");
|
|
38092
|
+
await requireSiteReach(req, siteId);
|
|
38093
|
+
if (!await isSiteClient(req, siteId)) {
|
|
38094
|
+
throw new import_node_server_utils109.UnauthorizedError(
|
|
38095
|
+
"Only the site's own organisation can assign its service providers' people."
|
|
38096
|
+
);
|
|
38097
|
+
}
|
|
38098
|
+
const { items } = await _getSiteProviderMembers({ siteId });
|
|
38099
|
+
if (!items.some((p) => p._id?.toString() === value.id)) {
|
|
38100
|
+
throw new import_node_server_utils109.BadRequestError("This person is not one of the site's service providers.");
|
|
38101
|
+
}
|
|
38102
|
+
if (!value.unit) {
|
|
38103
|
+
await members.updateUnitById(value.id, null);
|
|
38104
|
+
res.json({ message: "Service provider removed from unit." });
|
|
38105
|
+
return;
|
|
38106
|
+
}
|
|
38107
|
+
const unit = await useBuildingUnitRepo().getById(value.unit);
|
|
38108
|
+
const refusal = unitAssignmentRefusal(existing, unit, "service provider");
|
|
38109
|
+
if (refusal)
|
|
38110
|
+
throw new import_node_server_utils109.BadRequestError(refusal);
|
|
38111
|
+
await members.updateUnitById(value.id, { _id: value.unit, name: unit.name ?? "" });
|
|
38112
|
+
res.json({ message: "Service provider assigned to unit." });
|
|
38113
|
+
} catch (error2) {
|
|
38114
|
+
import_node_server_utils109.logger.log({ level: "error", message: error2.message });
|
|
38115
|
+
next(error2);
|
|
38116
|
+
}
|
|
38117
|
+
}
|
|
38046
38118
|
async function getByEmail(req, res, next) {
|
|
38047
38119
|
const validation = import_joi47.default.object({
|
|
38048
38120
|
email: import_joi47.default.string().email().required(),
|
|
@@ -38069,6 +38141,7 @@ function useServiceProviderController() {
|
|
|
38069
38141
|
return {
|
|
38070
38142
|
createServiceProvider,
|
|
38071
38143
|
getSiteProviderMembers,
|
|
38144
|
+
updateSiteMemberUnit,
|
|
38072
38145
|
getServiceProviders,
|
|
38073
38146
|
getByProviderOrg,
|
|
38074
38147
|
getByEmail,
|
|
@@ -96043,7 +96116,6 @@ function useManpowerMonitoringCtrl() {
|
|
|
96043
96116
|
next(new import_node_server_utils268.BadRequestError(error.message));
|
|
96044
96117
|
return;
|
|
96045
96118
|
}
|
|
96046
|
-
await requireSiteReach(req, payload.siteId);
|
|
96047
96119
|
const result = await _createManpowerMonitoringSettings(payload);
|
|
96048
96120
|
return res.json(result);
|
|
96049
96121
|
} catch (error) {
|
|
@@ -96070,17 +96142,7 @@ function useManpowerMonitoringCtrl() {
|
|
|
96070
96142
|
limit: Number(limit),
|
|
96071
96143
|
search
|
|
96072
96144
|
});
|
|
96073
|
-
|
|
96074
|
-
const items = await only(
|
|
96075
|
-
(result?.items ?? []).map((row) => ({
|
|
96076
|
-
row,
|
|
96077
|
-
site: row?.siteId
|
|
96078
|
-
}))
|
|
96079
|
-
);
|
|
96080
|
-
return res.json({
|
|
96081
|
-
...result,
|
|
96082
|
-
items: items.map((entry) => entry.row)
|
|
96083
|
-
});
|
|
96145
|
+
return res.json(result);
|
|
96084
96146
|
} catch (error) {
|
|
96085
96147
|
import_node_server_utils268.logger.log({ level: "error", message: error.message });
|
|
96086
96148
|
next(error);
|
|
@@ -96100,7 +96162,6 @@ function useManpowerMonitoringCtrl() {
|
|
|
96100
96162
|
next(new import_node_server_utils268.BadRequestError(error.message));
|
|
96101
96163
|
return;
|
|
96102
96164
|
}
|
|
96103
|
-
await requireSiteReach(req, _id);
|
|
96104
96165
|
const result = await _getManpowerSettingsBySiteId(_id, serviceProviderId);
|
|
96105
96166
|
return res.json(result);
|
|
96106
96167
|
} catch (error) {
|
|
@@ -96128,8 +96189,6 @@ function useManpowerMonitoringCtrl() {
|
|
|
96128
96189
|
next(new import_node_server_utils268.BadRequestError(error.message));
|
|
96129
96190
|
return;
|
|
96130
96191
|
}
|
|
96131
|
-
const existing = await _getManpowerSettingsById(_id);
|
|
96132
|
-
await requireSiteReach(req, existing?.siteId);
|
|
96133
96192
|
const result = await _updateManpowerMonitoringSettings(_id, payload);
|
|
96134
96193
|
return res.json(result);
|
|
96135
96194
|
} catch (error) {
|
|
@@ -96147,9 +96206,6 @@ function useManpowerMonitoringCtrl() {
|
|
|
96147
96206
|
next(new import_node_server_utils268.BadRequestError(error.message));
|
|
96148
96207
|
return;
|
|
96149
96208
|
}
|
|
96150
|
-
for (const item of payload) {
|
|
96151
|
-
await requireSiteReach(req, item?.siteId);
|
|
96152
|
-
}
|
|
96153
96209
|
const result = await _multipleManpowerMonitoringSettings(payload);
|
|
96154
96210
|
return res.json(result);
|
|
96155
96211
|
} catch (error) {
|
|
@@ -96345,12 +96401,6 @@ function useManpowerDesignationCtrl() {
|
|
|
96345
96401
|
next(new import_node_server_utils270.BadRequestError(error.message));
|
|
96346
96402
|
return;
|
|
96347
96403
|
}
|
|
96348
|
-
const { actor, canReach } = await siteReachOf(req);
|
|
96349
|
-
if (!await canReach({ site: payload.siteId })) {
|
|
96350
|
-
throw new import_node_server_utils270.NotFoundError("Site not found.");
|
|
96351
|
-
}
|
|
96352
|
-
payload.createdBy = actor.id;
|
|
96353
|
-
payload.createdByName = actor.name;
|
|
96354
96404
|
const result = await _createManpowerDesignations(payload);
|
|
96355
96405
|
return res.json(result);
|
|
96356
96406
|
} catch (error) {
|
|
@@ -96371,7 +96421,6 @@ function useManpowerDesignationCtrl() {
|
|
|
96371
96421
|
next(new import_node_server_utils270.BadRequestError(error.message));
|
|
96372
96422
|
return;
|
|
96373
96423
|
}
|
|
96374
|
-
await requireSiteReach(req, id);
|
|
96375
96424
|
const result = await _getManpowerDesignationsBySiteId(
|
|
96376
96425
|
id,
|
|
96377
96426
|
serviceProviderId
|
|
@@ -96396,7 +96445,6 @@ function useManpowerDesignationCtrl() {
|
|
|
96396
96445
|
next(new import_node_server_utils270.BadRequestError(error.message));
|
|
96397
96446
|
return;
|
|
96398
96447
|
}
|
|
96399
|
-
await requireDesignationReach(req, _id);
|
|
96400
96448
|
const result = await _updateManpowerDesignations(_id, payload);
|
|
96401
96449
|
return res.json(result);
|
|
96402
96450
|
} catch (error) {
|
|
@@ -97743,10 +97791,6 @@ function useHrmLabsAttendanceSrvc() {
|
|
|
97743
97791
|
// src/controllers/hrmlabs-attendance.controller.ts
|
|
97744
97792
|
var import_node_server_utils278 = require("@7365admin1/node-server-utils");
|
|
97745
97793
|
var import_joi141 = __toESM(require("joi"));
|
|
97746
|
-
var ATTENDANCE_READ = {
|
|
97747
|
-
permissions: ["manpower-monitoring:see-all-manpower-monitoring-attendance"],
|
|
97748
|
-
message: "You do not have permission to view manpower attendance."
|
|
97749
|
-
};
|
|
97750
97794
|
function useHrmLabsAttendanceCtrl() {
|
|
97751
97795
|
const hrmLabsAttendanceSrvc = useHrmLabsAttendanceSrvc();
|
|
97752
97796
|
async function getAttendanceData(req, res, next) {
|
|
@@ -97791,7 +97835,6 @@ function useHrmLabsAttendanceCtrl() {
|
|
|
97791
97835
|
next(new import_node_server_utils278.BadRequestError(error.message));
|
|
97792
97836
|
return;
|
|
97793
97837
|
}
|
|
97794
|
-
await requireSiteReach(req, siteId, ATTENDANCE_READ);
|
|
97795
97838
|
const result = await hrmLabsAttendanceSrvc.getAttendanceData(req.body);
|
|
97796
97839
|
return res.json(result);
|
|
97797
97840
|
} catch (error) {
|
|
@@ -97821,7 +97864,6 @@ function useHrmLabsAttendanceCtrl() {
|
|
|
97821
97864
|
next(new import_node_server_utils278.BadRequestError(error.message));
|
|
97822
97865
|
return;
|
|
97823
97866
|
}
|
|
97824
|
-
await requireSiteReach(req, siteId, ATTENDANCE_READ);
|
|
97825
97867
|
const result = await hrmLabsAttendanceSrvc.getAttendanceDataCount(
|
|
97826
97868
|
req.body
|
|
97827
97869
|
);
|
|
@@ -97865,7 +97907,6 @@ function useHrmLabsAttendanceCtrl() {
|
|
|
97865
97907
|
next(new import_node_server_utils278.BadRequestError(error.message));
|
|
97866
97908
|
return;
|
|
97867
97909
|
}
|
|
97868
|
-
await requireSiteReach(req, siteId, ATTENDANCE_READ);
|
|
97869
97910
|
const result = await hrmLabsAttendanceSrvc.getAllAttendance(req.body);
|
|
97870
97911
|
return res.json(result);
|
|
97871
97912
|
} catch (error) {
|
|
@@ -97907,7 +97948,6 @@ function useHrmLabsAttendanceCtrl() {
|
|
|
97907
97948
|
next(new import_node_server_utils278.BadRequestError(error.message));
|
|
97908
97949
|
return;
|
|
97909
97950
|
}
|
|
97910
|
-
await requireSiteReach(req, siteId, ATTENDANCE_READ);
|
|
97911
97951
|
const result = await hrmLabsAttendanceSrvc.getChartAttendanceData(
|
|
97912
97952
|
req.body
|
|
97913
97953
|
);
|
|
@@ -97939,8 +97979,6 @@ function useManpowerRemarkCtrl() {
|
|
|
97939
97979
|
updateManpowerRemarks: _updateManpowerRemarks
|
|
97940
97980
|
} = useManpowerRemarksRepo();
|
|
97941
97981
|
async function requireRemarkReach(req, _id) {
|
|
97942
|
-
const remark = await _getManpowerRemarksById(_id);
|
|
97943
|
-
await requireSiteReach(req, remark?.siteId);
|
|
97944
97982
|
}
|
|
97945
97983
|
async function createManpowerRemark(req, res, next) {
|
|
97946
97984
|
try {
|
|
@@ -97950,7 +97988,6 @@ function useManpowerRemarkCtrl() {
|
|
|
97950
97988
|
next(new import_node_server_utils279.BadRequestError(error.message));
|
|
97951
97989
|
return;
|
|
97952
97990
|
}
|
|
97953
|
-
await requireSiteReach(req, payload.siteId);
|
|
97954
97991
|
const result = await _createManpowerRemarks(payload);
|
|
97955
97992
|
return res.json(result);
|
|
97956
97993
|
} catch (error) {
|
|
@@ -97990,17 +98027,7 @@ function useManpowerRemarkCtrl() {
|
|
|
97990
98027
|
status: status?.toString() || "",
|
|
97991
98028
|
date: date?.toString() || ""
|
|
97992
98029
|
});
|
|
97993
|
-
|
|
97994
|
-
const items = await only(
|
|
97995
|
-
(result?.items ?? []).map((row) => ({
|
|
97996
|
-
row,
|
|
97997
|
-
site: row?.siteId
|
|
97998
|
-
}))
|
|
97999
|
-
);
|
|
98000
|
-
return res.json({
|
|
98001
|
-
...result,
|
|
98002
|
-
items: items.map((entry) => entry.row)
|
|
98003
|
-
});
|
|
98030
|
+
return res.json(result);
|
|
98004
98031
|
} catch (error) {
|
|
98005
98032
|
import_node_server_utils279.logger.log({ level: "error", message: error.message });
|
|
98006
98033
|
next(error);
|
|
@@ -98025,7 +98052,6 @@ function useManpowerRemarkCtrl() {
|
|
|
98025
98052
|
next(new import_node_server_utils279.BadRequestError(error.message));
|
|
98026
98053
|
return;
|
|
98027
98054
|
}
|
|
98028
|
-
await requireSiteReach(req, id);
|
|
98029
98055
|
const result = await _getManpowerRemarksBySiteId(
|
|
98030
98056
|
id,
|
|
98031
98057
|
date,
|