From 3230cc59ad931123f53891275da9d613e7a667f8 Mon Sep 17 00:00:00 2001 From: GuwandykA Date: Wed, 5 Aug 2026 16:05:36 +0500 Subject: [PATCH] Order categories newest-first and uppercase menu category names. Co-authored-by: Cursor --- backend/internal/client/users/db/postgresql.go | 2 +- frontend/src/js/app.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/backend/internal/client/users/db/postgresql.go b/backend/internal/client/users/db/postgresql.go index 78fe199..7008c12 100755 --- a/backend/internal/client/users/db/postgresql.go +++ b/backend/internal/client/users/db/postgresql.go @@ -83,7 +83,7 @@ func (r repository) GetCategories(ctx context.Context) ([]users.CategoryDTO, err LEFT JOIN sub_categories sc ON sc.category_id = c.id AND sc.status = true WHERE c.status = true GROUP BY c.id - ORDER BY c.created_at ASC;` + ORDER BY c.created_at DESC;` rows, err := r.client.Query(ctx, q) if err != nil { diff --git a/frontend/src/js/app.js b/frontend/src/js/app.js index 6423e11..e9e9e8d 100755 --- a/frontend/src/js/app.js +++ b/frontend/src/js/app.js @@ -148,10 +148,12 @@ async function fetchMenuItems() { }) } + const categoryName = (menuItem.name[window.locale] || '').toUpperCase() + container.insertAdjacentHTML('beforeend', `