Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix(sales): improve deal document printing - #8827

#8827
Open
Khuslen122 wants to merge 2 commits into
mainerxes/erxes:mainfrom
fix/sales-print-preview-performanceerxes/erxes:fix/sales-print-preview-performanceCopy head branch name to clipboard
Open

fix(sales): improve deal document printing#8827
Khuslen122 wants to merge 2 commits into
mainerxes/erxes:mainfrom
fix/sales-print-preview-performanceerxes/erxes:fix/sales-print-preview-performanceCopy head branch name to clipboard

Conversation

@Khuslen122

@Khuslen122 Khuslen122 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary by Sourcery

Improve sales deal document printing UX and backend processing for generating deal-based documents.

New Features:

  • Add a deal selection table with record-style UI and document picker when printing deals.
  • Support printing processed HTML documents via the PROCESS_DOCUMENT API with configurable paper size, copies, and branch/department context.

Bug Fixes:

  • Ensure deal document printing handles missing data and failures gracefully, including popup blocking, empty documents, and absent deals.
  • Correct resolution of related customers and companies when deal relations are missing but can be inferred from associated entities.

Enhancements:

  • Redesign the deal print dialog into a side sheet with modern form controls, loading states, and inline validation.
  • Improve backend deal document generation by parallelizing per-deal content replacement with bounded concurrency.
  • Optimize deal-related data fetching by running stage, users, labels, customers, companies, and product enrichment queries in parallel and reusing field metadata across products.

Summary by CodeRabbit

  • New Features
    • Added a redesigned deal printing flow with client-side print preparation, document selection, print settings, deal selection, and processing progress feedback.
    • Added English and Mongolian validation text prompting users to select at least one deal before printing.
  • Bug Fixes
    • Enhanced handling for blocked popups, missing selections/content, and print timeout/error scenarios.
  • Performance
    • Improved speed of document generation and deal processing by reducing repeated lookups and processing matched deals with bounded concurrency.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @Khuslen122, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@sourcery-ai

sourcery-ai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Reviewer's Guide

Frontend reimplements the deal print dialog to use a modern Sheet UI, server-side document processing via GraphQL, and a richer table selection; backend optimizes deal document generation with concurrent IO, shared field metadata fetching, and concurrency-limited replacement, improving robustness and performance for printing deal documents.

Sequence diagram for the updated deal print workflow

sequenceDiagram
  actor User
  participant PrintDialog
  participant Apollo as Apollo_useLazyQuery
  participant SalesAPI as sales_api_PROCESS_DOCUMENT
  participant PrintWindow

  User->>PrintDialog: Open PrintDialog
  PrintDialog->>PrintDialog: useDeals(stageId, limit=DEALS_LIMIT)
  User->>PrintDialog: Submit form (copies, width, brandId, branchId, departmentId, documentId)
  PrintDialog->>PrintDialog: print()
  alt missing documentId or selectedDealIds
    PrintDialog->>PrintDialog: toast(error)
  else valid form
    PrintDialog->>PrintWindow: window.open()
    PrintDialog->>PrintWindow: showPrintLoading()
    PrintDialog->>Apollo: processDocument(PROCESS_DOCUMENT)
    Apollo-->>SalesAPI: PROCESS_DOCUMENT query
    SalesAPI-->>Apollo: documentsProcess HTML
    alt html missing
      PrintDialog->>PrintWindow: close()
      PrintDialog->>PrintDialog: toast(print-document-failed)
    else html present
      PrintDialog->>PrintWindow: printHtml(html, title, width)
      PrintWindow->>PrintWindow: buildPrintReadyHtml()
      PrintWindow->>PrintWindow: waitForPrintDocument()
      PrintWindow->>PrintWindow: waitForPrintContent()
      PrintWindow->>PrintWindow: print()
      PrintWindow->>PrintWindow: close() after afterprint
    end
  end
Loading

File-Level Changes

Change Details Files
Modernized deal print dialog to use server-driven HTML generation and a richer deal selection UI.
  • Replaced legacy Dialog/Table-based print UI with a Sheet-based layout, updated form fields, and integrated react-hook-form typed values.
  • Integrated Apollo useLazyQuery with the PROCESS_DOCUMENT GraphQL query to fetch print-ready HTML instead of constructing a REST URL.
  • Added client-side helpers to wrap raw HTML into print-ready pages, open a dedicated print window with a loading state, and handle images/fonts readiness before triggering print.
  • Replaced checkbox table with RecordTable-based deal listing and selection, including a selection counter and loading/empty states.
  • Added validation and error toasts for missing document, missing deal selection, and blocked popups, and wired the print button to show a spinner while processing.
