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

New widget for date filtering #1387

Open
metas-mk opened this Issue Nov 27, 2017 · 14 comments

Comments

Projects
None yet
6 participants
@metas-mk
Member

metas-mk commented Nov 27, 2017

Is this a bug or feature request?

Feature Request

What is the current behavior?

Currently, when the user wants to browse through dates, then the current date-range filter must be used.
In some cases this is not handy at all... to many clicks.

What is the expected or desired behavior?

Take following example: https://w101.metasfresh.com:8443/window/540253
image

Remark:

  • the filter is "frequent:true" (so it will be displayed directly on view page and not inside the Filters button dropdown)
  • the filter has only one parameter
  • the parameter has set "showIncrementDecrementButtons:true"
  • the parameter has set "widgetType:Date" or "widgetType:DateTime"

=> Those are the conditions to identify that we are dealing with a different filtering widget.

In this case, the frontend shall:

  • the caption shall display the current date instead of "Filters: Date", so the user knows on which date he/she is filtering
  • render the "<" and ">" which will decrement/increment the current date with 1 day. When user is pressing one of the buttons, the frontend shall:
    ** automatically decrement/increment the date and apply the filter
    ** update the caption

Please let me know what do you think.
I am also open to suggestions to change the protocol as long as we deliver the functionality described here.

@metas-mk

This comment has been minimized.

Show comment
Hide comment
@metas-mk
Member

metas-mk commented Nov 27, 2017

@teosarca teosarca changed the title from New widget for date browsing to New widget for date filtering Nov 28, 2017

@ottosichert

This comment has been minimized.

Show comment
Hide comment
@ottosichert

ottosichert Nov 30, 2017

Member

I implemented the date stepper for date ranges as well, because their widgetType is Date as well.

Currently clicking on < or > will move the date range by one day, do you want to keep this behaviour or alternatively move the date range by its own length, i.e.:

screenshot-2017-12-1 metasfresh

Previous date range: 25.11.2017 - 01.12.2017
Next date range: 09.12.2017 - 15.12.2017

Member

ottosichert commented Nov 30, 2017

I implemented the date stepper for date ranges as well, because their widgetType is Date as well.

Currently clicking on < or > will move the date range by one day, do you want to keep this behaviour or alternatively move the date range by its own length, i.e.:

screenshot-2017-12-1 metasfresh

Previous date range: 25.11.2017 - 01.12.2017
Next date range: 09.12.2017 - 15.12.2017

metas-mk added a commit to metasfresh/metasfresh that referenced this issue Dec 1, 2017

Update ReleaseNotes.md
Adding a new Issue to the ReleaseNotes of next week
metasfresh/metasfresh-webui-frontend#1387 New
widget for date filtering
@metas-mk

This comment has been minimized.

Show comment
Hide comment
@metas-mk

metas-mk Dec 1, 2017

Member

moin @ottosichert
merged, rollout and quick test.
here a first feedback about it
a) press on filter button and parm for date --> calendar opens in weird, small dropdown instead of showing the caledar as usual
b) the increment/ decrement button dont' seem to have the same height as the filter button itself (a pixel or 2 too small)
image

Member

metas-mk commented Dec 1, 2017

moin @ottosichert
merged, rollout and quick test.
here a first feedback about it
a) press on filter button and parm for date --> calendar opens in weird, small dropdown instead of showing the caledar as usual
b) the increment/ decrement button dont' seem to have the same height as the filter button itself (a pixel or 2 too small)
image

@ottosichert

This comment has been minimized.

Show comment
Hide comment
@ottosichert

ottosichert Dec 1, 2017

Member

Hi @metas-mk,

a) This issue is separate from this feature and existed before my PR (at af74af7). I will look into it
b) It's actually half a pixel on Firefox (not visible) and one pixel on chrome (visible). I will fix it as well

Member

ottosichert commented Dec 1, 2017

Hi @metas-mk,

a) This issue is separate from this feature and existed before my PR (at af74af7). I will look into it
b) It's actually half a pixel on Firefox (not visible) and one pixel on chrome (visible). I will fix it as well

@metas-mk

This comment has been minimized.

Show comment
Hide comment
@metas-mk

metas-mk Dec 1, 2017

Member

Thx.
@ottosichert found another one. also just cosmetic. seems as if the gap between 2 filter buttons are now too narrow when w/o decrement/increment buttons.
image

