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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "2.2.162",
3
+ "version": "2.2.164",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -92,17 +92,13 @@ export class LoginController {
92
92
  actualState,
93
93
  );
94
94
 
95
- return res.status(200).json({
96
- success: true,
97
- message: 'Gmail configuration saved successfully',
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.status(500).json({
103
- success: false,
104
- error: error.message,
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 cr_lead_meeting
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 cr_lead_communication
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 cr_lead_meeting SET user_id=?
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')