fixed issue with searcing
This commit is contained in:
@@ -39,9 +39,9 @@ export async function listOrderSummaries(context: DatabaseContext, query?: strin
|
|||||||
|
|
||||||
const filters = search
|
const filters = search
|
||||||
? or(
|
? or(
|
||||||
sql`instr(${orders.orderNumber}, ${search}) > 0`,
|
sql`instr(lower(${orders.orderNumber}), lower(${search})) > 0`,
|
||||||
sql`instr(${users.name}, ${search}) > 0`,
|
sql`instr(lower(${users.name}), lower(${search})) > 0`,
|
||||||
sql`instr(${users.email}, ${search}) > 0`
|
sql`instr(lower(${users.email}), lower(${search})) > 0`
|
||||||
)
|
)
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ let app: AppWithContext;
|
|||||||
let employeeCookie = "";
|
let employeeCookie = "";
|
||||||
|
|
||||||
function firstHeader(value: string | string[] | undefined) {
|
function firstHeader(value: string | string[] | undefined) {
|
||||||
return Array.isArray(value) ? value[0] : value ?? "";
|
return Array.isArray(value) ? (value[0] ?? "") : value ?? "";
|
||||||
}
|
}
|
||||||
|
|
||||||
async function login(username: string) {
|
async function login(username: string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user