small clients ui tweaks

This commit is contained in:
miloschwartz
2025-04-20 16:49:48 -04:00
parent f960fb7d67
commit fa6fc9e80d
25 changed files with 215 additions and 377 deletions

View File

@@ -6,7 +6,7 @@ import {
sites,
userClients,
clientSites
} from "@server/db/schema";
} from "@server/db/schemas";
import logger from "@server/logger";
import HttpCode from "@server/types/HttpCode";
import response from "@server/lib/response";
@@ -53,6 +53,7 @@ function queryClients(orgId: string, accessibleClientIds: number[]) {
})
.from(clients)
.leftJoin(orgs, eq(clients.orgId, orgs.orgId))
.leftJoin(orgs, eq(clients.orgId, orgs.orgId))
.where(
and(
inArray(clients.clientId, accessibleClientIds),
@@ -63,7 +64,7 @@ function queryClients(orgId: string, accessibleClientIds: number[]) {
async function getSiteAssociations(clientIds: number[]) {
if (clientIds.length === 0) return [];
return db
.select({
clientId: clientSites.clientId,
@@ -205,4 +206,4 @@ export async function listClients(
createHttpError(HttpCode.INTERNAL_SERVER_ERROR, "An error occurred")
);
}
}
}