различные доработки
This commit is contained in:
@@ -19,7 +19,7 @@ export function detectExecutorKind(step: {
|
||||
|
||||
export interface StepExecutorDisplay {
|
||||
primary: string;
|
||||
/** Email под ФИО — только когда исполнитель задан конкретным сотрудником и тот найден в справочнике. */
|
||||
/** Должность и email под ФИО — когда исполнитель задан конкретным сотрудником и тот найден в справочнике. */
|
||||
secondary?: string;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,10 @@ export interface StepExecutorDisplay {
|
||||
export function describeStepExecutor(step: TemplateRouteStep, employees: Employee[]): StepExecutorDisplay {
|
||||
if (step.executorEmail) {
|
||||
const employee = findEmployeeByEmail(employees, step.executorEmail ?? undefined);
|
||||
return employee ? { primary: employee.fio, secondary: employee.email } : { primary: step.executorEmail };
|
||||
if (!employee) return { primary: step.executorEmail };
|
||||
// Должность рядом с email: по одному ФИО не видно, тот ли это человек, что
|
||||
// задумывался при настройке маршрута (в справочнике есть однофамильцы).
|
||||
return { primary: employee.fio, secondary: [employee.position, employee.email].filter(Boolean).join(' · ') };
|
||||
}
|
||||
if (step.position) return { primary: step.position };
|
||||
if (step.projectRole && step.projectRole !== ProjectRole.None) {
|
||||
|
||||
Reference in New Issue
Block a user