feat(leads): edit lead-board columns from the board
New-lead counts follow the first open column instead of its name, and cards no longer show an initials mark. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -979,8 +979,10 @@ export class LeadsService {
|
||||
const stages = await this.stages.list(actor.organizationId);
|
||||
const convertedIds = stages.filter((s) => s.isConverted).map((s) => s.id);
|
||||
const lostIds = stages.filter((s) => s.isLost).map((s) => s.id);
|
||||
const interested = stages.find((s) => s.name.includes('علاقهمند'));
|
||||
const newStage = stages.find((s) => s.name === 'جدید');
|
||||
// همان مقصد فرم و ورود از اکسل: اولین ستون باز، مستقل از اسم «جدید»
|
||||
const newStage = stages.find(
|
||||
(s) => !s.isConverted && !s.isLost && !s.isUnqualified,
|
||||
);
|
||||
|
||||
const [
|
||||
total,
|
||||
@@ -988,7 +990,6 @@ export class LeadsService {
|
||||
unassigned,
|
||||
converted,
|
||||
lost,
|
||||
interestedCount,
|
||||
withFollowUp,
|
||||
callsLogged,
|
||||
byAssigneeRaw,
|
||||
@@ -1008,11 +1009,6 @@ export class LeadsService {
|
||||
where: { ...base, stageId: { in: lostIds } },
|
||||
})
|
||||
: Promise.resolve(0),
|
||||
interested
|
||||
? this.prisma.lead.count({
|
||||
where: { ...base, stageId: interested.id },
|
||||
})
|
||||
: Promise.resolve(0),
|
||||
this.prisma.lead.count({
|
||||
where: { ...base, nextFollowUpAt: { not: null } },
|
||||
}),
|
||||
@@ -1055,7 +1051,7 @@ export class LeadsService {
|
||||
.sort((a, b) => b.count - a.count),
|
||||
callsLogged,
|
||||
withFollowUp,
|
||||
interested: interestedCount,
|
||||
interested: 0,
|
||||
converted,
|
||||
lost,
|
||||
conversionRate: Math.round((converted / denom) * 1000) / 10,
|
||||
|
||||
Reference in New Issue
Block a user