From f2a32b225c243e2cf8b5b368cc6ac4611ce3a476 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Fri, 1 Jul 2022 15:59:01 +0200 Subject: feat(matching): distiguish between empty and non empty address-search results --- basicConfig/templates/residency.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'basicConfig') diff --git a/basicConfig/templates/residency.html b/basicConfig/templates/residency.html index 26812ec0..de77269f 100644 --- a/basicConfig/templates/residency.html +++ b/basicConfig/templates/residency.html @@ -33,6 +33,7 @@ function search() { let updatedText = /*[[#{gui.residency.updated}]]*/ 'Updated text'; let errorText = /*[[#{gui.residency.error}]]*/ 'Error'; + let emptyText = /*[[#{gui.residency.noentry}]]*/ 'Found {0}' let foundText = /*[[#{gui.residency.found}]]*/ 'Found {0}'; let uniqueText = /*[[#{gui.residency.unique}]]*/ 'Unique'; let invalidInputText = /*[[#{gui.residency.header.inputinvalid}]]*/ 'Invalid'; @@ -57,7 +58,12 @@ $("#inputForm #inputNumber").val(data["results"][0]["number"]); return; } - $("#textResult").show().text(foundText.replace("{0}", data["resultCount"])); + + if (data["resultCount"] === 0) { + $("#textResult").show().text(emptyText); + } else { + $("#textResult").show().text(foundText.replace("{0}", data["resultCount"])); + } $("#tableResult").show(); $("#tableResult tbody").empty(); $.each(data.results, function (i, output) { -- cgit v1.2.3