[WEB-2066] fix: completed cycle date picker validation#5265
[WEB-2066] fix: completed cycle date picker validation#5265SatishGandham merged 1 commit intopreviewfrom
Conversation
WalkthroughThe recent changes enhance the user interface of the Changes
Poem
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 Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- web/core/components/cycles/analytics-sidebar/root.tsx (1 hunks)
Additional comments not posted (1)
web/core/components/cycles/analytics-sidebar/root.tsx (1)
390-390: LGTM! EnsureisCompletedis correctly set.The code change correctly disables the
DateRangeDropdownwhen the cycle is completed.Verify that the
isCompletedflag is correctly set based on the cycle's status.Verification successful
The
isCompletedflag is correctly set and used.The
isCompletedflag is correctly set based on the cycle's status and used appropriately within theweb/core/components/cycles/analytics-sidebar/root.tsxfile.
- The flag is set as
const isCompleted = cycleStatus === "completed";- It is used in various conditions to disable or enable components based on the cycle's completion status.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the `isCompleted` flag is correctly set based on the cycle's status. # Test: Search for the `isCompleted` flag usage. Expect: Correct setting of the flag based on cycle status. rg --type js -A 5 $'const isCompleted = cycleStatus === "completed"'Length of output: 69
Script:
#!/bin/bash # Description: Verify that the `isCompleted` flag is correctly set based on the cycle's status. # Test: Search for the `isCompleted` flag usage. Expect: Correct setting of the flag based on cycle status. rg --type js 'isCompleted'Length of output: 26
Script:
#!/bin/bash # Description: Verify that the `isCompleted` flag is correctly set based on the cycle's status. # Test: Search for the `isCompleted` flag usage and assignment. Expect: Correct setting of the flag based on cycle status. rg --type js -A 10 'isCompleted'Length of output: 32
Script:
#!/bin/bash # Description: Verify that the `isCompleted` flag is correctly set based on the cycle's status. # Test: Search for the `isCompleted` flag usage and assignment. Expect: Correct setting of the flag based on cycle status. rg --type js 'completed'Length of output: 232
Script:
#!/bin/bash # Description: Verify that the `isCompleted` flag is correctly set based on the cycle's status within the specific file. # Test: Search for the `isCompleted` flag usage and assignment within the specific file. rg --type js 'isCompleted' web/core/components/cycles/analytics-sidebar/root.tsxLength of output: 512
Changes:
This PR addresses a bug with the date picker validation for completed cycles. Previously, users were able to open the date range picker popover for completed cycles, which is not intended behavior. Added validation to prevent this issue.
Reference:
[WEB-2066]
Summary by CodeRabbit
New Features
Bug Fixes