36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
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',
|
||
],
|
||
};
|