Member

metas-mk commented Dec 1, 2017

Thx.
@ottosichert found another one. also just cosmetic. seems as if the gap between 2 filter buttons are now too narrow when w/o decrement/increment buttons.
image

@ottosichert

This comment has been minimized.

Show comment
Hide comment
@ottosichert

ottosichert Dec 1, 2017

Member

This issue was introduced by my feature PR, resolving it as well

Member

ottosichert commented Dec 1, 2017

This issue was introduced by my feature PR, resolving it as well

@metas-lc

This comment has been minimized.

Show comment
Hide comment
@metas-lc

metas-lc Dec 5, 2017

IT

  1. i had to make some configs to test this task:
    (i might need to create a task to have them by default)
    went to table window for qtyonhand, column Date => set range filter on N, filter +/- buttons on Y and Filter default Value on NOW
  2. opened window /540253
    => there are 2 arrows - height is OK, as big as the filter
  3. press on date filter
    => there is no scroll, the date panel fits
    => question: i wonder if we shall move the calendar a bit more to the right, right under the date? And to change the way date appears "2017-12-05T00:00:00.000+01:00"? (i have to ask)
  4. press on filter, open calendar, don't change the date, press apply
    => error: undefined has an invalid date. (don't know if it's task related?)
  5. press on < and > arrows
    => date changes accordingly OK
  6. navigating back:
    i went from Stock Control Purchase window (540253) to sales order (143)
    pressed on date filter in sales order => notice a range date filter
    directly pressed on back => notice the filter is still shown, name changed, but it's still a range date filter NOK (probably not task related)

picture for steps 3 and 4
image

picture for step 6
image

metas-lc commented Dec 5, 2017

IT

  1. i had to make some configs to test this task:
    (i might need to create a task to have them by default)
    went to table window for qtyonhand, column Date => set range filter on N, filter +/- buttons on Y and Filter default Value on NOW
  2. opened window /540253
    => there are 2 arrows - height is OK, as big as the filter
  3. press on date filter
    => there is no scroll, the date panel fits
    => question: i wonder if we shall move the calendar a bit more to the right, right under the date? And to change the way date appears "2017-12-05T00:00:00.000+01:00"? (i have to ask)
  4. press on filter, open calendar, don't change the date, press apply
    => error: undefined has an invalid date. (don't know if it's task related?)
  5. press on < and > arrows
    => date changes accordingly OK
  6. navigating back:
    i went from Stock Control Purchase window (540253) to sales order (143)
    pressed on date filter in sales order => notice a range date filter
    directly pressed on back => notice the filter is still shown, name changed, but it's still a range date filter NOK (probably not task related)

picture for steps 3 and 4
image

picture for step 6
image

@metas-lc

This comment has been minimized.

Show comment
Hide comment
@metas-lc

metas-lc Jan 9, 2018

Found another problem while testing metasfresh/metasfresh#3275
go to e.g. Purchase order (window/181), select default filter: Date Promised
add a date, set an hour, apply
select the filter again => the date and hour is reset. Shall keep the latest changes
image

metas-lc commented Jan 9, 2018

Found another problem while testing metasfresh/metasfresh#3275
go to e.g. Purchase order (window/181), select default filter: Date Promised
add a date, set an hour, apply
select the filter again => the date and hour is reset. Shall keep the latest changes
image

@wiadev

This comment has been minimized.

Show comment
Hide comment
@wiadev

wiadev Jan 17, 2018

Member

@teosarca While I'm working n this task, I figured that we have a timezone issue on both of front-end and back-end.

So I've updated the front-end to send timezone to back-end but back-end can't parse it.

Check out the following screenshot, please.
screenshot at jan 17 10-32-21

Member

wiadev commented Jan 17, 2018

@teosarca While I'm working n this task, I figured that we have a timezone issue on both of front-end and back-end.

So I've updated the front-end to send timezone to back-end but back-end can't parse it.

Check out the following screenshot, please.
screenshot at jan 17 10-32-21

wiadev added a commit that referenced this issue Jan 17, 2018

Create TetheredDateTime component #1387
- Update Datepicker to use TetheredDateTime

wiadev added a commit that referenced this issue Jan 17, 2018

wiadev added a commit that referenced this issue Jan 17, 2018

@wiadev wiadev referenced this issue Jan 17, 2018

