-
Notifications
You must be signed in to change notification settings - Fork 46
Payment verify bills #2710
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
base: console-impel-payment
Are you sure you want to change the base?
Payment verify bills #2710
Conversation
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the 📝 WalkthroughWalkthroughThis update introduces multiple new React components and pages to the health payments module, including interactive tables, pop-ups, and search forms for bill management, verification, and payment workflows. The routing is expanded to support these new features. Configuration and proxy settings are updated, and minor adjustments are made to UI text and request payloads. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI
participant API
participant Config
User->>UI: Navigates to Payments Module
UI->>Config: getConfig(key)
Config-->>UI: Returns config value
User->>UI: Interacts with Bill Table (e.g., select, edit, verify)
UI->>API: Fetches/updates bills, verifies, generates payments
API-->>UI: Returns bill/payment data
UI->>User: Shows tables, pop-ups, toasts, and feedback
sequenceDiagram
participant User
participant UploadAndFetchBillsCard
participant MyBills
participant Router
User->>UploadAndFetchBillsCard: Clicks "Fetch Bills"
UploadAndFetchBillsCard->>MyBills: Opens pop-up
User->>MyBills: Selects bills
MyBills-->>UploadAndFetchBillsCard: Returns selected bills
User->>UploadAndFetchBillsCard: Confirms selection
UploadAndFetchBillsCard->>Router: Navigates to verification with selected bill IDs
Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate Unit Tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 45
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (19)
health/micro-ui/web/micro-ui-internals/example/public/index.html
(2 hunks)health/micro-ui/web/micro-ui-internals/example/src/setupProxy.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/BillDetailsTable.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/MyBillsTable.js
(2 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/PaymentsCard.js
(2 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/Response.js
(2 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyAndGeneratePaymentsTable.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyBillsSearch.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/bill_inbox/BillInbox.js
(5 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/editWorkerDetailsPopUp .js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/sendForEditPopUp.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/bill_payment_details.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/fetch_bills.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/index.js
(2 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js
(5 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/upload_and_fetch_bills.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/verify_generate_payements.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/services/PaymentsInitialization.js
(1 hunks)health/micro-ui/web/public/index.html
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.js`: check
**/*.js
: check
⚙️ Source: CodeRabbit Configuration File
List of files the instruction was applied to:
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/PaymentsCard.js
health/micro-ui/web/micro-ui-internals/example/src/setupProxy.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/services/PaymentsInitialization.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/index.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/MyBillsTable.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/upload_and_fetch_bills.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyBillsSearch.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/fetch_bills.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyAndGeneratePaymentsTable.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/Response.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/editWorkerDetailsPopUp .js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/BillDetailsTable.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/verify_generate_payements.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/bill_payment_details.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/sendForEditPopUp.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/bill_inbox/BillInbox.js
🧠 Learnings (19)
📓 Common learnings
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/PaymentsCard.js (3)
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
health/micro-ui/web/micro-ui-internals/example/src/setupProxy.js (3)
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/services/PaymentsInitialization.js (4)
Learnt from: nitish-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `boundaryData` null check is performed at a higher level before calling the `getDataSheetReady` function in `utilities/project-factory/src/server/utils/genericUtils.ts`.
Learnt from: nitish-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: Validation for the presence of the `request` parameter in `autoGenerateBoundaryCodes` method of `dataManage.controller.ts` is handled at the entry level, making additional checks within the method unnecessary.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1925
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js:267-269
Timestamp: 2024-11-28T11:34:27.480Z
Learning: In the `downloadTemplate` function of `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js`, the scenario where `state?.hierarchyType` is undefined will not occur.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/index.js (8)
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1925
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js:267-269
Timestamp: 2024-11-28T11:34:27.480Z
Learning: In the `downloadTemplate` function of `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js`, the scenario where `state?.hierarchyType` is undefined will not occur.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2089
File: micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js:111-111
Timestamp: 2025-01-02T04:41:15.957Z
Learning: In micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js, always use "mdms[0].uniqueIdentifier" for the jsonPath instead of differentiating between "SOR" and other masters.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/LoginSignupSelector.js:24-24
Timestamp: 2025-06-26T09:43:00.597Z
Learning: In LoginSignupSelector component, the URL checking using window.location.href.includes("sandbox-ui/user/sign-up") is intentional for URL validation purposes, not navigation. The team prefers this approach over React Router's useLocation hook for specific URL checking needs.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:1-1
Timestamp: 2024-10-17T11:59:00.327Z
Learning: In `ActivityCard.js`, `React.Fragment` is used in the code.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/MyBillsTable.js (3)
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#1763
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/MyCampaign.js:65-75
Timestamp: 2024-11-07T07:17:27.636Z
Learning: In `MyCampaign.js`, when suggesting code improvements for the `onClickRow` function, keep suggestions simple and avoid unnecessary complexity.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/upload_and_fetch_bills.js (15)
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1925
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js:267-269
Timestamp: 2024-11-28T11:34:27.480Z
Learning: In the `downloadTemplate` function of `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js`, the scenario where `state?.hierarchyType` is undefined will not occur.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#204
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/Upload.js:468-481
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The error message in the `checkForErrorInUploadedFile` function within `Upload.js` is being localized and improved for better user experience, as clarified by the user.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:1-1
Timestamp: 2024-10-17T11:59:00.327Z
Learning: In `ActivityCard.js`, `React.Fragment` is used in the code.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1-1
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The imports in `MicroplanPreview.js` are from different libraries: `@egovernments/digit-ui-components` and `@egovernments/digit-ui-react-components`.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#204
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/Upload.js:0-0
Timestamp: 2024-10-08T20:11:12.539Z
Learning: A more detailed message for file parsing errors in the `Upload.js` file is displayed elsewhere in the code, as clarified by the user.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#204
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/Upload.js:0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: A more detailed message for file parsing errors in the `Upload.js` file is displayed elsewhere in the code, as clarified by the user.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The Button component from `@egovernments/digit-ui-components` has compatibility issues with the ActionBar, leading to the preference for using the Button from `@egovernments/digit-ui-react-components` in certain scenarios.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:30-35
Timestamp: 2024-10-17T12:00:51.749Z
Learning: In our codebase, the 'Card' component is commonly used by passing children via the 'children' prop.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-06-14T14:10:38.086Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#691
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Upload.js:16-17
Timestamp: 2024-10-08T20:11:12.539Z
Learning: The components `Loader`, `Toast`, and `Modal` are from different libraries in the DIGIT-Frontend project, as clarified by the user.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1832
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:592-594
Timestamp: 2024-11-14T12:48:23.023Z
Learning: In `PopInbox.js`, when integrating the `ConfirmationPopUp` component, error handling for API failures is managed internally within the component, so explicitly passing an `onError` prop is not necessary.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyBillsSearch.js (6)
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1-1
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The imports in `MicroplanPreview.js` are from different libraries: `@egovernments/digit-ui-components` and `@egovernments/digit-ui-react-components`.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:1-1
Timestamp: 2024-10-17T11:59:00.327Z
Learning: In `ActivityCard.js`, `React.Fragment` is used in the code.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/fetch_bills.js (5)
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2488
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js:152-152
Timestamp: 2025-06-04T04:08:48.234Z
Learning: In the employee login component (micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js), prefer using a `defaultTenant` variable to store `Digit.ULBService.getStateId()` instead of calling the function multiple times inline in the `defaultValue` object. This improves code readability and avoids function call duplication.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1-1
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The imports in `MicroplanPreview.js` are from different libraries: `@egovernments/digit-ui-components` and `@egovernments/digit-ui-react-components`.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyAndGeneratePaymentsTable.js (7)
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1-1
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The imports in `MicroplanPreview.js` are from different libraries: `@egovernments/digit-ui-components` and `@egovernments/digit-ui-react-components`.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-06-14T14:10:38.086Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1670
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccessMgmtTableWrapper.js:156-160
Timestamp: 2024-10-25T09:24:29.878Z
Learning: In the `UserAccessMgmtTableWrapper` component, since the `ShowMoreWrapper` is rendered within the cell, additional checks or row-specific state management are not required.
health/micro-ui/web/micro-ui-internals/example/public/index.html (16)
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js:3-39
Timestamp: 2024-06-14T14:10:20.359Z
Learning: The `CustomScaleControl` component in the `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js` file should not include a "loading map" message as there is another component handling this functionality to avoid redundancy.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: Tulika-eGov
PR: egovernments/DIGIT-Frontend#2288
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Landing/LandingComponent.js:18-24
Timestamp: 2025-03-25T10:47:42.433Z
Learning: In the DIGIT-Frontend project, commented-out code like `//config = defaultconfig;` is sometimes intentionally kept when it serves a development purpose, such as providing a way to quickly switch between configurations during local testing.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Otp/index.js:0-0
Timestamp: 2025-06-26T10:17:02.717Z
Learning: In the DIGIT Frontend project, banner images and similar configuration data should be managed through MDMS (Master Data Management Service) rather than hardcoded arrays or separate config files, as indicated by the user Hari-egov.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#478
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:80-99
Timestamp: 2024-10-08T20:11:12.539Z
Learning: Error handling for the `convertGeojsonToExcelSingleSheet` function in the `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` file is managed elsewhere in the codebase.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#478
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:80-99
Timestamp: 2024-06-10T19:25:42.992Z
Learning: Error handling for the `convertGeojsonToExcelSingleSheet` function in the `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` file is managed elsewhere in the codebase.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2488
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js:152-152
Timestamp: 2025-06-04T04:08:48.234Z
Learning: In the employee login component (micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js), prefer using a `defaultTenant` variable to store `Digit.ULBService.getStateId()` instead of calling the function multiple times inline in the `defaultValue` object. This improves code readability and avoids function call duplication.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/ProductDetails/ProductDetailsComponentUpdated.js:279-280
Timestamp: 2025-06-26T10:21:42.619Z
Learning: In the sandbox ProductDetailsComponentUpdated.js component, string concatenation is intentionally used for translation keys (e.g., `t(`${module}` + "_SECTION1_ROLE_1")`) instead of template literals for easier config identification and to make the key structure more explicit.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1-1
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The imports in `MicroplanPreview.js` are from different libraries: `@egovernments/digit-ui-components` and `@egovernments/digit-ui-react-components`.
Learnt from: Tulika-eGov
PR: egovernments/DIGIT-Frontend#2288
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Landing/LandingComponent.js:33-33
Timestamp: 2025-03-25T10:47:10.916Z
Learning: In DIGIT-Frontend, window.contextPath is dynamically determined and cannot be given a static fallback value like 'digit-ui'. The application relies on this dynamic context path for proper routing.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/ProductDetails/ProductDetailsComponentUpdated.js:326-345
Timestamp: 2025-06-26T10:38:13.794Z
Learning: In the DIGIT Frontend sandbox module, configuration data comes from MDMS (Master Data Management System) which provides reliable, well-structured data for UI components, reducing the likelihood of malformed configuration data that would require extensive error handling.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#691
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Upload.js:16-17
Timestamp: 2024-10-08T20:11:12.539Z
Learning: The components `Loader`, `Toast`, and `Modal` are from different libraries in the DIGIT-Frontend project, as clarified by the user.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The Button component from `@egovernments/digit-ui-components` has compatibility issues with the ActionBar, leading to the preference for using the Button from `@egovernments/digit-ui-react-components` in certain scenarios.
Learnt from: nabeelmd-eGov
PR: egovernments/DIGIT-Frontend#1680
File: health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js:1032-1094
Timestamp: 2024-10-26T15:11:49.938Z
Learning: In the DIGIT-Frontend project, when reviewing the `UICustomizations.js` file, avoid suggesting refactoring of repetitive rendering logic in switch cases into helper functions, unless explicitly requested.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/Response.js (5)
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The Button component from `@egovernments/digit-ui-components` has compatibility issues with the ActionBar, leading to the preference for using the Button from `@egovernments/digit-ui-react-components` in certain scenarios.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/LoginSignupSelector.js:24-24
Timestamp: 2025-06-26T09:43:00.597Z
Learning: In LoginSignupSelector component, the URL checking using window.location.href.includes("sandbox-ui/user/sign-up") is intentional for URL validation purposes, not navigation. The team prefers this approach over React Router's useLocation hook for specific URL checking needs.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1622
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/PopInboxTable.js:355-363
Timestamp: 2024-10-22T12:51:42.266Z
Learning: In `PopInboxTable.js`, the `showEditVillagePopup` state variable is initialized as an empty object.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/editWorkerDetailsPopUp .js (11)
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1622
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/PopInboxTable.js:355-363
Timestamp: 2024-10-22T12:51:42.266Z
Learning: In `PopInboxTable.js`, the `showEditVillagePopup` state variable is initialized as an empty object.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1837
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:559-561
Timestamp: 2024-11-15T10:15:57.369Z
Learning: In `PopInbox.js`, error handling for the `onError` callback in `WorkflowCommentPopUp` is handled within the component, so explicit error handling in the parent component is unnecessary.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1832
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:592-594
Timestamp: 2024-11-14T12:48:23.023Z
Learning: In `PopInbox.js`, when integrating the `ConfirmationPopUp` component, error handling for API failures is managed internally within the component, so explicitly passing an `onError` prop is not necessary.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-06-14T14:10:38.086Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js:3-39
Timestamp: 2024-06-14T14:10:20.359Z
Learning: The `CustomScaleControl` component in the `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js` file should not include a "loading map" message as there is another component handling this functionality to avoid redundancy.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:1-1
Timestamp: 2024-10-17T11:59:00.327Z
Learning: In `ActivityCard.js`, `React.Fragment` is used in the code.
Learnt from: Tulika-eGov
PR: egovernments/DIGIT-Frontend#2188
File: micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/employee/new-inbox.js:34-47
Timestamp: 2025-02-05T10:18:29.947Z
Learning: In the DIGIT-Frontend codebase, translations within FormComposer are handled internally by the component itself, so the translation function 't' does not need to be added to useMemo dependency arrays even when used within the memoized function that generates form configurations.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/BillDetailsTable.js (6)
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1-1
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The imports in `MicroplanPreview.js` are from different libraries: `@egovernments/digit-ui-components` and `@egovernments/digit-ui-react-components`.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-06-14T14:10:38.086Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/verify_generate_payements.js (8)
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1925
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js:267-269
Timestamp: 2024-11-28T11:34:27.480Z
Learning: In the `downloadTemplate` function of `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js`, the scenario where `state?.hierarchyType` is undefined will not occur.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2488
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js:152-152
Timestamp: 2025-06-04T04:08:48.234Z
Learning: In the employee login component (micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js), prefer using a `defaultTenant` variable to store `Digit.ULBService.getStateId()` instead of calling the function multiple times inline in the `defaultValue` object. This improves code readability and avoids function call duplication.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1-1
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The imports in `MicroplanPreview.js` are from different libraries: `@egovernments/digit-ui-components` and `@egovernments/digit-ui-react-components`.
Learnt from: nabeelmd-eGov
PR: egovernments/DIGIT-Frontend#1680
File: health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js:1032-1094
Timestamp: 2024-10-26T15:11:49.938Z
Learning: In the DIGIT-Frontend project, when reviewing the `UICustomizations.js` file, avoid suggesting refactoring of repetitive rendering logic in switch cases into helper functions, unless explicitly requested.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/bill_payment_details.js (6)
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2488
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js:152-152
Timestamp: 2025-06-04T04:08:48.234Z
Learning: In the employee login component (micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js), prefer using a `defaultTenant` variable to store `Digit.ULBService.getStateId()` instead of calling the function multiple times inline in the `defaultValue` object. This improves code readability and avoids function call duplication.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:1-1
Timestamp: 2024-10-17T11:59:00.327Z
Learning: In `ActivityCard.js`, `React.Fragment` is used in the code.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/sendForEditPopUp.js (12)
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1832
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:592-594
Timestamp: 2024-11-14T12:48:23.023Z
Learning: In `PopInbox.js`, when integrating the `ConfirmationPopUp` component, error handling for API failures is managed internally within the component, so explicitly passing an `onError` prop is not necessary.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1837
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:559-561
Timestamp: 2024-11-15T10:15:57.369Z
Learning: In `PopInbox.js`, error handling for the `onError` callback in `WorkflowCommentPopUp` is handled within the component, so explicit error handling in the parent component is unnecessary.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1622
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/PopInboxTable.js:355-363
Timestamp: 2024-10-22T12:51:42.266Z
Learning: In `PopInboxTable.js`, the `showEditVillagePopup` state variable is initialized as an empty object.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js:3-39
Timestamp: 2024-06-14T14:10:20.359Z
Learning: The `CustomScaleControl` component in the `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js` file should not include a "loading map" message as there is another component handling this functionality to avoid redundancy.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-06-14T14:10:38.086Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1-1
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The imports in `MicroplanPreview.js` are from different libraries: `@egovernments/digit-ui-components` and `@egovernments/digit-ui-react-components`.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1925
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js:267-269
Timestamp: 2024-11-28T11:34:27.480Z
Learning: In the `downloadTemplate` function of `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js`, the scenario where `state?.hierarchyType` is undefined will not occur.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:1-1
Timestamp: 2024-10-17T11:59:00.327Z
Learning: In `ActivityCard.js`, `React.Fragment` is used in the code.
Learnt from: Tulika-eGov
PR: egovernments/DIGIT-Frontend#2188
File: micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/employee/new-inbox.js:34-47
Timestamp: 2025-02-05T10:18:29.947Z
Learning: In the DIGIT-Frontend codebase, translations within FormComposer are handled internally by the component itself, so the translation function 't' does not need to be added to useMemo dependency arrays even when used within the memoized function that generates form configurations.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js (5)
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1847
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js:308-314
Timestamp: 2024-11-18T04:35:51.535Z
Learning: In `PlanInbox.js`, the variable `planWithCensus?.StatusCount[selectedFilter]` is always defined in the given context, so null checks are unnecessary.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:1-1
Timestamp: 2024-10-17T11:59:00.327Z
Learning: In `ActivityCard.js`, `React.Fragment` is used in the code.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/bill_inbox/BillInbox.js (5)
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1847
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js:308-314
Timestamp: 2024-11-18T04:35:51.535Z
Learning: In `PlanInbox.js`, the variable `planWithCensus?.StatusCount[selectedFilter]` is always defined in the given context, so null checks are unnecessary.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1622
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/PopInboxTable.js:355-363
Timestamp: 2024-10-22T12:51:42.266Z
Learning: In `PopInboxTable.js`, the `showEditVillagePopup` state variable is initialized as an empty object.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#720
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Nagivator.js:46-56
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The user prefers the `useEffect` hook to run only when `checkDataCompletion` changes in the `Navigator` component.
🧬 Code Graph Analysis (7)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/PaymentsCard.js (1)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/upload_and_fetch_bills.js (1)
ROLES
(11-14)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/MyBillsTable.js (3)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/BillDetailsTable.js (1)
handleSelectedRowsChange
(418-420)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js (1)
selectedCount
(31-31)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/bill_payment_details.js (1)
selectedRows
(33-33)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/upload_and_fetch_bills.js (1)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js (2)
useTranslation
(12-12)MyBills
(10-137)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyBillsSearch.js (2)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/verify_generate_payements.js (5)
useTranslation
(13-13)billID
(26-26)billStatus
(27-27)onSubmit
(213-216)onClear
(218-221)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyAndGeneratePaymentsTable.js (1)
useTranslation
(32-32)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/editWorkerDetailsPopUp .js (1)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/sendForEditPopUp.js (5)
useTranslation
(17-17)comment
(20-20)showToast
(21-21)handleSave
(30-54)handleKeyPress
(56-60)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/bill_payment_details.js (5)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js (6)
useTranslation
(12-12)currentPage
(27-27)rowsPerPage
(28-28)handlePageChange
(61-64)handlePerRowsChange
(66-70)project
(35-35)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/sendForEditPopUp.js (4)
useTranslation
(17-17)SendForEditPopUp
(15-130)comment
(20-20)selectedUser
(22-22)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/BillDetailsTable.js (6)
useTranslation
(26-26)handlePageChange
(398-400)handlePerRowsChange
(402-404)billDetails
(45-154)project
(29-29)BillDetailsTable
(25-481)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyAndGeneratePaymentsTable.js (6)
useTranslation
(32-32)handlePageChange
(593-595)handlePerRowsChange
(597-599)project
(35-35)updateBillDetailWorkflow
(84-125)updateBillDetailMutation
(81-83)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/utils/index.js (1)
formatTimestampToDate
(97-117)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js (2)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/upload_and_fetch_bills.js (1)
selectedBills
(32-32)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/MyBillsTable.js (3)
MyBillsTable
(21-236)handlePageChange
(189-191)handlePerRowsChange
(193-195)
🪛 Biome (1.9.4)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/upload_and_fetch_bills.js
[error] 121-129: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
[error] 130-141: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
[error] 158-165: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
[error] 166-174: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyBillsSearch.js
[error] 39-39: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.
Unsafe fix: Use a SelfClosingElement instead
(lint/style/useSelfClosingElements)
[error] 48-48: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.
Unsafe fix: Use a SelfClosingElement instead
(lint/style/useSelfClosingElements)
[error] 56-61: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.
Unsafe fix: Use a SelfClosingElement instead
(lint/style/useSelfClosingElements)
[error] 58-58: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
[error] 59-59: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/fetch_bills.js
[error] 52-52: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyAndGeneratePaymentsTable.js
[error] 354-354: Useless case clause.
because the default clause is present:
Unsafe fix: Remove the useless case.
(lint/complexity/noUselessSwitchCase)
[error] 355-355: Useless case clause.
because the default clause is present:
Unsafe fix: Remove the useless case.
(lint/complexity/noUselessSwitchCase)
[error] 370-379: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.
Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.
(lint/a11y/useKeyWithClickEvents)
[error] 519-519: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/Response.js
[error] 15-15: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
[error] 29-33: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/editWorkerDetailsPopUp .js
[error] 53-53: Avoid passing children using a prop
The canonical way to pass children in React is to use JSX elements
(lint/correctness/noChildrenProp)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/BillDetailsTable.js
[error] 227-229: Avoid using unnecessary Fragment.
A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.
Unsafe fix: Remove the Fragment
(lint/complexity/noUselessFragments)
[error] 290-292: Avoid using unnecessary Fragment.
A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.
Unsafe fix: Remove the Fragment
(lint/complexity/noUselessFragments)
[error] 342-342: Use Number.parseInt instead of the equivalent global.
ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.
(lint/style/useNumberNamespace)
[error] 343-343: Use Number.parseInt instead of the equivalent global.
ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.
(lint/style/useNumberNamespace)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/verify_generate_payements.js
[error] 60-60: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
[error] 116-116: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/bill_payment_details.js
[error] 127-127: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
[error] 165-165: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
[error] 187-187: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
[error] 215-215: Template literals are preferred over string concatenation.
Unsafe fix: Use a template literal.
(lint/style/useTemplate)
[error] 227-227: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
[error] 598-613: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
[error] 617-637: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
[error] 658-677: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
[error] 680-692: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
🔇 Additional comments (14)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/PaymentsCard.js (2)
41-42
: LGTM! New navigation links properly integrate with role-based access control.The new links for bill verification and editing are correctly configured with appropriate role restrictions and follow the established pattern.
8-8
: Confirm the correct backend role code for bill editorThe
EDIT_BILLS
entry in PaymentsCard.js uses a localROLES
mapping with"PAYMENT_EDITOR"
, and this same string is passed to the “verify” and “edit” pages. However, there’s no global roles constant in the codebase to validate against. Please ensure that"PAYMENT_EDITOR"
exactly matches the actual role code defined on the backend (or in any shared/constants module) to prevent authorization mismatches.• File: health/micro-ui/.../components/PaymentsCard.js (lines 6–10)
– ROLES.EDIT_BILLS: ["PAYMENT_EDITOR"] // TODO: confirm actual code
• Pages using this role:
– verify_generate_payements.js → params.roles: "PAYMENT_EDITOR"
– bill_payment_details.js → params.roles: "PAYMENT_EDITOR"health/micro-ui/web/public/index.html (1)
16-16
: LGTM! Title updated for Congo deployment.The title change aligns with the deployment target configuration.
health/micro-ui/web/micro-ui-internals/example/src/setupProxy.js (1)
107-112
: LGTM! New API endpoints properly configured.The health-expense API endpoints are correctly added to support the new bill verification, payment transfer, and task management features.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/MyBillsTable.js (2)
197-200
: Well-implemented selection handler.The
handleSelectedRowsChange
function correctly propagates both selected rows and count to parent components using optional chaining for safe callback execution.
219-220
: Proper integration of selection functionality.The DataTable props are correctly configured to enable row selection and handle selection changes via the new handler function.
health/micro-ui/web/micro-ui-internals/example/public/index.html (1)
12-12
: Regional deployment configuration update.The title change from "Burundi HCM" to "Congo HCM" appears to be a valid regional deployment configuration.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js (4)
10-10
: Proper component signature update.The component now correctly accepts props to enable integration with parent components for selection functionality.
71-74
: Robust total amount calculation.The
getTotalAmount
function includes proper null/undefined checks and safely accesses bill properties using optional chaining.
116-120
: Well-implemented selection summary display.The conditional rendering for the selection summary provides clear user feedback with proper formatting and internationalization.
121-130
: Proper integration of selection props.The MyBillsTable component receives all necessary selection-related props to enable the bill selection functionality.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/index.js (2)
13-15
: Clean component imports.The new component imports follow the established import pattern and support the expanded bill management functionality.
75-80
: Well-structured route additions.The new routes properly extend the payments module with consistent path patterns and appropriate component props for different use cases (view vs edit modes).
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/editWorkerDetailsPopUp .js (1)
40-44
: Add missing onKeyPress handler to TextAreaThe
handleKeyPress
function is defined but not connected to the TextArea component.<TextArea style={{ maxWidth: "100%" }} value={inputValue} onChange={(e) => setInputValue(e.target.value)} - + onKeyPress={handleKeyPress} />Also applies to: 58-63
⛔ Skipped due to learnings
Learnt from: siddhant-nawale-egov PR: egovernments/DIGIT-Frontend#698 File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/resourceMapping.js:74-74 Timestamp: 2024-06-10T19:25:42.992Z Learning: `onKeyPress` is deprecated and should be replaced with `onKeyDown` or `onKeyUp` for handling keyboard interactions.
Learnt from: siddhant-nawale-egov PR: egovernments/DIGIT-Frontend#923 File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/RuleEngine.js:458-459 Timestamp: 2024-06-17T18:54:45.789Z Learning: `onKeyPress` is deprecated and should be replaced with `onKeyDown` or `onKeyUp` for handling keyboard interactions.
Learnt from: rachana-egov PR: egovernments/DIGIT-Frontend#1612 File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/WorkflowCommentPopUp.js:37-41 Timestamp: 2024-10-22T09:14:46.876Z Learning: In this project, the `TextArea` component should submit the form when the 'Enter' key is pressed.
Learnt from: jagankumar-egov PR: egovernments/DIGIT-Frontend#2342 File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CreateCampaignComponents.js/DateSelection.js:41-47 Timestamp: 2025-04-21T05:15:36.122Z Learning: In React components, prefer using state setters directly in event handlers rather than creating wrapper functions that only call the setter without additional logic.
boundaryType: "Pays", | ||
} | ||
}); | ||
|
||
//TODO : NEEDS BE TO CHANGED TO COUNTRY |
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.
🧹 Nitpick (assertive)
🛠️ Refactor suggestion
Track the temporary boundary type change.
The hardcoded "Pays"
boundary type is a temporary workaround that needs to be reverted to "COUNTRY"
. Consider making this configurable to avoid hardcoding environment-specific values.
- boundaryType: "Pays",
+ boundaryType: window?.globalConfigs?.getConfig("BOUNDARY_TYPE") || "COUNTRY",
Do you want me to create a tracking issue for reverting this change to use the proper boundary type configuration?
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
boundaryType: "Pays", | |
} | |
}); | |
//TODO : NEEDS BE TO CHANGED TO COUNTRY | |
boundaryType: window?.globalConfigs?.getConfig("BOUNDARY_TYPE") || "COUNTRY", | |
} | |
}); | |
//TODO : NEEDS BE TO CHANGED TO COUNTRY |
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/services/PaymentsInitialization.js
around lines 121 to 124, the boundaryType is hardcoded as "Pays" as a temporary
workaround. Replace this hardcoded value with a configurable option that
defaults to "COUNTRY" to avoid environment-specific hardcoding. Implement a
configuration mechanism (e.g., environment variable or config file) to set the
boundaryType dynamically, and ensure the code uses this configuration instead of
the fixed string.
const back = state?.back ? state?.back : "BACK"; | ||
|
||
//TODO : test for button in both attendance and payments | ||
const isShowButton = state?.isShowButton === false ? false : true; |
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.
🧹 Nitpick (assertive)
Simplify the boolean assignment.
The ternary operator is unnecessary for this boolean logic.
- const isShowButton = state?.isShowButton === false ? false : true;
+ const isShowButton = state?.isShowButton !== false;
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
const isShowButton = state?.isShowButton === false ? false : true; | |
const isShowButton = state?.isShowButton !== false; |
🧰 Tools
🪛 Biome (1.9.4)
[error] 15-15: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/Response.js
at line 15, simplify the boolean assignment by removing the ternary operator.
Replace the expression with a direct boolean evaluation that returns true unless
state?.isShowButton is explicitly false.
footerChildren={isShowButton === true ? [ | ||
<Button label={t(`HCM_AM_VIEW_ANOTHER_REGISTER`)} onClick={ | ||
() => { | ||
history.push(`/${window.contextPath}/employee/payments/registers-inbox`); | ||
} | ||
} variation="teritiary" icon="ArrowForward" isSuffix /> | ||
]} | ||
] : []} |
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.
Add key prop to JSX element in array.
The Button element in the footerChildren array needs a key prop for React's reconciliation.
- footerChildren={isShowButton === true ? [
+ footerChildren={isShowButton ? [
<Button
+ key="view-register-button"
label={t(`HCM_AM_VIEW_ANOTHER_REGISTER`)}
onClick={() => {
history.push(`/${window.contextPath}/employee/payments/registers-inbox`);
}}
variation="teritiary"
icon="ArrowForward"
isSuffix
/>
] : []}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
footerChildren={isShowButton === true ? [ | |
<Button label={t(`HCM_AM_VIEW_ANOTHER_REGISTER`)} onClick={ | |
() => { | |
history.push(`/${window.contextPath}/employee/payments/registers-inbox`); | |
} | |
} variation="teritiary" icon="ArrowForward" isSuffix /> | |
]} | |
] : []} | |
footerChildren={isShowButton ? [ | |
<Button | |
key="view-register-button" | |
label={t(`HCM_AM_VIEW_ANOTHER_REGISTER`)} | |
onClick={() => { | |
history.push(`/${window.contextPath}/employee/payments/registers-inbox`); | |
}} | |
variation="teritiary" | |
icon="ArrowForward" | |
isSuffix | |
/> | |
] : []} |
🧰 Tools
🪛 Biome (1.9.4)
[error] 29-33: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/Response.js
around lines 28 to 34, the Button element inside the footerChildren array is
missing a key prop, which is required for React's reconciliation process. Add a
unique key prop to the Button component, such as key="view-another-register", to
ensure proper rendering and avoid warnings.
<script> | ||
var globalConfigs = (function () { | ||
var contextPath = "payments-ui"; | ||
var projectContext = "project"; | ||
var individualContext = "individual"; | ||
var attendanceContext = "attendance"; | ||
var musterRollContext = "health-muster-roll"; | ||
var expenseContext = "health-expense"; | ||
var expenseCalculatorContext = "health-expense-calculator"; | ||
var stateTenantId = "cg"; | ||
var gmaps_api_key = "AIzaSyAASfCFja6YxwDzEAzhHFc8B-17TNTCV0g"; | ||
var configModuleName = "commonUiConfig"; | ||
var centralInstanceEnabled = false; | ||
var localeRegion = "CG"; | ||
var localeDefault = "en"; | ||
var mdmsContext = "mdms-v2"; | ||
var hrmsContext = "egov-hrms"; | ||
var hierarchyType = "ADMIN"; | ||
var footerBWLogoURL = | ||
"https://unified-dev.digit.org/egov-dev-assets/digit-footer-bw.png"; | ||
var footerLogoURL = | ||
"https://unified-dev.digit.org/egov-dev-assets/digit-footer.png"; | ||
var digitHomeURL = "https://www.digit.org/"; | ||
var assetS3Bucket = "egov-dev-assets"; | ||
var calculationPageAssets = "https://egov-health-dev-assets.s3.ap-south-1.amazonaws.com/calculation-page-assets/" | ||
var getConfig = function (key) { | ||
if (key === "STATE_LEVEL_TENANT_ID") { | ||
return stateTenantId; | ||
} else if (key === "GMAPS_API_KEY") { | ||
return gmaps_api_key; | ||
} else if (key === "ENABLE_SINGLEINSTANCE") { | ||
return centralInstanceEnabled; | ||
} else if (key === "DIGIT_FOOTER_BW") { | ||
return footerBWLogoURL; | ||
} else if (key === "DIGIT_FOOTER") { | ||
return footerLogoURL; | ||
} else if (key === "DIGIT_HOME_URL") { | ||
return digitHomeURL; | ||
} else if (key === "S3BUCKET") { | ||
return assetS3Bucket; | ||
} else if (key === "CONTEXT_PATH") { | ||
return contextPath; | ||
} else if (key === "UICONFIG_MODULENAME") { | ||
return configModuleName; | ||
} else if (key === "LOCALE_REGION") { | ||
return localeRegion; | ||
} else if (key === "LOCALE_DEFAULT") { | ||
return localeDefault; | ||
} else if (key === "HRMS_CONTEXT_PATH") { | ||
return hrmsContext; | ||
} else if (key === "CALCULATION_PAGE_ASSETS") { | ||
return calculationPageAssets; | ||
} | ||
else if (key === "PROJECT_CONTEXT_PATH") { | ||
return projectContext; | ||
} | ||
else if (key === "PROJECT_SERVICE_PATH") { | ||
return projectContext; | ||
} | ||
else if(key == "HIERARCHY_TYPE"){ | ||
return hierarchyType; | ||
} | ||
else if(key == "INDIVIDUAL_CONTEXT_PATH"){ | ||
return individualContext; | ||
} | ||
else if(key == "ATTENDANCE_CONTEXT_PATH"){ | ||
return attendanceContext; | ||
} | ||
else if(key == "MUSTER_ROLL_CONTEXT_PATH"){ | ||
return musterRollContext; | ||
} | ||
else if(key == "EXPENSE_CONTEXT_PATH"){ | ||
return expenseContext; | ||
} | ||
else if(key == "EXPENSE_CALCULATOR_CONTEXT_PATH"){ | ||
return expenseCalculatorContext; | ||
} else if (key === "MDMS_CONTEXT_PATH") { | ||
return mdmsContext; | ||
} else if (key === "MDMS_V2_CONTEXT_PATH") { | ||
return mdmsContext; | ||
} else if (key === "MDMS_V1_CONTEXT_PATH") { | ||
return mdmsContext; | ||
} | ||
}; | ||
return { | ||
getConfig, | ||
}; | ||
})(); | ||
</script> |
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.
🛠️ Refactor suggestion
Improve configuration structure and consistency.
The inline configuration script has several areas for improvement:
- Inconsistent equality operators: Mix of
===
and==
(line 82) - Missing return statement: The function doesn't return anything for unmatched keys
- Formatting inconsistencies: Some lines have trailing spaces and inconsistent indentation
Apply this diff to fix the issues:
- else if(key == "INDIVIDUAL_CONTEXT_PATH"){
+ else if (key === "INDIVIDUAL_CONTEXT_PATH") {
return individualContext;
}
- else if(key == "ATTENDANCE_CONTEXT_PATH"){
+ else if (key === "ATTENDANCE_CONTEXT_PATH") {
return attendanceContext;
}
- else if(key == "MUSTER_ROLL_CONTEXT_PATH"){
+ else if (key === "MUSTER_ROLL_CONTEXT_PATH") {
return musterRollContext;
}
- else if(key == "EXPENSE_CONTEXT_PATH"){
+ else if (key === "EXPENSE_CONTEXT_PATH") {
return expenseContext;
}
- else if(key == "EXPENSE_CALCULATOR_CONTEXT_PATH"){
+ else if (key === "EXPENSE_CALCULATOR_CONTEXT_PATH") {
return expenseCalculatorContext;
- } else if (key === "MDMS_CONTEXT_PATH") {
+ } else if (key === "MDMS_CONTEXT_PATH") {
return mdmsContext;
} else if (key === "MDMS_V2_CONTEXT_PATH") {
return mdmsContext;
} else if (key === "MDMS_V1_CONTEXT_PATH") {
return mdmsContext;
- }
+ } else {
+ return null; // or undefined, depending on expected behavior
+ }
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
<script> | |
var globalConfigs = (function () { | |
var contextPath = "payments-ui"; | |
var projectContext = "project"; | |
var individualContext = "individual"; | |
var attendanceContext = "attendance"; | |
var musterRollContext = "health-muster-roll"; | |
var expenseContext = "health-expense"; | |
var expenseCalculatorContext = "health-expense-calculator"; | |
var stateTenantId = "cg"; | |
var gmaps_api_key = "AIzaSyAASfCFja6YxwDzEAzhHFc8B-17TNTCV0g"; | |
var configModuleName = "commonUiConfig"; | |
var centralInstanceEnabled = false; | |
var localeRegion = "CG"; | |
var localeDefault = "en"; | |
var mdmsContext = "mdms-v2"; | |
var hrmsContext = "egov-hrms"; | |
var hierarchyType = "ADMIN"; | |
var footerBWLogoURL = | |
"https://unified-dev.digit.org/egov-dev-assets/digit-footer-bw.png"; | |
var footerLogoURL = | |
"https://unified-dev.digit.org/egov-dev-assets/digit-footer.png"; | |
var digitHomeURL = "https://www.digit.org/"; | |
var assetS3Bucket = "egov-dev-assets"; | |
var calculationPageAssets = "https://egov-health-dev-assets.s3.ap-south-1.amazonaws.com/calculation-page-assets/" | |
var getConfig = function (key) { | |
if (key === "STATE_LEVEL_TENANT_ID") { | |
return stateTenantId; | |
} else if (key === "GMAPS_API_KEY") { | |
return gmaps_api_key; | |
} else if (key === "ENABLE_SINGLEINSTANCE") { | |
return centralInstanceEnabled; | |
} else if (key === "DIGIT_FOOTER_BW") { | |
return footerBWLogoURL; | |
} else if (key === "DIGIT_FOOTER") { | |
return footerLogoURL; | |
} else if (key === "DIGIT_HOME_URL") { | |
return digitHomeURL; | |
} else if (key === "S3BUCKET") { | |
return assetS3Bucket; | |
} else if (key === "CONTEXT_PATH") { | |
return contextPath; | |
} else if (key === "UICONFIG_MODULENAME") { | |
return configModuleName; | |
} else if (key === "LOCALE_REGION") { | |
return localeRegion; | |
} else if (key === "LOCALE_DEFAULT") { | |
return localeDefault; | |
} else if (key === "HRMS_CONTEXT_PATH") { | |
return hrmsContext; | |
} else if (key === "CALCULATION_PAGE_ASSETS") { | |
return calculationPageAssets; | |
} | |
else if (key === "PROJECT_CONTEXT_PATH") { | |
return projectContext; | |
} | |
else if (key === "PROJECT_SERVICE_PATH") { | |
return projectContext; | |
} | |
else if(key == "HIERARCHY_TYPE"){ | |
return hierarchyType; | |
} | |
else if(key == "INDIVIDUAL_CONTEXT_PATH"){ | |
return individualContext; | |
} | |
else if(key == "ATTENDANCE_CONTEXT_PATH"){ | |
return attendanceContext; | |
} | |
else if(key == "MUSTER_ROLL_CONTEXT_PATH"){ | |
return musterRollContext; | |
} | |
else if(key == "EXPENSE_CONTEXT_PATH"){ | |
return expenseContext; | |
} | |
else if(key == "EXPENSE_CALCULATOR_CONTEXT_PATH"){ | |
return expenseCalculatorContext; | |
} else if (key === "MDMS_CONTEXT_PATH") { | |
return mdmsContext; | |
} else if (key === "MDMS_V2_CONTEXT_PATH") { | |
return mdmsContext; | |
} else if (key === "MDMS_V1_CONTEXT_PATH") { | |
return mdmsContext; | |
} | |
}; | |
return { | |
getConfig, | |
}; | |
})(); | |
</script> | |
var getConfig = function (key) { | |
if (key === "STATE_LEVEL_TENANT_ID") { | |
return stateTenantId; | |
} else if (key === "GMAPS_API_KEY") { | |
return gmaps_api_key; | |
} else if (key === "ENABLE_SINGLEINSTANCE") { | |
return centralInstanceEnabled; | |
} else if (key === "DIGIT_FOOTER_BW") { | |
return footerBWLogoURL; | |
} else if (key === "DIGIT_FOOTER") { | |
return footerLogoURL; | |
} else if (key === "DIGIT_HOME_URL") { | |
return digitHomeURL; | |
} else if (key === "S3BUCKET") { | |
return assetS3Bucket; | |
} else if (key === "CONTEXT_PATH") { | |
return contextPath; | |
} else if (key === "UICONFIG_MODULENAME") { | |
return configModuleName; | |
} else if (key === "LOCALE_REGION") { | |
return localeRegion; | |
} else if (key === "LOCALE_DEFAULT") { | |
return localeDefault; | |
} else if (key === "HRMS_CONTEXT_PATH") { | |
return hrmsContext; | |
} else if (key === "CALCULATION_PAGE_ASSETS") { | |
return calculationPageAssets; | |
} else if (key === "PROJECT_CONTEXT_PATH") { | |
return projectContext; | |
} else if (key === "PROJECT_SERVICE_PATH") { | |
return projectContext; | |
} else if (key === "HIERARCHY_TYPE") { | |
return hierarchyType; | |
} else if (key === "INDIVIDUAL_CONTEXT_PATH") { | |
return individualContext; | |
} else if (key === "ATTENDANCE_CONTEXT_PATH") { | |
return attendanceContext; | |
} else if (key === "MUSTER_ROLL_CONTEXT_PATH") { | |
return musterRollContext; | |
} else if (key === "EXPENSE_CONTEXT_PATH") { | |
return expenseContext; | |
} else if (key === "EXPENSE_CALCULATOR_CONTEXT_PATH") { | |
return expenseCalculatorContext; | |
} else if (key === "MDMS_CONTEXT_PATH") { | |
return mdmsContext; | |
} else if (key === "MDMS_V2_CONTEXT_PATH") { | |
return mdmsContext; | |
} else if (key === "MDMS_V1_CONTEXT_PATH") { | |
return mdmsContext; | |
} else { | |
return null; // or undefined, depending on expected behavior | |
} | |
}; |
🤖 Prompt for AI Agents
In health/micro-ui/web/micro-ui-internals/example/public/index.html between
lines 23 and 111, fix the inline configuration script by replacing all instances
of loose equality (==) with strict equality (===) for consistency, add a default
return statement (such as returning null or undefined) at the end of the
getConfig function to handle unmatched keys, and clean up formatting by removing
trailing spaces and ensuring consistent indentation throughout the script.
// const handleFilterChange = (data) => { | ||
// setDateRange(data.range); | ||
// }; |
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.
🧹 Nitpick (assertive)
Remove commented code.
Clean up the commented code to improve readability and maintainability.
Apply this diff to remove the commented code:
- // const handleFilterChange = (data) => {
- // setDateRange(data.range);
- // };
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
// const handleFilterChange = (data) => { | |
// setDateRange(data.range); | |
// }; |
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyBillsSearch.js
around lines 20 to 22, remove the commented-out handleFilterChange function
entirely to clean up the code and improve readability and maintainability.
<Button | ||
className="custom-class" | ||
iconFill="" | ||
label={t(`HCM_AM_VERIFY`)} | ||
menuStyles={{ | ||
bottom: "40px", | ||
}} | ||
optionsKey="name" | ||
size="" | ||
style={{ minWidth: "14rem" }} | ||
title="" | ||
type="button" | ||
variation="primary" | ||
isDisabled={selectedRows.length === 0} | ||
|
||
/> |
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.
Add key properties to Button elements in arrays.
React requires key properties for elements rendered in arrays.
[
- <Button
+ <Button key="verify-button"
className="custom-class"
iconFill=""
label={t(`HCM_AM_VERIFY`)}
// ... rest of props
/>
]
Apply similar changes to all Button elements in the actionFields arrays.
Also applies to: 617-637, 658-677, 680-692
🧰 Tools
🪛 Biome (1.9.4)
[error] 598-613: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/bill_payment_details.js
around lines 598 to 613, the Button components rendered inside arrays lack
unique key properties, which React requires to efficiently track elements. Add a
unique key prop to each Button element in these arrays, using a stable
identifier such as an index or a unique string related to the button's purpose.
Repeat this fix for Button elements in the actionFields arrays at lines 617-637,
658-677, and 680-692 as well.
} | ||
}, | ||
config: { | ||
enabled: project ? true : false, |
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.
🧹 Nitpick (assertive)
Simplify boolean expressions.
Remove unnecessary ternary operators returning boolean literals.
-enabled: project ? true : false,
+enabled: !!project,
-enabled: billData ? true : false,
+enabled: !!billData,
-enabled: individualIds.length > 0 ? true : false,
+enabled: individualIds.length > 0,
-enabled: project && !editBillDetails ? true : false,
+enabled: !!(project && !editBillDetails),
Also applies to: 165-165, 187-187, 227-227
🧰 Tools
🪛 Biome (1.9.4)
[error] 127-127: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/bill_payment_details.js
at lines 127, 165, 187, and 227, simplify the boolean expressions by removing
the ternary operators that return true or false based on a condition. Replace
expressions like "project ? true : false" with just "Boolean(project)" or simply
"!!project" to make the code cleaner and more concise.
givenName: individual?.name?.givenName, | ||
mobileNumber: individual?.mobileNumber, | ||
userId: individual?.userDetails?.username, | ||
wage: wage+" "+workerRatesData?.currency, |
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.
🧹 Nitpick (assertive)
Use template literal instead of string concatenation.
-wage: wage+" "+workerRatesData?.currency,
+wage: `${wage} ${workerRatesData?.currency}`,
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
wage: wage+" "+workerRatesData?.currency, | |
wage: `${wage} ${workerRatesData?.currency}`, |
🧰 Tools
🪛 Biome (1.9.4)
[error] 215-215: Template literals are preferred over string concatenation.
Unsafe fix: Use a template literal.
(lint/style/useTemplate)
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/bill_payment_details.js
at line 215, replace the string concatenation used to combine wage and currency
with a template literal for better readability and consistency. Change the
expression from wage + " " + workerRatesData?.currency to a template literal
format like `${wage} ${workerRatesData?.currency}`.
...cro-ui-internals/packages/modules/health-payments/src/pages/employee/bill_payment_details.js
Show resolved
Hide resolved
...cro-ui-internals/packages/modules/health-payments/src/pages/employee/bill_payment_details.js
Outdated
Show resolved
Hide resolved
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.
Review continued from previous batch...
const bill = BillData?.bills?.[0]; | ||
|
||
if (bill?.id) { | ||
console.log("Bill ID:", bill.id); |
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.
🛠️ Refactor suggestion
Remove console.log statements.
Remove all console.log statements added in the new code for production deployment.
Also applies to: 208-208, 224-224, 232-232, 243-243, 255-255, 326-326, 338-338, 341-341, 344-344, 346-346
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/bill_inbox/BillInbox.js
at lines 189, 208, 224, 232, 243, 255, 326, 338, 341, 344, and 346, remove all
console.log statements to clean up the code for production deployment. Replace
these debug logs with appropriate error handling or remove them entirely if not
needed.
//TODO : CHECK UPDATE | ||
const updateBillMutation = Digit.Hooks.useCustomAPIMutationHook({ | ||
url: `/${expenseContextPath}/bill/v1/_update`, |
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.
🧹 Nitpick (assertive)
Remove TODO comment or address it.
The TODO comment should be addressed or removed if no longer relevant.
- //TODO : CHECK UPDATE
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
//TODO : CHECK UPDATE | |
const updateBillMutation = Digit.Hooks.useCustomAPIMutationHook({ | |
url: `/${expenseContextPath}/bill/v1/_update`, | |
const updateBillMutation = Digit.Hooks.useCustomAPIMutationHook({ | |
url: `/${expenseContextPath}/bill/v1/_update`, |
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/bill_inbox/BillInbox.js
around lines 155 to 157, there is a TODO comment that needs to be addressed.
Either implement the required update functionality indicated by the TODO or
remove the comment if it is no longer relevant to keep the code clean and
maintainable.
// if(billUpdate){ | ||
updateBillData(); | ||
// setBillUpdate(false); | ||
// } |
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.
🧹 Nitpick (assertive)
Remove commented code.
Remove commented code blocks if they're no longer needed.
-// if(billUpdate){
updateBillData();
-// setBillUpdate(false);
-// }
-// setIsDataLoading(true);
-// let refetchResult = await refetchBill();
-// // Keep polling until bills are available
-// while (!refetchResult?.BillData?.bills || refetchResult.BillData.bills.length === 0) {
-// // Wait for 2 seconds before next try
-// await new Promise((resolve) => setTimeout(resolve, 1500));
-// refetchResult = await refetchBill();
-// }
-// setIsDataLoading(false);
Also applies to: 328-336
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/bill_inbox/BillInbox.js
at lines 261-264 and also lines 328-336, remove the commented-out code blocks
that are no longer needed to clean up the codebase. Delete these commented lines
entirely to improve code readability and maintainability.
}, | ||
}, | ||
); | ||
updatedBillResponse(); |
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.
Remove incorrect function call.
updatedBillResponse
is not a function, it's the response from mutateAsync
. This line should be removed.
-updatedBillResponse();
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
updatedBillResponse(); |
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/bill_inbox/BillInbox.js
at line 252, remove the call to updatedBillResponse() because
updatedBillResponse is not a function but the response from mutateAsync. Simply
delete this line to fix the issue.
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); | ||
await sleep(10000); |
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.
🧹 Nitpick (assertive)
Extract sleep function and make delay configurable.
The inline sleep function should be extracted and the 10-second delay should be configurable or at least documented why this specific delay is needed.
+// Add to utils or constants
+const BILL_UPDATE_DELAY_MS = 10000; // 10 seconds delay between bill and detail updates
+const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
-const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
-await sleep(10000);
+await sleep(BILL_UPDATE_DELAY_MS);
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); | |
await sleep(10000); | |
// Add to utils or constants | |
const BILL_UPDATE_DELAY_MS = 10000; // 10 seconds delay between bill and detail updates | |
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); | |
await sleep(BILL_UPDATE_DELAY_MS); |
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/bill_inbox/BillInbox.js
around lines 209 to 210, the sleep function is defined inline and the 10-second
delay is hardcoded. Extract the sleep function outside the current scope to a
reusable utility or helper function. Replace the hardcoded 10000 ms delay with a
configurable parameter or constant, and add a comment explaining why this
specific delay duration is used.
…ervice update for bill in My bills, headers updated, alert popups
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: 5
🔭 Outside diff range comments (1)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js (1)
88-182
: Fix async useEffect antipatternReact useEffect should not have an async function as its direct callback. This can lead to race conditions and unhandled promise rejections.
- useEffect(async () => { + useEffect(() => { if (BillData) { const updateBillData = async () => { // ... existing code }; - await updateBillData(); + updateBillData(); setTableData(BillData.bills); setTotalCount(BillData?.pagination?.totalCount); } }, [BillData])
♻️ Duplicate comments (39)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/Response.js (2)
14-14
: Simplify the boolean assignment.The ternary operator is unnecessary for this boolean logic.
- const isShowButton = state?.isShowButton === false ? false : true; + const isShowButton = state?.isShowButton !== false;
27-33
: Add key prop and simplify boolean comparison.The Button element in the footerChildren array needs a key prop for React's reconciliation, and the boolean comparison can be simplified.
- footerChildren={isShowButton === true ? [ + footerChildren={isShowButton ? [ <Button + key="view-register-button" label={t(`HCM_AM_VIEW_ANOTHER_REGISTER`)} onClick={() => { history.push(`/${window.contextPath}/employee/payments/registers-inbox`); }} variation="teritiary" icon="ArrowForward" isSuffix /> ] : []}health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyBillsSearch.js (5)
7-8
: Update component documentation.The documentation mentions "date range" but the component actually uses bill ID and status for searching.
20-22
: Remove commented code.Clean up the commented code to improve readability and maintainability.
29-29
: Remove commented code.Remove the commented line within the
handleClear
function.
39-39
: Fix JSX self-closing elements and use internationalization.Address static analysis hints and improve consistency by making JSX elements self-closing and using translation for the STATUS label.
Also applies to: 48-48
56-61
: Fix JSX structure and add missing keys.Address static analysis hints by making the ButtonGroup self-closing and adding keys to button elements.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/sendForEditPopUp.js (2)
6-13
: Update JSDoc comment to reflect actual component purposeThe documentation mentions "attendance register" but this component is for bills/payments workflow.
16-16
: Remove console.log statementDebug logging should be removed before production deployment.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/editWorkerDetailsPopUp .js (4)
6-13
: Update JSDoc to reflect actual component purposeThe documentation incorrectly mentions "attendance register" instead of worker details editing.
19-19
: Remove unused state variableThe
comment
state variable is declared but never used.
27-27
: Remove console.log statementDebug logging should be removed.
53-53
: Use proper component structure for PopUp childrenThe PopUp component should not receive children as a prop array. Consider restructuring to follow the component's expected API.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/upload_and_fetch_bills.js (3)
17-26
: Clean up commented codeRemove commented session storage clearing code if it's not needed, or uncomment it if it should be active.
121-142
: Add key props to button elementsReact requires key props for elements in arrays to optimize rendering.
158-175
: Add key props to ActionBar button elementsReact requires key props for elements in arrays.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyAndGeneratePaymentsTable.js (5)
43-79
: Remove mock data before production deployment.This mock bills data should be removed as it's only for testing purposes.
108-108
: Replace console.log with proper logging mechanism.Remove or replace
console.log
statements with a proper logging service for production code.Also applies to: 118-118, 167-167, 175-175, 257-257, 265-265, 286-286, 328-328, 338-338
344-359
: Remove redundant case clauses.The
FULLY_PAID
andSENT_BACK
cases are redundant as they fall through to the default case.const getAvailableActions = (status) => { switch (status) { //TODO : add Download action case "PARTIALLY_VERIFIED": return ["HCM_AM_VERIFY", "HCM_AM_EDIT", "HCM_AM_GENERATE_PAYMENT"]; case "PENDING_VERIFICATION": return ["HCM_AM_VERIFY"]; case "FULLY_VERIFIED": return ["HCM_AM_GENERATE_PAYMENT"]; case "PARTIALLY_PAID": return ["HCM_AM_VERIFY", "HCM_AM_EDIT", "HCM_AM_GENERATE_PAYMENT"]; - case "FULLY_PAID": - case "SENT_BACK": default: return []; // No actions allowed except download } };
370-383
: Add keyboard accessibility for clickable bill ID.The clickable div should support keyboard navigation for accessibility.
-<div className="ellipsis-cell" title={t(row?.billNumber) || t("NA")} -onClick={() => { - //view bill/edit bill - if (props?.editBill) { - history.push(`/${window.contextPath}/employee/payments/edit-bill-payment-details`,{ billID: row.billNumber }); - } else { - history.push(`/${window.contextPath}/employee/payments/view-bill-payment-details`,{ billID: row.billNumber }); - } -}} -style={{ color: "#C84C0E", cursor: "pointer", textDecoration: "underline" }}> +<div className="ellipsis-cell" + title={t(row?.billNumber) || t("NA")} + onClick={() => { + if (props?.editBill) { + history.push(`/${window.contextPath}/employee/payments/edit-bill-payment-details`,{ billID: row.billNumber }); + } else { + history.push(`/${window.contextPath}/employee/payments/view-bill-payment-details`,{ billID: row.billNumber }); + } + }} + onKeyDown={(e) => { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + if (props?.editBill) { + history.push(`/${window.contextPath}/employee/payments/edit-bill-payment-details`,{ billID: row.billNumber }); + } else { + history.push(`/${window.contextPath}/employee/payments/view-bill-payment-details`,{ billID: row.billNumber }); + } + } + }} + role="button" + tabIndex={0} + style={{ color: "#C84C0E", cursor: "pointer", textDecoration: "underline" }}>
519-519
: Simplify boolean expression.Remove unnecessary ternary operator.
-showBottom={isLastRow && props.data.length !== 1? false : true} +showBottom={!(isLastRow && props.data.length !== 1)}health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/bill_payment_details.js (6)
1-1
: Fix incomplete import statement.Remove the incomplete
use
import.-import React, { useState, useEffect, useRef, use, Fragment } from "react"; +import React, { useState, useEffect, useRef, Fragment } from "react";
23-23
: Remove console.log statements.Remove all console.log statements before production deployment.
Also applies to: 141-142, 246-246, 285-285, 336-336, 346-346
62-103
: Remove mock billDetails data.This mock data should be removed before production deployment.
- const billDetails = [ - { - "id": "123456", - "name":"Worker 1", - "role":"Distrubutor", - "billDate": 1698307200000, - "noOfDays": 5, - "wage": "30", - "status":"NOT_VERIFIED", - "totalAmount": "150", - }, - // ... rest of mock data - ]
132-132
: Simplify boolean expressions.Remove unnecessary ternary operators returning boolean literals.
-enabled: project ? true : false, +enabled: !!project,Also applies to: 170-170, 192-192, 232-232
220-220
: Use template literal instead of string concatenation.-wage: wage+" "+workerRatesData?.currency, +wage: `${wage} ${workerRatesData?.currency}`,
881-899
: Add key properties to Button elements in arrays.React requires key properties for elements rendered in arrays.
[ - <Button + <Button key="verify-button" className="custom-class" iconFill="" label={t(`HCM_AM_VERIFY`)} // ... rest of props /> ]Also applies to: 903-925, 946-967, 970-981
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/verify_generate_payements.js (2)
20-20
: Remove console.log statements.Console.log statements should be removed or replaced with proper logging for production.
Also applies to: 74-74, 156-156, 161-161, 165-165
60-60
: Simplify boolean expressions in config objects.Remove unnecessary ternary operators that return boolean literals.
-enabled: project ? true : false, +enabled: !!project,Also applies to: 115-115
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/BillDetailsTable.js (5)
227-229
: Remove unnecessary fragmentsFragments are redundant when they contain only one child element.
- content={<> - <div style={{ maxWidth: "600px", whiteSpace: "normal", wordWrap: "break-word" }}> - {t(row?.additionalDetails?.reasonForFailure)}</div></>} + content={ + <div style={{ maxWidth: "600px", whiteSpace: "normal", wordWrap: "break-word" }}> + {t(row?.additionalDetails?.reasonForFailure)}</div>}Also applies to: 291-293
347-347
: Remove console.log statementsDebug logging should be removed from production code.
- console.log("days", days);
- console.log("inside handleFieldUpdate", key, newValue, editingRowIndex);
Also applies to: 407-407
343-344
: Use Number.parseInt for ES2015 consistencyModern JavaScript moved parseInt to the Number namespace.
- const totalAmount = parseInt(row?.totalAmount) || 0; - const wage = parseInt(row?.wage) || 0; + const totalAmount = Number.parseInt(row?.totalAmount) || 0; + const wage = Number.parseInt(row?.wage) || 0;
277-281
: Add missing field key and initial value for mobile number editingThe mobile number edit button is missing the fieldKey and initialFieldValue setup that's present for the name field.
onClick={() => { setShowEditField(true); + setFieldKey("mobileNumber"); + setInitialFieldValue(row?.mobileNumber || ""); + setEditingRowIndex(row?.id); setEditFieldName(t("HCM_AM_MOBILE_NUMBER")); }}
45-154
: Remove unused test dataThe
billDetails
array is defined but never used in the component.- const billDetails = [ - { - "id": "123456", - "name":"Worker 1", - "role":"Distrubutor", - "billDate": 1698307200000, - "noOfDays": 5, - "wage": "30", - "totalAmount": "150", - }, - // ... rest of the array - ]health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/bill_inbox/BillInbox.js (5)
189-189
: Remove console.log statementsRemove all console.log statements added in the new code for production deployment.
Also applies to: 208-208, 224-224, 232-232, 243-243, 255-255, 326-326, 338-338, 341-341, 344-344, 346-346
155-157
: Remove or address TODO commentThe TODO comment should be addressed or removed if no longer relevant.
- //TODO : CHECK UPDATE
252-252
: Remove incorrect function call
updatedBillResponse
is not a function, it's the response frommutateAsync
. This line will cause a runtime error.- updatedBillResponse();
209-210
: Extract sleep function and make delay configurableThe inline sleep function should be extracted and the 10-second delay should be configurable or documented.
+// Add to utils or constants +const BILL_UPDATE_DELAY_MS = 10000; // 10 seconds delay between bill and detail updates +const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); - const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); - await sleep(10000); + await sleep(BILL_UPDATE_DELAY_MS);
261-264
: Remove commented codeRemove commented code blocks if they're no longer needed.
- // if(billUpdate){ - // updateBillData(); - // setBillUpdate(false); - // } - // setIsDataLoading(true); - // let refetchResult = await refetchBill(); - // // Keep polling until bills are available - // while (!refetchResult?.BillData?.bills || refetchResult.BillData.bills.length === 0) { - // // Wait for 2 seconds before next try - // await new Promise((resolve) => setTimeout(resolve, 1500)); - // refetchResult = await refetchBill(); - // } - // setIsDataLoading(false);Also applies to: 328-336
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (12)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/BillDetailsTable.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/PaymentsCard.js
(2 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/Response.js
(2 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyAndGeneratePaymentsTable.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyBillsSearch.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/bill_inbox/BillInbox.js
(5 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/editWorkerDetailsPopUp .js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/sendForEditPopUp.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/bill_payment_details.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js
(7 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/upload_and_fetch_bills.js
(1 hunks)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/verify_generate_payements.js
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.js`: check
**/*.js
: check
⚙️ Source: CodeRabbit Configuration File
List of files the instruction was applied to:
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/Response.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/PaymentsCard.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyBillsSearch.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/editWorkerDetailsPopUp .js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/bill_payment_details.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyAndGeneratePaymentsTable.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/upload_and_fetch_bills.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/BillDetailsTable.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/sendForEditPopUp.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/verify_generate_payements.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/bill_inbox/BillInbox.js
🧠 Learnings (13)
📓 Common learnings
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/Response.js (16)
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The Button component from `@egovernments/digit-ui-components` has compatibility issues with the ActionBar, leading to the preference for using the Button from `@egovernments/digit-ui-react-components` in certain scenarios.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2342
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CreateCampaignComponents.js/DateSelection.js:41-47
Timestamp: 2025-04-21T05:15:36.122Z
Learning: In React components, prefer using state setters directly in event handlers rather than creating wrapper functions that only call the setter without additional logic.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1847
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js:308-314
Timestamp: 2024-11-18T04:35:51.535Z
Learning: In `PlanInbox.js`, the variable `planWithCensus?.StatusCount[selectedFilter]` is always defined in the given context, so null checks are unnecessary.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#1763
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/MyCampaign.js:65-75
Timestamp: 2024-11-07T07:17:27.636Z
Learning: In `MyCampaign.js`, when suggesting code improvements for the `onClickRow` function, keep suggestions simple and avoid unnecessary complexity.
Learnt from: nabeelmd-eGov
PR: egovernments/DIGIT-Frontend#1680
File: health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js:1032-1094
Timestamp: 2024-10-26T15:11:49.938Z
Learning: In the DIGIT-Frontend project, when reviewing the `UICustomizations.js` file, avoid suggesting refactoring of repetitive rendering logic in switch cases into helper functions, unless explicitly requested.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/timelinePopUpWrapper.js:36-36
Timestamp: 2024-11-07T11:00:11.847Z
Learning: In the `TimelinePopUpWrapper` component in `timelinePopUpWrapper.js`, the `action` property of `instance` is a required field and will always be defined; thus, checks for undefined values for `instance.action` are unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#771
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/CreateMicroplan.js:204-204
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `setCheckDataCompletion` function in `CreateMicroplan.js` uses string literals as arguments, not boolean values. This is used to manage different states of data completion checks.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#771
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/CreateMicroplan.js:204-204
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `setCheckDataCompletion` function in `CreateMicroplan.js` uses string literals as arguments, not boolean values. This is used to manage different states of data completion checks.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/ProductDetails/ProductDetailsComponentUpdated.js:279-280
Timestamp: 2025-06-26T10:21:42.619Z
Learning: In the sandbox ProductDetailsComponentUpdated.js component, string concatenation is intentionally used for translation keys (e.g., `t(`${module}` + "_SECTION1_ROLE_1")`) instead of template literals for easier config identification and to make the key structure more explicit.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:1-1
Timestamp: 2024-10-17T11:59:00.327Z
Learning: In `ActivityCard.js`, `React.Fragment` is used in the code.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-06-14T14:10:38.086Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:30-35
Timestamp: 2024-10-17T12:00:51.749Z
Learning: In our codebase, the 'Card' component is commonly used by passing children via the 'children' prop.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/LoginSignupSelector.js:24-24
Timestamp: 2025-06-26T09:43:00.597Z
Learning: In LoginSignupSelector component, the URL checking using window.location.href.includes("sandbox-ui/user/sign-up") is intentional for URL validation purposes, not navigation. The team prefers this approach over React Router's useLocation hook for specific URL checking needs.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1622
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/PopInboxTable.js:355-363
Timestamp: 2024-10-22T12:51:42.266Z
Learning: In `PopInboxTable.js`, the `showEditVillagePopup` state variable is initialized as an empty object.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/PaymentsCard.js (6)
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-06-14T14:10:38.086Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/ProductDetails/ProductDetailsComponentUpdated.js:279-280
Timestamp: 2025-06-26T10:21:42.619Z
Learning: In the sandbox ProductDetailsComponentUpdated.js component, string concatenation is intentionally used for translation keys (e.g., `t(`${module}` + "_SECTION1_ROLE_1")`) instead of template literals for easier config identification and to make the key structure more explicit.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyBillsSearch.js (20)
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1-1
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The imports in `MicroplanPreview.js` are from different libraries: `@egovernments/digit-ui-components` and `@egovernments/digit-ui-react-components`.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#1763
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/MyCampaign.js:65-75
Timestamp: 2024-11-07T07:17:27.636Z
Learning: In `MyCampaign.js`, when suggesting code improvements for the `onClickRow` function, keep suggestions simple and avoid unnecessary complexity.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1847
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js:308-314
Timestamp: 2024-11-18T04:35:51.535Z
Learning: In `PlanInbox.js`, the variable `planWithCensus?.StatusCount[selectedFilter]` is always defined in the given context, so null checks are unnecessary.
Learnt from: nabeelmd-eGov
PR: egovernments/DIGIT-Frontend#1680
File: health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js:1032-1094
Timestamp: 2024-10-26T15:11:49.938Z
Learning: In the DIGIT-Frontend project, when reviewing the `UICustomizations.js` file, avoid suggesting refactoring of repetitive rendering logic in switch cases into helper functions, unless explicitly requested.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `onStepClick` logic in `CreateMicroplan.js` is intentionally commented out to allow developers to navigate between screens during development, even though not all screens are made yet.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/postcss.config.js:3-13
Timestamp: 2024-10-08T20:11:12.539Z
Learning: Retain commented-out code in `postcss.config.js` as it might be needed for future configurations or debugging.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1779
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FileComponent.js:19-28
Timestamp: 2024-11-08T07:49:53.969Z
Learning: In `FileComponent.js`, the `formatDate` function receives a date string that is always a valid date entity, so additional input validation and error handling are unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#720
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Nagivator.js:46-56
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The user prefers the `useEffect` hook to run only when `checkDataCompletion` changes in the `Navigator` component.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/timelinePopUpWrapper.js:36-36
Timestamp: 2024-11-07T11:00:11.847Z
Learning: In the `TimelinePopUpWrapper` component in `timelinePopUpWrapper.js`, the `action` property of `instance` is a required field and will always be defined; thus, checks for undefined values for `instance.action` are unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js:3-39
Timestamp: 2024-06-14T14:10:20.359Z
Learning: The `CustomScaleControl` component in the `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js` file should not include a "loading map" message as there is another component handling this functionality to avoid redundancy.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The Button component from `@egovernments/digit-ui-components` has compatibility issues with the ActionBar, leading to the preference for using the Button from `@egovernments/digit-ui-react-components` in certain scenarios.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-06-14T14:10:38.086Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/ProductDetails/ProductDetailsComponentUpdated.js:279-280
Timestamp: 2025-06-26T10:21:42.619Z
Learning: In the sandbox ProductDetailsComponentUpdated.js component, string concatenation is intentionally used for translation keys (e.g., `t(`${module}` + "_SECTION1_ROLE_1")`) instead of template literals for easier config identification and to make the key structure more explicit.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:1-1
Timestamp: 2024-10-17T11:59:00.327Z
Learning: In `ActivityCard.js`, `React.Fragment` is used in the code.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#204
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/Upload.js:468-481
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The error message in the `checkForErrorInUploadedFile` function within `Upload.js` is being localized and improved for better user experience, as clarified by the user.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2488
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js:152-152
Timestamp: 2025-06-04T04:08:48.234Z
Learning: In the employee login component (micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js), prefer using a `defaultTenant` variable to store `Digit.ULBService.getStateId()` instead of calling the function multiple times inline in the `defaultValue` object. This improves code readability and avoids function call duplication.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/editWorkerDetailsPopUp .js (22)
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1622
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/PopInboxTable.js:355-363
Timestamp: 2024-10-22T12:51:42.266Z
Learning: In `PopInboxTable.js`, the `showEditVillagePopup` state variable is initialized as an empty object.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1837
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:559-561
Timestamp: 2024-11-15T10:15:57.369Z
Learning: In `PopInbox.js`, error handling for the `onError` callback in `WorkflowCommentPopUp` is handled within the component, so explicit error handling in the parent component is unnecessary.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1832
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:592-594
Timestamp: 2024-11-14T12:48:23.023Z
Learning: In `PopInbox.js`, when integrating the `ConfirmationPopUp` component, error handling for API failures is managed internally within the component, so explicitly passing an `onError` prop is not necessary.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-06-14T14:10:38.086Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js:3-39
Timestamp: 2024-06-14T14:10:20.359Z
Learning: The `CustomScaleControl` component in the `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js` file should not include a "loading map" message as there is another component handling this functionality to avoid redundancy.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `onStepClick` logic in `CreateMicroplan.js` is intentionally commented out to allow developers to navigate between screens during development, even though not all screens are made yet.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2488
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js:152-152
Timestamp: 2025-06-04T04:08:48.234Z
Learning: In the employee login component (micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js), prefer using a `defaultTenant` variable to store `Digit.ULBService.getStateId()` instead of calling the function multiple times inline in the `defaultValue` object. This improves code readability and avoids function call duplication.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1925
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js:267-269
Timestamp: 2024-11-28T11:34:27.480Z
Learning: In the `downloadTemplate` function of `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js`, the scenario where `state?.hierarchyType` is undefined will not occur.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/timelinePopUpWrapper.js:36-36
Timestamp: 2024-11-07T11:00:11.847Z
Learning: In the `TimelinePopUpWrapper` component in `timelinePopUpWrapper.js`, the `action` property of `instance` is a required field and will always be defined; thus, checks for undefined values for `instance.action` are unnecessary.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:1-1
Timestamp: 2024-10-17T11:59:00.327Z
Learning: In `ActivityCard.js`, `React.Fragment` is used in the code.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2342
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CreateCampaignComponents.js/DateSelection.js:41-47
Timestamp: 2025-04-21T05:15:36.122Z
Learning: In React components, prefer using state setters directly in event handlers rather than creating wrapper functions that only call the setter without additional logic.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/postcss.config.js:3-13
Timestamp: 2024-10-08T20:11:12.539Z
Learning: Retain commented-out code in `postcss.config.js` as it might be needed for future configurations or debugging.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#1763
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/MyCampaign.js:65-75
Timestamp: 2024-11-07T07:17:27.636Z
Learning: In `MyCampaign.js`, when suggesting code improvements for the `onClickRow` function, keep suggestions simple and avoid unnecessary complexity.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2089
File: micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js:111-111
Timestamp: 2025-01-02T04:41:15.957Z
Learning: In micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js, always use "mdms[0].uniqueIdentifier" for the jsonPath instead of differentiating between "SOR" and other masters.
Learnt from: nabeelmd-eGov
PR: egovernments/DIGIT-Frontend#1680
File: health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js:1032-1094
Timestamp: 2024-10-26T15:11:49.938Z
Learning: In the DIGIT-Frontend project, when reviewing the `UICustomizations.js` file, avoid suggesting refactoring of repetitive rendering logic in switch cases into helper functions, unless explicitly requested.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/RuleEngine.js:55-57
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The logic for the data change save check in the `RuleEngine.js` file has been shifted elsewhere for more global checks.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:30-35
Timestamp: 2024-10-17T12:00:51.749Z
Learning: In our codebase, the 'Card' component is commonly used by passing children via the 'children' prop.
Learnt from: Tulika-eGov
PR: egovernments/DIGIT-Frontend#2188
File: micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/employee/new-inbox.js:34-47
Timestamp: 2025-02-05T10:18:29.947Z
Learning: In the DIGIT-Frontend codebase, translations within FormComposer are handled internally by the component itself, so the translation function 't' does not need to be added to useMemo dependency arrays even when used within the memoized function that generates form configurations.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/bill_payment_details.js (20)
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2488
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js:152-152
Timestamp: 2025-06-04T04:08:48.234Z
Learning: In the employee login component (micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js), prefer using a `defaultTenant` variable to store `Digit.ULBService.getStateId()` instead of calling the function multiple times inline in the `defaultValue` object. This improves code readability and avoids function call duplication.
Learnt from: nabeelmd-eGov
PR: egovernments/DIGIT-Frontend#1680
File: health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js:1032-1094
Timestamp: 2024-10-26T15:11:49.938Z
Learning: In the DIGIT-Frontend project, when reviewing the `UICustomizations.js` file, avoid suggesting refactoring of repetitive rendering logic in switch cases into helper functions, unless explicitly requested.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2089
File: micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js:111-111
Timestamp: 2025-01-02T04:41:15.957Z
Learning: In micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js, always use "mdms[0].uniqueIdentifier" for the jsonPath instead of differentiating between "SOR" and other masters.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#1763
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/MyCampaign.js:65-75
Timestamp: 2024-11-07T07:17:27.636Z
Learning: In `MyCampaign.js`, when suggesting code improvements for the `onClickRow` function, keep suggestions simple and avoid unnecessary complexity.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `onStepClick` logic in `CreateMicroplan.js` is intentionally commented out to allow developers to navigate between screens during development, even though not all screens are made yet.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/timelinePopUpWrapper.js:36-36
Timestamp: 2024-11-07T11:00:11.847Z
Learning: In the `TimelinePopUpWrapper` component in `timelinePopUpWrapper.js`, the `action` property of `instance` is a required field and will always be defined; thus, checks for undefined values for `instance.action` are unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The Button component from `@egovernments/digit-ui-components` has compatibility issues with the ActionBar, leading to the preference for using the Button from `@egovernments/digit-ui-react-components` in certain scenarios.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-06-14T14:10:38.086Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/ProductDetails/ProductDetailsComponentUpdated.js:279-280
Timestamp: 2025-06-26T10:21:42.619Z
Learning: In the sandbox ProductDetailsComponentUpdated.js component, string concatenation is intentionally used for translation keys (e.g., `t(`${module}` + "_SECTION1_ROLE_1")`) instead of template literals for easier config identification and to make the key structure more explicit.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#771
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/CreateMicroplan.js:204-204
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `setCheckDataCompletion` function in `CreateMicroplan.js` uses string literals as arguments, not boolean values. This is used to manage different states of data completion checks.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#771
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/CreateMicroplan.js:204-204
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `setCheckDataCompletion` function in `CreateMicroplan.js` uses string literals as arguments, not boolean values. This is used to manage different states of data completion checks.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1847
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js:308-314
Timestamp: 2024-11-18T04:35:51.535Z
Learning: In `PlanInbox.js`, the variable `planWithCensus?.StatusCount[selectedFilter]` is always defined in the given context, so null checks are unnecessary.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:1-1
Timestamp: 2024-10-17T11:59:00.327Z
Learning: In `ActivityCard.js`, `React.Fragment` is used in the code.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1-1
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The imports in `MicroplanPreview.js` are from different libraries: `@egovernments/digit-ui-components` and `@egovernments/digit-ui-react-components`.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1925
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js:267-269
Timestamp: 2024-11-28T11:34:27.480Z
Learning: In the `downloadTemplate` function of `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js`, the scenario where `state?.hierarchyType` is undefined will not occur.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js:3-39
Timestamp: 2024-06-14T14:10:20.359Z
Learning: The `CustomScaleControl` component in the `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js` file should not include a "loading map" message as there is another component handling this functionality to avoid redundancy.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyAndGeneratePaymentsTable.js (19)
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1-1
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The imports in `MicroplanPreview.js` are from different libraries: `@egovernments/digit-ui-components` and `@egovernments/digit-ui-react-components`.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1670
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccessMgmtTableWrapper.js:156-160
Timestamp: 2024-10-25T09:24:29.878Z
Learning: In the `UserAccessMgmtTableWrapper` component, since the `ShowMoreWrapper` is rendered within the cell, additional checks or row-specific state management are not required.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-06-14T14:10:38.086Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/updateSessionUtils.js:144-156
Timestamp: 2024-06-10T19:25:42.992Z
Learning: In the `updateSessionUtils.js` file, during the data processing phase, errors should be logged, and the file should be ignored without throwing exceptions.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/updateSessionUtils.js:144-156
Timestamp: 2024-10-08T20:11:12.539Z
Learning: In the `updateSessionUtils.js` file, during the data processing phase, errors should be logged, and the file should be ignored without throwing exceptions.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#1763
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/MyCampaign.js:65-75
Timestamp: 2024-11-07T07:17:27.636Z
Learning: In `MyCampaign.js`, when suggesting code improvements for the `onClickRow` function, keep suggestions simple and avoid unnecessary complexity.
Learnt from: nabeelmd-eGov
PR: egovernments/DIGIT-Frontend#1680
File: health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js:1032-1094
Timestamp: 2024-10-26T15:11:49.938Z
Learning: In the DIGIT-Frontend project, when reviewing the `UICustomizations.js` file, avoid suggesting refactoring of repetitive rendering logic in switch cases into helper functions, unless explicitly requested.
Learnt from: Bhavya-egov
PR: egovernments/DIGIT-Frontend#2013
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/jsonReader.js:24-27
Timestamp: 2024-12-12T05:38:22.901Z
Learning: In the `jsonReader` function within `health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/jsonReader.js`, generic error handling is sufficient, and enhancing error handling with specific error types is not necessary.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2488
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js:152-152
Timestamp: 2025-06-04T04:08:48.234Z
Learning: In the employee login component (micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js), prefer using a `defaultTenant` variable to store `Digit.ULBService.getStateId()` instead of calling the function multiple times inline in the `defaultValue` object. This improves code readability and avoids function call duplication.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2089
File: micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js:111-111
Timestamp: 2025-01-02T04:41:15.957Z
Learning: In micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js, always use "mdms[0].uniqueIdentifier" for the jsonPath instead of differentiating between "SOR" and other masters.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1847
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js:308-314
Timestamp: 2024-11-18T04:35:51.535Z
Learning: In `PlanInbox.js`, the variable `planWithCensus?.StatusCount[selectedFilter]` is always defined in the given context, so null checks are unnecessary.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/timelinePopUpWrapper.js:36-36
Timestamp: 2024-11-07T11:00:11.847Z
Learning: In the `TimelinePopUpWrapper` component in `timelinePopUpWrapper.js`, the `action` property of `instance` is a required field and will always be defined; thus, checks for undefined values for `instance.action` are unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#923
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/RuleEngine.js:458-459
Timestamp: 2024-06-17T18:54:45.789Z
Learning: `onKeyPress` is deprecated and should be replaced with `onKeyDown` or `onKeyUp` for handling keyboard interactions.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/resourceMapping.js:74-74
Timestamp: 2024-06-10T19:25:42.992Z
Learning: `onKeyPress` is deprecated and should be replaced with `onKeyDown` or `onKeyUp` for handling keyboard interactions.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `onStepClick` logic in `CreateMicroplan.js` is intentionally commented out to allow developers to navigate between screens during development, even though not all screens are made yet.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/upload_and_fetch_bills.js (25)
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1925
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js:267-269
Timestamp: 2024-11-28T11:34:27.480Z
Learning: In the `downloadTemplate` function of `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js`, the scenario where `state?.hierarchyType` is undefined will not occur.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#204
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/Upload.js:468-481
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The error message in the `checkForErrorInUploadedFile` function within `Upload.js` is being localized and improved for better user experience, as clarified by the user.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:1-1
Timestamp: 2024-10-17T11:59:00.327Z
Learning: In `ActivityCard.js`, `React.Fragment` is used in the code.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#204
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/Upload.js:0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: A more detailed message for file parsing errors in the `Upload.js` file is displayed elsewhere in the code, as clarified by the user.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#204
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/Upload.js:0-0
Timestamp: 2024-10-08T20:11:12.539Z
Learning: A more detailed message for file parsing errors in the `Upload.js` file is displayed elsewhere in the code, as clarified by the user.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1-1
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The imports in `MicroplanPreview.js` are from different libraries: `@egovernments/digit-ui-components` and `@egovernments/digit-ui-react-components`.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/postcss.config.js:3-13
Timestamp: 2024-10-08T20:11:12.539Z
Learning: Retain commented-out code in `postcss.config.js` as it might be needed for future configurations or debugging.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `onStepClick` logic in `CreateMicroplan.js` is intentionally commented out to allow developers to navigate between screens during development, even though not all screens are made yet.
Learnt from: Tulika-eGov
PR: egovernments/DIGIT-Frontend#2288
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Landing/LandingComponent.js:18-24
Timestamp: 2025-03-25T10:47:42.433Z
Learning: In the DIGIT-Frontend project, commented-out code like `//config = defaultconfig;` is sometimes intentionally kept when it serves a development purpose, such as providing a way to quickly switch between configurations during local testing.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2488
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js:152-152
Timestamp: 2025-06-04T04:08:48.234Z
Learning: In the employee login component (micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js), prefer using a `defaultTenant` variable to store `Digit.ULBService.getStateId()` instead of calling the function multiple times inline in the `defaultValue` object. This improves code readability and avoids function call duplication.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The Button component from `@egovernments/digit-ui-components` has compatibility issues with the ActionBar, leading to the preference for using the Button from `@egovernments/digit-ui-react-components` in certain scenarios.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2089
File: micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js:111-111
Timestamp: 2025-01-02T04:41:15.957Z
Learning: In micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js, always use "mdms[0].uniqueIdentifier" for the jsonPath instead of differentiating between "SOR" and other masters.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/timelinePopUpWrapper.js:36-36
Timestamp: 2024-11-07T11:00:11.847Z
Learning: In the `TimelinePopUpWrapper` component in `timelinePopUpWrapper.js`, the `action` property of `instance` is a required field and will always be defined; thus, checks for undefined values for `instance.action` are unnecessary.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#1763
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/MyCampaign.js:65-75
Timestamp: 2024-11-07T07:17:27.636Z
Learning: In `MyCampaign.js`, when suggesting code improvements for the `onClickRow` function, keep suggestions simple and avoid unnecessary complexity.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-06-14T14:10:38.086Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/ProductDetails/ProductDetailsComponentUpdated.js:279-280
Timestamp: 2025-06-26T10:21:42.619Z
Learning: In the sandbox ProductDetailsComponentUpdated.js component, string concatenation is intentionally used for translation keys (e.g., `t(`${module}` + "_SECTION1_ROLE_1")`) instead of template literals for easier config identification and to make the key structure more explicit.
Learnt from: nabeelmd-eGov
PR: egovernments/DIGIT-Frontend#1680
File: health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js:1032-1094
Timestamp: 2024-10-26T15:11:49.938Z
Learning: In the DIGIT-Frontend project, when reviewing the `UICustomizations.js` file, avoid suggesting refactoring of repetitive rendering logic in switch cases into helper functions, unless explicitly requested.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js:3-39
Timestamp: 2024-06-14T14:10:20.359Z
Learning: The `CustomScaleControl` component in the `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js` file should not include a "loading map" message as there is another component handling this functionality to avoid redundancy.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1832
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:592-594
Timestamp: 2024-11-14T12:48:23.023Z
Learning: In `PopInbox.js`, when integrating the `ConfirmationPopUp` component, error handling for API failures is managed internally within the component, so explicitly passing an `onError` prop is not necessary.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:30-35
Timestamp: 2024-10-17T12:00:51.749Z
Learning: In our codebase, the 'Card' component is commonly used by passing children via the 'children' prop.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#691
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Upload.js:16-17
Timestamp: 2024-10-08T20:11:12.539Z
Learning: The components `Loader`, `Toast`, and `Modal` are from different libraries in the DIGIT-Frontend project, as clarified by the user.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/BillDetailsTable.js (24)
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1-1
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The imports in `MicroplanPreview.js` are from different libraries: `@egovernments/digit-ui-components` and `@egovernments/digit-ui-react-components`.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-06-14T14:10:38.086Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:1-1
Timestamp: 2024-10-17T11:59:00.327Z
Learning: In `ActivityCard.js`, `React.Fragment` is used in the code.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#1763
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/MyCampaign.js:65-75
Timestamp: 2024-11-07T07:17:27.636Z
Learning: In `MyCampaign.js`, when suggesting code improvements for the `onClickRow` function, keep suggestions simple and avoid unnecessary complexity.
Learnt from: nabeelmd-eGov
PR: egovernments/DIGIT-Frontend#1680
File: health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js:1032-1094
Timestamp: 2024-10-26T15:11:49.938Z
Learning: In the DIGIT-Frontend project, when reviewing the `UICustomizations.js` file, avoid suggesting refactoring of repetitive rendering logic in switch cases into helper functions, unless explicitly requested.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/ProductDetails/ProductDetailsComponentUpdated.js:279-280
Timestamp: 2025-06-26T10:21:42.619Z
Learning: In the sandbox ProductDetailsComponentUpdated.js component, string concatenation is intentionally used for translation keys (e.g., `t(`${module}` + "_SECTION1_ROLE_1")`) instead of template literals for easier config identification and to make the key structure more explicit.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1847
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js:308-314
Timestamp: 2024-11-18T04:35:51.535Z
Learning: In `PlanInbox.js`, the variable `planWithCensus?.StatusCount[selectedFilter]` is always defined in the given context, so null checks are unnecessary.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/timelinePopUpWrapper.js:36-36
Timestamp: 2024-11-07T11:00:11.847Z
Learning: In the `TimelinePopUpWrapper` component in `timelinePopUpWrapper.js`, the `action` property of `instance` is a required field and will always be defined; thus, checks for undefined values for `instance.action` are unnecessary.
Learnt from: Bhavya-egov
PR: egovernments/DIGIT-Frontend#2013
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/jsonReader.js:24-27
Timestamp: 2024-12-12T05:38:22.901Z
Learning: In the `jsonReader` function within `health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/jsonReader.js`, generic error handling is sufficient, and enhancing error handling with specific error types is not necessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/updateSessionUtils.js:144-156
Timestamp: 2024-06-10T19:25:42.992Z
Learning: In the `updateSessionUtils.js` file, during the data processing phase, errors should be logged, and the file should be ignored without throwing exceptions.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/updateSessionUtils.js:144-156
Timestamp: 2024-10-08T20:11:12.539Z
Learning: In the `updateSessionUtils.js` file, during the data processing phase, errors should be logged, and the file should be ignored without throwing exceptions.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2089
File: micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js:111-111
Timestamp: 2025-01-02T04:41:15.957Z
Learning: In micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js, always use "mdms[0].uniqueIdentifier" for the jsonPath instead of differentiating between "SOR" and other masters.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js:3-39
Timestamp: 2024-06-14T14:10:20.359Z
Learning: The `CustomScaleControl` component in the `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js` file should not include a "loading map" message as there is another component handling this functionality to avoid redundancy.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#938
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreviewHelperCompoenents.js:220-220
Timestamp: 2024-06-22T07:29:39.935Z
Learning: User siddhant-nawale-egov prefers using `isNaN` over `Number.isNaN` for scenarios where type coercion is desired in JavaScript.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1126-1126
Timestamp: 2024-06-15T11:18:59.548Z
Learning: When reviewing code related to type coercion in JavaScript within the DIGIT-Frontend repository, it's important to consider the context in which functions like `isNaN` and `isFinite` are used, as explicit type coercion might be necessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1126-1126
Timestamp: 2024-10-08T20:11:07.773Z
Learning: When reviewing code related to type coercion in JavaScript within the DIGIT-Frontend repository, it's important to consider the context in which functions like `isNaN` and `isFinite` are used, as explicit type coercion might be necessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#720
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/JsonPreviewInExcelForm.js:56-56
Timestamp: 2024-06-10T19:25:42.992Z
Learning: When checking if a value is numeric in JavaScript, using `!isNaN(parseFloat(value)) && isFinite(value)` is a more robust approach to avoid misinterpreting strings like "2Wn" as numeric.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#720
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/JsonPreviewInExcelForm.js:56-56
Timestamp: 2024-10-08T20:11:07.772Z
Learning: When checking if a value is numeric in JavaScript, using `!isNaN(parseFloat(value)) && isFinite(value)` is a more robust approach to avoid misinterpreting strings like "2Wn" as numeric.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#741
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/JsonPreviewInExcelForm.js:54-59
Timestamp: 2024-06-10T19:25:42.992Z
Learning: When checking if a value is numeric in JavaScript, using `!isNaN(parseFloat(value)) && isFinite(value)` is a more robust approach to avoid misinterpreting strings like "21fasf" as numeric.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#741
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/JsonPreviewInExcelForm.js:54-59
Timestamp: 2024-10-08T20:11:12.539Z
Learning: When checking if a value is numeric in JavaScript, using `!isNaN(parseFloat(value)) && isFinite(value)` is a more robust approach to avoid misinterpreting strings like "21fasf" as numeric.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/sendForEditPopUp.js (18)
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1832
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:592-594
Timestamp: 2024-11-14T12:48:23.023Z
Learning: In `PopInbox.js`, when integrating the `ConfirmationPopUp` component, error handling for API failures is managed internally within the component, so explicitly passing an `onError` prop is not necessary.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1837
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js:559-561
Timestamp: 2024-11-15T10:15:57.369Z
Learning: In `PopInbox.js`, error handling for the `onError` callback in `WorkflowCommentPopUp` is handled within the component, so explicit error handling in the parent component is unnecessary.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1622
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/PopInboxTable.js:355-363
Timestamp: 2024-10-22T12:51:42.266Z
Learning: In `PopInboxTable.js`, the `showEditVillagePopup` state variable is initialized as an empty object.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-06-14T14:10:38.086Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js:3-39
Timestamp: 2024-06-14T14:10:20.359Z
Learning: The `CustomScaleControl` component in the `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js` file should not include a "loading map" message as there is another component handling this functionality to avoid redundancy.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1-1
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The imports in `MicroplanPreview.js` are from different libraries: `@egovernments/digit-ui-components` and `@egovernments/digit-ui-react-components`.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1925
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js:267-269
Timestamp: 2024-11-28T11:34:27.480Z
Learning: In the `downloadTemplate` function of `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js`, the scenario where `state?.hierarchyType` is undefined will not occur.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#1763
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/MyCampaign.js:65-75
Timestamp: 2024-11-07T07:17:27.636Z
Learning: In `MyCampaign.js`, when suggesting code improvements for the `onClickRow` function, keep suggestions simple and avoid unnecessary complexity.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: nabeelmd-eGov
PR: egovernments/DIGIT-Frontend#1680
File: health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js:1032-1094
Timestamp: 2024-10-26T15:11:49.938Z
Learning: In the DIGIT-Frontend project, when reviewing the `UICustomizations.js` file, avoid suggesting refactoring of repetitive rendering logic in switch cases into helper functions, unless explicitly requested.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/timelinePopUpWrapper.js:36-36
Timestamp: 2024-11-07T11:00:11.847Z
Learning: In the `TimelinePopUpWrapper` component in `timelinePopUpWrapper.js`, the `action` property of `instance` is a required field and will always be defined; thus, checks for undefined values for `instance.action` are unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `onStepClick` logic in `CreateMicroplan.js` is intentionally commented out to allow developers to navigate between screens during development, even though not all screens are made yet.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#771
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/CreateMicroplan.js:204-204
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `setCheckDataCompletion` function in `CreateMicroplan.js` uses string literals as arguments, not boolean values. This is used to manage different states of data completion checks.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:1-1
Timestamp: 2024-10-17T11:59:00.327Z
Learning: In `ActivityCard.js`, `React.Fragment` is used in the code.
Learnt from: Tulika-eGov
PR: egovernments/DIGIT-Frontend#2188
File: micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/employee/new-inbox.js:34-47
Timestamp: 2025-02-05T10:18:29.947Z
Learning: In the DIGIT-Frontend codebase, translations within FormComposer are handled internally by the component itself, so the translation function 't' does not need to be added to useMemo dependency arrays even when used within the memoized function that generates form configurations.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/verify_generate_payements.js (17)
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2488
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js:152-152
Timestamp: 2025-06-04T04:08:48.234Z
Learning: In the employee login component (micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js), prefer using a `defaultTenant` variable to store `Digit.ULBService.getStateId()` instead of calling the function multiple times inline in the `defaultValue` object. This improves code readability and avoids function call duplication.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1-1
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The imports in `MicroplanPreview.js` are from different libraries: `@egovernments/digit-ui-components` and `@egovernments/digit-ui-react-components`.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1925
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js:267-269
Timestamp: 2024-11-28T11:34:27.480Z
Learning: In the `downloadTemplate` function of `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserUpload.js`, the scenario where `state?.hierarchyType` is undefined will not occur.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#771
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/CreateMicroplan.js:204-204
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `setCheckDataCompletion` function in `CreateMicroplan.js` uses string literals as arguments, not boolean values. This is used to manage different states of data completion checks.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#771
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/pages/employee/CreateMicroplan.js:204-204
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `setCheckDataCompletion` function in `CreateMicroplan.js` uses string literals as arguments, not boolean values. This is used to manage different states of data completion checks.
Learnt from: Tulika-eGov
PR: egovernments/DIGIT-Frontend#2288
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Landing/LandingComponent.js:18-24
Timestamp: 2025-03-25T10:47:42.433Z
Learning: In the DIGIT-Frontend project, commented-out code like `//config = defaultconfig;` is sometimes intentionally kept when it serves a development purpose, such as providing a way to quickly switch between configurations during local testing.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2089
File: micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js:111-111
Timestamp: 2025-01-02T04:41:15.957Z
Learning: In micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js, always use "mdms[0].uniqueIdentifier" for the jsonPath instead of differentiating between "SOR" and other masters.
Learnt from: nabeelmd-eGov
PR: egovernments/DIGIT-Frontend#1680
File: health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js:1032-1094
Timestamp: 2024-10-26T15:11:49.938Z
Learning: In the DIGIT-Frontend project, when reviewing the `UICustomizations.js` file, avoid suggesting refactoring of repetitive rendering logic in switch cases into helper functions, unless explicitly requested.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#1763
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/MyCampaign.js:65-75
Timestamp: 2024-11-07T07:17:27.636Z
Learning: In `MyCampaign.js`, when suggesting code improvements for the `onClickRow` function, keep suggestions simple and avoid unnecessary complexity.
Learnt from: Bhavya-egov
PR: egovernments/DIGIT-Frontend#2013
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/jsonReader.js:24-27
Timestamp: 2024-12-12T05:38:22.901Z
Learning: In the `jsonReader` function within `health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/jsonReader.js`, generic error handling is sufficient, and enhancing error handling with specific error types is not necessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `onStepClick` logic in `CreateMicroplan.js` is intentionally commented out to allow developers to navigate between screens during development, even though not all screens are made yet.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js:3-39
Timestamp: 2024-06-14T14:10:20.359Z
Learning: The `CustomScaleControl` component in the `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js` file should not include a "loading map" message as there is another component handling this functionality to avoid redundancy.
Learnt from: Tulika-eGov
PR: egovernments/DIGIT-Frontend#2188
File: micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/employee/new-inbox.js:34-47
Timestamp: 2025-02-05T10:18:29.947Z
Learning: In the DIGIT-Frontend codebase, translations within FormComposer are handled internally by the component itself, so the translation function 't' does not need to be added to useMemo dependency arrays even when used within the memoized function that generates form configurations.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js (8)
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1-1
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The imports in `MicroplanPreview.js` are from different libraries: `@egovernments/digit-ui-components` and `@egovernments/digit-ui-react-components`.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#691
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Upload.js:16-17
Timestamp: 2024-10-08T20:11:12.539Z
Learning: The components `Loader`, `Toast`, and `Modal` are from different libraries in the DIGIT-Frontend project, as clarified by the user.
Learnt from: Tulika-eGov
PR: egovernments/DIGIT-Frontend#2188
File: micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/employee/new-inbox.js:34-47
Timestamp: 2025-02-05T10:18:29.947Z
Learning: In the DIGIT-Frontend codebase, translations within FormComposer are handled internally by the component itself, so the translation function 't' does not need to be added to useMemo dependency arrays even when used within the memoized function that generates form configurations.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:1-1
Timestamp: 2024-10-17T11:59:00.327Z
Learning: In `ActivityCard.js`, `React.Fragment` is used in the code.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/ProductDetails/ProductDetailsComponentUpdated.js:279-280
Timestamp: 2025-06-26T10:21:42.619Z
Learning: In the sandbox ProductDetailsComponentUpdated.js component, string concatenation is intentionally used for translation keys (e.g., `t(`${module}` + "_SECTION1_ROLE_1")`) instead of template literals for easier config identification and to make the key structure more explicit.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/bill_inbox/BillInbox.js (15)
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1847
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js:308-314
Timestamp: 2024-11-18T04:35:51.535Z
Learning: In `PlanInbox.js`, the variable `planWithCensus?.StatusCount[selectedFilter]` is always defined in the given context, so null checks are unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#720
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Nagivator.js:46-56
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The user prefers the `useEffect` hook to run only when `checkDataCompletion` changes in the `Navigator` component.
Learnt from: nabeelmd-eGov
PR: egovernments/DIGIT-Frontend#1680
File: health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js:1032-1094
Timestamp: 2024-10-26T15:11:49.938Z
Learning: In the DIGIT-Frontend project, when reviewing the `UICustomizations.js` file, avoid suggesting refactoring of repetitive rendering logic in switch cases into helper functions, unless explicitly requested.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#1763
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/MyCampaign.js:65-75
Timestamp: 2024-11-07T07:17:27.636Z
Learning: In `MyCampaign.js`, when suggesting code improvements for the `onClickRow` function, keep suggestions simple and avoid unnecessary complexity.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2488
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js:152-152
Timestamp: 2025-06-04T04:08:48.234Z
Learning: In the employee login component (micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js), prefer using a `defaultTenant` variable to store `Digit.ULBService.getStateId()` instead of calling the function multiple times inline in the `defaultValue` object. This improves code readability and avoids function call duplication.
Learnt from: Bhavya-egov
PR: egovernments/DIGIT-Frontend#2013
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/jsonReader.js:24-27
Timestamp: 2024-12-12T05:38:22.901Z
Learning: In the `jsonReader` function within `health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/utils/jsonReader.js`, generic error handling is sufficient, and enhancing error handling with specific error types is not necessary.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2089
File: micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js:111-111
Timestamp: 2025-01-02T04:41:15.957Z
Learning: In micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js, always use "mdms[0].uniqueIdentifier" for the jsonPath instead of differentiating between "SOR" and other masters.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js:3-39
Timestamp: 2024-06-14T14:10:20.359Z
Learning: The `CustomScaleControl` component in the `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/CustomScaleControl.js` file should not include a "loading map" message as there is another component handling this functionality to avoid redundancy.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/postcss.config.js:3-13
Timestamp: 2024-10-08T20:11:12.539Z
Learning: Retain commented-out code in `postcss.config.js` as it might be needed for future configurations or debugging.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#0
File: :0-0
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `onStepClick` logic in `CreateMicroplan.js` is intentionally commented out to allow developers to navigate between screens during development, even though not all screens are made yet.
Learnt from: Tulika-eGov
PR: egovernments/DIGIT-Frontend#2288
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Landing/LandingComponent.js:18-24
Timestamp: 2025-03-25T10:47:42.433Z
Learning: In the DIGIT-Frontend project, commented-out code like `//config = defaultconfig;` is sometimes intentionally kept when it serves a development purpose, such as providing a way to quickly switch between configurations during local testing.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1622
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/PopInboxTable.js:355-363
Timestamp: 2024-10-22T12:51:42.266Z
Learning: In `PopInboxTable.js`, the `showEditVillagePopup` state variable is initialized as an empty object.
🧬 Code Graph Analysis (4)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/PaymentsCard.js (1)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/upload_and_fetch_bills.js (1)
ROLES
(11-14)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyBillsSearch.js (2)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js (4)
useTranslation
(13-13)billID
(24-24)onSubmit
(188-191)onClear
(193-196)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/verify_generate_payements.js (5)
useTranslation
(13-13)billID
(26-26)billStatus
(27-27)onSubmit
(214-217)onClear
(219-222)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyAndGeneratePaymentsTable.js (4)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/BillDetailsTable.js (4)
useTranslation
(26-26)showToast
(28-28)project
(29-29)columns
(161-397)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/sendForEditPopUp.js (5)
useTranslation
(17-17)showToast
(21-21)SendForEditPopUp
(15-130)comment
(20-20)selectedUser
(22-22)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/MyBillsTable.js (4)
useTranslation
(22-22)showToast
(23-23)project
(24-24)columns
(27-187)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/bill_payment_details.js (10)
useTranslation
(24-24)showToast
(34-34)project
(114-114)updateBillDetailMutation
(296-298)updateBillDetailWorkflow
(299-353)getTaskStatusMutation
(355-357)verifyBillMutation
(358-360)triggerVerifyBill
(361-450)generatePaymentMutation
(452-454)triggerGeneratePayment
(456-550)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/upload_and_fetch_bills.js (1)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js (2)
useTranslation
(13-13)MyBills
(11-247)
🪛 Biome (1.9.4)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/Response.js
[error] 14-14: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
[error] 28-32: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyBillsSearch.js
[error] 39-39: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.
Unsafe fix: Use a SelfClosingElement instead
(lint/style/useSelfClosingElements)
[error] 48-48: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.
Unsafe fix: Use a SelfClosingElement instead
(lint/style/useSelfClosingElements)
[error] 56-61: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.
Unsafe fix: Use a SelfClosingElement instead
(lint/style/useSelfClosingElements)
[error] 58-58: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
[error] 59-59: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/editWorkerDetailsPopUp .js
[error] 53-53: Avoid passing children using a prop
The canonical way to pass children in React is to use JSX elements
(lint/correctness/noChildrenProp)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/bill_payment_details.js
[error] 132-132: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
[error] 170-170: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
[error] 192-192: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
[error] 220-220: Template literals are preferred over string concatenation.
Unsafe fix: Use a template literal.
(lint/style/useTemplate)
[error] 232-232: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
[error] 881-899: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
[error] 903-925: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
[error] 946-967: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
[error] 970-981: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/VerifyAndGeneratePaymentsTable.js
[error] 354-354: Useless case clause.
because the default clause is present:
Unsafe fix: Remove the useless case.
(lint/complexity/noUselessSwitchCase)
[error] 355-355: Useless case clause.
because the default clause is present:
Unsafe fix: Remove the useless case.
(lint/complexity/noUselessSwitchCase)
[error] 370-379: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.
Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.
(lint/a11y/useKeyWithClickEvents)
[error] 519-519: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/upload_and_fetch_bills.js
[error] 121-129: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
[error] 130-141: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
[error] 158-165: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
[error] 166-174: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/BillDetailsTable.js
[error] 227-229: Avoid using unnecessary Fragment.
A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.
Unsafe fix: Remove the Fragment
(lint/complexity/noUselessFragments)
[error] 291-293: Avoid using unnecessary Fragment.
A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.
Unsafe fix: Remove the Fragment
(lint/complexity/noUselessFragments)
[error] 343-343: Use Number.parseInt instead of the equivalent global.
ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.
(lint/style/useNumberNamespace)
[error] 344-344: Use Number.parseInt instead of the equivalent global.
ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.
(lint/style/useNumberNamespace)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/verify_generate_payements.js
[error] 60-60: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
[error] 115-115: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js
[error] 93-93: Shouldn't redeclare 'bill'. Consider to delete it or rename it.
'bill' is defined here:
(lint/suspicious/noRedeclare)
🔇 Additional comments (5)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/PaymentsCard.js (2)
8-8
: LGTM: New role group added correctly.The addition of the
EDIT_BILLS
role group with thePAYMENT_EDITOR
role follows the existing pattern and integrates well with the role-based access control system.
41-42
: LGTM: New navigation links added properly.The new links for "verify-bills" and "edit-bills" are correctly implemented using the existing
generateLink
helper function and properly assigned to their respective role groups. The role-based filtering ensures appropriate access control.health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/sendForEditPopUp.js (1)
30-54
: LGTM: Proper validation logic implemented.The validation logic correctly checks for both user selection and comment presence, providing appropriate error messages via toast notifications. The component properly manages state and callbacks.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/upload_and_fetch_bills.js (1)
33-36
: LGTM: Navigation logic implemented correctly.The
handleConfirm
function properly extracts bill IDs from selected bills and navigates to the verification page with the correct route state. The logic is clean and follows React Router patterns.health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/bill_inbox/BillInbox.js (1)
184-260
: Clarify the purpose of updateBillData functionThe
updateBillData
function is defined but never invoked. Either implement its usage or remove it to avoid confusion.If this function is intended to be used, uncomment the invocation:
- // if(billUpdate){ - // updateBillData(); - // setBillUpdate(false); - // } + if(billUpdate){ + updateBillData(); + setBillUpdate(false); + }Otherwise, remove the entire function definition to keep the code clean.
<div style={{ display: "flex", justifyContent: "center", gap: "2rem", marginTop: "1rem" }}> | ||
<div style={{ flex: 1, display: "flex", justifyContent: "center" }}> | ||
<Card | ||
className="upload-card hover-highlight"S |
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.
Fix syntax error in JSX.
There's an extra 'S' character at the end of the line that will cause a compilation error.
- className="upload-card hover-highlight"S
+ className="upload-card hover-highlight"
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
className="upload-card hover-highlight"S | |
className="upload-card hover-highlight" |
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/upload_and_fetch_bills.js
at line 63, remove the extra 'S' character at the end of the className attribute
to fix the JSX syntax error and ensure the code compiles correctly.
const bill = response?.bills?.[0]; | ||
console.log("Bill updated:", bill); | ||
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); | ||
await sleep(10000); |
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.
🧹 Nitpick (assertive)
Extract sleep function to a utility
The inline sleep function should be extracted to a reusable utility function.
- const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
- await sleep(10000);
+ // Extract to utils/helpers.js
+ await sleep(10000); // Consider making the delay configurable
Add to a utilities file:
export const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js
at line 119, the sleep function is used inline. Extract this sleep function into
a separate utility file by creating a reusable function that returns a Promise
resolving after a given timeout. Then import and use this utility function
instead of the inline implementation to improve code reuse and maintainability.
const bill = BillData?.bills?.[0]; | ||
|
||
if (props?.isSelectableRows && bill?.id) { | ||
console.log("Bill ID:", bill.id); |
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.
🧹 Nitpick (assertive)
Remove console.log statements
Debug logging should be removed from production code.
- console.log("Bill ID:", bill.id);
- console.log("Bill updated:", bill);
- console.log("Bill detail workflow updated successfully:", data);
- console.log("Error updating bill detail workflow:", error);
- console.log("12Error updating bill detail workflow:", error);
- console.error("Error in bill or billDetails update:", error);
Also applies to: 117-117, 133-133, 143-143, 155-155, 168-168
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js
at lines 96, 117, 133, 143, 155, and 168, remove all console.log statements used
for debugging to ensure no debug logging remains in the production code.
...ro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js
Show resolved
Hide resolved
...ro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js
Show resolved
Hide resolved
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: 5
🔭 Outside diff range comments (1)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js (1)
88-182
: Fix async useEffect anti-patternUsing async directly in useEffect is an anti-pattern. Create an async function inside the effect and call it immediately.
- useEffect(async () => { + useEffect(() => { if (BillData) { - const updateBillData = async () => { BillData.bills.forEach(async (bill) => { // ... existing code ... }); }; - // if(billUpdate){ - await updateBillData(); - // setIsUpdateLoading(false); + updateBillData(); setTableData(BillData.bills); setTotalCount(BillData?.pagination?.totalCount); } }, [BillData])
♻️ Duplicate comments (2)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js (2)
96-96
: Remove console.log statementsDebug logging should be removed from production code.
Also applies to: 117-117, 133-133, 143-143, 155-155, 168-168
119-119
: Extract sleep function to a utilityThe inline sleep function should be extracted to a reusable utility function.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js
(7 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.js`: check
**/*.js
: check
⚙️ Source: CodeRabbit Configuration File
List of files the instruction was applied to:
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js
🧠 Learnings (2)
📓 Common learnings
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js:0-0
Timestamp: 2025-06-27T05:52:33.156Z
Learning: The PrivacyComponent in `micro-ui/web/micro-ui-internals/packages/modules/core/src/components/PrivacyComponent.js` is mostly used in login and signup pages, especially in formcomposer where the UI is stable, making layout changes less likely to cause regressions.
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js (21)
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#606
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js:276-276
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The `addResourcesToFilteredDataToShow` function in `micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/index.js` now includes checks for data integrity, such as validation of `previewData`, the common column, and `resources`, along with error logging for invalid data formats.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1770
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js:320-322
Timestamp: 2024-11-07T11:02:33.520Z
Learning: In `health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/viewVillage.js`, the `data?.additionalFields` object is guaranteed to be defined, so checking for its existence before accessing its keys is unnecessary.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2488
File: micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js:152-152
Timestamp: 2025-06-04T04:08:48.234Z
Learning: In the employee login component (micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js), prefer using a `defaultTenant` variable to store `Digit.ULBService.getStateId()` instead of calling the function multiple times inline in the `defaultValue` object. This improves code readability and avoids function call duplication.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/updateSessionUtils.js:144-156
Timestamp: 2024-06-10T19:25:42.992Z
Learning: In the `updateSessionUtils.js` file, during the data processing phase, errors should be logged, and the file should be ignored without throwing exceptions.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/updateSessionUtils.js:144-156
Timestamp: 2024-10-08T20:11:12.539Z
Learning: In the `updateSessionUtils.js` file, during the data processing phase, errors should be logged, and the file should be ignored without throwing exceptions.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#2089
File: micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js:111-111
Timestamp: 2025-01-02T04:41:15.957Z
Learning: In micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js, always use "mdms[0].uniqueIdentifier" for the jsonPath instead of differentiating between "SOR" and other masters.
Learnt from: nabeelmd-eGov
PR: egovernments/DIGIT-Frontend#1680
File: health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js:1032-1094
Timestamp: 2024-10-26T15:11:49.938Z
Learning: In the DIGIT-Frontend project, when reviewing the `UICustomizations.js` file, avoid suggesting refactoring of repetitive rendering logic in switch cases into helper functions, unless explicitly requested.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#720
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/excelValidations.js:7-7
Timestamp: 2024-06-10T19:25:42.992Z
Learning: In `excelValidations.js`, the variables `locationDataColumns`, `errors`, `hasDataErrors`, `missingColumnsList`, and `errorMessages` are reassigned later in the code, making the use of `let` appropriate.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#720
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/excelValidations.js:7-7
Timestamp: 2024-10-08T20:11:12.539Z
Learning: In `excelValidations.js`, the variables `locationDataColumns`, `errors`, `hasDataErrors`, `missingColumnsList`, and `errorMessages` are reassigned later in the code, making the use of `let` appropriate.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#720
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/JsonPreviewInExcelForm.js:48-49
Timestamp: 2024-10-08T20:11:07.772Z
Learning: In `JsonPreviewInExcelForm.js`, the variables `headerName` and `error` are only assigned once within the scope of the `map` function, making the use of `const` appropriate.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#720
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/JsonPreviewInExcelForm.js:48-49
Timestamp: 2024-06-10T19:25:42.992Z
Learning: In `JsonPreviewInExcelForm.js`, the variables `headerName` and `error` are only assigned once within the scope of the `map` function, making the use of `const` appropriate.
Learnt from: jagankumar-egov
PR: egovernments/DIGIT-Frontend#1763
File: health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/MyCampaign.js:65-75
Timestamp: 2024-11-07T07:17:27.636Z
Learning: In `MyCampaign.js`, when suggesting code improvements for the `onClickRow` function, keep suggestions simple and avoid unnecessary complexity.
Learnt from: rachana-egov
PR: egovernments/DIGIT-Frontend#1847
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js:308-314
Timestamp: 2024-11-18T04:35:51.535Z
Learning: In `PlanInbox.js`, the variable `planWithCensus?.StatusCount[selectedFilter]` is always defined in the given context, so null checks are unnecessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#741
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/createTemplate.js:56-56
Timestamp: 2024-06-10T19:25:42.992Z
Learning: In `createTemplate.js`, the variables `rowData`, `tempRow`, `columnSchema`, `newXlsxData`, and `columnList` are reassigned later in the code, making the use of `let` appropriate.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#741
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/utils/createTemplate.js:56-56
Timestamp: 2024-10-08T20:11:07.773Z
Learning: In `createTemplate.js`, the variables `rowData`, `tempRow`, `columnSchema`, `newXlsxData`, and `columnList` are reassigned later in the code, making the use of `let` appropriate.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#698
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/MicroplanPreview.js:1-1
Timestamp: 2024-06-10T19:25:42.992Z
Learning: The imports in `MicroplanPreview.js` are from different libraries: `@egovernments/digit-ui-components` and `@egovernments/digit-ui-react-components`.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#691
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/components/Upload.js:16-17
Timestamp: 2024-10-08T20:11:12.539Z
Learning: The components `Loader`, `Toast`, and `Modal` are from different libraries in the DIGIT-Frontend project, as clarified by the user.
Learnt from: Tulika-eGov
PR: egovernments/DIGIT-Frontend#2188
File: micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/employee/new-inbox.js:34-47
Timestamp: 2025-02-05T10:18:29.947Z
Learning: In the DIGIT-Frontend codebase, translations within FormComposer are handled internally by the component itself, so the translation function 't' does not need to be added to useMemo dependency arrays even when used within the memoized function that generates form configurations.
Learnt from: Ramkrishna-egov
PR: egovernments/DIGIT-Frontend#1545
File: health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/ActivityCard.js:1-1
Timestamp: 2024-10-17T11:59:00.327Z
Learning: In `ActivityCard.js`, `React.Fragment` is used in the code.
Learnt from: Hari-egov
PR: egovernments/DIGIT-Frontend#2644
File: micro-ui/web/micro-ui-internals/packages/modules/sandbox/src/pages/employee/ProductDetails/ProductDetailsComponentUpdated.js:279-280
Timestamp: 2025-06-26T10:21:42.619Z
Learning: In the sandbox ProductDetailsComponentUpdated.js component, string concatenation is intentionally used for translation keys (e.g., `t(`${module}` + "_SECTION1_ROLE_1")`) instead of template literals for easier config identification and to make the key structure more explicit.
🧬 Code Graph Analysis (1)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js (3)
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/verify_generate_payements.js (4)
useTranslation
(13-13)project
(43-43)handlePageChange
(125-128)handlePerRowsChange
(130-134)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/components/MyBillsTable.js (5)
useTranslation
(22-22)project
(24-24)MyBillsTable
(21-236)handlePageChange
(189-191)handlePerRowsChange
(193-195)health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/bill_payment_details.js (5)
useTranslation
(24-24)project
(114-114)updateBillDetailMutation
(296-298)handlePageChange
(46-49)handlePerRowsChange
(51-55)
<React.Fragment> | ||
{selectedCount > 0 && ( | ||
<div style={{ margin: '1rem 0', fontWeight: 'bold', color: '#0B4B66' }}> | ||
{selectedCount} {t("HCM_AM_BILLS_SELECTED")} | {t("$")} {totalAmount} |
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.
🧹 Nitpick (assertive)
Make currency symbol configurable
The hardcoded "$" symbol should be replaced with a configurable or localized currency symbol.
- {selectedCount} {t("HCM_AM_BILLS_SELECTED")} | {t("$")} {totalAmount}
+ {selectedCount} {t("HCM_AM_BILLS_SELECTED")} | {t("COMMON_CURRENCY_SYMBOL")} {totalAmount}
Also consider using a currency formatter for proper number formatting:
const formattedAmount = new Intl.NumberFormat(locale, {
style: 'currency',
currency: 'USD' // Make this configurable
}).format(totalAmount);
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js
at line 219, replace the hardcoded "$" currency symbol with a configurable or
localized currency symbol. Use Intl.NumberFormat with the appropriate locale and
currency code to format totalAmount properly as currency. Ensure the currency
code is configurable to support different currencies dynamically.
console.log("Bill ID:", bill.id); | ||
|
||
try { | ||
if (bill.businessService != "PAYMENTS.BILL") { |
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.
🛠️ Refactor suggestion
Use strict equality operator
Use !==
instead of !=
for strict comparison to avoid potential type coercion issues.
- if (bill.businessService != "PAYMENTS.BILL") {
+ if (bill.businessService !== "PAYMENTS.BILL") {
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
if (bill.businessService != "PAYMENTS.BILL") { | |
if (bill.businessService !== "PAYMENTS.BILL") { |
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js
at line 99, replace the non-strict inequality operator `!=` with the strict
inequality operator `!==` in the condition checking if bill.businessService is
not equal to "PAYMENTS.BILL" to prevent type coercion issues.
import MyBillsSearch from "../../components/MyBillsSearch"; | ||
import MyBillsTable from "../../components/MyBillsTable"; | ||
import { defaultRowsPerPage } from "../../utils/constants"; | ||
import { set } from "lodash"; |
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.
🧹 Nitpick (assertive)
Remove unused import
The set
function from lodash is imported but never used in this file.
-import { set } from "lodash";
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
import { set } from "lodash"; |
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js
at line 9, the lodash 'set' function is imported but not used anywhere in the
file. Remove the import statement for 'set' to clean up unused code and avoid
unnecessary dependencies.
const updateBillData = async () => { | ||
BillData.bills.forEach(async (bill) => { | ||
// const bill = BillData?.bills?.[0]; | ||
|
||
if (props?.isSelectableRows && bill?.id) { | ||
console.log("Bill ID:", bill.id); | ||
|
||
try { | ||
if (bill.businessService != "PAYMENTS.BILL") { | ||
setIsUpdateLoading(true); | ||
|
||
const updatedBillResponse = await updateBillMutation.mutateAsync( | ||
{ | ||
body: { | ||
bill: { | ||
...bill, | ||
businessService: "PAYMENTS.BILL", | ||
}, | ||
workflow: { | ||
action: "CREATE", | ||
}, | ||
}, | ||
}, | ||
{ | ||
onSuccess: async (response) => { | ||
const bill = response?.bills?.[0]; | ||
console.log("Bill updated:", bill); | ||
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); | ||
await sleep(10000); | ||
updateBillDetailMutation.mutateAsync( | ||
{ | ||
body: { | ||
bill: { | ||
...bill, | ||
}, | ||
workflow: { | ||
action: "CREATE", | ||
} | ||
}, | ||
}, | ||
{ | ||
onSuccess: (data) => { | ||
console.log("Bill detail workflow updated successfully:", data); | ||
setShowToast({ | ||
key: "success", | ||
label: t(`HCM_AM_BILL_UPDATE_SUCCESS`), //TODO UPDATE TOAST MSG | ||
transitionTime: 2000, | ||
}); | ||
setIsUpdateLoading(false); | ||
refetchBill(); // refetch bills after update | ||
}, | ||
onError: (error) => { | ||
console.log("Error updating bill detail workflow:", error); | ||
setIsUpdateLoading(false); | ||
setShowToast({ | ||
key: "error", | ||
label: error?.response?.data?.Errors?.[0]?.message || t("HCM_AM_BILL_DETAILS_UPDATE_ERROR"),//TODO UPDATE TOAST MSG | ||
transitionTime: 2000, | ||
}); | ||
} | ||
} | ||
) | ||
}, | ||
onError: (error) => { | ||
console.log("12Error updating bill detail workflow:", error); | ||
setIsUpdateLoading(false); | ||
setShowToast({ | ||
key: "error", | ||
label: error?.response?.data?.Errors?.[0]?.message || t("HCM_AM_BILL_UPDATE_ERROR"),//TODO UPDATE TOAST MSG | ||
transitionTime: 2000, | ||
}); | ||
}, | ||
}, | ||
); | ||
// updatedBillResponse(); | ||
} | ||
} catch (error) { | ||
console.error("Error in bill or billDetails update:", error); | ||
setIsUpdateLoading(false); | ||
setShowToast({ key: "error", label: t(`HCM_AM_BILL_UPDATE_ERROR`), transitionTime: 3000 }); | ||
} | ||
|
||
} | ||
}); | ||
}; |
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.
🛠️ Refactor suggestion
Improve bill update logic with better error handling and concurrency
The current implementation has several issues:
- Sequential processing could be slow
- No tracking of partial failures
- Hardcoded 10-second delay without explanation
- Loading state issues with multiple bills
Consider using Promise.all
or Promise.allSettled
for concurrent processing and better error handling.
const updateBillData = async () => {
- BillData.bills.forEach(async (bill) => {
- // const bill = BillData?.bills?.[0];
-
- if (props?.isSelectableRows && bill?.id) {
- console.log("Bill ID:", bill.id);
-
- try {
- if (bill.businessService != "PAYMENTS.BILL") {
- setIsUpdateLoading(true);
- // ... rest of the code
- }
- } catch (error) {
- console.error("Error in bill or billDetails update:", error);
- setIsUpdateLoading(false);
- setShowToast({ key: "error", label: t(`HCM_AM_BILL_UPDATE_ERROR`), transitionTime: 3000 });
- }
- }
- });
+ if (!props?.isSelectableRows) return;
+
+ const billsToUpdate = BillData.bills.filter(bill =>
+ bill?.id && bill.businessService !== "PAYMENTS.BILL"
+ );
+
+ if (billsToUpdate.length === 0) return;
+
+ setIsUpdateLoading(true);
+
+ const updatePromises = billsToUpdate.map(async (bill) => {
+ try {
+ const updatedBillResponse = await updateBillMutation.mutateAsync({
+ body: {
+ bill: { ...bill, businessService: "PAYMENTS.BILL" },
+ workflow: { action: "CREATE" }
+ }
+ });
+
+ const updatedBill = updatedBillResponse?.bills?.[0];
+ await sleep(10000); // Consider making this configurable
+
+ await updateBillDetailMutation.mutateAsync({
+ body: {
+ bill: { ...updatedBill },
+ workflow: { action: "CREATE" }
+ }
+ });
+
+ return { success: true, billId: bill.id };
+ } catch (error) {
+ return { success: false, billId: bill.id, error };
+ }
+ });
+
+ const results = await Promise.allSettled(updatePromises);
+ const failures = results.filter(r => r.status === 'rejected' || !r.value?.success);
+
+ setIsUpdateLoading(false);
+
+ if (failures.length === 0) {
+ setShowToast({
+ key: "success",
+ label: t(`HCM_AM_BILL_UPDATE_SUCCESS`),
+ transitionTime: 2000,
+ });
+ } else if (failures.length < results.length) {
+ setShowToast({
+ key: "warning",
+ label: t(`HCM_AM_PARTIAL_BILL_UPDATE_SUCCESS`),
+ transitionTime: 3000,
+ });
+ } else {
+ setShowToast({
+ key: "error",
+ label: t(`HCM_AM_BILL_UPDATE_ERROR`),
+ transitionTime: 3000,
+ });
+ }
+
+ refetchBill();
};
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js
between lines 91 and 175, the bill update logic processes each bill sequentially
with a hardcoded 10-second delay and lacks proper error tracking and loading
state management for multiple bills. Refactor the code to use Promise.allSettled
to process all bills concurrently, track individual successes and failures, and
update the loading state only after all updates complete. Remove the fixed delay
or replace it with a more appropriate mechanism if needed, and ensure error
handling provides feedback for partial failures without blocking other updates.
console.log("Bill detail workflow updated successfully:", data); | ||
setShowToast({ | ||
key: "success", | ||
label: t(`HCM_AM_BILL_UPDATE_SUCCESS`), //TODO UPDATE TOAST MSG |
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.
💡 Verification agent
🧩 Analysis chain
Address TODO comments for toast messages
There are multiple TODO comments indicating that toast messages need to be updated. Please ensure these are addressed before merging.
Would you like me to help create appropriate toast message translations or open an issue to track this task?
Also applies to: 147-147, 159-159
🏁 Script executed:
#!/bin/bash
# Locate the my_bills.js file
file=$(fd my_bills.js)
echo "Inspecting TODOs in: $file"
# List all TODO comments with line numbers
rg -n "TODO" "$file"
Length of output: 968
Update toast message translations and remove TODO comments
Please replace the placeholder TODOs with finalized translation keys for each toast and delete the //TODO UPDATE TOAST MSG
comments:
• health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js
– Line 136: finalize the success toast message (currently t('HCM_AM_BILL_UPDATE_SUCCESS')
) and remove the TODO.
– Line 147: confirm the error toast translation key (fallback: t('HCM_AM_BILL_DETAILS_UPDATE_ERROR')
) and remove the TODO.
– Line 159: confirm the error toast translation key (fallback: t('HCM_AM_BILL_UPDATE_ERROR')
) and remove the TODO.
Let me know if you’d like help crafting the specific translation strings or if we should track this in a separate issue.
🤖 Prompt for AI Agents
In
health/micro-ui/web/micro-ui-internals/packages/modules/health-payments/src/pages/employee/my_bills.js
at lines 136, 147, and 159, replace the placeholder toast message translation
keys with the finalized ones for success and error messages as specified, and
remove all the associated //TODO UPDATE TOAST MSG comments to clean up the code.
Confirm or update the translation keys to the correct finalized strings before
removing the comments.
Choose the appropriate template for your PR:
Feature PR
Feature Request
JIRA ID
Module
Description
Related Issues
Bugfix PR
Bugfix Request
JIRA ID
Module
Description
Root Cause
Related Issues
Release PR
Summary by CodeRabbit
New Features
Enhancements
Bug Fixes
Style