diff --git a/apps/api/src/modules/admin-customers/admin-customers.service.ts b/apps/api/src/modules/admin-customers/admin-customers.service.ts index 322302f..ce786ab 100644 --- a/apps/api/src/modules/admin-customers/admin-customers.service.ts +++ b/apps/api/src/modules/admin-customers/admin-customers.service.ts @@ -73,8 +73,15 @@ function verifyStepOne(step: VerificationStep): number { return 3; // rejected / not yet submitted case VerificationStep.STEP_ONE_SUBMITTED: return 1; // pending review - default: - // STEP_TWO_SUBMITTED and VERIFIED both imply step one was accepted + case VerificationStep.REJECTED: + // Must be explicit: falling into `default` would report 2 (accepted), + // and the view unlocks the order/account switches on step one === 2. + // Rejected customers keep them locked — legacy's step-one reject also + // set active = -1 (MajorCustomerController.php:116-117). + return 3; + case VerificationStep.STEP_TWO_SUBMITTED: + case VerificationStep.VERIFIED: + // both imply step one was accepted return 2; } } @@ -85,7 +92,9 @@ function verifyStepTwo(step: VerificationStep): number { return 1; // pending review case VerificationStep.VERIFIED: return 2; // accepted - default: + case VerificationStep.UNVERIFIED: + case VerificationStep.STEP_ONE_SUBMITTED: + case VerificationStep.REJECTED: return 3; // rejected / not reached } } diff --git a/apps/user-app-v2/src/views/user/ProfileView.vue b/apps/user-app-v2/src/views/user/ProfileView.vue index 6664bdd..859733a 100644 --- a/apps/user-app-v2/src/views/user/ProfileView.vue +++ b/apps/user-app-v2/src/views/user/ProfileView.vue @@ -111,6 +111,7 @@ const VERIFICATION_LABELS: Record = { STEP_ONE_SUBMITTED: 'مرحله اول ثبت شده', STEP_TWO_SUBMITTED: 'مرحله دوم ثبت شده', VERIFIED: 'تایید شده', + REJECTED: 'رد شده', } const session = useSessionStore() diff --git a/apps/user-app/src/views/user/ProfileView.vue b/apps/user-app/src/views/user/ProfileView.vue index 66497ca..0eeb527 100644 --- a/apps/user-app/src/views/user/ProfileView.vue +++ b/apps/user-app/src/views/user/ProfileView.vue @@ -111,6 +111,7 @@ const VERIFICATION_LABELS: Record = { STEP_ONE_SUBMITTED: 'مرحله اول ثبت شده', STEP_TWO_SUBMITTED: 'مرحله دوم ثبت شده', VERIFIED: 'تایید شده', + REJECTED: 'رد شده', } const session = useSessionStore()