Skip to content

fix: amm-2368 item to store mapping issue#148

Merged
vishwab1 merged 1 commit into
release-3.8.2from
sn/itemMap
Jul 1, 2026
Merged

fix: amm-2368 item to store mapping issue#148
vishwab1 merged 1 commit into
release-3.8.2from
sn/itemMap

Conversation

@snehar-nd

@snehar-nd snehar-nd commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

📋 Description

JIRA ID:

AMM-2368

✅ Type of Change

  • 🐞 Bug fix (non-breaking change which resolves an issue)

ℹ️ Additional Information

bufferarray was not appending the new data.

Summary by CodeRabbit

  • Bug Fixes
    • Improved inventory item-to-store mapping updates so changes are applied more reliably.
    • Added safer add/remove behavior for rows and nested items, helping the interface refresh consistently after edits.
    • Reduced the risk of stale or inconsistent table data when modifying mappings.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0312e9ed-5410-408b-9572-d01a5115a8f5

📥 Commits

Reviewing files that changed from the base of the PR and between fafb4ee and 274b6ea.

📒 Files selected for processing (1)
  • src/app/app-provider-admin/provider-admin/inventory/item-to-store-mapping/item-to-store-mapping.component.ts

📝 Walkthrough

Walkthrough

In ItemToStoreMappingComponent, buffer array update logic was changed to avoid in-place mutation of bufferarray.data. addtoBufferArray, removeRow, and removeItem now operate on copies of the array and reassign the result, including conditional row removal when nested itemID1 becomes empty.

Changes

Buffer Array Immutability

Layer / File(s) Summary
Copy-based buffer array updates
src/app/app-provider-admin/provider-admin/inventory/item-to-store-mapping/item-to-store-mapping.component.ts
addtoBufferArray uses spread-based reassignment instead of push; removeRow and removeItem copy bufferarray.data, splice/remove entries, conditionally remove empty rows, and reassign the copy.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 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 clearly references the item-to-store mapping bug fix addressed by this change.
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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: dependency version conflict. Check your lock file or package.json.


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.

@sonarqubecloud

sonarqubecloud Bot commented Jul 1, 2026

Copy link
Copy Markdown

@snehar-nd
snehar-nd changed the base branch from main to release-3.8.2 July 1, 2026 11:45
@vishwab1
vishwab1 merged commit 3b586dd into release-3.8.2 Jul 1, 2026
5 checks passed
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