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
[Admin] Feed dashboard graph with real data #11082
Conversation
Response to problems: |
@CoderMaggie 1st and 3rd problem resolved: |
f913c22
to
865ec10
Compare
src/Sylius/Component/Core/Dashboard/SalesDataArrayNormalizerInterface.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/AdminBundle/Controller/DashboardController.php
Outdated
Show resolved
Hide resolved
$channelId = $channel->getId(); | ||
|
||
$query = $this->entityManager->getConnection()->query( | ||
"SELECT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this implement a DQL here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be for it to leave it as it is now, because it is an experimental feature
…dashboard controller
The requested changes have been applied :)
Thanks, Mateusz! 🎉 |
And Grzegorz 🎉 😄 |
DATE_FORMAT(checkout_completed_at, '%m.%y') AS \"date\", | ||
SUM(total) as \"total\" | ||
FROM sylius_order | ||
WHERE (channel_id = $channelId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To support string and int ids:
WHERE (channel_id = $channelId) | |
WHERE (channel_id = "$channelId") |
Known problems:
no currency in the graph (where it should be displayed? Tooltip? On the Y-axis? cc @CoderMaggie)if there is 0 sale in a month it won't be displayed (rare, but possible)