bitrix_task_control/src/reports/completed/index.ts

36 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import type { ReportPlugin } from '../types';
import { buildCompletedTasksReport } from './main';
import { notifyCompletedTasks } from './notifyFilialHead';
import { notifySalesDepartmentHead } from './notifySalesHead';
export const completedPlugin: ReportPlugin = {
id: 'completed',
menuTitle: '6️⃣ ✅ Завершенные задачи',
menuItems: [
{ label: '📈 Сформировать отчет', functionName: 'buildCompletedTasksReport' },
{ label: '👔 Отправить отчет рукфилу', functionName: 'notifyCompletedTasks' },
{ label: '👔 Отправить отчет РОПу', functionName: 'notifySalesDepartmentHead' },
],
handlers: {
buildCompletedTasksReport,
notifyCompletedTasks,
notifySalesDepartmentHead,
},
requiredConfigKeys: [
'SOURCE_SHEET_ID',
'EMAILS_SHEET_ID',
'ROLES_SHEET_ID',
'BACKUP_EMAILS_SPREADSHEET_ID',
'ORG_STRUCTURE_FILE_ID',
'DEPARTMENT_ID',
'DEFAULT_FILIAL_HEAD_NAME',
'BITRIX_PORTAL',
'BALANCER_URL',
],
requiredScriptProperties: [
'BALANCER_PUBLIC',
'BALANCER_SECRET',
'BITRIX_WEBHOOK_TASKS',
],
};