fix: user status
Deploy banu-front / deploy (push) Failing after 7s

This commit is contained in:
sajjadtalkhabi
2026-06-11 16:57:17 +03:30
parent 130266b416
commit a007db0d50
17 changed files with 123 additions and 119 deletions
@@ -6,7 +6,7 @@ const pick = (arr, i) => arr[i % arr.length]
const makeStudent = (i) => {
const firstName = pick(firstNames, i)
const lastName = pick(lastNames, i + 2)
const status = i % 3 === 0 ? 'rejected' : 'pending'
const status = i % 3 === 0 ? 'rejected' : 'verified'
const submittedAt = new Date(Date.now() - i * 86_400_000).toISOString()
return {
id: 500 + i,
+1 -1
View File
@@ -86,7 +86,7 @@ const makeUser = (i, overrides = {}) => {
fullName: `${firstName} ${lastName}`,
phoneNumber,
nationalCode: String(1_000_000_000 + i * 7).padStart(10, '0'),
status: i % 5 === 0 ? 'pending' : 'approved',
status: i % 5 === 0 ? 'pending' : i % 3 === 0 ? 'verified' : 'approved',
roleId: roles.find((r) => r.name === role)?.id,
address: {
address: 'آدرس نمونه',
+1
View File
@@ -21,6 +21,7 @@ register('GET', endpoints.getApprovedUsers, ({ query }) => {
nationalCode: 'includes',
phoneNumber: 'includes',
roleId: (item, v) => String(item.roleId) === String(v),
status: (item, v) => String(item.status) === String(v),
})
list = filterDateRange(list, query)
const { data: items, meta } = paginate(list, query)
+14 -4
View File
@@ -9,7 +9,13 @@ register('POST', endpoints.login, () => ({
data: { user: currentMe, token: fakeToken },
}))
register('POST', endpoints.loginWithCode2Step, () => ({
register('POST', endpoints.requestLoginOtp, () => ({
success: true,
message: 'If the phone is registered, a code has been sent.',
data: null,
}))
register('POST', endpoints.verifyLoginOtp, () => ({
data: { user: currentMe, token: fakeToken },
}))
@@ -26,15 +32,19 @@ register('POST', endpoints.resendVerificationCodeForRegister, () => ({
}))
register('POST', endpoints.forgotPassword, () => ({
data: { message: 'کد بازیابی ارسال شد' },
success: true,
message: 'If the phone is registered, a code has been sent.',
data: null,
}))
register('POST', endpoints.verifyForgotPasswordCode, () => ({
data: { token: fakeToken },
data: { reset_token: fakeToken },
}))
register('POST', endpoints.resetPassword, () => ({
data: { message: 'رمز عبور با موفقیت تغییر کرد' },
success: true,
message: 'Password updated.',
data: null,
}))
register('POST', endpoints.logout, () => ({ data: { message: 'خروج موفق' } }))