fix: consistent sorting in optimized views
This commit is contained in:
parent
1bdb4da519
commit
e39bd90911
7 changed files with 25 additions and 20 deletions
8
package-lock.json
generated
8
package-lock.json
generated
|
@ -7936,16 +7936,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vitefu": {
|
"node_modules/vitefu": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.0.4.tgz",
|
||||||
"integrity": "sha512-iKKfOMBHob2WxEJbqbJjHAkmYgvFDPhuqrO82om83S8RLk+17FtyMBfcyeH8GqD0ihShtkMW/zzJgiA51hCNCQ==",
|
"integrity": "sha512-y6zEE3PQf6uu/Mt6DTJ9ih+kyJLr4XcSgHR2zUkM8SWDhuixEJxfJ6CZGMHh1Ec3vPLoEA0IHU5oWzVqw8ulow==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"tests/deps/*",
|
"tests/deps/*",
|
||||||
"tests/projects/*"
|
"tests/projects/*"
|
||||||
],
|
],
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0-beta.0"
|
"vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0"
|
||||||
},
|
},
|
||||||
"peerDependenciesMeta": {
|
"peerDependenciesMeta": {
|
||||||
"vite": {
|
"vite": {
|
||||||
|
|
|
@ -70,7 +70,7 @@ WHERE
|
||||||
pt.posts_id = p.id) AS tags,
|
pt.posts_id = p.id) AS tags,
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
json_agg(json_build_object('name', g.name, 'url', g.slug))
|
json_agg(json_build_object('name', g.name, 'url', g.slug) ORDER BY g.name ASC)
|
||||||
FROM
|
FROM
|
||||||
posts_genres gp
|
posts_genres gp
|
||||||
LEFT JOIN genres g ON gp.genres_id = g.id
|
LEFT JOIN genres g ON gp.genres_id = g.id
|
||||||
|
@ -78,7 +78,7 @@ WHERE
|
||||||
gp.posts_id = p.id) AS genres,
|
gp.posts_id = p.id) AS genres,
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
json_agg(json_build_object('name', a.name_string, 'url', a.slug, 'country', a.country, 'total_plays', a.total_plays))
|
json_agg(json_build_object('name', a.name_string, 'url', a.slug, 'country', a.country, 'total_plays', a.total_plays) ORDER BY a.name_string ASC)
|
||||||
FROM
|
FROM
|
||||||
posts_artists pa
|
posts_artists pa
|
||||||
LEFT JOIN artists a ON pa.artists_id = a.id
|
LEFT JOIN artists a ON pa.artists_id = a.id
|
||||||
|
@ -87,7 +87,7 @@ WHERE
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
json_agg(json_build_object('title', b.title, 'author', b.author, 'url', b.slug)
|
json_agg(json_build_object('title', b.title, 'author', b.author, 'url', b.slug)
|
||||||
ORDER BY b.title)
|
ORDER BY b.title ASC)
|
||||||
FROM
|
FROM
|
||||||
posts_books pbk
|
posts_books pbk
|
||||||
LEFT JOIN books b ON pbk.books_id = b.id
|
LEFT JOIN books b ON pbk.books_id = b.id
|
||||||
|
@ -104,7 +104,7 @@ WHERE
|
||||||
pm.posts_id = p.id) AS movies,
|
pm.posts_id = p.id) AS movies,
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
json_agg(json_build_object('title', s.title, 'year', s.year, 'url', s.slug))
|
json_agg(json_build_object('title', s.title, 'year', s.year, 'url', s.slug) ORDER BY s.year DESC)
|
||||||
FROM
|
FROM
|
||||||
posts_shows ps
|
posts_shows ps
|
||||||
LEFT JOIN shows s ON ps.shows_id = s.id
|
LEFT JOIN shows s ON ps.shows_id = s.id
|
||||||
|
|
|
@ -23,7 +23,8 @@ SELECT
|
||||||
bt.books_id = b.id) AS tags,
|
bt.books_id = b.id) AS tags,
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
json_agg(json_build_object('name', a.name_string, 'url', a.slug, 'country', a.country, 'total_plays', a.total_plays))
|
json_agg(json_build_object('name', a.name_string, 'url', a.slug, 'country', a.country, 'total_plays', a.total_plays)
|
||||||
|
ORDER BY a.name_string ASC)
|
||||||
FROM
|
FROM
|
||||||
books_artists ba
|
books_artists ba
|
||||||
LEFT JOIN artists a ON ba.artists_id = a.id
|
LEFT JOIN artists a ON ba.artists_id = a.id
|
||||||
|
@ -31,7 +32,8 @@ WHERE
|
||||||
ba.books_id = b.id) AS artists,
|
ba.books_id = b.id) AS artists,
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
json_agg(json_build_object('title', m.title, 'year', m.year, 'url', m.slug))
|
json_agg(json_build_object('title', m.title, 'year', m.year, 'url', m.slug)
|
||||||
|
ORDER BY m.year DESC)
|
||||||
FROM
|
FROM
|
||||||
movies_books mb
|
movies_books mb
|
||||||
LEFT JOIN movies m ON mb.movies_id = m.id
|
LEFT JOIN movies m ON mb.movies_id = m.id
|
||||||
|
@ -39,7 +41,8 @@ WHERE
|
||||||
mb.books_id = b.id) AS movies,
|
mb.books_id = b.id) AS movies,
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
json_agg(json_build_object('name', g.name, 'url', g.slug))
|
json_agg(json_build_object('name', g.name, 'url', g.slug)
|
||||||
|
ORDER BY g.name ASC)
|
||||||
FROM
|
FROM
|
||||||
genres_books gb
|
genres_books gb
|
||||||
LEFT JOIN genres g ON gb.genres_id = g.id
|
LEFT JOIN genres g ON gb.genres_id = g.id
|
||||||
|
@ -47,7 +50,8 @@ WHERE
|
||||||
gb.books_id = b.id) AS genres,
|
gb.books_id = b.id) AS genres,
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
json_agg(json_build_object('title', s.title, 'year', s.year, 'url', s.slug))
|
json_agg(json_build_object('title', s.title, 'year', s.year, 'url', s.slug)
|
||||||
|
ORDER BY s.year DESC)
|
||||||
FROM
|
FROM
|
||||||
shows_books sb
|
shows_books sb
|
||||||
LEFT JOIN shows s ON sb.shows_id = s.id
|
LEFT JOIN shows s ON sb.shows_id = s.id
|
||||||
|
@ -65,7 +69,7 @@ WHERE
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
json_agg(json_build_object('title', rb.title, 'author', rb.author, 'url', rb.slug)
|
json_agg(json_build_object('title', rb.title, 'author', rb.author, 'url', rb.slug)
|
||||||
ORDER BY rb.title)
|
ORDER BY rb.title DESC)
|
||||||
FROM
|
FROM
|
||||||
related_books rbk
|
related_books rbk
|
||||||
LEFT JOIN books rb ON rbk.related_books_id = rb.id
|
LEFT JOIN books rb ON rbk.related_books_id = rb.id
|
||||||
|
|
|
@ -39,7 +39,7 @@ SELECT
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
json_agg(json_build_object('title', b.title, 'author', b.author, 'url', b.slug)
|
json_agg(json_build_object('title', b.title, 'author', b.author, 'url', b.slug)
|
||||||
ORDER BY b.date_finished DESC)
|
ORDER BY b.title ASC)
|
||||||
FROM
|
FROM
|
||||||
books_artists ba
|
books_artists ba
|
||||||
LEFT JOIN books b ON ba.books_id = b.id
|
LEFT JOIN books b ON ba.books_id = b.id
|
||||||
|
|
|
@ -18,7 +18,8 @@ SELECT
|
||||||
a.genres = g.id) AS artists,
|
a.genres = g.id) AS artists,
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
json_agg(json_build_object('title', b.title, 'author', b.author, 'url', b.slug))
|
json_agg(json_build_object('title', b.title, 'author', b.author, 'url', b.slug)
|
||||||
|
ORDER BY b.title ASC)
|
||||||
FROM
|
FROM
|
||||||
books b
|
books b
|
||||||
JOIN genres_books gb ON gb.books_id = b.id
|
JOIN genres_books gb ON gb.books_id = b.id
|
||||||
|
|
|
@ -38,7 +38,7 @@ SELECT
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
json_agg(json_build_object('title', b.title, 'author', b.author, 'url', b.slug)
|
json_agg(json_build_object('title', b.title, 'author', b.author, 'url', b.slug)
|
||||||
ORDER BY b.title)
|
ORDER BY b.title ASC)
|
||||||
FROM
|
FROM
|
||||||
shows_books sb
|
shows_books sb
|
||||||
LEFT JOIN books b ON sb.books_id = b.id
|
LEFT JOIN books b ON sb.books_id = b.id
|
||||||
|
@ -73,7 +73,7 @@ SELECT
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
json_agg(json_build_object('name', a.name_string, 'url', a.slug, 'country', a.country, 'total_plays', a.total_plays)
|
json_agg(json_build_object('name', a.name_string, 'url', a.slug, 'country', a.country, 'total_plays', a.total_plays)
|
||||||
ORDER BY a.name_string)
|
ORDER BY a.name_string ASC)
|
||||||
FROM
|
FROM
|
||||||
shows_artists sa
|
shows_artists sa
|
||||||
LEFT JOIN artists a ON sa.artists_id = a.id
|
LEFT JOIN artists a ON sa.artists_id = a.id
|
||||||
|
|
|
@ -3158,9 +3158,6 @@
|
||||||
{
|
{
|
||||||
"loc": "https://coryd.dev/watching/movies/246741"
|
"loc": "https://coryd.dev/watching/movies/246741"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"loc": "https://coryd.dev/watching/movies/744857"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"loc": "https://coryd.dev/watching/movies/22798"
|
"loc": "https://coryd.dev/watching/movies/22798"
|
||||||
},
|
},
|
||||||
|
@ -3182,6 +3179,9 @@
|
||||||
{
|
{
|
||||||
"loc": "https://coryd.dev/watching/movies/22488"
|
"loc": "https://coryd.dev/watching/movies/22488"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"loc": "https://coryd.dev/watching/movies/744857"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"loc": "https://coryd.dev/watching/movies/1216191"
|
"loc": "https://coryd.dev/watching/movies/1216191"
|
||||||
},
|
},
|
||||||
|
|
Reference in a new issue