frontend/plugins/sales_ui/src/modules/deals/boards/components/common/Print.tsx
Parallelized and optimized deal document replacer data fetching and content generation on the backend.
  • Introduced a generic mapWithConcurrency helper and DOCUMENT_PROCESS_CONCURRENCY limit to bound concurrent processing of deals in replaceDealContent.
  • Refactored buildDealReplacer to fetch stage/pipeline/board, assigned users, labels, customer IDs, company IDs, products, customers, and companies in parallel, with sensible fallbacks when related IDs are missing.
  • Consolidated customer/company enrichment to compute attrMap customers/companies and primary customer contact fields after parallel fetches.
  • Updated replaceDealContent to use mapWithConcurrency instead of a sequential loop and to return early without logging when no content or deals are provided.
backend/plugins/sales_api/src/modules/sales/documents/dealContent.ts
Deduplicated and batched field metadata fetching for product properties in generateProducts.
  • Collected unique property field IDs from all products before the main loop and fetched their field definitions once via TRPC.
  • Cached fields in a Map for O(1) lookup when enriching each product's properties with field text and data.
  • Ensured field text falls back to an empty string when undefined to avoid undefined values in properties.
backend/plugins/sales_api/src/modules/sales/utils.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR parallelizes deal document enrichment and replacement, batches product field lookups, and replaces the sales deal print dialog with a Sheet-based workflow that processes selected deals and prints generated HTML.

Changes

Deal document processing and printing

Layer / File(s) Summary
Parallel document enrichment
backend/plugins/sales_api/src/modules/sales/documents/dealContent.ts, backend/plugins/sales_api/src/modules/sales/utils.ts
Deal attributes and product properties are gathered with parallel promises and batched field queries.
Concurrent deal replacement
backend/plugins/sales_api/src/modules/sales/documents/dealContent.ts
Matched deals are processed with bounded concurrency while preserving result ordering.
Deal print dialog and browser printing
frontend/plugins/sales_ui/src/modules/deals/boards/components/common/Print.tsx, backend/gateway/src/locales/en/sales.json, backend/gateway/src/locales/mn/sales.json
The print UI uses deal-table selection, document processing, print-window resource handling, validation, loading states, and new locale messages.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PrintDialog
  participant PrintDealsRecordTable
  participant PROCESS_DOCUMENT
  participant PrintWindow
  PrintDialog->>PrintDealsRecordTable: Read selected deal IDs
  PrintDialog->>PROCESS_DOCUMENT: Submit document ID, replacer IDs, and print config
  PROCESS_DOCUMENT-->>PrintDialog: Return generated HTML
  PrintDialog->>PrintWindow: Load prepared HTML and wait for resources
  PrintWindow-->>PrintDialog: Reach complete state
  PrintDialog->>PrintWindow: Trigger print
Loading

Possibly related PRs

  • erxes/erxes#8336: Updates overlapping deal document customer/company ID fallback logic.
  • erxes/erxes#8585: Updates the overlapping sales UI print component and its translation calls.

Suggested reviewers: uuganaa1007

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: improving sales deal document printing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sales-print-preview-performance

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (3)
frontend/plugins/sales_ui/src/modules/deals/boards/components/common/Print.tsx (3)

636-645: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Numeric inputs can't be cleared while typing.

Number.parseInt('') || 1 coerces an empty field back to 1 (or the default width) on every keystroke that empties it, so users can't delete-and-retype. Keeping the raw string in the field and coercing on submit avoids this.

Also applies to: 659-669

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@frontend/plugins/sales_ui/src/modules/deals/boards/components/common/Print.tsx`
around lines 636 - 645, Update the numeric inputs in the Print component’s field
handlers to preserve the raw event.target.value, including an empty string,
during editing instead of immediately applying Number.parseInt with a fallback.
Move numeric coercion and the minimum/default-width handling to the submit or
final-value processing path for both affected inputs.

289-323: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

No timeout when waiting for images/fonts.

waitForPrintDocument has PRINT_DOCUMENT_LOAD_TIMEOUT, but this wait can stall indefinitely if an image or font never settles, leaving the popup stuck on the loading screen with no way to recover. Race it against the same timeout.

♻️ Proposed timeout race
-  await Promise.all([
-    printWindow.document.fonts?.ready ?? Promise.resolve(),
-    ...pendingImages,
-  ]);
+  await Promise.race([
+    Promise.all([
+      printWindow.document.fonts?.ready ?? Promise.resolve(),
+      ...pendingImages,
+    ]),
+    new Promise<void>((resolve) =>
+      window.setTimeout(resolve, PRINT_DOCUMENT_LOAD_TIMEOUT),
+    ),
+  ]);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@frontend/plugins/sales_ui/src/modules/deals/boards/components/common/Print.tsx`
around lines 289 - 323, Update waitForPrintContent to race the combined
font-readiness, image-settling, and animation-frame wait against the existing
PRINT_DOCUMENT_LOAD_TIMEOUT used by waitForPrintDocument. Ensure the timeout
rejects or otherwise aborts the wait so a never-settling image or font cannot
leave the print popup loading indefinitely, while preserving normal completion
when all resources settle in time.

