-
Notifications
You must be signed in to change notification settings - Fork 21
fix: reverse date and display bug #427
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
base: next
Are you sure you want to change the base?
Conversation
live-demo/app/custom/Dashboard.vue
Outdated
| unlistedPrice: item.unlistedPrice.toFixed(2), | ||
| }) | ||
| ); | ||
| const arr = data.value?.listedVsUnlistedPriceByDays; |
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.
Instead of this fix lets simply return data in correct order from backend , by modifying query (this is live demo so this is crucial to keep code simple)
live-demo/app/index.ts
Outdated
| LIMIT ?; | ||
| ` | ||
| ).all(days); | ||
| apartsByDays.reverse(); |
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.
@tesaide lets just fix SQL (asc desc?)
live-demo/app/index.ts
Outdated
| COUNT(*) as count | ||
| FROM apartments | ||
| GROUP BY day | ||
| ORDER BY day DESC |
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.
@tesaide please change it here
live-demo/app/index.ts
Outdated
| const days = req.body.days || 7; | ||
| const apartsByDays = await db.prepare( | ||
| `SELECT | ||
| `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.
@tesaide please return whitespaces back
Correct formatting:
const x = function doThis(
aa=1,
bb=2
)
Bad formatting
const x = function doThis(
aa=1, // reads really hard, it is hard to distinguish
bb=2
)
live-demo/app/index.ts
Outdated
| ORDER BY day ASC | ||
| LIMIT ?;` | ||
| ).all(days); | ||
|
|
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.
@tesaide I think there is no sense to add a new empty line?
No description provided.