+
+
+
رزرو پیش ثبت نام
+
{school?.product?.name}
+
paySchool()}>
+ پرداخت مستقیم به حساب مدرسه با مبلغ {separate(school.price)} تومان
+
+
+ توجه:
+ نحوه پرداخت برای رزرو پیش ثبتنام از طریق دکمه بالا خواهد بود
+و می بایست ازین طریق جداگانه پرداخت گردد
+
+
-
- {
- school.count > 1 &&
{school?.count} عدد
- }
-
{separate(school?.product?.price)} تومان
-
-
+
- pushToCart(
+ pushSchoolToCart(
{
productId: school?.productId,
userId: school?.userId,
@@ -102,6 +107,9 @@ function ShoppingCart({
))
}
+ {
+ schoolList.length > 0 &&
+ }
{list.map((product, index) => (
))}
@@ -128,6 +136,7 @@ function ShoppingCart({
title={`پرداخت هزینه : ${factorInfo?.payPrice ? separate(factorInfo?.payPrice) : 0} تومان`}
borderType='rounded-xl'
className='h-16 w-full mx-none text-xl'
+ onClick={() => payFactor()}
/>
diff --git a/src/components/Timer/index.js b/src/components/Timer/index.js
index d3b6866..00fd139 100644
--- a/src/components/Timer/index.js
+++ b/src/components/Timer/index.js
@@ -77,11 +77,11 @@ export default class Timer extends Component {
}
render() {
return (
- <>
-
+ // <>
+
{this.state.time ? this.state.time.m : ''}:{this.state.time ? this.state.time.s : ''}
-
- >
+
+ // >
);
}
}
diff --git a/src/components/Timer/index.scss b/src/components/Timer/index.scss
index f1724eb..6696de1 100644
--- a/src/components/Timer/index.scss
+++ b/src/components/Timer/index.scss
@@ -1,8 +1,8 @@
.timer {
flex-direction: row;
direction: rtl !important;
- margin-right: 10px;
- margin-left: 10px;
+ // margin-right: 10px;
+ // margin-left: 10px;
color: $green2;
font-family: numeralLight;
}
diff --git a/src/redux/reducers/user.js b/src/redux/reducers/user.js
index a932d48..ec10416 100644
--- a/src/redux/reducers/user.js
+++ b/src/redux/reducers/user.js
@@ -41,8 +41,10 @@ export default function user(state = initialState, action) {
return { ...state, loading: false, status: data.profile, error: null };
case "user/login":
case "user/otp/login":
- if (data.profile.username == null) {
+ if (data.profile.nationalId == null) {
window.location.replace('/register')
+ }else{
+ window.location.reload()
}
return {
...state,
diff --git a/src/utils/onInput.js b/src/utils/onInput.js
index 6fea5af..9f78c96 100644
--- a/src/utils/onInput.js
+++ b/src/utils/onInput.js
@@ -1,5 +1,6 @@
import { toast } from "react-toastify";
+
class onInput {
persianOnly = (txt) => {
let newText = txt;
@@ -277,19 +278,22 @@ class onInput {
};
noNumber = (value) => {
let newText = value;
- newText = newText.replace(/`/g, "");
- newText = newText.replace(/0/g, "");
- newText = newText.replace(/1/g, "");
- newText = newText.replace(/2/g, "");
- newText = newText.replace(/3/g, "");
- newText = newText.replace(/4/g, "");
- newText = newText.replace(/5/g, "");
- newText = newText.replace(/6/g, "");
- newText = newText.replace(/7/g, "");
- newText = newText.replace(/8/g, "");
- newText = newText.replace(/9/g, "");
+
return newText
};
+ persianNoNum = (value) => {
+ var p = /^[\u0600-\u06FF\s]+$/;
+ var tst = p.test(value);
+ if (tst === true) {
+ return value
+ }
+ else {
+ if (value.length !== 0) {
+ toast.info("از کاراکتر فارسی استفاده کنید");
+ }
+ return ''
+ }
+ };
}
const _onInput = new onInput();
diff --git a/src/view/LoginSignUp/mobile/index.js b/src/view/LoginSignUp/mobile/index.js
index 8bba41c..a0f157c 100644
--- a/src/view/LoginSignUp/mobile/index.js
+++ b/src/view/LoginSignUp/mobile/index.js
@@ -142,7 +142,7 @@ const LoginSignUpMobile = ({
};
const checkOtp = () => {
- if (
+ if (steps !== 1 &&
signUpFields?.otp1 &&
signUpFields?.otp2 &&
signUpFields?.otp3 &&
@@ -159,6 +159,7 @@ const LoginSignUpMobile = ({
applicationToken: "22",
});
setError(undefined);
+
} else {
setError("کد وارد شده را چک کنید.");
@@ -292,15 +293,16 @@ const LoginSignUpMobile = ({
}}
>درخواست مجدد کد تایید
)
+ )
}
@@ -434,7 +436,7 @@ const LoginSignUpMobile = ({
onClick={(e) => {
checkOtp(e)
- activeLogin()
+ // activeLogin()
}}
>
diff --git a/src/view/register/mobile/index.js b/src/view/register/mobile/index.js
index 6edca0c..f7357dc 100644
--- a/src/view/register/mobile/index.js
+++ b/src/view/register/mobile/index.js
@@ -421,8 +421,8 @@ const MobileRegister = ({