rez_core 3.1.25 → 3.1.26
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.
|
@@ -85,13 +85,13 @@ let StageGroupRepository = class StageGroupRepository {
|
|
|
85
85
|
const meetingCounts = await this.dataSource.query(`
|
|
86
86
|
SELECT stage_id, COUNT(*) AS meeting_count
|
|
87
87
|
FROM crm_lead_meeting
|
|
88
|
-
WHERE stage_id IN (${stageIds.map(() => '?').join(',')}) AND
|
|
88
|
+
WHERE stage_id IN (${stageIds.map(() => '?').join(',')}) AND mapped_entity_id = ?
|
|
89
89
|
GROUP BY stage_id
|
|
90
90
|
`, [...stageIds, lead_id]);
|
|
91
91
|
const sendCommCounts = await this.dataSource.query(`
|
|
92
92
|
SELECT stage_id, COUNT(*) AS send_comm_count
|
|
93
93
|
FROM crm_lead_communication
|
|
94
|
-
WHERE stage_id IN (${stageIds.map(() => '?').join(',')}) AND
|
|
94
|
+
WHERE stage_id IN (${stageIds.map(() => '?').join(',')}) AND mapped_entity_id = ?
|
|
95
95
|
AND type IN ('SEND', 'LOG')
|
|
96
96
|
GROUP BY stage_id
|
|
97
97
|
`, [...stageIds, lead_id]);
|