Skip to content

Aseem jobposting analytics custom date filter state handling#4426

Merged
one-community merged 5 commits intodevelopmentfrom
aseem-jobposting-analytics-custom-date-filter-state-handling
Feb 1, 2026
Merged

Aseem jobposting analytics custom date filter state handling#4426
one-community merged 5 commits intodevelopmentfrom
aseem-jobposting-analytics-custom-date-filter-state-handling

Conversation

@aseemdeshmukh
Copy link
Copy Markdown
Contributor

Description

1

Related PRS (if any):

NA

Main changes explained:

  • Modified TimeFilter.jsx

How to test:

  1. check into current branch
  2. do npm install and ... to run this PR locally
  3. Clear site data/cache
  4. log as admin user
  5. go to http://localhost:5173/applicants-chart
  6. when switching between filter types (“Weekly”, “Yearly”, “Custom”), previously entered custom date values should reset

Screenshots or videos of changes:

DateFilterStateHandling.mp4

@netlify
Copy link
Copy Markdown

netlify Bot commented Nov 20, 2025

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit cf35141
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/697843360186aa0008cc83fa
😎 Deploy Preview https://deploy-preview-4426--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sonarqubecloud
Copy link
Copy Markdown

@aseemdeshmukh aseemdeshmukh added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Nov 20, 2025
@sanjeev29
Copy link
Copy Markdown
Contributor

Tested the PR locally on Chrome browser. Switching between filter types works correctly. The custom date filters are also reset properly when switched. The PR changes works as expected.
Screenshot 2025-11-27 at 6 24 29 PM
Screenshot 2025-11-27 at 6 25 45 PM
Screenshot 2025-11-27 at 6 25 56 PM

sanjeev29
sanjeev29 previously approved these changes Nov 28, 2025
Copy link
Copy Markdown

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Aseem,

I have reviewed your PR locally and all the functionality perform as per the requirement in both the modes. I just would like one change - instead of you showcasing that the "Start date cannot be after end date." as shown in the below image - can we just not allow the use to select future dates. Do let me know if this change can be made. Else your PR as i said performs as per requirement and i will approve it.
Screenshot 2025-11-29 at 12 37 19 AM
Screenshot 2025-11-29 at 12 36 49 AM
Screenshot 2025-11-29 at 12 36 55 AM
Screenshot 2025-11-29 at 12 36 59 AM
Screenshot 2025-11-29 at 12 37 06 AM

Copy link
Copy Markdown

@IndraAnuraag9 IndraAnuraag9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reviewed this PR locally using an admin account. Everything is working as intended. The state of the "custom dates" filter is reset every time this filter is selected.
Everything looks good. Approving the PR.
Screenshot 2025-11-29 at 6 59 26 PM
Screenshot 2025-11-29 at 6 59 47 PM
Screenshot 2025-11-29 at 6 59 41 PM

@SwathiAngadi
Copy link
Copy Markdown
Contributor

Hi Aseem,

I have reviewed this PR. Graph is loading properly on changing different filters. Custom filter resets after selecting other value from dropdown , working perfect in both Dark and Light mode.

Screen.Recording.2025-12-14.144735.mp4

Copy link
Copy Markdown

@rohanrastogi311 rohanrastogi311 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality works as expected in both light and dark mode. Suggestion: Change the highlight colour in dark mode as it makes the numbers slightly difficult to read.
 PR 4426 Screenshot
PR 4426 Screenshot
PR 4426 Screenshot

Vikas-8055
Vikas-8055 previously approved these changes Jan 8, 2026
Copy link
Copy Markdown

@Vikas-8055 Vikas-8055 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Aseem,

I have tested this PR locally and verified the custom date filter state handling works correctly. All filter types (Weekly, Yearly, Monthly, Custom Dates) function properly and the chart updates as expected. The main fix works perfectly - when switching between different filter types and returning to "Custom Dates," the date fields reset to empty as intended, preventing the previous state persistence issue. Tested in both light and dark mode, and the functionality works smoothly in both themes with no errors in the console. The implementation successfully addresses the reported issue and improves the user experience when working with custom date ranges in the analytics chart.

Screenshot 2026-01-08 at 4 35 57 PM Screenshot 2026-01-08 at 4 36 08 PM Screenshot 2026-01-08 at 4 41 17 PM

@aseemdeshmukh
Copy link
Copy Markdown
Contributor Author

Hi Aseem,

I have reviewed your PR locally and all the functionality perform as per the requirement in both the modes. I just would like one change - instead of you showcasing that the "Start date cannot be after end date." as shown in the below image - can we just not allow the use to select future dates. Do let me know if this change can be made. Else your PR as i said performs as per requirement and i will approve it. Screenshot 2025-11-29 at 12 37 19 AM Screenshot 2025-11-29 at 12 36 49 AM Screenshot 2025-11-29 at 12 36 55 AM Screenshot 2025-11-29 at 12 36 59 AM Screenshot 2025-11-29 at 12 37 06 AM

Hi Anusha,

