From 760f1c2877c2f0e691be20089327caa00a30d25c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Mon, 20 Mar 2023 23:49:01 +0800 Subject: [PATCH] Fixed the query to be case-insensitive in the base account selector in the account form and the account selector in the journal entry form. --- src/accounting/static/js/account-form.js | 2 +- src/accounting/static/js/account-selector.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/accounting/static/js/account-form.js b/src/accounting/static/js/account-form.js index 03482c2..88fda14 100644 --- a/src/accounting/static/js/account-form.js +++ b/src/accounting/static/js/account-form.js @@ -310,7 +310,7 @@ class BaseAccountSelector { const queryValues = JSON.parse(option.dataset.queryValues); let isMatched = false; for (const queryValue of queryValues) { - if (queryValue.includes(this.#query.value)) { + if (queryValue.toLowerCase().includes(this.#query.value.toLowerCase())) { isMatched = true; break; } diff --git a/src/accounting/static/js/account-selector.js b/src/accounting/static/js/account-selector.js index 2716277..761fb01 100644 --- a/src/accounting/static/js/account-selector.js +++ b/src/accounting/static/js/account-selector.js @@ -166,7 +166,7 @@ class AccountSelector { } const queryValues = JSON.parse(option.dataset.queryValues); for (const queryValue of queryValues) { - if (queryValue.includes(query.value)) { + if (queryValue.toLowerCase().includes(query.value.toLowerCase())) { return true; } }