Визуализатор: «роль - Имя» в подсказках собирается из справочника, ключ справочника - обычный
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -72,25 +72,25 @@ describe("каноническая длительность", () => {
|
||||
describe("справочник ответственных", () => {
|
||||
const raw = {
|
||||
process: [
|
||||
{ id: "CP-0", responsible: "architect - RIOS", responsible2: "arch_permit_lead - Андрей", data_out1: "Plan" },
|
||||
{ id: "S-1", responsible: "pm - PM" },
|
||||
{ id: "CP-0", responsible: "architect", responsible2: "arch_permit_lead", data_out1: "Plan" },
|
||||
{ id: "S-1", responsible: "pm" },
|
||||
{ id: "S-2" },
|
||||
],
|
||||
refs: [
|
||||
{ id: "architect - RIOS", role: "architect", person: "RIOS", comment: null },
|
||||
{ id: "arch_permit_lead - Андрей", role: "arch_permit_lead", person: "Андрей", comment: "уточнить" },
|
||||
{ id: "specs_client_mgr - Austin", role: "specs_client_mgr", person: "Austin", comment: null },
|
||||
{ id: "specs_client_mgr - Маша", role: "specs_client_mgr", person: "Маша", comment: "делит с Austin" },
|
||||
{ id: "pm - PM", role: "pm", person: "PM", comment: null },
|
||||
{ id: "architect", role: "architect", person: "RIOS", comment: null },
|
||||
{ id: "arch_permit_lead", role: "arch_permit_lead", person: "Андрей", comment: "уточнить" },
|
||||
{ id: "specs_client_mgr", role: "specs_client_mgr", person: "Austin", comment: null },
|
||||
{ id: "specs_client_mgr_2", role: "specs_client_mgr", person: "Маша", comment: "делит с Austin" },
|
||||
{ id: "pm", role: "pm", person: "PM", comment: null },
|
||||
],
|
||||
legacyRoles: false,
|
||||
systems: [],
|
||||
data: [{ id: "Plan", data_description: "План", responsible: "architect - RIOS", comment: null }],
|
||||
data: [{ id: "Plan", data_description: "План", responsible: "architect", comment: null }],
|
||||
};
|
||||
it("колонки responsible, responsible2, responsible3 дают список ключей, роль берётся у первого", () => {
|
||||
const m = buildModel("khbuild", raw);
|
||||
expect(m.rows[0]).toMatchObject({ responsible: ["architect - RIOS", "arch_permit_lead - Андрей"], role: "architect", responsibleName: "RIOS; Андрей" });
|
||||
expect(m.rows[1]).toMatchObject({ responsible: ["pm - PM"], role: "pm" });
|
||||
expect(m.rows[0]).toMatchObject({ responsible: ["architect", "arch_permit_lead"], role: "architect", responsibleName: "RIOS; Андрей" });
|
||||
expect(m.rows[1]).toMatchObject({ responsible: ["pm"], role: "pm" });
|
||||
expect(m.rows[2]).toMatchObject({ responsible: [], role: null });
|
||||
expect(describeResponsible(m.rows[0]!, m)).toBe("architect - RIOS; arch_permit_lead - Андрей");
|
||||
expect(describeResponsible(m.rows[2]!, m)).toBe("не указан");
|
||||
@@ -176,8 +176,8 @@ describe("computeSchedule", () => {
|
||||
const model: ProcessModel = {
|
||||
set: "khbuild",
|
||||
responsible: [
|
||||
{ id: "architect - RIOS", role: "architect", person: "RIOS", comment: null },
|
||||
{ id: "pm - PM", role: "pm", person: "PM", comment: "кто именно?" },
|
||||
{ id: "architect", role: "architect", person: "RIOS", comment: null },
|
||||
{ id: "pm", role: "pm", person: "PM", comment: "кто именно?" },
|
||||
],
|
||||
roles: [
|
||||
{ id: "architect", person: "RIOS", comment: null },
|
||||
|
||||
Reference in New Issue
Block a user