⚠ Коллизия
');
- for (const pIdx of partnerIdxs!) {
- const p = bookings[pIdx]!;
- const pLabel = p.brand || p.company_name || 'Без названия';
- tt.push(`
${esc(pLabel)} ${fmtDate(p.start_date)} – ${fmtDate(p.end_date)}
`);
- }
+ const datesRow = `
📅${fmtDate(bk.start_date)} – ${fmtDate(bk.end_date)}${dur ? ' · ' + esc(dur) : ''}
`;
+ let tooltipHtml: string;
+ if (!flags.managerView) {
+ // Anonymous tier: date range only — no title, task №, status or Planfix hint.
+ tooltipHtml = `
${datesRow}
`;
+ } else {
+ const title = brand || company || 'Без названия';
+ const managers = (bk.manager || []).filter(Boolean).join(', ');
+ const tt: string[] = [];
+ tt.push('
');
+ tt.push(`${esc(title)}`);
+ if (bk.task_id) tt.push(`№${esc(bk.task_id)}`);
tt.push('
');
+ if (brand && company) tt.push(`
${esc(company)}
`);
+ tt.push('
');
+ tt.push(datesRow);
+ if (bk.task_status) tt.push(`
${esc(bk.task_status)}
`);
+ if (managers) tt.push(`
👤${esc(managers)}
`);
+ if (isCollision) {
+ tt.push('
⚠ Коллизия
');
+ for (const pIdx of partnerIdxs!) {
+ const p = bookings[pIdx]!;
+ const pLabel = p.brand || p.company_name || 'Без названия';
+ tt.push(`
${esc(pLabel)} ${fmtDate(p.start_date)} – ${fmtDate(p.end_date)}
`);
+ }
+ tt.push('
');
+ }
+ tt.push('
↗ Клик — открыть в ПланФикс
');
+ tooltipHtml = `
${tt.join('')}
`;
}
- tt.push('
↗ Клик — открыть в ПланФикс
');
- const tooltipHtml = `
${tt.join('')}
`;
return {
id: bk.board_id + '__' + idx,