))}
@@ -103,15 +118,7 @@ export default NavbarDrawer;
NavbarDrawer.defaultProps = {
users: [
{
- id: 0,
- firstName: "محمدرضا",
- lastName: "خراسانی",
- title: "استاد علوم تجربی",
- image: user1,
- status: 0,
- },
- {
- id: 0,
+ id: 1,
firstName: "اکبر",
lastName: "خراسانی",
title: "استاد علوم تجربی",
@@ -129,7 +136,7 @@ NavbarDrawer.defaultProps = {
},
{
name: "واقعیت افزوده",
- link: "/",
+ link: "/ar",
icon:
,
toast: "",
message: "",
@@ -142,9 +149,9 @@ NavbarDrawer.defaultProps = {
message: "",
},
{
- name: "کتاب الکترونیک",
- link: "/activation",
- icon:
,
toast: "",
message: "",
},
@@ -164,25 +171,25 @@ NavbarDrawer.defaultProps = {
},
{
name: "پیام رسان",
- link: "/chatroom",
- icon:
,
toast: "",
message: "",
},
{
- name: "ویرایش مشخصات",
- link: "/profile",
- icon:
,
toast: "",
- message: "4 پیام",
+ message: "",
+ // onClick: this.props.logout,
},
{
- name: "گزارش ایراد",
- link: "/",
- icon:
,
toast: "",
- message: "",
- // onClick: this.props.logout,
+ message: "4 پیام",
},
{
name: "خروج",
diff --git a/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.scss b/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.scss
index fa37e44..3274ad5 100644
--- a/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.scss
+++ b/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.scss
@@ -11,6 +11,9 @@
text-align: right !important;
direction: rtl;
padding: 30px 0px 10px 0px;
+ a {
+ text-decoration: none;
+ }
&__header {
height: 60px;
background-color: white;
diff --git a/src/views/Home/SingleBlog/index.js b/src/views/Home/SingleBlog/index.js
index a1cef59..7370f1c 100644
--- a/src/views/Home/SingleBlog/index.js
+++ b/src/views/Home/SingleBlog/index.js
@@ -20,15 +20,18 @@ export default class SingleBlog extends Component {
{data.title}
-
{data.subTitle}
-
- {data.buttonText}
+
{data.text}
+
+ بیشتر
- {data.fileId ? (
+ {data.id ? (
) : null}
diff --git a/src/views/MyBooks/index.js b/src/views/MyBooks/index.js
index 22d9d42..abf8c0f 100644
--- a/src/views/MyBooks/index.js
+++ b/src/views/MyBooks/index.js
@@ -18,7 +18,7 @@ const maxMobileSize = 550;
const fontSize = {
mobile: {
- h1: window.innerWidth > maxMobileSize ? 24 : window.innerWidth / 17,
+ h1: window.innerWidth > maxMobileSize ? 24 : window.innerWidth / 20,
a: window.innerHeight > maxMobileSize ? 15 : window.innerWidth / 30,
},
};
@@ -74,31 +74,6 @@ const Item = (props) => {
{data.title}
-
-
- کتاب دیجیتال
- {/* {!data.status.digital ? (
-
- ) : null} */}
-
-
- واقعیت افزوده
- {/* {!data.status.ar ? (
-
- ) : null} */}
-
-
);
};
diff --git a/src/views/NewProfile/index.js b/src/views/NewProfile/index.js
new file mode 100644
index 0000000..22ce5f1
--- /dev/null
+++ b/src/views/NewProfile/index.js
@@ -0,0 +1,557 @@
+import React, { Component } from "react";
+import { user } from "~/Redux/actions";
+import { connect } from "react-redux";
+
+import Select from "../Auth/Profile/Select/index";
+import Input from "../Auth/Profile/Input/index";
+import TextArea from "../Auth/Profile/TextArea/index";
+import Upload from "../Auth/Profile/Upload/index";
+import Gender from "../Auth/Profile/GenderSwitch/index";
+import Birthdate from "../Auth/Profile/Birthdate/index";
+import MultipleSelector from "../Auth/Profile/MultipleSelector/index";
+import Loader from "~/components/Loader/index";
+import Document from "../Auth/Profile/Document/index";
+
+import logo from "~/assets/icons/logo.png";
+import pic from "~/assets/images/pic.png";
+
+import "../Auth/Profile/index.scss";
+
+const maxDesktopSize = 1250;
+const maxMobileSize = 550;
+
+const fontSize = {
+ desktop: {
+ h1: window.innerWidth > maxDesktopSize ? 25 : window.innerWidth / 55,
+ p: window.innerWidth > maxDesktopSize ? 14 : window.innerWidth / 90,
+ },
+ mobile: {
+ h1: window.innerWidth > maxMobileSize ? 20 : window.innerWidth / 18,
+ p: window.innerWidth > maxMobileSize ? 14 : window.innerWidth / 28,
+ },
+};
+
+const toastMessages = {
+ firstName: "نام وارد شده صحیح نیست!",
+ lastName: "نام خانوادگی وارد شده صحیح نیست!",
+ username: "نام کاربری صحیح نیست.",
+};
+
+class NewProfile extends Component {
+ state = {
+ render: false,
+ file: null,
+ docFileIds: "",
+ firstName: "",
+ lastName: "",
+ password: "",
+ username: "",
+ address: "",
+ email: "",
+ gender: "دختر",
+ userRoleId: "دانش آموز",
+ nationalId: "",
+ provinceId: "",
+ phone: "",
+ cityId: "",
+ zoneId: "",
+ schoolId: "",
+ postalCode: "",
+ gradeId: [],
+ validation: {
+ firstName: "",
+ lastName: "",
+ username: "",
+ email: "",
+ postalCode: "",
+ nationalId: "",
+ schoolId: "",
+ },
+ };
+
+ componentDidMount() {
+ // this.props.getProfile();
+ }
+
+ onChange = (name, value) => {
+ if (name === "gardeId" && this.state.userRoleId === "معلم") {
+ this.setState((prevState) => ({
+ gradeId: [...prevState.gradeId, value],
+ }));
+ }
+ if (name === "userRoleId") {
+ this.setState({
+ gradeId: [],
+ [name]: value,
+ });
+ } else {
+ this.setState({
+ [name]: value,
+ });
+ }
+ };
+
+ onSubmit = async (e) => {
+ const {
+ firstName,
+ lastName,
+ username,
+ cellphone,
+ password,
+ postalCode,
+ address,
+ email,
+ phone,
+ } = this.state;
+ const { profile, setProfile } = this.props;
+ const data = {
+ firstName: firstName || profile.firstName,
+ lastName: lastName || profile.lastName,
+ username: username || profile.username,
+ cellphone: profile.cellphone,
+ password: password || profile.password,
+ postalCode: postalCode || profile.postalCode,
+ address: address || profile.address,
+ email: email || profile.email,
+ phone: phone || profile.phone,
+ };
+ await setProfile(data);
+ };
+
+ forcePersian = (txt) => {
+ let yas = txt;
+ yas = yas.replace(/`/g, "");
+ yas = yas.replace(/0/g, "");
+ yas = yas.replace(/1/g, "");
+ yas = yas.replace(/2/g, "");
+ yas = yas.replace(/3/g, "");
+ yas = yas.replace(/4/g, "");
+ yas = yas.replace(/5/g, "");
+ yas = yas.replace(/6/g, "");
+ yas = yas.replace(/7/g, "");
+ yas = yas.replace(/8/g, "");
+ yas = yas.replace(/9/g, "");
+ yas = yas.replace(/0/g, "");
+ yas = yas.replace(/q/g, "");
+ yas = yas.replace(/w/g, "");
+ yas = yas.replace(/e/g, "");
+ yas = yas.replace(/r/g, "");
+ yas = yas.replace(/t/g, "");
+ yas = yas.replace(/y/g, "");
+ yas = yas.replace(/u/g, "");
+ yas = yas.replace(/i/g, "");
+ yas = yas.replace(/o/g, "");
+ yas = yas.replace(/p/g, "");
+ yas = yas.replace(/\[/g, "");
+ yas = yas.replace(/\]/g, "");
+ yas = yas.replace(/a/g, "");
+ yas = yas.replace(/s/g, "");
+ yas = yas.replace(/d/g, "");
+ yas = yas.replace(/f/g, "");
+ yas = yas.replace(/g/g, "");
+ yas = yas.replace(/h/g, "");
+ yas = yas.replace(/j/g, "");
+ yas = yas.replace(/k/g, "");
+ yas = yas.replace(/l/g, "");
+ yas = yas.replace(/\;/g, "");
+ yas = yas.replace(/\'/g, "");
+ yas = yas.replace(/z/g, "");
+ yas = yas.replace(/x/g, "");
+ yas = yas.replace(/c/g, "");
+ yas = yas.replace(/v/g, "");
+ yas = yas.replace(/b/g, "");
+ yas = yas.replace(/n/g, "");
+ yas = yas.replace(/m/g, "");
+ yas = yas.replace(/\,/g, "");
+ yas = yas.replace(/\./g, "");
+ yas = yas.replace(/\//g, "");
+ yas = yas.replace(/~/g, " ");
+ yas = yas.replace(/Q/g, "");
+ yas = yas.replace(/W/g, "");
+ yas = yas.replace(/E/g, "");
+ yas = yas.replace(/R/g, "");
+ yas = yas.replace(/T/g, "");
+ yas = yas.replace(/Y/g, "");
+ yas = yas.replace(/U/g, "");
+ yas = yas.replace(/I/g, "");
+ yas = yas.replace(/O/g, "");
+ yas = yas.replace(/P/g, "");
+ yas = yas.replace(/A/g, "");
+ yas = yas.replace(/S/g, "");
+ yas = yas.replace(/G/g, "");
+ yas = yas.replace(/H/g, "");
+ yas = yas.replace(/J/g, "");
+ yas = yas.replace(/K/g, "");
+ yas = yas.replace(/L/g, "");
+ yas = yas.replace(/Z/g, "");
+ yas = yas.replace(/X/g, "");
+ yas = yas.replace(/B/g, "");
+ yas = yas.replace(/N/g, "");
+ yas = yas.replace(/M/g, "");
+ yas = yas.replace(/\?/g, "");
+ return yas;
+ };
+
+ render() {
+ const { user, profile } = this.props;
+ return (
+ <>
+ {window.innerWidth > 1000 ? (
+
+
+
حساب کاربری
+
+ لطفا مشخصات خود را به صورت کامل نمایید.
+
+
+
+
+ ) : null}
+ {window.innerWidth < 1000 ? (
+
+
+
افزودن کاربر جدید
+
+ لطفا مشحصات خود را به صورت کامل وارد نمایید
+
+
+
+
+
+
+
+
+
+ {this.state.userRoleId === "دانش آموز" ? (
+
+ ) : null}
+ {this.state.userRoleId === "معلم" ? (
+
+ ) : null}
+ {this.state.userRoleId === "دانش آموز" &&
+ Number(this.state.gradeId) > 9 ? (
+
+ ) : null}
+
+
+
+
+ {this.state.userRoleId === "دانش آموز" ? (
+
+ ) : null}
+ {this.state.userRoleId === "معلم" ? (
+
+ ) : null}
+ {this.state.userRoleId === "معلم" ? (
+
+ ) : null}
+
+
+
+
+
+
+ ) : null}
+ >
+ );
+ }
+}
+
+export default connect((state) => ({}), {})(NewProfile);
+
+NewProfile.defaultProps = {
+ user: {
+ name: "اکبر",
+ icon: pic,
+ description: "",
+ },
+};
diff --git a/src/views/Products/Product/index.js b/src/views/Products/Product/index.js
index 77cf98e..030cec5 100644
--- a/src/views/Products/Product/index.js
+++ b/src/views/Products/Product/index.js
@@ -17,6 +17,7 @@ const fontSize = {
},
desktop: {
h1: window.innerWidth > maxDesktopSize ? 18 : window.innerWidth / 65,
+ h2: window.innerWidth > maxDesktopSize ? 15 : window.innerWidth / 75,
div: window.innerWidth > maxDesktopSize ? 16 : window.innerWidth / 85,
old: window.innerWidth > maxDesktopSize ? 9 : window.innerWidth / 120,
},
@@ -69,9 +70,12 @@ export default class Product extends Component {
- کتاب
+
کتاب
+
+ {product.product[1].price} تومان
+
{/* {!product.status.digital ? (
) : null} */}
@@ -79,12 +83,12 @@ export default class Product extends Component {
- نسخه دیجیتال
- {/* {!product.status.digital ? (
-
- ) : null} */}
+
دیجیتال
+
+ {product.product[0].price} تومان
+
) : null}
diff --git a/src/views/Products/Product/index.scss b/src/views/Products/Product/index.scss
index 9c27f0e..76d9f3f 100644
--- a/src/views/Products/Product/index.scss
+++ b/src/views/Products/Product/index.scss
@@ -22,26 +22,39 @@
&--physical {
background-color: #7fc75d;
color: white;
- padding: 5px 3px;
+ padding: 5px 7px;
border-radius: 7px;
font-family: numeralMedium;
text-decoration: none;
+ width: 100%;
+ h2 {
+ margin: 0px;
+ }
&:hover {
color: white;
}
}
&--ar {
border: 1px solid #7fc75d;
- padding: 5px 3px;
+ padding: 5px 7px;
border-radius: 7px;
color: #7fc75d;
margin-top: 10px;
+ width: 100%;
+ text-decoration: none;
+ font-family: numeralLight;
+ h2 {
+ margin: 0px;
+ }
&:hover {
color: #7fc75d;
}
}
}
+.mobile-products-product {
+ text-decoration: none;
+}
@media screen and (max-width: 350px) {
.mobile-products-product {
width: 100%;
diff --git a/src/views/Products/Sort/index.js b/src/views/Products/Sort/index.js
index 373e3b5..ed32d5f 100644
--- a/src/views/Products/Sort/index.js
+++ b/src/views/Products/Sort/index.js
@@ -17,7 +17,7 @@ export default class Sort extends React.Component {
مرتب سازی بر اساس
-
+
{parent.props.sortItems.map((item, i) => (
- ({}), {
})(Products);
Products.defaultProps = {
- sortItems: [
- "پربازدیدترین",
- "پرفروش ترین",
- "گران ترین",
- "ارزان ترین",
- "جدیدترین",
- "بزودی",
- ],
+ sortItems: ["پرفروش ترین", "جدیدترین"],
subjects: ["فیزیک", "زیست", "شیمی", "روانشناسی", "علوم", "دین و زندگی"],
levels: ["اول", "دوم", "سوم", "دهم"],
};
diff --git a/src/views/QRScan/Modal/index.js b/src/views/QRScan/Modal/index.js
index fbea57a..ef41813 100644
--- a/src/views/QRScan/Modal/index.js
+++ b/src/views/QRScan/Modal/index.js
@@ -13,6 +13,7 @@ const fontSize = {
};
export default class QRModal extends Component {
render() {
+ const { tail, parent } = this.props;
return (
<>
{window.innerWidth < 1000 ? (
@@ -21,8 +22,11 @@ export default class QRModal extends Component {
اسکن کد QR موفقیت آمیز بود.
- {this.props.tail}
+ {tail}
+
) : (
@@ -30,8 +34,11 @@ export default class QRModal extends Component {
اسکن کد QR موفقیت آمیز بود.
- {this.props.tail}
+ {tail}
+
)}
>
diff --git a/src/views/QRScan/Modal/index.scss b/src/views/QRScan/Modal/index.scss
index 199d47a..2b0aa12 100644
--- a/src/views/QRScan/Modal/index.scss
+++ b/src/views/QRScan/Modal/index.scss
@@ -24,6 +24,19 @@
font-family: numeralLight;
border-radius: 25px;
}
+ button {
+ text-decoration: none;
+ width: 30%;
+ min-width: 100px;
+ margin: 15px auto;
+ background-color: #cc001b;
+ border: 2px solid white;
+ padding: 5px 0px;
+ text-align: center;
+ color: white;
+ font-family: numeralLight;
+ border-radius: 25px;
+ }
}
.qr-modal {
@@ -52,6 +65,19 @@
font-family: numeralLight;
border-radius: 25px;
}
+ button {
+ text-decoration: none;
+ width: 25%;
+ max-width: 100px;
+ margin: 15px auto;
+ background-color: #cc001b;
+ border: 2px solid white;
+ padding: 10px 0px;
+ text-align: center;
+ color: white;
+ font-family: numeralLight;
+ border-radius: 25px;
+ }
}
@keyframes qrModal {
diff --git a/src/views/QRScan/index.js b/src/views/QRScan/index.js
index ca6ea5e..1117c62 100644
--- a/src/views/QRScan/index.js
+++ b/src/views/QRScan/index.js
@@ -29,7 +29,7 @@ class QRScan extends Component {
state = {
value: null,
facingMode: 0,
- tail: "Zist13-10",
+ tail: null,
};
async componentDidUpdate() {
@@ -125,7 +125,7 @@ class QRScan extends Component {
)}
{this.state.tail === null ? null : (
-
+
)}
آخرین مشاهدات
diff --git a/src/views/Support/index.js b/src/views/Support/index.js
new file mode 100644
index 0000000..18728f4
--- /dev/null
+++ b/src/views/Support/index.js
@@ -0,0 +1,54 @@
+import React, { Component } from "react";
+
+import Navbar from "../Home/Navbar/index";
+import Input from "../Contact/Input/index";
+import Select from "../Contact/Select/index";
+
+import "../Contact/index.scss";
+
+const maxDesktopSize = 1250;
+const maxMobileSize = 550;
+
+const fontSize = {
+ desktop: {
+ h1: window.innerWidth > maxDesktopSize ? 30 : window.innerWidth / 40,
+ p: window.innerWidth > maxDesktopSize ? 14 : window.innerWidth / 80,
+ span: window.innerWidth > maxDesktopSize ? 16 : window.innerWidth / 80,
+ },
+ mobile: {
+ h1: window.innerWidth > maxMobileSize ? 25 : window.innerWidth / 16,
+ p: window.innerWidth > maxMobileSize ? 14 : window.innerWidth / 34,
+ span: window.innerWidth > maxMobileSize ? 15 : window.innerWidth / 32,
+ },
+};
+
+class Support extends Component {
+ render() {
+ return (
+ <>
+
+
+
+
تماس با ما
+
+ برای ارتباط با دنیای شگفت انگیز دانوین از فرم زیر استفاده کنید و
+ پس از انتخاب دپارتمان مد نظر پیام خود را ارسال کنید.
+
+
+
+
+
+
+
+
+
+ >
+ );
+ }
+}
+
+export default Support;