Skip to content

COMOPT-736 bundles support#7

Merged
rossbrandon merged 4 commits intomainfrom
COMOPT-736-bundles-support
Oct 13, 2025
Merged

COMOPT-736 bundles support#7
rossbrandon merged 4 commits intomainfrom
COMOPT-736-bundles-support

Conversation

@lcabornero
Copy link
Copy Markdown
Contributor

No description provided.

@lcabornero lcabornero requested a review from a team as a code owner October 10, 2025 10:37
* @param {{ id: string; name: string; quantity: number }[]} bundledProducts - Array of bundled product objects
* @returns {object[]} Array of bundle group objects for ACO
*/
function buildAcoBundles(bundledProducts) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: use const arrow functions instead of the function syntax. Right now this file has a mix of both and we should standardize.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Standarized to const


/**
* Transforms a Salesforce product to an ACO product.
* Builds the bundles array for an ACO parent bundle product.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like the comment for transformProduct was removed during this update. Can you add it back?

}

// Handle parent bundle product (type BUNDLE) using correct bundles array structure
if (product.type === 'BUNDLE' && Array.isArray(product.bundledProducts) && product.bundledProducts.length > 0) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: you can just do this:

if (product.type === 'BUNDLE' && product.bundledProducts?.length)

@rossbrandon rossbrandon merged commit 5dcfc52 into main Oct 13, 2025
2 checks passed
@rossbrandon rossbrandon deleted the COMOPT-736-bundles-support branch October 13, 2025 15:41
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.

2 participants