Localize order modals, add dual logos, and improve admin order tools.
Farsi business order/variation UI, light/dark logo upload on business profile, payment order steps, variation editing, super-admin site links, and checkout/auth fixes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
dc570c1e7f
commit
5e799eddf9
@@ -226,27 +226,30 @@ export function LoginPage() {
|
||||
|
||||
setCellExistsSites(null)
|
||||
|
||||
// Password is applied only after OTP when passwordPending; toast then.
|
||||
if (data.passwordUpdated) {
|
||||
showToast(t('signup.toast.passwordUpdated'), 'info')
|
||||
}
|
||||
|
||||
if (data.requiresOtp || data.passwordPending || !data.user.cellVerifiedAt) {
|
||||
if (data.accessToken) {
|
||||
logoutRequest()
|
||||
}
|
||||
await continueToSmsVerify(
|
||||
cellNumber,
|
||||
data.passwordPending
|
||||
? t('signup.info.verifyExistingPasswordUpdated')
|
||||
: t('signup.info.verify'),
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
if (data.user.customerBusinesses.length === 0) {
|
||||
logoutRequest()
|
||||
setError(CUSTOMER_ACCESS_MESSAGE)
|
||||
return
|
||||
}
|
||||
|
||||
if (!data.user.cellVerifiedAt) {
|
||||
logoutRequest()
|
||||
await continueToSmsVerify(
|
||||
cellNumber,
|
||||
data.passwordUpdated
|
||||
? t('signup.info.verifyExistingPasswordUpdated')
|
||||
: t('signup.info.verify'),
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
await login(cellNumber, password)
|
||||
navigate(redirectTo)
|
||||
} catch (err) {
|
||||
@@ -356,7 +359,10 @@ export function LoginPage() {
|
||||
setIsSubmitting(true)
|
||||
|
||||
try {
|
||||
await loginWithOtp(cellNumber, smsCode)
|
||||
const result = await loginWithOtp(cellNumber, smsCode)
|
||||
if (result.passwordUpdated) {
|
||||
showToast(t('signup.toast.passwordUpdated'), 'info')
|
||||
}
|
||||
navigate(redirectTo)
|
||||
} catch (err) {
|
||||
handleApiError(err, t('otp.error.signIn'))
|
||||
|
||||
Reference in New Issue
Block a user