25-28: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

Prefer root-barrel imports for shared library constants.

The constants exist under frontend/libs/ui-modules/src/modules/documents/constants/index.ts, but the shared library is typically consumed via root imports; re-export PAPER_SIZES/PAPER_TYPES from ui-modules so Module Federation path mappings and consumers use the stable shared package entry.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@frontend/plugins/sales_ui/src/modules/deals/boards/components/common/Print.tsx`
around lines 25 - 28, Re-export PAPER_SIZES and PAPER_TYPES from the ui-modules
root barrel, then update the Print.tsx import to consume both constants from
ui-modules instead of the nested documents/constants path. Preserve the existing
constant usage and remove the deep shared-library import.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@frontend/plugins/sales_ui/src/modules/deals/boards/components/common/Print.tsx`:
- Line 512: Reset selectedDealIds whenever the sheet’s open state or stageId
changes, including the fixed tableId RecordTable selection so stale rows cannot
persist across close/reopen or stage changes. Update the effect or lifecycle
logic surrounding selectedDealIds and the RecordTable configuration while
preserving selection during an unchanged open stage.
- Around line 492-499: The useDeals call in Print should account for stages
containing more than DEALS_LIMIT deals instead of silently presenting
deals.length as the complete set. Add pagination to load all deals, or expose a
clear truncation indicator near the selected/deals.length counter when the limit
is reached; keep the existing behavior for stages within the limit.
- Around line 365-372: Replace the Blob URL navigation in the print flow with
rendering the generated HTML through a tightly sandboxed iframe using srcdoc,
allowing only the minimal capability needed for printing (such as allow-modals).
Update the surrounding print readiness flow to wait for the sandboxed document,
and ensure untrusted values passed through buildPrintReadyHtml are escaped or
sanitized before insertion.

---

Nitpick comments:
In
`@frontend/plugins/sales_ui/src/modules/deals/boards/components/common/Print.tsx`:
- Around line 636-645: Update the numeric inputs in the Print component’s field
handlers to preserve the raw event.target.value, including an empty string,
during editing instead of immediately applying Number.parseInt with a fallback.
Move numeric coercion and the minimum/default-width handling to the submit or
final-value processing path for both affected inputs.
- Around line 289-323: Update waitForPrintContent to race the combined
font-readiness, image-settling, and animation-frame wait against the existing
PRINT_DOCUMENT_LOAD_TIMEOUT used by waitForPrintDocument. Ensure the timeout
rejects or otherwise aborts the wait so a never-settling image or font cannot
leave the print popup loading indefinitely, while preserving normal completion
when all resources settle in time.
- Around line 25-28: Re-export PAPER_SIZES and PAPER_TYPES from the ui-modules
root barrel, then update the Print.tsx import to consume both constants from
ui-modules instead of the nested documents/constants path. Preserve the existing
constant usage and remove the deep shared-library import.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7d068329-8aa7-4776-9cff-bb9ee57dc821

📥 Commits

Reviewing files that changed from the base of the PR and between 5dbc81d and b39faac.

📒 Files selected for processing (5)
  • backend/gateway/src/locales/en/sales.json
  • backend/gateway/src/locales/mn/sales.json
  • backend/plugins/sales_api/src/modules/sales/documents/dealContent.ts
  • backend/plugins/sales_api/src/modules/sales/utils.ts
  • frontend/plugins/sales_ui/src/modules/deals/boards/components/common/Print.tsx

Comment on lines +365 to +372
const printReadyHtml = buildPrintReadyHtml(html, width);
const printUrl = URL.createObjectURL(
new Blob([printReadyHtml], { type: 'text/html;charset=utf-8' }),
);

