Skip to content
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

[Dashboard] As on date filter need to display on the primary dashboard #1461

Closed
mahalakshme opened this issue Jul 11, 2024 · 8 comments
Closed
Assignees

Comments

@mahalakshme
Copy link
Contributor

mahalakshme commented Jul 11, 2024

As is:

  • By default in the date filter we don't show the current date. It will show the previously set date.
  • When dashboard refresh is disabled, whenever filter is applied, dashboard refresh gets triggered.

Need:

  • Currently we have different UI for primary dashboard and secondary dashboards. Going forward we need to make it the same to avoid complexities at code level and also since the underlying cards and filters work in similar fashion.
  • 'As on date' filter with 'Today' and 'Tomorrow' buttons on home page was requested so that it will be easy for users to view today and tomorrow's work. Everyday users click on Today so that they can see the due visits for that day. So why cant we make the current date as default? Thats because, then users cant disable dashboard refresh. So it cant be made default.
  • So if we move this inside the 'Filter' on low memory devices(2 GM RAM), clicking on Filter -> selecting date and then applying which is a 3 step process take more time(leads to frustration for users), when compared to just clicking Today.
  • Because of the above, it is better to provide the shortcut of date on the top.

AC:

  • When 'As on date' filter is set on a dashboard and if that is configured to be the home dashboard, then display the 'As on date filter' on the dashboard. - Instead of this we can just do displaying the as on date filter on the dashboard both for primary and secondary dashboard to reduce the complexity related to removing of filters.
  • No need to show date-picker icon to save space. Instead, like we show Date selection in registration when selecting date of birth, we can show similarly. ie. the date picker should appear on clicking on the date. And the date needs to display in green to denote that it is clickable.
Screenshot 2024-07-29 at 4 51 56 PM
  • On the first login, since there will be no previously set date in the cache, it needs to automatically show the Today's date(even when dashboard refresh is disabled)
  • Today and Tomorrow shortcut buttons need to be highlighted on selecting the corresponding dates like existing currently (shown in the video below)
Screen.Recording.2024-07-29.at.4.14.41.PM.mov
  • Currently we show 'Filter' text and icon. Remove the filter icon and display the filter text alone since text is something better understood by users and to save space.

  • Change the colour of Remove filter icon as well to green(to make it in inline with Think201 suggestions).

  • Like the current behaviour, the 'As on date' filter can display on clicking the 'Filter' icon as well. But like in the current behaviour on selection on filter page or home page, the filter values should display the same on both pages.

  • When displaying the saved filters, currently we show the selected subject type separately like below. Going forward we need to show it with other selected filters that can be removed.

Image

  • To avoid confusion w.r to removing of filters, we can display 'As on date' filter also among the selected filters, and on clicking the remove button, remove the filters and reset the 'As on date' filter to today.

Not needed

  • Implementing support for 'As on date' filter to be used by the CustomDashboard ReportCards (Standard / Custom)

Testing:

nested report card types

@mahalakshme mahalakshme converted this from a draft issue Jul 11, 2024
@mahalakshme mahalakshme moved this from In Analysis Review to Ready in Avni Product Jul 24, 2024
@mahalakshme mahalakshme moved this from Ready to In Analysis in Avni Product Jul 25, 2024
@mahalakshme mahalakshme changed the title As on date filter need to display on the primary dashboard [Dashboard] As on date filter need to display on the primary dashboard Jul 29, 2024
@mahalakshme mahalakshme moved this from In Analysis to Ready in Avni Product Jul 29, 2024
@himeshr himeshr self-assigned this Jul 29, 2024
@himeshr himeshr moved this from Ready to In Progress in Avni Product Jul 30, 2024
@himeshr himeshr moved this from In Progress to Hold in Avni Product Jul 30, 2024
himeshr added a commit that referenced this issue Jul 31, 2024
@himeshr himeshr moved this from Hold to In Progress in Avni Product Aug 1, 2024
himeshr added a commit that referenced this issue Aug 1, 2024
conditionally display asOnDate
himeshr added a commit that referenced this issue Aug 1, 2024
himeshr added a commit to avniproject/avni-models that referenced this issue Aug 2, 2024
@himeshr
Copy link
Contributor

