Exclude sales-expert trading accounts from wholesale customer lists.
Expert trading rows are APP_SHOPKEEPER for orders/ledger and were showing next to real omde customers. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -97169,20 +97169,24 @@ var require_admin_customers_service = __commonJS({
|
||||
in: [client_1.VerificationStep.STEP_ONE_SUBMITTED, client_1.VerificationStep.STEP_TWO_SUBMITTED]
|
||||
}
|
||||
};
|
||||
const notExpertTradingAccount = {
|
||||
salesExpertTradingFor: null
|
||||
};
|
||||
switch (scope) {
|
||||
case "banker":
|
||||
return { kind: client_1.CustomerKind.BANKER, isArchived: false };
|
||||
case "shopkeeper":
|
||||
return { kind: client_1.CustomerKind.WALK_IN_SHOPKEEPER, isArchived: false };
|
||||
case "non_verified":
|
||||
return { isArchived: false, ...pendingVerification };
|
||||
return { isArchived: false, ...pendingVerification, ...notExpertTradingAccount };
|
||||
case "archived":
|
||||
return { isArchived: true };
|
||||
return { isArchived: true, ...notExpertTradingAccount };
|
||||
case "all":
|
||||
default:
|
||||
return {
|
||||
kind: client_1.CustomerKind.APP_SHOPKEEPER,
|
||||
isArchived: false,
|
||||
...notExpertTradingAccount,
|
||||
NOT: pendingVerification
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user