fix(customers): show every non-archived wholesale customer in the main list

The reference (henza_server AdminController::getCustomer) lists type=2 AND
is_archive=0 with no verification or active filter. The develop-branch change
that hid inactive customers with a pending verification step from «عمده»
emptied the list for customers migrated in that state, while their numbers
stayed taken ("already exists"). Restore parity; the sales-expert trading
account exclusion is kept.

Includes the rebuilt release/app.js and a regression test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
s.esmaeili
2026-10-26 06:50:05 +03:30
co-authored by Claude Sonnet 5.5
parent e2ec30f241
commit 0c52adcd26
3 changed files with 23 additions and 12 deletions
+4 -6
View File
@@ -97157,10 +97157,9 @@ var require_admin_customers_service = __commonJS({
* NOTE every non-archive list also excludes archived rows, so archiving a
* customer removes them from ALL type lists at once.
*
* «در انتظار» vs «عمده» must not show the same rows. App self-registration
* creates APP_SHOPKEEPER + isActive=false + STEP_ONE_SUBMITTED, and step-one
* accept sets isActive=true — so pending is inactive+pending-step only, and
* the main omde list excludes those same inactive pending rows.
* «در انتظار» and «عمده» MAY show the same customer, exactly as in the
* reference: getCustomer has no verification filter, so a customer awaiting
* approval is in both lists.
*/
scopeWhere(scope) {
const pendingVerification = {
@@ -97186,8 +97185,7 @@ var require_admin_customers_service = __commonJS({
return {
kind: client_1.CustomerKind.APP_SHOPKEEPER,
isArchived: false,
...notExpertTradingAccount,
NOT: pendingVerification
...notExpertTradingAccount
};
}
}