The functionality of "Start date cannot be after end date." has not been implemented in this PR as it was not part of the task. This task pertains to only the following issues :
i) When switching between filter types (“Weekly”, “Yearly”, “Custom”), previously entered custom date values persist.
ii) Custom date fields should ALWAYS reset when returning to the “Custom Date Range” filter.

The change request that you have asked can be a part of separate task.

Copy link
Copy Markdown
Contributor

@Shravan-neelamsetty Shravan-neelamsetty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Aseem, I tested this PR locally by logging in as admin and navigating to /applicants-chart. The main functionality works correctly, when I switch between filter types (Weekly, Yearly, Monthly, Custom Date Range) and return to "Custom Date Range," the date fields properly reset to empty, which was the goal of this PR. All filter types work as expected, the chart updates correctly for each selection, and the functionality works smoothly in both light and dark mode.
Screenshot 2026-01-09 at 5 19 26 AM
Screenshot 2026-01-09 at 5 19 35 AM
Screenshot 2026-01-09 at 5 20 34 AM

@abhinav-TB
Copy link
Copy Markdown
Member

Hi Aseem, I ran this PR locally and tested all the filters, everything is working as expected in both dark and light mode.
image

@Ganesh112001
Copy link
Copy Markdown

Hi Aseem, I tested this PR locally following the provided steps and verified that the custom date filter state handling works correctly as intended. After checking out the aseem-jobposting-analytics-custom-date-filter-state-handling branch, running npm install, and starting both the backend and frontend servers, I logged in as an admin user and navigated to /applicants-chart to test the functionality. I thoroughly tested the custom date filter behavior by entering various date values in the "Custom" filter mode and then switching between "Weekly", "Yearly", and "Custom" filter types multiple times. The custom date fields now properly reset and clear when switching away from the "Custom" filter and returning to it, which resolves the state persistence issue mentioned in the PR description. I verified this behavior across multiple scenarios: Custom → Weekly → Custom, Custom → Yearly → Custom, and even multi-step switches like Custom → Weekly → Yearly → Custom, and in all cases the previously entered custom date values correctly reset rather than persisting. The chart updates properly for each filter type, the date inputs function as expected when re-entering values, and I observed no console errors during testing. This fix significantly improves usability by preventing confusion from stale date values and ensures users always start with a clean slate when selecting the Custom filter. The implementation works flawlessly and is ready for merge.
Screenshot 2026-01-10 at 2 26 13 PM
Screenshot 2026-01-10 at 2 28 18 PM

@one-community
Copy link
Copy Markdown
Member

Hi Aseem,
I have reviewed your PR locally and all the functionality perform as per the requirement in both the modes. I just would like one change - instead of you showcasing that the "Start date cannot be after end date." as shown in the below image - can we just not allow the use to select future dates. Do let me know if this change can be made. Else your PR as i said performs as per requirement and i will approve it. Screenshot 2025-11-29 at 12 37 19 AM Screenshot 2025-11-29 at 12 36 49 AM Screenshot 2025-11-29 at 12 36 55 AM Screenshot 2025-11-29 at 12 36 59 AM Screenshot 2025-11-29 at 12 37 06 AM

Hi Anusha,

The functionality of "Start date cannot be after end date." has not been implemented in this PR as it was not part of the task. This task pertains to only the following issues : i) When switching between filter types (“Weekly”, “Yearly”, “Custom”), previously entered custom date values persist. ii) Custom date fields should ALWAYS reset when returning to the “Custom Date Range” filter.

The change request that you have asked can be a part of separate task.

Please still complete these requests as part of your task. Text me how many hours you want me to add to it for this.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Aseem,

I have reviewed your PR locally and thanks for fixing the issue but the chart appears to be enlarged than the original.

Image Image Image

@aseemdeshmukh
Copy link
Copy Markdown
Contributor Author

aseemdeshmukh commented Jan 29, 2026

Hi Aseem,

I have reviewed your PR locally and thanks for fixing the issue but the chart appears to be enlarged than the original.

Image Image Image

Yes, when I merged development into my branch the chart size was changed and so was the UI of the tooltip. Looks like someone worked on the chart simultaneously.
Edit: The branch #4435 had all the changes related to this particular branch which were merged into development and I pulled into mine.

@saitejakaasoju
Copy link
Copy Markdown
Contributor

Hi Aseem,
I tested this PR locally by logging in as admin and navigating to /applicants-chart. The intended fix works as expected: switching between filter types and returning to Custom Date Range properly resets the date fields, and the chart updates correctly for all filters in both light and dark modes.
One thing I noticed is that the chart now appears slightly larger than before, which affects the overall layout.
PR-4426
PR-4426-1

@one-community
Copy link
Copy Markdown
Member

Thank you all, merging!

@one-community one-community merged commit ada3d73 into development Feb 1, 2026
10 checks passed
pavanputti pushed a commit that referenced this pull request Feb 22, 2026
…lytics-custom-date-filter-state-handling

Aseem jobposting analytics custom date filter state handling
Copy link
Copy Markdown

@naznin07 naznin07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useEffect dependency issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.