Label print API

This commit is contained in:
2026-02-07 06:41:39 -05:00
parent dd5aa7c4bc
commit 3d1c007609
5 changed files with 132 additions and 1 deletions

View File

@@ -324,6 +324,11 @@ function renderDrugs() {
);
}
// Sort alphabetically by drug name
drugsToShow = drugsToShow.sort((a, b) =>
a.name.toLowerCase().localeCompare(b.name.toLowerCase())
);
if (drugsToShow.length === 0) {
drugsList.innerHTML = '<p class="empty">No drugs found matching your criteria</p>';
return;