Improved search, linking results to scenes page, updating on input clear.

This commit is contained in:
2026-01-05 21:40:03 +01:00
parent 68f15d4f74
commit 77b9acea32
6 changed files with 8 additions and 6 deletions

View File

@@ -49,7 +49,8 @@ export async function fetchEntities(options = {}) {
.where((subBuilder) => {
subBuilder
.whereILike('entities.name', `%${options.query}%`)
.orWhereILike('entities.slug', `%${options.query}%`);
.orWhereILike('entities.slug', `%${options.query}%`)
.orWhereILike(knex.raw('array_to_string(entities.alias, \',\', \'*\')'), `%${options.query}%`);
})
.whereNot('entities.type', 'info');
});