himeshr commented Aug 2, 2024

Reference Video for AsOnDate filter support on CustomDashboards.
https://github.com/user-attachments/assets/e331ee38-a9f1-48b4-8255-8d58b499ce2f

@himeshr himeshr moved this from In Progress to Code Review Ready in Avni Product Aug 2, 2024
@himeshr
Copy link
Contributor

himeshr commented Aug 5, 2024

Additional commit 69d7044

@1t5j0y 1t5j0y moved this from In Code Review to QA Ready in Avni Product Aug 13, 2024
@AchalaBelokar
Copy link

  • I appiled as on date filter on nested report card which is giving me this error

Login with maha@APF there is QRT child due and overdue visits card
thiss is happen withthe staging env
Cannot read property 'countOfCards' of undefined
at createNestedErrorResults (address at index.android.bundle:1:1049150)
at anonymous (address at index.android.bundle:1:2431950)
at anonymous (address at index.android.bundle:1:1112702)
at forEach ((native)::)
at apply ((native)::)
at value (address at index.android.bundle:1:2247013)
at forEach (address at index.android.bundle:1:1112664)
at refreshCount (address at index.android.bundle:1:2431423)
at anonymous (address at index.android.bundle:1:2484373)
at combination (address at index.android.bundle:1:2625137)
at dispatch (address at index.android.bundle:1:2624241)
at dispatchAction (address at index.android.bundle:1:1255323)
at anonymous (address at index.android.bundle:1:2429924)
at apply ((native)::)
at anonymous (address at index.android.bundle:1:247033)
at _callTimer (address at index.android.bundle:1:246363)
at callTimers (address at index.android.bundle:1:248101)
at apply ((native)::)
at __callFunction (address at index.android.bundle:1:98035)
at anonymous (address at index.android.bundle:1:96528)
at __guard (address at index.android.bundle:1:97468)
at callFunctionReturnFlushedQueue (address at index.android.bundle:1:96486)

@AchalaBelokar AchalaBelokar moved this from In QA to QA Failed in Avni Product Aug 14, 2024
himeshr added a commit to avniproject/avni-models that referenced this issue Aug 16, 2024
@himeshr himeshr moved this from In Progress to QA Ready in Avni Product Aug 16, 2024
@Dinesh2019 Dinesh2019 self-assigned this Aug 20, 2024
@Dinesh2019
Copy link

When the we removed the filter value gets removed from the filter but in the home screen it is displayed

Click here to watch

@Dinesh2019 Dinesh2019 moved this from In QA to QA Failed in Avni Product Aug 20, 2024
@himeshr
Copy link
Contributor

himeshr commented Aug 20, 2024

When the we removed the filter value gets removed from the filter but in the home screen it is displayed

Click here to watch

@Dinesh2019 I do not see a problem with this scenario.. User has selected asOnDate filter to be today, which is what is shown in the FilterView section.

We could have a call if needed to discuss this further.

@mahalakshme
Copy link
Contributor Author

mahalakshme commented Aug 20, 2024

@himeshr is it possible to retain the selection of value for 'as on date' filter inside the filter view as well on clicking of the remove button?

@mahalakshme
Copy link
Contributor Author

@himeshr @Dinesh2019 have updated the AC(last point) to handle the above case in an easy manner and behaviourly consistent manner based on discussion with Himesh.

@himeshr
Copy link
Contributor

himeshr commented Aug 21, 2024

Have absorbed the recommended change in behaviour..

Screen.Recording.2024-08-21.at.4.51.53.PM.mov

@himeshr himeshr moved this from QA Failed to QA Ready in Avni Product Aug 21, 2024
@AchalaBelokar AchalaBelokar moved this from In QA to Done in Avni Product Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

5 participants