build: rebuild API release bundle and admin panel for the omde list debug block

Rebuilds apps/api/release and apps/admin-panel/dist so the deployed images
carry 0156a97 (X-Debug counts block on the wholesale lists, console output in
the panel). No source change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mahmood
2026-10-26 09:38:35 +03:30
co-authored by Claude Sonnet 5.5
parent 0156a976e7
commit d8b6d36c1b
143 changed files with 200 additions and 165 deletions
+55 -19
View File
@@ -97189,7 +97189,33 @@ var require_admin_customers_service = __commonJS({
};
}
}
async list(query, scope = "all") {
/**
* Opt-in (X-Debug header) troubleshooting block for an empty list: counts only,
* no names/mobiles. Shows the exact WHERE the request ran, how many customers
* the scope matches before the grid's own filters, and how many customers
* exist per kind / are an expert's trading account. Off with DIAG_LOG=false.
*/
async listDebug(scope, scoped, total, returned) {
const [byKind, inScope, expertTradingAccounts] = await Promise.all([
this.prisma.customer.groupBy({
by: ["kind", "isActive", "isArchived", "verificationStep"],
_count: { _all: true }
}),
this.prisma.customer.count({ where: this.scopeWhere(scope) }),
this.prisma.customer.count({ where: { salesExpertTradingFor: { isNot: null } } })
]);
return {
scope,
where: scoped,
matched_with_grid_filters: total,
returned_rows: returned,
matched_by_scope_only: inScope,
customers_total: byKind.reduce((n, g) => n + g._count._all, 0),
expert_trading_accounts: expertTradingAccounts,
by_kind: byKind.map(({ _count, ...g }) => ({ ...g, n: _count._all }))
};
}
async list(query, scope = "all", debug = false) {
this.table.assertNotExport(query);
const aliased = this.applyAliases(query);
const { where, orderBy, skip, take, page, limit } = this.table.build(aliased, {
@@ -97214,7 +97240,10 @@ var require_admin_customers_service = __commonJS({
this.prisma.customer.count({ where: scoped })
]);
const linked = await this.accountingLinked(rows.map((r) => r.id));
return this.table.respond(rows.map((r) => ({ ...this.toRow(r), ...AdminCustomersService_1.accountingCells(r, linked) })), total, query, page, limit);
const result = this.table.respond(rows.map((r) => ({ ...this.toRow(r), ...AdminCustomersService_1.accountingCells(r, linked) })), total, query, page, limit);
if (!debug || process.env.DIAG_LOG === "false")
return result;
return { ...result, debug: await this.listDebug(scope, scoped, total, rows.length) };
}
/**
* The accounting balance is null for a customer not linked to the software,
@@ -97984,23 +98013,25 @@ var require_admin_customers_controller = __commonJS({
constructor(customers) {
this.customers = customers;
}
list(query, scope) {
return this.customers.list(query, scope);
// `X-Debug: 1` (set by the panel when localStorage.debug === '1') adds a
// counts-only `debug` block to the response — see AdminCustomersService.listDebug.
list(query, scope, debug) {
return this.customers.list(query, scope, debug === "1");
}
listAll(query) {
return this.list(query, "all");
listAll(query, debug) {
return this.list(query, "all", debug);
}
listBanker(query) {
return this.list(query, "banker");
listBanker(query, debug) {
return this.list(query, "banker", debug);
}
listShopkeeper(query) {
return this.list(query, "shopkeeper");
listShopkeeper(query, debug) {
return this.list(query, "shopkeeper", debug);
}
listNonVerified(query) {
return this.list(query, "non_verified");
listNonVerified(query, debug) {
return this.list(query, "non_verified", debug);
}
listArchived(query) {
return this.list(query, "archived");
listArchived(query, debug) {
return this.list(query, "archived", debug);
}
/** Legacy POST single-customer — the retail customer list. */
listSingle(query, admin) {
@@ -98075,8 +98106,9 @@ var require_admin_customers_controller = __commonJS({
(0, common_12.HttpCode)(200),
(0, guards_1.RequirePermission)("persons.list.client.omde"),
__param3(0, (0, common_12.Body)()),
__param3(1, (0, common_12.Headers)("x-debug")),
__metadata3("design:type", Function),
__metadata3("design:paramtypes", [table_query_dto_1.TableQueryDto]),
__metadata3("design:paramtypes", [table_query_dto_1.TableQueryDto, String]),
__metadata3("design:returntype", void 0)
], AdminCustomersController.prototype, "listAll", null);
__decorate4([
@@ -98085,8 +98117,9 @@ var require_admin_customers_controller = __commonJS({
(0, guards_1.SuperAdminOnly)(),
(0, guards_1.RequirePermission)("persons.list.client.omde"),
__param3(0, (0, common_12.Body)()),
__param3(1, (0, common_12.Headers)("x-debug")),
__metadata3("design:type", Function),
__metadata3("design:paramtypes", [table_query_dto_1.TableQueryDto]),
__metadata3("design:paramtypes", [table_query_dto_1.TableQueryDto, String]),
__metadata3("design:returntype", void 0)
], AdminCustomersController.prototype, "listBanker", null);
__decorate4([
@@ -98095,8 +98128,9 @@ var require_admin_customers_controller = __commonJS({
(0, guards_1.SuperAdminOnly)(),
(0, guards_1.RequirePermission)("persons.list.client.omde"),
__param3(0, (0, common_12.Body)()),
__param3(1, (0, common_12.Headers)("x-debug")),
__metadata3("design:type", Function),
__metadata3("design:paramtypes", [table_query_dto_1.TableQueryDto]),
__metadata3("design:paramtypes", [table_query_dto_1.TableQueryDto, String]),
__metadata3("design:returntype", void 0)
], AdminCustomersController.prototype, "listShopkeeper", null);
__decorate4([
@@ -98104,8 +98138,9 @@ var require_admin_customers_controller = __commonJS({
(0, common_12.HttpCode)(200),
(0, guards_1.RequirePermission)("persons.list.client.omde"),
__param3(0, (0, common_12.Body)()),
__param3(1, (0, common_12.Headers)("x-debug")),
__metadata3("design:type", Function),
__metadata3("design:paramtypes", [table_query_dto_1.TableQueryDto]),
__metadata3("design:paramtypes", [table_query_dto_1.TableQueryDto, String]),
__metadata3("design:returntype", void 0)
], AdminCustomersController.prototype, "listNonVerified", null);
__decorate4([
@@ -98113,8 +98148,9 @@ var require_admin_customers_controller = __commonJS({
(0, common_12.HttpCode)(200),
(0, guards_1.RequirePermission)("persons.list.client.omde"),
__param3(0, (0, common_12.Body)()),
__param3(1, (0, common_12.Headers)("x-debug")),
__metadata3("design:type", Function),
__metadata3("design:paramtypes", [table_query_dto_1.TableQueryDto]),
__metadata3("design:paramtypes", [table_query_dto_1.TableQueryDto, String]),
__metadata3("design:returntype", void 0)
], AdminCustomersController.prototype, "listArchived", null);
__decorate4([
+3 -4
View File
@@ -819,7 +819,7 @@ const config = {
"value": "prisma-client-js"
},
"output": {
"value": "E:\\tehran_taj\\node_modules\\.pnpm\\@prisma+client@5.22.0_prisma@5.22.0\\node_modules\\@prisma\\client",
"value": "E:\\tehran_taj-wt\\node_modules\\.pnpm\\@prisma+client@5.22.0_prisma@5.22.0\\node_modules\\@prisma\\client",
"fromEnvVar": null
},
"config": {
@@ -837,11 +837,10 @@ const config = {
}
],
"previewFeatures": [],
"sourceFilePath": "E:\\tehran_taj\\apps\\api\\prisma\\schema.prisma"
"sourceFilePath": "E:\\tehran_taj-wt\\apps\\api\\prisma\\schema.prisma"
},
"relativeEnvPaths": {
"rootEnvPath": null,
"schemaEnvPath": "../../../../../../apps/api/.env"
"rootEnvPath": null
},
"relativePath": "../../../../../../apps/api/prisma",
"clientVersion": "5.22.0",
+3 -4
View File
@@ -820,7 +820,7 @@ const config = {
"value": "prisma-client-js"
},
"output": {
"value": "E:\\tehran_taj\\node_modules\\.pnpm\\@prisma+client@5.22.0_prisma@5.22.0\\node_modules\\@prisma\\client",
"value": "E:\\tehran_taj-wt\\node_modules\\.pnpm\\@prisma+client@5.22.0_prisma@5.22.0\\node_modules\\@prisma\\client",
"fromEnvVar": null
},
"config": {
@@ -838,11 +838,10 @@ const config = {
}
],
"previewFeatures": [],
"sourceFilePath": "E:\\tehran_taj\\apps\\api\\prisma\\schema.prisma"
"sourceFilePath": "E:\\tehran_taj-wt\\apps\\api\\prisma\\schema.prisma"
},
"relativeEnvPaths": {
"rootEnvPath": null,
"schemaEnvPath": "../../../../../../apps/api/.env"
"rootEnvPath": null
},
"relativePath": "../../../../../../apps/api/prisma",
"clientVersion": "5.22.0",