Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
+7
-1
@@ -10,6 +10,7 @@ import { getTranslations } from "~/locale/i18next.server";
|
||||
import { loadCrmContext, notFoundResponse, requireCrmPermission } from "~/utils/integrations/crm/crmAccess.server";
|
||||
import { listKontakteForCsv, resolveUserLabels } from "~/utils/integrations/crm/crmService.server";
|
||||
import { parseKontaktListQuery } from "~/utils/integrations/crm/kontaktListQuery";
|
||||
import { isDemoDataUiEnabled } from "~/utils/services/.server/demoDataUi.server";
|
||||
|
||||
export const loader = async ({ request, params }: LoaderFunctionArgs) => {
|
||||
const { t } = await getTranslations(request);
|
||||
@@ -24,7 +25,12 @@ export const loader = async ({ request, params }: LoaderFunctionArgs) => {
|
||||
}
|
||||
|
||||
const url = new URL(request.url);
|
||||
const { filter, sort } = parseKontaktListQuery(url.searchParams);
|
||||
const { filter: parsedFilter, sort } = parseKontaktListQuery(url.searchParams);
|
||||
// Outside staging/dev the `demo=show` query param is ignored server-side
|
||||
// (demo data is a staging/dev-only affordance).
|
||||
const filter = isDemoDataUiEnabled(undefined, { tenantId: ctx.tenantId, tenantSlug: params.tenant })
|
||||
? parsedFilter
|
||||
: { ...parsedFilter, includeDemoData: false };
|
||||
const rows = await listKontakteForCsv({ tenantId: ctx.tenantId, ctx, filter, sort });
|
||||
const userLabels = await resolveUserLabels(rows.map((row) => row.zustaendigerUserId).filter((id): id is string => Boolean(id)));
|
||||
|
||||
|
||||
Reference in new issue
Block a user