rez_core 2.2.162 → 2.2.164
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/user/controller/login.controller.d.ts +1 -1
- package/dist/module/user/controller/login.controller.js +2 -10
- package/dist/module/user/controller/login.controller.js.map +1 -1
- package/dist/module/workflow/repository/stage-group.repository.js +2 -2
- package/dist/module/workflow/service/workflow-meta.service.js +9 -9
- package/dist/module/workflow/service/workflow-meta.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/user/controller/login.controller.ts +6 -10
- package/src/module/workflow/repository/stage-group.repository.ts +2 -2
- package/src/module/workflow/service/workflow-meta.service.ts +13 -14
package/package.json
CHANGED
|
@@ -92,17 +92,13 @@ export class LoginController {
|
|
|
92
92
|
actualState,
|
|
93
93
|
);
|
|
94
94
|
|
|
95
|
-
return res.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
hubId: result.hubId,
|
|
99
|
-
configId: result.configId,
|
|
100
|
-
});
|
|
95
|
+
return res.redirect(
|
|
96
|
+
`${this.configService.get('BASE_URL')}`,
|
|
97
|
+
);
|
|
101
98
|
} catch (error) {
|
|
102
|
-
return res.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
});
|
|
99
|
+
return res.redirect(
|
|
100
|
+
`${this.configService.get('BASE_URL')}`,
|
|
101
|
+
);
|
|
106
102
|
}
|
|
107
103
|
}
|
|
108
104
|
|
|
@@ -110,7 +110,7 @@ export class StageGroupRepository {
|
|
|
110
110
|
const meetingCounts = await this.dataSource.query(
|
|
111
111
|
`
|
|
112
112
|
SELECT stage_id, COUNT(*) AS meeting_count
|
|
113
|
-
FROM
|
|
113
|
+
FROM crm_lead_meeting
|
|
114
114
|
WHERE stage_id IN (${stageIds.map(() => '?').join(',')}) AND lead_id = ?
|
|
115
115
|
GROUP BY stage_id
|
|
116
116
|
`,
|
|
@@ -121,7 +121,7 @@ export class StageGroupRepository {
|
|
|
121
121
|
const sendCommCounts = await this.dataSource.query(
|
|
122
122
|
`
|
|
123
123
|
SELECT stage_id, COUNT(*) AS send_comm_count
|
|
124
|
-
FROM
|
|
124
|
+
FROM crm_lead_communication
|
|
125
125
|
WHERE stage_id IN (${stageIds.map(() => '?').join(',')}) AND lead_id = ?
|
|
126
126
|
AND type IN ('SEND', 'LOG')
|
|
127
127
|
GROUP BY stage_id
|
|
@@ -124,6 +124,18 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
124
124
|
loggedInUser,
|
|
125
125
|
);
|
|
126
126
|
|
|
127
|
+
await this.taskService.createSystemNote(
|
|
128
|
+
{
|
|
129
|
+
reason_code: reason_code || '',
|
|
130
|
+
remark: remark || '',
|
|
131
|
+
mapped_entity_id,
|
|
132
|
+
stage_id: currentStage.stage_id,
|
|
133
|
+
action_id: currentStage.action_id,
|
|
134
|
+
stage_group_id: currentStage.stage_group_id,
|
|
135
|
+
},
|
|
136
|
+
loggedInUser,
|
|
137
|
+
);
|
|
138
|
+
|
|
127
139
|
// Case 1: First stage – initialize
|
|
128
140
|
if (!currentStage) {
|
|
129
141
|
const getAllResult = await this.getFirstStage(
|
|
@@ -235,7 +247,6 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
235
247
|
error?.message || error,
|
|
236
248
|
);
|
|
237
249
|
}
|
|
238
|
-
|
|
239
250
|
return `Moved to next stage (Stage ID: ${nextStage.id}).`;
|
|
240
251
|
}
|
|
241
252
|
|
|
@@ -244,18 +255,6 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
244
255
|
currentStage.is_current = 'N';
|
|
245
256
|
await this.stageMovementRepo.save(currentStage);
|
|
246
257
|
|
|
247
|
-
await this.taskService.createSystemNote(
|
|
248
|
-
{
|
|
249
|
-
reason_code: reason_code || '',
|
|
250
|
-
remark: remark || '',
|
|
251
|
-
mapped_entity_id,
|
|
252
|
-
stage_id: currentStage.stage_id,
|
|
253
|
-
action_id: currentStage.action_id,
|
|
254
|
-
stage_group_id: currentStage.stage_group_id,
|
|
255
|
-
},
|
|
256
|
-
loggedInUser,
|
|
257
|
-
);
|
|
258
|
-
|
|
259
258
|
return 'Workflow completed. No next stage available.';
|
|
260
259
|
}
|
|
261
260
|
|
|
@@ -387,7 +386,7 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
387
386
|
);
|
|
388
387
|
|
|
389
388
|
await this.dataSource.query(
|
|
390
|
-
`UPDATE
|
|
389
|
+
`UPDATE crm_lead_meeting SET user_id=?
|
|
391
390
|
WHERE stage_id = ?
|
|
392
391
|
AND lead_id = ?
|
|
393
392
|
AND (status='scheduled' OR status='rescheduled')
|