rename: کاریز فروش → مسیر فروش, کاریز پروژه → تابلوی پروژه
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -502,7 +502,7 @@ export class DealsExcelService {
|
||||
}
|
||||
|
||||
/**
|
||||
* مراحل پیشفرض سیستم (سرنخ، تماس اول، …) که خالی ماندهاند از کاریزهای واردشده حذف میشوند
|
||||
* مراحل پیشفرض سیستم (سرنخ، تماس اول، …) که خالی ماندهاند از مسیرهای فروش واردشده حذف میشوند
|
||||
* تا فقط مراحل خود فایل دیده شوند.
|
||||
*/
|
||||
private async removeUnusedDefaultStages(organizationId: string, pipelineIds: Set<string>) {
|
||||
@@ -634,7 +634,8 @@ export class DealsExcelService {
|
||||
status: DealStatus,
|
||||
ctx: RowContext,
|
||||
) {
|
||||
const name = pipelineName?.trim() || 'کاریز فروش';
|
||||
const rawName = pipelineName?.trim();
|
||||
const name = !rawName || rawName === 'کاریز فروش' ? 'مسیر فروش' : rawName;
|
||||
const cacheKey = name.toLowerCase();
|
||||
let pipeline = ctx.pipelines.get(cacheKey);
|
||||
if (!pipeline) {
|
||||
@@ -677,7 +678,7 @@ export class DealsExcelService {
|
||||
}
|
||||
const added = await this.pipelines.createStage(organizationId, pipeline.id, wanted);
|
||||
const stage = added.stages.find((s) => s.name === wanted) ?? added.stages.at(-1);
|
||||
if (!stage) throw new Error('کاریز مرحلهای ندارد');
|
||||
if (!stage) throw new Error('مسیر فروش مرحلهای ندارد');
|
||||
pipeline.stages = added.stages.map((s) => ({
|
||||
id: s.id,
|
||||
name: s.name,
|
||||
@@ -688,7 +689,7 @@ export class DealsExcelService {
|
||||
}
|
||||
|
||||
const stage = byStatusExisting ?? pipeline.stages[0];
|
||||
if (!stage) throw new Error('کاریز مرحلهای ندارد');
|
||||
if (!stage) throw new Error('مسیر فروش مرحلهای ندارد');
|
||||
return { pipelineId: pipeline.id, stageId: stage.id, pipelineName: pipeline.name };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user