try {
printWindow.location.replace(printUrl);
await waitForPrintDocument(printWindow, printUrl, errorMessage);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Inspect how documentsProcess builds the returned HTML and whether values are escaped
fd -t f 'prepareContent*' -x cat -n {} \;
rg -n 'prepareContent' -g '!**/node_modules/**' -C3

Repository: erxes/erxes

Length of output: 2031


Render the printable HTML in a tightly sandboxed iframe.

Blob URLs adopt the opener page’s origin, so <script> or event-handler markup in the printable HTML runs with access to the app origin. opener = null does not change that behavior. Render the document into srcdoc with a restrictive sandbox (for example, allow-modals only, or the minimal allowed set) and avoid passing untrusted attribute values through buildPrintReadyHtml without escaping/sanitization.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@frontend/plugins/sales_ui/src/modules/deals/boards/components/common/Print.tsx`
around lines 365 - 372, Replace the Blob URL navigation in the print flow with
rendering the generated HTML through a tightly sandboxed iframe using srcdoc,
allowing only the minimal capability needed for printing (such as allow-modals).
Update the surrounding print readiness flow to wait for the sandboxed document,
and ensure untrusted values passed through buildPrintReadyHtml are escaped or
sanitized before insertion.

Comment on lines +492 to 499
const { deals = [], loading } = useDeals({
variables: {
stageId,
limit: DEALS_LIMIT,
},
skip: !open,
fetchPolicy: 'network-only',
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Deals beyond DEALS_LIMIT are silently dropped.

The stage may hold more than 100 deals, yet the counter renders selected/deals.length as if it were the full set. Consider surfacing the truncation (e.g. a "showing first 100" hint) or paginating.

Also applies to: 749-755

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@frontend/plugins/sales_ui/src/modules/deals/boards/components/common/Print.tsx`
around lines 492 - 499, The useDeals call in Print should account for stages
containing more than DEALS_LIMIT deals instead of silently presenting
deals.length as the complete set. Add pagination to load all deals, or expose a
clear truncation indicator near the selected/deals.length counter when the limit
is reached; keep the existing behavior for stages within the limit.

},
});

const [selectedDealIds, setSelectedDealIds] = useState<string[]>([]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

selectedDealIds is never reset when the sheet closes or stageId changes.

The state (and the RecordTable row selection keyed by the fixed tableId) survives close/reopen, so reopening on a different stage can submit replacerIds for deals that aren't in the current list. Clear the selection when open or stageId changes.

🐛 Proposed reset
   const [selectedDealIds, setSelectedDealIds] = useState<string[]>([]);
+
+  useEffect(() => {
+    setSelectedDealIds([]);
+  }, [open, stageId]);

Also applies to: 600-608

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@frontend/plugins/sales_ui/src/modules/deals/boards/components/common/Print.tsx`
at line 512, Reset selectedDealIds whenever the sheet’s open state or stageId
changes, including the fixed tableId RecordTable selection so stale rows cannot
persist across close/reopen or stage changes. Update the effect or lifecycle
logic surrounding selectedDealIds and the RecordTable configuration while
preserving selection during an unchanged open stage.

@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
backend/plugins/sales_api/src/modules/sales/documents/dealContent.ts (2)

12-12: 🚀 Performance & Scalability | 🔵 Trivial

Verify downstream capacity for the new concurrency level.

DOCUMENT_PROCESS_CONCURRENCY = 8 limits deals, but each buildDealReplacer starts several TRPC/database operations in parallel. The effective downstream fan-out can therefore be much higher than eight; please validate this against core-service and database capacity, or use a shared/configurable limiter if needed.

Also applies to: 181-195

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/plugins/sales_api/src/modules/sales/documents/dealContent.ts` at line
12, Review DOCUMENT_PROCESS_CONCURRENCY together with buildDealReplacer’s
parallel TRPC/database work and validate the resulting downstream fan-out
against core-service and database capacity. If eight concurrent deals exceed
capacity, replace the fixed limit with the existing shared or configurable
limiter, ensuring the effective operation concurrency is bounded.

456-502: 📐 Maintainability & Code Quality | 🔵 Trivial

Preserve observability for empty and no-match returns.

Replacing the previous console warnings with silent early returns can make invalid deal IDs or malformed content difficult to diagnose. Retain a structured debug log or metric for these cases without restoring noisy console.warn calls.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/plugins/sales_api/src/modules/sales/documents/dealContent.ts` around
lines 456 - 502, Preserve structured observability in the early-return paths
surrounding deal lookup and content validation: add or retain a debug log or
metric when replacerIds are empty or no deals match. Update the relevant
deal-processing function without restoring console.warn calls, and keep both
existing return [] behaviors unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@backend/plugins/sales_api/src/modules/sales/documents/dealContent.ts`:
- Line 12: Review DOCUMENT_PROCESS_CONCURRENCY together with buildDealReplacer’s
parallel TRPC/database work and validate the resulting downstream fan-out
against core-service and database capacity. If eight concurrent deals exceed
capacity, replace the fixed limit with the existing shared or configurable
limiter, ensuring the effective operation concurrency is bounded.
- Around line 456-502: Preserve structured observability in the early-return
paths surrounding deal lookup and content validation: add or retain a debug log
or metric when replacerIds are empty or no deals match. Update the relevant
deal-processing function without restoring console.warn calls, and keep both
existing return [] behaviors unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 387e3996-0aa1-47ad-affd-8dc7b782be14

📥 Commits

Reviewing files that changed from the base of the PR and between b39faac and 8a156a5.

📒 Files selected for processing (2)
  • backend/plugins/sales_api/src/modules/sales/documents/dealContent.ts
  • frontend/plugins/sales_ui/src/modules/deals/boards/components/common/Print.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/plugins/sales_ui/src/modules/deals/boards/components/common/Print.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.