You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought about my 'possible fix' for this and actually it doesn't really fit the need. While it would always give you a 2 digit date code, it would set the graphs up to never look past today's date. You would probably want to do something more like
Webapp
Summary
It looks like the getOverview() method in the typescript formats the fromDay variable using getters on javascript date object.
Example line
pacbot/webapp/src/app/pacman-features/secondary-components/compliance-overview-trend/compliance-overview-trend.component.ts
Line 137 in d78605e
Specifically getMonth will return a single digit value for most months and the backend api is expecting an format of YYYY-MM-DD and produces an error.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMonth
pacbot/api/pacman-api-asset/src/main/java/com/tmobile/pacman/api/asset/controller/AssetTrendController.java
Line 70 in 49b1c9e
Reproduce steps
Log into pacbot and load the home page with the compliance overview chart.
Expected Results
The proper date passed to the API for the charts and allowed to be parsed correctly.
Actual Results
https://user-images.githubusercontent.com/40577885/52662044-ffb68780-2ec8-11e9-9066-a702ffad79bb.png
https://user-images.githubusercontent.com/40577885/52662630-51134680-2eca-11e9-8e22-439f027de474.png
Possible Fix
This could potentially be fixed by just using ISO string and sub string adequately
fromDay = today.toISOString().substring(0, 10);
https://user-images.githubusercontent.com/40577885/52662744-946db500-2eca-11e9-9421-a215693294d2.png
Aha! Link: https://t-mobile1t-mobile.aha.io/features/PM-302
The text was updated successfully, but these errors were encountered: