-
Notifications
You must be signed in to change notification settings - Fork 19
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
bug bash issue #659
bug bash issue #659
Conversation
nabeelmd-eGov
commented
May 22, 2024
- fixes-> cyclenumber issue, hover issue, dropdown height issue,
- css
- fixes
WalkthroughWalkthroughThe recent updates in the micro-UI project mainly focus on upgrading dependencies, refining component imports, and enhancing CSS styles. Key changes include updating the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configration 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: 2
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
micro-ui/web/micro-ui-internals/packages/css/package.json
is excluded by!**/*.json
Files selected for processing (9)
- micro-ui/web/micro-ui-internals/example/public/index.html (1 hunks)
- micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss (1 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AddProductField.js (1 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignSummary.js (1 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js (4 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useResourceData.js (3 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js (1 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/AddProductscontext.js (2 hunks)
- micro-ui/web/public/index.html (1 hunks)
Files skipped from review due to trivial changes (6)
- micro-ui/web/micro-ui-internals/example/public/index.html
- micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignSummary.js
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/AddProductscontext.js
- micro-ui/web/public/index.html
Additional Context Used
Path-based Instructions (3)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useResourceData.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AddProductField.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js (1)
Pattern
**/*.js
: check
Additional comments not posted (4)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/hooks/useResourceData.js (2)
25-27
: Correctly addedcampaignId
toadditionalDetails
. This aligns with the PR's objective to enhance data handling.
1-1
: Ensure all calls touseResourceData
are updated to pass the newid
parameter.micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AddProductField.js (1)
8-8
: Updated import ofDropdown
from@egovernments/digit-ui-components
is correct as per the PR's description.micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js (1)
39-40
: Correctly retrievesid
from URL search parameters. This aligns with the PR's objective to enhance data handling.
@@ -37,7 +39,7 @@ export const useResourceData = async (data, hierarchyType, type, tenantId) => { | |||
return Error; | |||
} else { | |||
Error = errorMessage; | |||
Error.isError = true ; | |||
Error.isError = 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.
Ensure consistent error handling. Here, Error
is assigned a string directly, which might not be intended as Error.isError
is set next line.
- Error = errorMessage;
+ Error.error = errorMessage;
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.
Error.isError = true; | |
Error.error = errorMessage; | |
Error.isError = true; |
if (!errorsType[type] && uploadedFile?.length > 0) { | ||
setShowToast({ key: "info", label: t("HCM_VALIDATION_IN_PROGRESS") }); | ||
setIsValidation(true); | ||
setIsError(true); | ||
|
||
try { | ||
const temp = await Digit.Hooks.campaign.useResourceData(uploadedFile, params?.hierarchyType, type, tenantId); | ||
const temp = await Digit.Hooks.campaign.useResourceData(uploadedFile, params?.hierarchyType, type, tenantId, 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.
Ensure error handling is robust. The error message transformation might cause issues if temp.error
is undefined or not a string.
- const errorMessage = temp?.error.replaceAll(":", "-");
+ const errorMessage = temp?.error ? temp.error.replaceAll(":", "-") : "Unknown error";
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.
if (!errorsType[type] && uploadedFile?.length > 0) { | |
setShowToast({ key: "info", label: t("HCM_VALIDATION_IN_PROGRESS") }); | |
setIsValidation(true); | |
setIsError(true); | |
try { | |
const temp = await Digit.Hooks.campaign.useResourceData(uploadedFile, params?.hierarchyType, type, tenantId); | |
const temp = await Digit.Hooks.campaign.useResourceData(uploadedFile, params?.hierarchyType, type, tenantId, id); | |
if (!errorsType[type] && uploadedFile?.length > 0) { | |
setShowToast({ key: "info", label: t("HCM_VALIDATION_IN_PROGRESS") }); | |
setIsValidation(true); | |
setIsError(true); | |
try { | |
const temp = await Digit.Hooks.campaign.useResourceData(uploadedFile, params?.hierarchyType, type, tenantId, id); | |
const errorMessage = temp?.error ? temp.error.replaceAll(":", "-") : "Unknown error"; |