Merged

#1387 #1507

metas-mk added a commit that referenced this issue Jan 18, 2018

.#1387 Minor fix of code formatting w/ lint
Minor fix of code formatting w/ lint
#1387

metas-mk added a commit that referenced this issue Jan 18, 2018

wiadev added a commit that referenced this issue Jan 19, 2018

@metas-lc

This comment has been minimized.

Show comment
Hide comment
@metas-lc

metas-lc Jan 19, 2018

IT
3. the calendar appears like a tooltip (looks fine for me) and it's right under date OK
4. new error appears NOK

"Failed converting DateDoc's value '2018-01-19T01:00:00+02:00' (class java.lang.String) to class java.util.Date↵ LookupDataSource: null↵ Widget type: Date"

Actually the filter seems to not work anymore because of that error
5. not working because of no.4 NOK
EDIT: for 4 and 5 created task metasfresh/metasfresh-webui-api#796

  1. could not reproduce OK

.
about the other problem in purchase order - date promised => the problem was solved, the filter remembers the date you set BUT i found a weird issue, similar with old step 4
purchase order -> filter -> default -> date promised -> set a date -> important: click in the field of the date (somewhere in the middle of 2018-01-22T00:00:00.000+02:00)
=>
undefined has an invalid date. NOK

metas-lc commented Jan 19, 2018

IT
3. the calendar appears like a tooltip (looks fine for me) and it's right under date OK
4. new error appears NOK

"Failed converting DateDoc's value '2018-01-19T01:00:00+02:00' (class java.lang.String) to class java.util.Date↵ LookupDataSource: null↵ Widget type: Date"

Actually the filter seems to not work anymore because of that error
5. not working because of no.4 NOK
EDIT: for 4 and 5 created task metasfresh/metasfresh-webui-api#796

  1. could not reproduce OK

.
about the other problem in purchase order - date promised => the problem was solved, the filter remembers the date you set BUT i found a weird issue, similar with old step 4
purchase order -> filter -> default -> date promised -> set a date -> important: click in the field of the date (somewhere in the middle of 2018-01-22T00:00:00.000+02:00)
=>
undefined has an invalid date. NOK

@wiadev

This comment has been minimized.

Show comment
Hide comment
@wiadev

wiadev Jan 19, 2018

Member

@metas-lc
Regarding 4 and 5, I've already described in #1387 (comment).

@teosarca Can you take a look at it, please?

Member

wiadev commented Jan 19, 2018

@metas-lc
Regarding 4 and 5, I've already described in #1387 (comment).

@teosarca Can you take a look at it, please?

@metas-lc

This comment has been minimized.

Show comment
Hide comment
@metas-lc

metas-lc Jan 19, 2018

@wiadev ah yes sry. I didn't see it. I'll create a task for it.

metas-lc commented Jan 19, 2018

@wiadev ah yes sry. I didn't see it. I'll create a task for it.

@metas-lc

This comment has been minimized.

Show comment
Hide comment
@teosarca

This comment has been minimized.

Show comment
Hide comment
@teosarca

teosarca Jan 19, 2018

Member

@wiadev @metas-lc that's not a backend issue.
The problem is the frontend is no longer respecting the date format.

In console i've found:

Caused by: org.adempiere.exceptions.AdempiereException: Failed converting '2018-01-16T00:00:00+02:00' to date.
 Please use following format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX.
 e.g. 2018-01-20T01:17:34.991+02:00

So basically, you are no longer including the milliseconds.

Member

teosarca commented Jan 19, 2018

@wiadev @metas-lc that's not a backend issue.
The problem is the frontend is no longer respecting the date format.

In console i've found:

Caused by: org.adempiere.exceptions.AdempiereException: Failed converting '2018-01-16T00:00:00+02:00' to date.
 Please use following format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX.
 e.g. 2018-01-20T01:17:34.991+02:00

So basically, you are no longer including the milliseconds.

metas-ts added a commit that referenced this issue Feb 6, 2018

Merge pull request #1516 from metasfresh/dev-1387
Update yarn.lock on v8.9.1 #1387

metas-ts added a commit that referenced this issue Feb 6, 2018

metas-ts added a commit that referenced this issue Feb 6, 2018

Merge pull request #1562 from metasfresh/revert-1516-dev-1387
Revert "Update yarn.lock on v8.9.1 #1387"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment