MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / updateReportAnnotationToolbar

Function updateReportAnnotationToolbar

deployments/desktop/static/desktop.js:2853–2878  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2851 "success",
2852 ui().papers.markedAs(labels[action]),
2853 ui().papers.dispositionHelp
2854 );
2855 }
2856
2857 function itemCount(value) {
2858 return Array.isArray(value) ? value.length : 0;
2859 }
2860
2861 function submitResultMessage(data, generateReports) {
2862 const feedback = data.feedback || data || {};
2863 const selectedCount = itemCount(feedback.selected_numbers);
2864 const skippedCount = itemCount(feedback.skipped_numbers);
2865 const laterCount = itemCount(feedback.later_numbers);
2866 const totalFeedback = selectedCount + skippedCount + laterCount;
2867 const reportCount = Number(data.reports?.count || data.reports?.created_docs?.length || 0);
2868 const wikiBackfilled = Number(data.reports?.wiki_backfilled || 0);
2869 const feishuWarning = data.reports?.feishu_warning || "";
2870
2871 if (!totalFeedback && !reportCount) {
2872 return {
2873 type: "warning",
2874 title: ui().papers.emptyFeedbackTitle,
2875 detail: ui().papers.emptyFeedbackDetail
2876 };
2877 }
2878
2879 const title = generateReports
2880 ? reportCount
2881 ? ui().papers.submittedWithReports(reportCount)

Callers

nothing calls this directly

Calls 2

$Function · 0.70

Tested by

no test coverage detected