rez_core 3.1.197 → 3.1.199
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/module/mapper/service/mapper.service.js +6 -4
- package/dist/module/mapper/service/mapper.service.js.map +1 -1
- package/dist/module/notification/service/otp.service.js +8 -2
- package/dist/module/notification/service/otp.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/mapper/service/mapper.service.ts +10 -5
- package/src/module/notification/service/otp.service.ts +9 -2
package/package.json
CHANGED
|
@@ -22,10 +22,8 @@ export class MapperService extends EntityServiceImpl {
|
|
|
22
22
|
const mappers = await this.dataSource.query(
|
|
23
23
|
`SELECT id, name, code, status
|
|
24
24
|
FROM cr_mapper_master
|
|
25
|
-
WHERE mapped_entity_type = ? AND (-1 = ? OR name LIKE ? OR code LIKE ?)
|
|
26
|
-
|
|
27
|
-
`,
|
|
28
|
-
[mappedEntityType, filter || -1, `%${filter}%`, `%${filter}%`, status || -1, status],
|
|
25
|
+
WHERE mapped_entity_type = ? AND (-1 = ? OR name LIKE ? OR code LIKE ?)`,
|
|
26
|
+
[mappedEntityType, filter || -1, `%${filter}%`, `%${filter}%`],
|
|
29
27
|
);
|
|
30
28
|
|
|
31
29
|
const distinctStatuses = [
|
|
@@ -46,13 +44,20 @@ export class MapperService extends EntityServiceImpl {
|
|
|
46
44
|
|
|
47
45
|
// map status names to mappers
|
|
48
46
|
|
|
49
|
-
|
|
47
|
+
let mappersResolved = mappers.map((m) => ({
|
|
50
48
|
id: m.id,
|
|
51
49
|
label: m.name,
|
|
52
50
|
value: m.id,
|
|
53
51
|
code: m.code,
|
|
54
52
|
status: statusMap.get(m.status) || null,
|
|
55
53
|
}));
|
|
54
|
+
|
|
55
|
+
if (status) {
|
|
56
|
+
mappersResolved = mappersResolved.filter(
|
|
57
|
+
(m) => m.status && m.status.toLowerCase() === status.toLowerCase(),
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
return mappersResolved;
|
|
56
61
|
}
|
|
57
62
|
|
|
58
63
|
async deleteEntity(entityType: string, entityId: number, loggedInUser) {
|
|
@@ -70,12 +70,19 @@ export class OtpService {
|
|
|
70
70
|
// Find OTP entity by ID
|
|
71
71
|
const otpEntity = await this.findByOtpId(otp_id);
|
|
72
72
|
if (!otpEntity) {
|
|
73
|
-
throw new BadRequestException('OTP not found!');
|
|
73
|
+
// throw new BadRequestException('OTP not found!');
|
|
74
|
+
return {
|
|
75
|
+
sucess: false,
|
|
76
|
+
message: 'OTP not found!',
|
|
77
|
+
};
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
// Validate the identifier against the OTP entity
|
|
77
81
|
if (otpEntity.identifier !== identifier) {
|
|
78
|
-
|
|
82
|
+
return {
|
|
83
|
+
sucess: false,
|
|
84
|
+
message: 'Invalid OTP identifier!',
|
|
85
|
+
};
|
|
79
86
|
}
|
|
80
87
|
|
|
81
88
|
// OTP validation logic
|