From f92fb55ab68d98b10b631066872285aed3b0be40 Mon Sep 17 00:00:00 2001 From: Deniss Kozickis Date: Thu, 27 Jun 2024 10:18:47 +0300 Subject: [PATCH] GN-4853: Seach and sort templates alphabetically (#682) --- .changeset/shaggy-pugs-shave.md | 5 +++++ app/components/document-creator/form.hbs | 2 ++ app/services/regulatory-attachments-fetcher.js | 1 + 3 files changed, 8 insertions(+) create mode 100644 .changeset/shaggy-pugs-shave.md diff --git a/.changeset/shaggy-pugs-shave.md b/.changeset/shaggy-pugs-shave.md new file mode 100644 index 000000000..e3ab75b1f --- /dev/null +++ b/.changeset/shaggy-pugs-shave.md @@ -0,0 +1,5 @@ +--- +'frontend-gelinkt-notuleren': patch +--- + +GN-4853: Seach and sort templates alphabetically diff --git a/app/components/document-creator/form.hbs b/app/components/document-creator/form.hbs index f6d5808ba..157e29778 100644 --- a/app/components/document-creator/form.hbs +++ b/app/components/document-creator/form.hbs @@ -27,6 +27,8 @@ @options={{@options}} @selected={{@selectedTemplate}} @onChange={{@onSelectTemplate}} + @searchEnabled={{true}} + @searchField='title' as |option| > {{option.title}} diff --git a/app/services/regulatory-attachments-fetcher.js b/app/services/regulatory-attachments-fetcher.js index 57e1cde0a..d48584dee 100644 --- a/app/services/regulatory-attachments-fetcher.js +++ b/app/services/regulatory-attachments-fetcher.js @@ -32,6 +32,7 @@ export default class RegulatoryAttachmentsFetcher extends Service { } FILTER( ! BOUND(?validThrough) || ?validThrough > NOW()) } + ORDER BY LCASE(REPLACE(STR(?title), '^ +| +$', '')) `; const details = { query: sparqlQuery,