-
Notifications
You must be signed in to change notification settings - Fork 16
fix: amm-2061 admin work location mapping issue fixed #123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
π WalkthroughWalkthroughA click event handler on an edit block selection option is replaced with an onSelectionChange handler that includes a guard condition ( Changes
Estimated code review effortπ― 1 (Trivial) | β±οΈ ~3 minutes Poem
π₯ Pre-merge checks | β 3β Passed checks (3 passed)
βοΈ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
π§Ή Nitpick comments (1)
src/app/app-provider-admin/provider-admin/activities/work-location-mapping/work-location-mapping.component.html (1)
736-738: Good fix for preventing programmatic updates, but consider consolidating logic.The
$event.isUserInputguard correctly preventssetUpdatedBlockNamefrom being called during programmatic selection changes, which addresses the bug. However, this splits the block selection logic between themat-select(line 729) and individualmat-optionelements.β»οΈ Optional refactor to consolidate logic on mat-select
Consider moving the block name capture to the mat-select's
selectionChangehandler to centralize the logic:At line 729, update the mat-select handler:
- (selectionChange)="getEditVillageMaster(ServiceEditblock)" + (selectionChange)=" + getEditVillageMaster(ServiceEditblock); + setUpdatedBlockName( + editblocks.find(b => b.blockID === ServiceEditblock)?.blockName + ) + "Then remove the
onSelectionChangefrom mat-option:<mat-option *ngFor="let item of editblocks" [value]="item.blockID" - (onSelectionChange)=" - $event.isUserInput && setUpdatedBlockName(item.blockName) - " >This centralizes selection handling and eliminates the need for the
isUserInputguard since mat-select'sselectionChangeonly fires for actual value changes.
π Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
π Files selected for processing (1)
src/app/app-provider-admin/provider-admin/activities/work-location-mapping/work-location-mapping.component.html
π§° Additional context used
π§ Learnings (1)
π Learning: 2024-11-25T11:01:28.621Z
Learnt from: devikasuresh20
Repo: PSMRI/ADMIN-UI PR: 50
File: src/app/app-provider-admin/provider-admin/activities/work-location-mapping/work-location-mapping.component.ts:1981-1981
Timestamp: 2024-11-25T11:01:28.621Z
Learning: In the `filterComponentList` method of `WorkLocationMappingComponent` in `src/app/app-provider-admin/provider-admin/activities/work-location-mapping/work-location-mapping.component.ts`, retain the manual filtering implementation as it provides better control over the filtering logic.
Applied to files:
src/app/app-provider-admin/provider-admin/activities/work-location-mapping/work-location-mapping.component.html



π Description
JIRA ID: amm-2061
admin work location mapping issue fixed
β Type of Change
Summary by CodeRabbit
βοΈ Tip: You can customize this high-level summary in your review settings.