-
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
delivery new changes, toast fix, error fix #716
Conversation
WalkthroughWalkthroughThe recent changes to the campaign manager module primarily focus on enhancing form validation, error handling, and dynamic configuration. New state variables for error handling and validation triggers were introduced across multiple components. Additionally, the Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant User
participant CampaignDates
participant CampaignName
participant CampaignType
participant DeliveryConfig
participant SetupCampaign
participant Module
User->>CampaignDates: Fill in dates
CampaignDates->>CampaignDates: Validate dates
CampaignDates->>User: Show error if invalid
User->>CampaignName: Fill in name
CampaignName->>CampaignName: Validate name
CampaignName->>User: Show error if invalid
User->>CampaignType: Select type
CampaignType->>CampaignType: Validate type
CampaignType->>User: Show error if invalid
User->>SetupCampaign: Submit form
SetupCampaign->>SetupCampaign: Set isSubmitting to true
SetupCampaign->>DeliveryConfig: Fetch delivery config
DeliveryConfig->>SetupCampaign: Return config
SetupCampaign->>Module: Fetch BOUNDARY_HIERARCHY_TYPE
Module->>SetupCampaign: Return hierarchy type
SetupCampaign->>User: Confirm submission
Poem
Tip Early Access Features
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: 7
Outside diff range and nitpick comments (10)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js (1)
Line range hint
42-43
: Avoid using template literals when not necessary for better performance and readability.- <Header>{t(`HCM_CAMPAIGN_NAME_HEADER`)}</Header> + <Header>{t("HCM_CAMPAIGN_NAME_HEADER")}</Header>micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js (1)
Line range hint
52-53
: Avoid using template literals when not necessary for better performance and readability.- <Header>{t(`HCM_CAMPAIGN_TYPE_HEADER`)}</Header> + <Header>{t("HCM_CAMPAIGN_TYPE_HEADER")}</Header>micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDates.js (1)
Line range hint
70-71
: Avoid using template literals when not necessary for better performance and readability.- <Header>{t(`HCM_CAMPAIGN_DATES_HEADER`)}</Header> + <Header>{t("HCM_CAMPAIGN_DATES_HEADER")}</Header>Also applies to: 74-74
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js (4)
Line range hint
115-115
: Use strict equality===
for comparisons to avoid potential bugs due to type coercion.- active: i.cycleIndex == action.payload.tabIndex ? true : false, + active: i.cycleIndex === action.payload.tabIndex ? true : false,
Line range hint
239-239
: Use strict equality===
for comparisons to ensure type safety.- active: deliver.deliveryIndex == action.payload.subTabIndex ? true : false, + active: deliver.deliveryIndex === action.payload.subTabIndex ? true : false,
Line range hint
250-250
: Use strict equality===
for comparisons to ensure type safety.- active: deliver.deliveryIndex == action.payload.subTabIndex ? true : false, + active: deliver.deliveryIndex === action.payload.subTabIndex ? true : false,
Line range hint
191-206
: Consider usingfor...of
instead offorEach
for better performance and readability.- saved.forEach((cycle) => { + for (const cycle of saved) { // Remove deliveries if there are more deliveries than the specified number if (cycle.deliveries.length > subTabs) { cycle.deliveries.splice(subTabs); } // Add deliveries if there are fewer deliveries than the specified number for (let i = cycle.deliveries.length + 1; i <= subTabs; i++) { const newIndex = i.toString(); cycle.deliveries.push({ deliveryIndex: newIndex, active: true, deliveryRules: [], }); } - }); + }micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/AddDeliverycontext.js (2)
Line range hint
152-153
: Avoid using thedelete
operator on properties as it can lead to performance issues.- delete item.attributes.find((i) => i.key === attribute.key).toValue; - delete item.attributes.find((i) => i.key === attribute.key).fromValue; + item.attributes.find((i) => i.key === attribute.key).toValue = undefined; + item.attributes.find((i) => i.key === attribute.key).fromValue = undefined;
Line range hint
247-260
: Ensure that keyboard accessibility is provided for clickable elements.- <div onClick={() => onDelete()} + <div onClick={() => onDelete()} onKeyUp={(e) => { if (e.key === 'Enter') onDelete(); }}micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js (1)
459-459
: ResettingisSubmitting
should be handled carefully to avoid race conditions.Consider adding a comment explaining why
isSubmitting
is reset here to help future maintainers.
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 (11)
- 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/CampaignDates.js (5 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js (2 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js (3 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/CampaignConfig.js (4 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/deliveryConfig.js (2 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js (8 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/AddDeliverycontext.js (4 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js (2 hunks)
- micro-ui/web/public/index.html (1 hunks)
Files skipped from review due to trivial changes (2)
- micro-ui/web/micro-ui-internals/example/public/index.html
- micro-ui/web/public/index.html
Additional Context Used
Biome (78)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDates.js (7)
70-70: Do not use template literals if interpolation and special-character handling are not needed.
71-71: Do not use template literals if interpolation and special-character handling are not needed.
74-74: Do not use template literals if interpolation and special-character handling are not needed.
29-29: This hook does not specify all of its dependencies: endDate
29-29: This hook does not specify all of its dependencies: startDate
40-40: This hook does not specify all of its dependencies: onSelect
40-40: This hook does not specify all of its dependencies: startValidation
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js (6)
42-42: Do not use template literals if interpolation and special-character handling are not needed.
43-43: Do not use template literals if interpolation and special-character handling are not needed.
17-17: This hook does not specify all of its dependencies: name
24-24: This hook does not specify all of its dependencies: onSelect
24-24: This hook does not specify all of its dependencies: startValidation
24-24: This hook specifies more dependencies than necessary: props?.props?.sessionData?.HCM_CAMPAIGN_NAME?.campaignName
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js (5)
52-52: Do not use template literals if interpolation and special-character handling are not needed.
53-53: Do not use template literals if interpolation and special-character handling are not needed.
18-18: This hook does not specify all of its dependencies: type
35-35: This hook does not specify all of its dependencies: onSelect
35-35: This hook does not specify all of its dependencies: startValidation
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js (20)
25-61: Prefer for...of instead of forEach.
169-175: Prefer for...of instead of forEach.
189-209: Prefer for...of instead of forEach.
218-220: Prefer for...of instead of forEach.
266-266: Do not use template literals if interpolation and special-character handling are not needed.
295-295: Unnecessary use of boolean literals in conditional expression.
357-357: Unsafe usage of optional chaining.
358-358: Unsafe usage of optional chaining.
471-534: Prefer for...of instead of forEach.
473-532: Prefer for...of instead of forEach.
475-475: Use === instead of ==.
== is only allowed when comparing againstnull
476-476: Use === instead of ==.
== is only allowed when comparing againstnull
484-521: Prefer for...of instead of forEach.
523-529: Prefer for...of instead of forEach.
558-748: This else clause can be omitted because previous branches break early.
723-723: Avoid the delete operator which can impact performance.
724-724: Avoid the delete operator which can impact performance.
754-754: Unsafe usage of optional chaining.
781-809: Prefer for...of instead of forEach.
782-808: Prefer for...of instead of forEach.
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/AddDeliverycontext.js (20)
25-25: Alternative text title element cannot be empty
152-152: Avoid the delete operator which can impact performance.
153-153: Avoid the delete operator which can impact performance.
165-165: Do not use template literals if interpolation and special-character handling are not needed.
180-180: Do not use template literals if interpolation and special-character handling are not needed.
185-185: Unnecessary use of boolean literals in conditional expression.
197-197: Do not use template literals if interpolation and special-character handling are not needed.
211-211: Do not use template literals if interpolation and special-character handling are not needed.
227-227: Do not use template literals if interpolation and special-character handling are not needed.
247-260: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.
262-262: Do not use template literals if interpolation and special-character handling are not needed.
359-359: Do not use template literals if interpolation and special-character handling are not needed.
377-377: Do not use template literals if interpolation and special-character handling are not needed.
382-382: Unnecessary use of boolean literals in conditional expression.
393-393: Do not use template literals if interpolation and special-character handling are not needed.
407-407: Do not use template literals if interpolation and special-character handling are not needed.
423-423: Do not use template literals if interpolation and special-character handling are not needed.
552-552: Do not use template literals if interpolation and special-character handling are not needed.
612-612: Do not use template literals if interpolation and special-character handling are not needed.
615-627: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js (20)
17-17: The computed expression can be simplified without the use of a string literal.
42-42: The computed expression can be simplified without the use of a string literal.
43-43: The computed expression can be simplified without the use of a string literal.
49-49: Unnecessary use of boolean literals in conditional expression.
52-52: Unnecessary use of boolean literals in conditional expression.
53-53: Change to an optional chain.
85-92: This else clause can be omitted because previous branches break early.
98-98: Change to an optional chain.
115-115: Use === instead of ==.
== is only allowed when comparing againstnull
134-134: Unnecessary use of boolean literals in conditional expression.
191-206: Prefer for...of instead of forEach.
220-234: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.
237-240: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.
239-239: Unnecessary use of boolean literals in conditional expression.
239-239: Use === instead of ==.
== is only allowed when comparing againstnull
244-255: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.
250-250: Unnecessary use of boolean literals in conditional expression.
250-250: Use === instead of ==.
== is only allowed when comparing againstnull
258-266: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.
267-281: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.
Path-based Instructions (8)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDates.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/deliveryConfig.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/CampaignConfig.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/AddDeliverycontext.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js (1)
Pattern
**/*.js
: check
Additional comments not posted (21)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js (4)
11-12
: Added state variables for validation control and error handling.
18-23
: Ensure error state is reset appropriately when conditions change.
25-30
: Good use of conditional rendering based on validation state.
50-55
: Ensure that the error message is displayed correctly when there is an error.micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js (4)
15-16
: Added state variables for error handling and validation triggers.
19-22
: Ensure error state is reset appropriately when conditions change.
36-41
: Good use of conditional rendering based on validation state.
60-73
: Ensure that the error message is displayed correctly when there is an error.micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDates.js (4)
17-18
: Added state variables for error handling and validation triggers.
30-38
: Ensure error state is reset appropriately when conditions change.
41-50
: Good use of conditional rendering based on validation state.
79-104
: Ensure that the error message is displayed correctly when there is an error.micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/deliveryConfig.js (1)
12-58
: Updated attribute and delivery configurations to handle new conditions and values.micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss (1)
296-317
: Updated styles for.digit-toast-success
and.digit-dropdown-select.error
to enhance visual feedback on success and error states.micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/CampaignConfig.js (1)
1-1
: UpdatedCampaignConfig
to handleisSubmitting
state for better form submission management.Also applies to: 21-21, 45-45, 69-69
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/AddDeliverycontext.js (1)
362-362
: Ensure that theTextInput
component is used correctly. Thevalue
prop should not be a translated string unless it's intentional.micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js (5)
455-456
: Ensure thatCampaignConfig
is updated correctly on state changes.This is a good use of
useEffect
to keepcampaignConfig
in sync with state changes.
1087-1087
: Ensure thatisSubmitting
is set appropriately.Good practice to set
isSubmitting
at the start of the submission process to prevent duplicate submissions.
230-230
: Consider initializingisSubmitting
state directly in theuseState
call.- const [isSubmitting, setIsSubmitting] = useState(false); + const [isSubmitting, setIsSubmitting] = useState(false); // Initialize directly here for clarityLikely invalid or redundant comment.
1151-1151
: Ensure that the function returns the correct value.
231-231
: Ensure thatCampaignConfig
is correctly handling thenull
value for the second parameter.
...web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js
Outdated
Show resolved
Hide resolved
...icro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js
Outdated
Show resolved
Hide resolved
...icro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js
Outdated
Show resolved
Hide resolved
...icro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js
Outdated
Show resolved
Hide resolved
...o-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js
Show resolved
Hide resolved
...o-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js
Show resolved
Hide resolved
...-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDates.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
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (5)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDates.js (4 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js (2 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js (3 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/deliveryConfig.js (3 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js (5 hunks)
Additional Context Used
Biome (38)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDates.js (7)
70-70: Do not use template literals if interpolation and special-character handling are not needed.
71-71: Do not use template literals if interpolation and special-character handling are not needed.
74-74: Do not use template literals if interpolation and special-character handling are not needed.
29-29: This hook does not specify all of its dependencies: endDate
29-29: This hook does not specify all of its dependencies: startDate
40-40: This hook does not specify all of its dependencies: onSelect
40-40: This hook does not specify all of its dependencies: startValidation
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js (6)
42-42: Do not use template literals if interpolation and special-character handling are not needed.
43-43: Do not use template literals if interpolation and special-character handling are not needed.
17-17: This hook does not specify all of its dependencies: name
24-24: This hook does not specify all of its dependencies: onSelect
24-24: This hook does not specify all of its dependencies: startValidation
24-24: This hook specifies more dependencies than necessary: props?.props?.sessionData?.HCM_CAMPAIGN_NAME?.campaignName
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js (5)
52-52: Do not use template literals if interpolation and special-character handling are not needed.
53-53: Do not use template literals if interpolation and special-character handling are not needed.
18-18: This hook does not specify all of its dependencies: type
35-35: This hook does not specify all of its dependencies: onSelect
35-35: This hook does not specify all of its dependencies: startValidation
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js (20)
17-17: The computed expression can be simplified without the use of a string literal.
42-42: The computed expression can be simplified without the use of a string literal.
43-43: The computed expression can be simplified without the use of a string literal.
49-49: Unnecessary use of boolean literals in conditional expression.
52-52: Unnecessary use of boolean literals in conditional expression.
84-84: Change to an optional chain.
116-123: This else clause can be omitted because previous branches break early.
129-129: Change to an optional chain.
146-146: Use === instead of ==.
== is only allowed when comparing againstnull
165-165: Unnecessary use of boolean literals in conditional expression.
222-237: Prefer for...of instead of forEach.
251-265: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.
268-271: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.
270-270: Unnecessary use of boolean literals in conditional expression.
270-270: Use === instead of ==.
== is only allowed when comparing againstnull
275-286: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.
281-281: Unnecessary use of boolean literals in conditional expression.
281-281: Use === instead of ==.
== is only allowed when comparing againstnull
289-297: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.
298-312: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.
Path-based Instructions (5)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/deliveryConfig.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDates.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js (1)
Pattern
**/*.js
: check
Additional comments not posted (14)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js (3)
11-12
: State initialization for validation and error handling is correctly added.
18-22
: Proper error handling based on submission status and name presence.
50-60
: TextInput component is correctly updated to handle errors and changes.micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js (3)
15-16
: State initialization for validation and error handling is correctly added.
18-21
: Proper error handling based on submission status and type presence.
60-72
: Dropdown component is correctly updated to handle errors and changes.micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/deliveryConfig.js (1)
32-33
: Configuration structure for delivery settings is correctly updated.Also applies to: 50-78, 104-132
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDates.js (4)
4-4
: Correctly importedErrorMessage
andTextInput
for enhanced form handling.
17-18
: State initialization for validation and error handling is correctly added.
41-50
: Complex validation logic for start and end dates is well-handled.
79-104
: Date input handling with error display is correctly implemented.micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js (3)
4-4
: Correct usage ofdeliveryConfig
import for accessing configuration data.
28-29
: Ensure that the data fetching logic is correctly updated to match the selected project type.
53-85
: Complex logic for generating delivery rules based on the project type is well implemented.
...o-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js
Show resolved
Hide resolved
...o-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js
Outdated
Show resolved
Hide resolved
...o-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js
Show resolved
Hide resolved
...o-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignType.js
Show resolved
Hide resolved
...-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDates.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.
Actionable comments posted: 2
Outside diff range and nitpick comments (3)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js (2)
Line range hint
7-59
: Refactor to destructure properties fromprops
for cleaner code.- const CampaignName = ({ onSelect, formData, control, formState, ...props }) => { + const CampaignName = ({ onSelect, formData, control, formState, props: { sessionData, isSubmitting } }) => {This change will make the code cleaner and improve readability by directly using
sessionData
andisSubmitting
instead of accessing them throughprops
.
Line range hint
42-43
: Avoid using template literals where not necessary.- <Header>{t(`HCM_CAMPAIGN_NAME_HEADER`)}</Header> + <Header>{t("HCM_CAMPAIGN_NAME_HEADER")}</Header>This change removes unnecessary complexity from the code by using a simple string instead of a template literal.
Also applies to: 49-49
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDates.js (1)
Line range hint
71-72
: Avoid using template literals where not necessary.- <p>{t(`HCM_CAMPAIGN_DATES`)}</p> + <p>{t("HCM_CAMPAIGN_DATES")}</p>This change removes unnecessary complexity from the code by using a simple string instead of a template literal.
Also applies to: 75-75
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDates.js (4 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js (2 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/deliveryConfig.js (3 hunks)
Additional Context Used
Biome (13)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDates.js (7)
71-71: Do not use template literals if interpolation and special-character handling are not needed.
72-72: Do not use template literals if interpolation and special-character handling are not needed.
75-75: Do not use template literals if interpolation and special-character handling are not needed.
29-29: This hook does not specify all of its dependencies: endDate
29-29: This hook does not specify all of its dependencies: startDate
40-40: This hook does not specify all of its dependencies: onSelect
40-40: This hook does not specify all of its dependencies: startValidation
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js (6)
42-42: Do not use template literals if interpolation and special-character handling are not needed.
43-43: Do not use template literals if interpolation and special-character handling are not needed.
17-17: This hook does not specify all of its dependencies: name
24-24: This hook does not specify all of its dependencies: onSelect
24-24: This hook does not specify all of its dependencies: startValidation
24-24: This hook specifies more dependencies than necessary: props?.props?.sessionData?.HCM_CAMPAIGN_NAME?.campaignName
Path-based Instructions (3)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDates.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/deliveryConfig.js (1)
Pattern
**/*.js
: check
Additional comments not posted (1)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/configs/deliveryConfig.js (1)
Line range hint
1-192
: Ensure consistency in the structure of delivery configurations.This script checks for any delivery configurations that might not have been updated to the new structure involving
conditionConfig
.Verification successful
The verification script did not find any inconsistencies in the delivery configurations. All
attributeConfig
entries are correctly nested withinconditionConfig
.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all delivery configurations follow the new structure. # Test: Search for inconsistent delivery configurations. Expect: No results. rg --type json 'attributeConfig' | rg -v 'conditionConfig'Length of output: 56
...o-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignName.js
Show resolved
Hide resolved
...-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignDates.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: 0
Outside diff range and nitpick comments (9)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js (1)
Line range hint
136-138
: Consider refactoringforEach
loops tofor...of
for better performance and readability.- Object.keys(CustomisedHooks).map((ele) => { + for (const ele of Object.keys(CustomisedHooks)) { - Object.keys(CustomisedHooks[ele]).map((hook) => { + for (const hook of Object.keys(CustomisedHooks[ele])) { - Object.keys(CustomisedHooks[ele][hook]).map((method) => { + for (const method of Object.keys(CustomisedHooks[ele][hook])) { setupHooks(hook, method, CustomisedHooks[ele][hook][method]); } } }micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js (1)
Line range hint
53-213
: The use of optional chaining improves safety in accessing nested properties. Consider simplifying the complex conditional logic ingenerateTabsData
to enhance readability and maintainability.- if (item) { + if (item) { // Consider breaking down this complex condition into smaller functions or using a strategy pattern for clarity.micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js (7)
229-229
: Consider initializingisSubmitting
state directly inuseState
to improve readability.
Line range hint
24-60
: Consider replacingforEach
withfor...of
for better performance and readability in modern JavaScript.- data.forEach((item) => { + for (const item of data) {Also applies to: 168-174, 188-208, 217-219, 469-532, 471-530, 482-519, 521-527, 779-807, 780-806
Line range hint
264-264
: Avoid using template literals when not necessary for cleaner code.- const reqCriteria = { - url: `/boundary-service/boundary-hierarchy-definition/_search`, + const reqCriteria = { + url: 'boundary-service/boundary-hierarchy-definition/_search',
Line range hint
293-293
: Simplify the conditional expression for better readability.- active: index === 0, // Initialize active to false + active: index === 0,
Line range hint
473-474
: Use strict equality checks (===
) instead of loose equality (==
) to avoid unexpected type coercion.- if (item.key == cycle.cycleIndex) { + if (item.key === cycle.cycleIndex) {Also applies to: 474-474
Line range hint
721-722
: Avoid using thedelete
operator on properties as it can lead to performance issues.- delete payloadData?.startDate; - delete payloadData?.endDate; + payloadData.startDate = undefined; + payloadData.endDate = undefined;
Line range hint
556-746
: This largeelse
block can be simplified or broken down into smaller functions for better readability and maintainability.
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js (2 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js (10 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js (3 hunks)
Additional Context Used
Biome (41)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js (1)
136-138: Prefer for...of instead of forEach.
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js (20)
24-60: Prefer for...of instead of forEach.
168-174: Prefer for...of instead of forEach.
188-208: Prefer for...of instead of forEach.
217-219: Prefer for...of instead of forEach.
264-264: Do not use template literals if interpolation and special-character handling are not needed.
293-293: Unnecessary use of boolean literals in conditional expression.
355-355: Unsafe usage of optional chaining.
356-356: Unsafe usage of optional chaining.
469-532: Prefer for...of instead of forEach.
471-530: Prefer for...of instead of forEach.
473-473: Use === instead of ==.
== is only allowed when comparing againstnull
474-474: Use === instead of ==.
== is only allowed when comparing againstnull
482-519: Prefer for...of instead of forEach.
521-527: Prefer for...of instead of forEach.
556-746: This else clause can be omitted because previous branches break early.
721-721: Avoid the delete operator which can impact performance.
722-722: Avoid the delete operator which can impact performance.
752-752: Unsafe usage of optional chaining.
779-807: Prefer for...of instead of forEach.
780-806: Prefer for...of instead of forEach.
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js (20)
17-17: The computed expression can be simplified without the use of a string literal.
42-42: The computed expression can be simplified without the use of a string literal.
43-43: The computed expression can be simplified without the use of a string literal.
49-49: Unnecessary use of boolean literals in conditional expression.
52-52: Unnecessary use of boolean literals in conditional expression.
84-84: Change to an optional chain.
116-123: This else clause can be omitted because previous branches break early.
129-129: Change to an optional chain.
146-146: Use === instead of ==.
== is only allowed when comparing againstnull
165-165: Unnecessary use of boolean literals in conditional expression.
222-237: Prefer for...of instead of forEach.
251-265: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.
268-271: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.
270-270: Unnecessary use of boolean literals in conditional expression.
270-270: Use === instead of ==.
== is only allowed when comparing againstnull
275-286: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.
281-281: Unnecessary use of boolean literals in conditional expression.
281-281: Use === instead of ==.
== is only allowed when comparing againstnull
289-297: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.
298-312: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.
Path-based Instructions (3)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js (1)
Pattern
**/*.js
: check
Additional comments not posted (8)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js (1)
35-42
: Dynamic fetching ofBOUNDARY_HIERARCHY_TYPE
introduces flexibility in configuration. Ensure that the data fetching is correctly handled and that theBOUNDARY_HIERARCHY_TYPE
is always defined.micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js (7)
230-230
: Initialization ofcampaignConfig
withuseState
usingCampaignConfig
function directly is good for encapsulation.
257-258
: FetchinghierarchyConfig
using custom hooks is a clean way to manage dynamic data fetching.
453-454
: Good use ofuseEffect
to updatecampaignConfig
based on dependencies.
457-461
: Proper management of submission state and URL parameters based oncurrentKey
andisSummary
.
1078-1078
: SettingisSubmitting
to true at the start of form submission is a good practice to prevent duplicate submissions.
Line range hint
355-356
: Ensure that optional chaining is used safely to avoid runtime errors.Verification successful
Ensure safe usage of optional chaining in critical calculations.
The search results show extensive use of optional chaining (
?.
) across various files. Specifically, in theSetupCampaign.js
file, the optional chaining is used in the following lines:cycle: delivery?.map((obj) => obj?.cycleNumber)?.length > 0 ? Math.max(...delivery?.map((obj) => obj?.cycleNumber)) : 1, deliveries: delivery?.map((obj) => obj?.deliveryNumber)?.length > 0 ? Math.max(...delivery?.map((obj) => obj?.deliveryNumber)) : 1,These lines use optional chaining to safely access properties of objects within arrays. The usage appears to be safe as it checks the length of the mapped arrays before applying
Math.max
.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the safety of optional chaining usage in critical calculations. # Test: Search for optional chaining usage. Expect: Safe usage patterns. rg --type javascript $'?.'Length of output: 105
Script:
#!/bin/bash # Description: Verify the safety of optional chaining usage in critical calculations. # Test: Search for optional chaining usage. Expect: Safe usage patterns. rg --type javascript '\?\.'Length of output: 64
Script:
#!/bin/bash # Description: Verify the safety of optional chaining usage in critical calculations. # Test: Search for optional chaining usage. Expect: Safe usage patterns. rg --type js '\?\.'Length of output: 339161
Line range hint
752-752
: Check the usage of optional chaining to ensure it does not lead to unexpected behaviors.Verification successful
The search results indicate that optional chaining is used extensively throughout the codebase. However, to specifically address the concern about the usage of optional chaining in critical calculations, we need to focus on the context where optional chaining is used in calculations or assignments that could potentially lead to unexpected behaviors if the chained properties are
undefined
ornull
.Given the extensive use of optional chaining, it is crucial to ensure that all instances where optional chaining is used in calculations or critical logic are safe. To achieve this, we should narrow down our search to instances where optional chaining is used in arithmetic operations or critical assignments.
Let's refine our search to identify such instances.
The refined search results indicate that there are no critical arithmetic operations or assignments involving optional chaining that could lead to unexpected behaviors. The instances found are either in logging, URL construction, or comments, which are not critical calculations or assignments.
Therefore, the usage of optional chaining in the specified file and context appears to be safe and does not lead to unexpected behaviors.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the safety of optional chaining usage in critical calculations. # Test: Search for optional chaining usage. Expect: Safe usage patterns. rg --type javascript $'?.'Length of output: 105
Script:
#!/bin/bash # Description: Verify the safety of optional chaining usage in critical calculations. # Test: Search for optional chaining usage. Expect: Safe usage patterns. rg --type javascript '\?\.'Length of output: 64
Script:
#!/bin/bash # Description: Verify the safety of optional chaining usage in critical calculations. # Test: Search for optional chaining usage. Expect: Safe usage patterns. rg '\?\.'Length of output: 448699
Script:
#!/bin/bash # Description: Search for optional chaining usage in arithmetic operations or critical assignments. # Test: Search for optional chaining usage in arithmetic operations. rg --pcre2 '\?\.\w+\s*[\+\-\*\/%]\s*\w+' --glob '*.js' --glob '*.ts' # Test: Search for optional chaining usage in critical assignments. rg --pcre2 '\?\.\w+\s*=\s*\w+' --glob '*.js' --glob '*.ts'Length of output: 3058
...web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.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: 2
Outside diff range and nitpick comments (2)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/index.js (1)
Line range hint
50-90
: PassingBOUNDARY_HIERARCHY_TYPE
toSetupCampaign
aligns with dynamic configuration management. However, consider using template literals for path construction to enhance readability and maintainability.- <PrivateRoute path={`${path}/setup-campaign`} component={() => <SetupCampaign hierarchyType={BOUNDARY_HIERARCHY_TYPE} />} /> + <PrivateRoute path={`${path}/setup-campaign`} component={() => <SetupCampaign hierarchyType={BOUNDARY_HIERARCHY_TYPE} />} />micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js (1)
Line range hint
35-58
: FetchingBOUNDARY_HIERARCHY_TYPE
dynamically is a robust enhancement. Consider usingfor...of
instead offorEach
for iterating over objects for better performance and readability.- Object.keys(CustomisedHooks).map((ele) => { + for (const ele of Object.keys(CustomisedHooks)) {
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js (3 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js (10 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/index.js (2 hunks)
Additional Context Used
Biome (24)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js (1)
136-138: Prefer for...of instead of forEach.
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js (20)
24-60: Prefer for...of instead of forEach.
168-174: Prefer for...of instead of forEach.
188-208: Prefer for...of instead of forEach.
217-219: Prefer for...of instead of forEach.
264-264: Do not use template literals if interpolation and special-character handling are not needed.
293-293: Unnecessary use of boolean literals in conditional expression.
355-355: Unsafe usage of optional chaining.
356-356: Unsafe usage of optional chaining.
469-532: Prefer for...of instead of forEach.
471-530: Prefer for...of instead of forEach.
473-473: Use === instead of ==.
== is only allowed when comparing againstnull
474-474: Use === instead of ==.
== is only allowed when comparing againstnull
482-519: Prefer for...of instead of forEach.
521-527: Prefer for...of instead of forEach.
556-746: This else clause can be omitted because previous branches break early.
721-721: Avoid the delete operator which can impact performance.
722-722: Avoid the delete operator which can impact performance.
752-752: Unsafe usage of optional chaining.
779-807: Prefer for...of instead of forEach.
780-806: Prefer for...of instead of forEach.
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/index.js (3)
19-19: Template literals are preferred over string concatenation.
30-30: Unnecessary use of boolean literals in conditional expression.
35-35: Unnecessary use of boolean literals in conditional expression.
Path-based Instructions (3)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/index.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js (1)
Pattern
**/*.js
: check
Additional comments not posted (5)
micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js (5)
229-229
: Ensure proper initialization of state variables to avoid potential bugs.It's important to verify that
isSubmitting
is appropriately set and reset throughout the component lifecycle to prevent issues with form submission states.
240-240
: Consider simplifying the state management for query parameters.
[REFACTOR_SUGGESTion]- const isSummary = searchParams.get("summary"); - const noAction = searchParams.get("action"); - const isDraft = searchParams.get("draft"); - const isSkip = searchParams.get("skip"); + const { summary: isSummary, action: noAction, draft: isDraft, skip: isSkip } = Object.fromEntries(searchParams.entries());This refactor uses destructuring to make the code cleaner and more readable by reducing redundancy.
453-453
: Ensure thatsetCampaignConfig
is called with the correct parameters.It's crucial to verify that the parameters passed to
setCampaignConfig
are always valid and that the function handles all possible input scenarios correctly.
457-457
: Properly manage the submission state to prevent issues during form processing.Ensure that
isSubmitting
is correctly managed across all component states to prevent duplicate submissions or state inconsistencies.
1078-1078
: Validate form data before setting submission state.This is a good practice as it prevents the form from being submitted with invalid data, thus ensuring data integrity.
...web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js
Show resolved
Hide resolved
...web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js
Show resolved
Hide resolved
* Updates the delivery rules logic for gender * * info message for status creating (#644) * success message if user cred sheet * send id with key resourceid * Send variant in sku also Co-authored-by: nabeelmd-eGov <[email protected]> * Feat : added boundary validation (#643) Co-authored-by: Jagankumar <[email protected]> * Update campaignValidators.ts (#645) * added delay in download (#646) * Update campaignValidators.ts (#647) * fixes (#649) Co-authored-by: nabeelmd-eGov <[email protected]> * fixed header validation (#648) * change in filter recursive (#650) * Update genericUtils.ts (#652) * fix (#651) Co-authored-by: nabeelmd-eGov <[email protected]> * updated lowest level hierarchy validation for target HLM -5948 (#654) * Update campaignValidators.ts (#655) * fixes-> cyclenumber issue, hover issue, dropdown height issue, * css * fixes-> cyclenumber issue, hover issue, dropdown height issue, (#656) * fixes-> cyclenumber issue, hover issue, dropdown height issue, * css --------- Co-authored-by: nabeelmd-eGov <[email protected]> * Update campaignUtils.ts * fixed HLM-5970 * Feat : added boundary validation at data level * fixes * local add * Added boundary validation * Refactor * fixed HLM-5935 and HLM-5749 * Refactor * Feat : updated table * change campaignid in payload * Feat : added campaignId * Update campaignApis.ts * Update campaignValidators.ts * refactored * Refactor * assigned campaignId * Refactor * updated createRequest Schema * Feat : invalid Status Persist * status fix * version-fix * Update CODEOWNERS * core version updated and css fix for language dropdown * refactor (#676) * Uat signoff (#678) * change in filter recursive * lowest level * added validation related to target sheet headers * HLM-5916 * download button fixes in summary (#682) Co-authored-by: nabeelmd-eGov <[email protected]> * Hlm 5927 (#687) * change in filter recursive * lowest level * added validation for boundary codes to be invalid other than that selected from UI in target upload * Added Delivery and cycle config for LLIN and SMC both (#688) * no of cycle and deivery drafted changes * fixes * add localisation code for boundaries * fixes * fixes * Value localise in summary screen, api error change * fixes * genarate api call fix * font size change for summary * login css change * HLM-5718: SMC delivery config enhancement * config update * added config for in between * fix config for llin * added mdms integration --------- Co-authored-by: nabeelmd-eGov <[email protected]> * Fixed HLM-5988_warning message (#689) Co-authored-by: nabeelmd-eGov <[email protected]> * download filename fixes (#693) * download button fixes in summary * download filename with custom name changes added --------- Co-authored-by: nabeelmd-eGov <[email protected]> * download filename fixes (#694) * download button fixes in summary * download filename with custom name changes added * config fix for llin --------- Co-authored-by: nabeelmd-eGov <[email protected]> * successful toast message is fixed (#695) * successful toast message is fixed * Update UploadData.js * HLM-5991: Alert Pop UP CR (#696) Co-authored-by: nabeelmd-eGov <[email protected]> * HLM-5718 changes (#703) Co-authored-by: nabeelmd-eGov <[email protected]> * Localization cache (#706) * change in filter recursive * lowest level * refactored localization cache logic * Update README.md (#707) * Update README.md * Update README.md * Update utilities/project-factory/README.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update README.md --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * HLM-5985_made lowest level changes (#708) * HLM-5985_made lowest level changes * resolved codeRabbit comments * Create LOCALSETUP.md (#709) * Create LOCALSETUP.md * Refactored config * Update LOCALSETUP.md * Update utilities/project-factory/LOCALSETUP.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/LOCALSETUP.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/LOCALSETUP.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/LOCALSETUP.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update LOCALSETUP.md --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * updated the localisation module config * Refactor config (#713) * Refactor config * Update utilities/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update postman_collection.json (#714) * Update postman_collection.json * Update postman_collection.json * Delete utilities/project-factory/project_factory_swagger.yml (#715) * Feat : removed campaignId validation for boundary upload (#718) * updated the delay for boundary relationship * added logger for request TODO TEST will be reverted * Revert "added logger for request TODO TEST" This reverts commit d5c2bf5. * Schema validation (#719) * Feat : removed campaignId validation for boundary upload * Feat : added schema validation * Fixed mdms host * updated the logger messages * updated the loggers * delivery new changes, toast fix, error fix (#716) * delivery new changes, toast fix, error fix * new fixes * fixes * change text component to field component * added hierarchy * fix * fix * fix * fix * passing hierarchy from props --------- Co-authored-by: nabeelmd-eGov <[email protected]> * Schema validation2 (#721) * Feat : removed campaignId validation for boundary upload * Feat : added schema validation * Fixed mdms host * Feat : added boundary validation * Feat : optimized product search * Fix : project mapping fixed (#722) * Fixed project search (#723) * smc fixes (#724) Co-authored-by: nabeelmd-eGov <[email protected]> * Feat : added boundary confirmation (#727) * Fix: fixed processing boundary * Refactor * fixed HLM-6109 (#729) * gate fixes validation, ui ux (#731) Co-authored-by: nabeelmd-eGov <[email protected]> * integrated panelcard component (#732) * integrated panelcard component * Update micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/Response.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Jagankumar <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update genericUtils.ts (#733) * Create CHANGELOG.md (#717) * Update request.ts (#735) * fixed generate api issue (#734) Co-authored-by: Jagankumar <[email protected]> * Create CHANGELOG.md * gate fixes (#736) * gate fixes validation, ui ux * gate fix --------- Co-authored-by: nabeelmd-eGov <[email protected]> * added loader in the selecting boundaries (#737) * Update createAndSearch.ts (#738) * fix (#739) * fix * fix --------- Co-authored-by: nabeelmd-eGov <[email protected]> * Patch 3 (#740) * change in filter recursive * lowest level * trimmed underscore and empty spaces * boundary fix (#742) Co-authored-by: nabeelmd-eGov <[email protected]> * Update genericUtils.ts (#746) * fixed the delivery products issue * Fixed delivery conditions issue * Update campaignApis.ts (#747) * fixed warning toast (#748) * fixed warning toast * Update UploadData.js * fix (#749) * fix * fx * fix --------- Co-authored-by: nabeelmd-eGov <[email protected]> * core -update (#751) Co-authored-by: nabeelmd-eGov <[email protected]> * fixed stepper issue (#752) * fixed stepper issue * Update index.html * Feat : added user validation via individual (#753) * fixes (#754) Co-authored-by: nabeelmd-eGov <[email protected]> * code fix nabeel (#756) * fixes * fix --------- Co-authored-by: nabeelmd-eGov <[email protected]> * Updated few loggers (#759) * updated few loggers flow * Update utilities/project-factory/src/server/api/campaignApis.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/src/server/utils/campaignMappingUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/src/server/utils/campaignUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/src/server/api/campaignApis.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/src/server/utils/campaignMappingUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update utilities/project-factory/src/server/utils/genericUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Updated the user Password generation logic #761 * Update Listener.ts (#730) * Update Listener.ts * added try catch logic in producer * Feat : added parallel batch execution (#767) * Feat : added parallel batch execution * Refactor * Update utilities/project-factory/src/server/validators/campaignValidators.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fixed the stepper (#765) * changes config (#769) * Project type config and added loggers for process of campaign (#772) * Feat : added themes in generate template (#773) * fixed the ajv package version for build issue * Feat : removed xlsx (#776) * HLM-6177: PARALLEL SEARCH IMPLEMENT, DELIVERY TYPE IMPLEMENT (#778) Co-authored-by: nabeelmd-eGov <[email protected]> * css update (#780) Co-authored-by: nabeelmd-eGov <[email protected]> * HLM-6179 and HLM-6180 (#777) * HLM-6179 and HLM-6180 * campaign name changes --------- Co-authored-by: Jagankumar <[email protected]> * Feat : fixed target generation (#781) * fixed tenantId issue (#784) * fix: resolved AJV-related Jenkins build issue reference #783 #786 (#787) * module ui fix * updated all the package version for build fixes * fixed kafka-error at target generation (#789) * updated core version (#791) * updated core version * updated css also * Update campaignValidators.ts (#794) * Updated the excel generation logic and files * added changes for configurable column in target sheet (#779) * change in filter recursive * lowest level * made target headers genearte through mdms schema * changed config index.ts * changed config index.ts * changes for now * added configurable column logic from schema HLM-6169 * updated validate of target columns through schema * added masterForColumnSchema in index.ts * formatted dataManageService * refactored lock TargetFields func * removed console.log * User creation performance improved (#800) * Feat : Improved user creation performance * Change status color * Update utilities/project-factory/src/server/utils/campaignUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Jagankumar <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update genericUtils.ts (#801) * Hlm 6170 (#802) * change in filter recursive * lowest level * HLM -6170 added logic for only village level data in target sheet and some refactoring * updated css (#804) * fixed button issue (#805) * HLM 6177: Error card implementation in summary screen (#806) * HLM-6177: PARALLEL SEARCH IMPLEMENT, DELIVERY TYPE IMPLEMENT * Added Error Cards in summary screen and redirection --------- Co-authored-by: nabeelmd-eGov <[email protected]> * added error button styles (#807) Co-authored-by: nabeelmd-eGov <[email protected]> * updated popUp css (#808) * HLM 6178: Implementing New Pop up screen in boundaries (#809) * added error button styles * Implementing New Pop up screen in boundaries --------- Co-authored-by: nabeelmd-eGov <[email protected]> * Facility changes (#812) * Feat : changed facility Template * Feat : locked target templates * fixed colour issue (#813) * Updated the project type conversion logic for the "deliveryType" dont1 and n config * Unique field added (#814) * Feat : changed facility Template * Feat : locked target templates * Feat : added unique check logic * Target schema update (#815) * change in filter recursive * lowest level * updated shcema of target columns to be configurable * removed empty spaces from config index.ts * Active mapping (#817) * Feat : changed facility Template * Feat : locked target templates * Feat : added unique check logic * Feat : added mapping via active field * changes in the schema validation (#816) * Updated the workbench and css module version * Feat : added active inactive boundary check (#818) * Update campaignValidators.ts (#819) * added active inactive validation (#820) * changed api call time (#826) * Feat : added target sum mapping (#825) * added campaign type as filter (#827) * Update genericApis.ts (#828) * Update excelUtils.ts (#829) * UI issue fixes, icon fix in summary error (#831) Co-authored-by: nabeelmd-eGov <[email protected]> * Target columns (#830) * change in filter recursive * lowest level * commit * Feat : target flow fixed for LLIN-mz * uat to dev --------- Co-authored-by: admin1 <[email protected]> * Feat : freezed target columns (#833) * Target mr dn (#834) * change in filter recursive * lowest level * Feat : skipped validation temporarily * changes in the target validation (#835) * fixed error info (#837) * Added roboto font (#840) * Feat : added roboto font * Fixed config * target validation based on diff campaign types (#843) * change in filter recursive * lowest level * updated validation of target based on campaign type * fixed validation issue (#844) * Updated the workbench package version * fixed validation logic (#846) * fixed validation logic * Update micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Jagankumar <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Error messages improved (#848) * Feat : imporved error messages and initilised utils for tracking process * Fix ; unused variables fixed * Feat : improved error messages * Fix : download error fix (#850) * Update campaignUtils.ts (#851) * Update campaignUtils.ts * Update utilities/project-factory/src/server/utils/campaignUtils.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update campaignValidators.ts (#853) * HLM 6210: Toast, error focus fix and project type reset delivery data fix (#854) * HLM-6210: campaign type change reset delivery data fix, summary error focus fix * summary error focus fix --------- Co-authored-by: nabeelmd-eGov <[email protected]> * HLM-6225_added time out according to data (#855) * Update campaignValidators.ts (#859) * HLM 6210 (#858) * HLM-6210: campaign type change reset delivery data fix, summary error focus fix * summary error focus fix * parallel search fixes --------- Co-authored-by: nabeelmd-eGov <[email protected]> * Remove validation (#852) * change in filter recursive * lowest level * removed unnecessary validation for target * spacing refactor * Update campaignValidators.ts (#863) * Header validation (#861) * change in filter recursive * lowest level * removed unnecessary validation for target * changed the logic of header validation * space refactor * Update campaignUtils.ts (#864) * fixed ui error (#865) * Read me (#867) * change in filter recursive * lowest level * removed unnecessary validation for target * changed the logic of header validation * fixed portugese language error * space refactoring * Update Dockerfile * Update Dockerfile * Update migrate.sh * Update Dockerfile * Update campaignValidators.ts (#868) * HLM 6210:campaign type change reset fix (#869) * HLM-6210: campaign type change reset delivery data fix, summary error focus fix * summary error focus fix * parallel search fixes * campaign type change reset fix --------- Co-authored-by: nabeelmd-eGov <[email protected]> * Update excelUtils.ts for sheetHeaders wraping (#870) * Update package.json * updated error messages (#871) * feat : added jaeger-client tracing (#872) * updated the table config * Update campaignApis.ts (#875) * removed the schema and updated the db name * fixing generate API call, file auto delete, date error (#877) Co-authored-by: nabeelmd-eGov <[email protected]> * Trim resource (#878) * Feat : trimmed resource persist message * Refactor * Removed reject error in produce message * fixed min time, draft logic (#879) * Update index.ts (#880) * added min ui error and facility usage (#883) * added min ui error and facility usage * changes * Update campaignUtils.ts (#884) * HLM 6007 (#885) * fixing generate API call, file auto delete, date error * generate api fix --------- Co-authored-by: nabeelmd-eGov <[email protected]> * Update Dockerfile * Feat : docker config update (#886) * Update Dockerfile (#887) * Create buildWorkbenchUI.yml * Update README.md (#917) * Update buildWorkbenchUI.yml * Update README.md * Updated the DB Schema issue of Project-factory * fixed hierarchy order (#919) * User flag hcm (#920) * Feat : docker config update * Feat : added user create flag * Refactored * Update campaignUtils.ts * Update campaignMappingUtils.ts (#922) * Ashish egov patch 2 (#921) * Update index.ts * Update campaignApis.ts * Fixed the project type conversion and product duplicate issue * Update campaignApis.ts (#924) * Update campaignMappingUtils.ts (#925) * Update campaignMappingUtils.ts * Refactored * Update publishProjectFactory.yml * Update buildWorkbenchUI.yml * Update campaignMappingUtils.ts (#926) * Update request.ts (#928) * Update request.ts * Feat : updated httprequest * Feat : warning response added * Refactor * added start and enddate in cycles * Update campaignApis.ts (#930) * Update request.ts (#932) * fixed generate issue (#933) * Fixed project-type resources duplication * updated target error messages (#936) * fixed stepper from draft (#937) * Update Listener.ts * delivery type disable fix, product sku name change (#939) Co-authored-by: nabeelmd-eGov <[email protected]> * fixed error message issue (#941) * Redis integration (#940) * Feat : added redis * Feat : added redis retry * removed templates folder * updated the folder structure for health ui and removed utilties * Update publishAllPackages.yml * Update buildWorkbenchUI.yml --------- Co-authored-by: nabeelmd-eGov <[email protected]> Co-authored-by: nabeelmd-eGov <[email protected]> Co-authored-by: ashish-egov <[email protected]> Co-authored-by: Bhavya-egov <[email protected]> Co-authored-by: nitish-egov <[email protected]> Co-authored-by: Bhavya-egov <[email protected]> Co-authored-by: ashish-egov <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Swathi-eGov <[email protected]> Co-authored-by: admin1 <[email protected]>
No description provided.