reza added very feather

master
RezaAshrafi77 3 years ago
parent f0e7f8005c
commit abaa0c00e8
  1. 7
      src/App.css
  2. 2
      src/AppRouter.js
  3. 40
      src/Redux/actions/comment.js
  4. 1
      src/Redux/actions/index.js
  5. 34
      src/Redux/reducers/comment.js
  6. 1
      src/Redux/reducers/index.js
  7. 4
      src/Redux/reducers/user.js
  8. 12
      src/Redux/reducers/userProduct.js
  9. BIN
      src/assets/icons/image.jpg
  10. 274
      src/util/onInput.js
  11. 45
      src/views/AR/BreadCrumb/index.js
  12. 8
      src/views/AR/BreadCrumb/index.scss
  13. 5
      src/views/AR/index.js
  14. 25
      src/views/Auth/Profile/Birthdate/index.js
  15. 117
      src/views/Auth/Profile/index.js
  16. 23
      src/views/Contact/Input/index.js
  17. 27
      src/views/Contact/Select/index.js
  18. 49
      src/views/Contact/index.js
  19. 3
      src/views/Contact/index.scss
  20. 2
      src/views/Home/HomeStatic/Flex/index.js
  21. 66
      src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.js
  22. 4
      src/views/Home/Navbar/Mobile/index.js
  23. 2
      src/views/MyBooks/BreadCrumb/index.js
  24. 49
      src/views/MyBooks/index.js
  25. 17
      src/views/MyBooks/index.scss
  26. 2
      src/views/Product/Comment/index.js
  27. 37
      src/views/Product/MaterialModal/index.js
  28. 15
      src/views/Product/index.js
  29. 5
      src/views/Product/index.scss
  30. 7
      src/views/Products/Product/index.js
  31. 15
      src/views/Products/index.scss
  32. 4
      src/views/QR/Image/index.js
  33. 4
      src/views/QR/VideoBox/React-video-js-player/index.scss
  34. 6
      src/views/QR/VideoBox/index.scss
  35. 26
      src/views/QR/index.js
  36. 5
      src/views/QR/index.scss
  37. 54
      src/views/QRScan/LastQr/index.js
  38. 32
      src/views/QRScan/LastQr/index.scss
  39. 17
      src/views/QRScan/index.js
  40. 42
      src/views/QRScan/index.scss
  41. 55
      src/views/Support/index.js

@ -1,10 +1,7 @@
* {
box-sizing: border-box !important;
direction: rtl;
direction: rtl;
font-family: numeralLight;
}
@font-face {

@ -43,7 +43,7 @@ class AppRouter extends Component {
const mobile = window.innerWidth < 1000 ? true : false;
let home = mobile ? (
<Route exact path={"/"}>
{proxy.status() ? (
{proxy.status ? (
this.props.profile ? (
<Home />
) : (

@ -0,0 +1,40 @@
import proxy from "../proxy";
const comment = {
list:
(data = {}) =>
async (dispatch) =>
await proxy.get("comment/list", data, { dispatch }),
info:
(data = {}) =>
async (dispatch) => {
await proxy.get("comment/info", data, { dispatch });
},
add:
(
data = {},
data2 = {
id: window.location.pathname.slice(
window.location.pathname.lastIndexOf("/") + 1,
window.location.pathname.length
),
}
) =>
async (dispatch) => {
await proxy.post("comment/add", data);
await proxy.get("book/info", data2, { dispatch });
},
del:
(data = {}, data2 = {}) =>
async (dispatch) => {
await proxy.delete("ar/delete", data);
await proxy.get("ar/list", data2, { dispatch });
},
update:
(data = {}, data2 = {}) =>
async (dispatch) => {
await proxy.put("ar/update", data);
await proxy.get("ar/list", data2, { dispatch });
},
};
export default comment;

@ -8,3 +8,4 @@ export { default as qr } from "./qr.js";
export { default as book } from "./book.js";
export { default as userProduct } from "./userProduct.js";
export { default as transport } from "./transport.js";
export { default as comment } from "./comment.js";

@ -0,0 +1,34 @@
import { toast } from "react-toastify";
const initialState = {
loading: false,
error: null,
list: null,
};
export default function comment(state = initialState, action) {
let { type, data } = action;
switch (type) {
case "comment/list":
return { ...state, loading: false, error: null };
case "comment/update":
return { ...state, loading: false, error: null };
case "comment/add":
return { ...state, loading: false, error: null };
case "comment/delete":
return { ...state, loading: false, error: null };
case "comment/info":
return {
...state,
loading: false,
list: data,
error: null,
};
case "loading":
return { ...state, loading: true };
case "error":
return { ...state, loading: false, error: data.message };
default:
return state;
}
}

@ -8,3 +8,4 @@ export { default as qr } from "./qr.js";
export { default as book } from "./book.js";
export { default as userProduct } from "./userProduct.js";
export { default as transport } from "./transport.js";
export { default as comment } from "./comment.js";

@ -16,8 +16,10 @@ export default function user(state = initialState, action) {
case "user/register":
case "user/switchRole":
case "public/sendOTP":
toast.success("کد به شماره شما ارسال گردید.");
return { ...state, loading: false, status: data.profile, error: null };
case "user/otp/login":
toast.success("به دانوین خوش آمدید.");
return {
...state,
loading: false,
@ -38,6 +40,8 @@ export default function user(state = initialState, action) {
case "mothers/list":
return { ...state, loading: false, mothers: data, error: null };
case "user/setProfile":
toast.success("تغییرات اعمال شد.");
window.location = "/";
return { ...state, loading: false, error: null };
/////////////
case "loading":

@ -6,12 +6,22 @@ const initialState = {
list: [],
info: null,
sum: null,
checkEmpty: false,
};
export default function userProduct(state = initialState, action) {
let { type, data, message } = action;
switch (type) {
case "userProduct/list":
return { ...state, loading: false, list: data, error: null };
const checkEmpty = data.filter(
(item) => item.condition === 2 && item.product.productType === (1 || 3)
);
return {
...state,
loading: false,
list: data,
checkEmpty: checkEmpty.length > 0 ? false : true,
error: null,
};
case "userProduct/info":
return { ...state, loading: false, info: data, error: null };
case "userProduct/update":

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@ -0,0 +1,274 @@
import { toast } from "react-toastify";
class onInput {
persianOnly = (txt) => {
let newText = txt;
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, "");
newText = newText.replace(/0/g, "");
newText = newText.replace(/q/g, "");
newText = newText.replace(/w/g, "");
newText = newText.replace(/e/g, "");
newText = newText.replace(/r/g, "");
newText = newText.replace(/t/g, "");
newText = newText.replace(/y/g, "");
newText = newText.replace(/u/g, "");
newText = newText.replace(/i/g, "");
newText = newText.replace(/o/g, "");
newText = newText.replace(/p/g, "");
newText = newText.replace(/\[/g, "");
newText = newText.replace(/\]/g, "");
newText = newText.replace(/a/g, "");
newText = newText.replace(/s/g, "");
newText = newText.replace(/d/g, "");
newText = newText.replace(/f/g, "");
newText = newText.replace(/g/g, "");
newText = newText.replace(/h/g, "");
newText = newText.replace(/j/g, "");
newText = newText.replace(/k/g, "");
newText = newText.replace(/l/g, "");
newText = newText.replace(/\;/g, "");
newText = newText.replace(/\'/g, "");
newText = newText.replace(/z/g, "");
newText = newText.replace(/x/g, "");
newText = newText.replace(/c/g, "");
newText = newText.replace(/v/g, "");
newText = newText.replace(/b/g, "");
newText = newText.replace(/n/g, "");
newText = newText.replace(/m/g, "");
newText = newText.replace(/\,/g, "");
newText = newText.replace(/\./g, "");
newText = newText.replace(/\//g, "");
newText = newText.replace(/~/g, " ");
newText = newText.replace(/Q/g, "");
newText = newText.replace(/W/g, "");
newText = newText.replace(/E/g, "");
newText = newText.replace(/R/g, "");
newText = newText.replace(/T/g, "");
newText = newText.replace(/Y/g, "");
newText = newText.replace(/U/g, "");
newText = newText.replace(/I/g, "");
newText = newText.replace(/O/g, "");
newText = newText.replace(/P/g, "");
newText = newText.replace(/A/g, "");
newText = newText.replace(/S/g, "");
newText = newText.replace(/G/g, "");
newText = newText.replace(/H/g, "");
newText = newText.replace(/J/g, "");
newText = newText.replace(/K/g, "");
newText = newText.replace(/L/g, "");
newText = newText.replace(/Z/g, "");
newText = newText.replace(/X/g, "");
newText = newText.replace(/B/g, "");
newText = newText.replace(/N/g, "");
newText = newText.replace(/M/g, "");
newText = newText.replace(/\?/g, "");
if (!newText) {
toast.info("از کاراکتر فارسی استفاده کنید");
}
return newText;
};
englishAndNumberWithoutSpace = (txt) => {
let newText = txt;
newText = newText.replace(/`/g, "");
newText = newText.replace(/0/g, "0");
newText = newText.replace(/1/g, "1");
newText = newText.replace(/2/g, "2");
newText = newText.replace(/3/g, "3");
newText = newText.replace(/4/g, "4");
newText = newText.replace(/5/g, "5");
newText = newText.replace(/6/g, "6");
newText = newText.replace(/7/g, "7");
newText = newText.replace(/8/g, "8");
newText = newText.replace(/9/g, "9");
newText = newText.replace(/ا/g, "");
newText = newText.replace(/ب/g, "");
newText = newText.replace(/پ/g, "");
newText = newText.replace(/ت/g, "");
newText = newText.replace(/ث/g, "");
newText = newText.replace(/ج/g, "");
newText = newText.replace(/چ/g, "");
newText = newText.replace(/ح/g, "");
newText = newText.replace(/خ/g, "");
newText = newText.replace(/د/g, "");
newText = newText.replace(/\[/g, "");
newText = newText.replace(/\]/g, "");
newText = newText.replace(/ذ/g, "");
newText = newText.replace(/ر/g, "");
newText = newText.replace(/ز/g, "");
newText = newText.replace(/ژ/g, "");
newText = newText.replace(/ط/g, "");
newText = newText.replace(/ظ/g, "");
newText = newText.replace(/ع/g, "");
newText = newText.replace(/غ/g, "");
newText = newText.replace(/ف/g, "");
newText = newText.replace(/\;/g, "");
newText = newText.replace(/\'/g, "");
newText = newText.replace(/ق/g, "");
newText = newText.replace(/س/g, "");
newText = newText.replace(/ش/g, "");
newText = newText.replace(/ص/g, "");
newText = newText.replace(/ض/g, "");
newText = newText.replace(/ک/g, "");
newText = newText.replace(/گ/g, "");
newText = newText.replace(/\,/g, "");
newText = newText.replace(/\./g, "");
newText = newText.replace(/\//g, "");
newText = newText.replace(/~/g, " ");
newText = newText.replace(/ل/g, "");
newText = newText.replace(/م/g, "");
newText = newText.replace(/ن/g, "");
newText = newText.replace(/و/g, "");
newText = newText.replace(/ه/g, "");
newText = newText.replace(/ی/g, "");
newText = newText.replace(/\?/g, "");
if (!newText) {
toast.info("از کاراکتر انگلیسی واعداداستفاده کنید");
}
return newText;
};
numberOnly = (txt) => {
let newText = txt;
newText = newText.replace(/`/g, "");
newText = newText.replace(/0/g, "0");
newText = newText.replace(/1/g, "1");
newText = newText.replace(/2/g, "2");
newText = newText.replace(/3/g, "3");
newText = newText.replace(/4/g, "4");
newText = newText.replace(/5/g, "5");
newText = newText.replace(/6/g, "6");
newText = newText.replace(/7/g, "7");
newText = newText.replace(/8/g, "8");
newText = newText.replace(/9/g, "9");
newText = newText.replace(/ا/g, "");
newText = newText.replace(/ب/g, "");
newText = newText.replace(/پ/g, "");
newText = newText.replace(/ت/g, "");
newText = newText.replace(/ث/g, "");
newText = newText.replace(/ج/g, "");
newText = newText.replace(/چ/g, "");
newText = newText.replace(/ح/g, "");
newText = newText.replace(/خ/g, "");
newText = newText.replace(/د/g, "");
newText = newText.replace(/\[/g, "");
newText = newText.replace(/\]/g, "");
newText = newText.replace(/ذ/g, "");
newText = newText.replace(/ر/g, "");
newText = newText.replace(/ز/g, "");
newText = newText.replace(/ژ/g, "");
newText = newText.replace(/ط/g, "");
newText = newText.replace(/ظ/g, "");
newText = newText.replace(/ع/g, "");
newText = newText.replace(/غ/g, "");
newText = newText.replace(/ف/g, "");
newText = newText.replace(/\;/g, "");
newText = newText.replace(/\'/g, "");
newText = newText.replace(/ق/g, "");
newText = newText.replace(/س/g, "");
newText = newText.replace(/ش/g, "");
newText = newText.replace(/ص/g, "");
newText = newText.replace(/ض/g, "");
newText = newText.replace(/ک/g, "");
newText = newText.replace(/گ/g, "");
newText = newText.replace(/\,/g, "");
newText = newText.replace(/\./g, "");
newText = newText.replace(/\//g, "");
newText = newText.replace(/~/g, " ");
newText = newText.replace(/ل/g, "");
newText = newText.replace(/م/g, "");
newText = newText.replace(/ن/g, "");
newText = newText.replace(/و/g, "");
newText = newText.replace(/ه/g, "");
newText = newText.replace(/ی/g, "");
newText = newText.replace(/\?/g, "");
newText = newText.replace(/q/g, "");
newText = newText.replace(/w/g, "");
newText = newText.replace(/e/g, "");
newText = newText.replace(/r/g, "");
newText = newText.replace(/t/g, "");
newText = newText.replace(/y/g, "");
newText = newText.replace(/u/g, "");
newText = newText.replace(/i/g, "");
newText = newText.replace(/o/g, "");
newText = newText.replace(/p/g, "");
newText = newText.replace(/a/g, "");
newText = newText.replace(/s/g, "");
newText = newText.replace(/d/g, "");
newText = newText.replace(/f/g, "");
newText = newText.replace(/g/g, "");
newText = newText.replace(/h/g, "");
newText = newText.replace(/j/g, "");
newText = newText.replace(/k/g, "");
newText = newText.replace(/l/g, "");
newText = newText.replace(/z/g, "");
newText = newText.replace(/x/g, "");
newText = newText.replace(/c/g, "");
newText = newText.replace(/v/g, "");
newText = newText.replace(/b/g, "");
newText = newText.replace(/n/g, "");
newText = newText.replace(/m/g, "");
newText = newText.replace(/Q/g, "");
newText = newText.replace(/W/g, "");
newText = newText.replace(/E/g, "");
newText = newText.replace(/R/g, "");
newText = newText.replace(/T/g, "");
newText = newText.replace(/Y/g, "");
newText = newText.replace(/U/g, "");
newText = newText.replace(/I/g, "");
newText = newText.replace(/O/g, "");
newText = newText.replace(/P/g, "");
newText = newText.replace(/A/g, "");
newText = newText.replace(/S/g, "");
newText = newText.replace(/G/g, "");
newText = newText.replace(/H/g, "");
newText = newText.replace(/J/g, "");
newText = newText.replace(/K/g, "");
newText = newText.replace(/L/g, "");
newText = newText.replace(/Z/g, "");
newText = newText.replace(/X/g, "");
newText = newText.replace(/B/g, "");
newText = newText.replace(/N/g, "");
newText = newText.replace(/M/g, "");
if (!newText) {
toast.info("از اعداداستفاده کنید");
}
return newText;
};
dayHandler = (num) => {
let newNum = this.numberOnly(num);
if (newNum > 31) {
toast.error("روز نباید بزرگتر از 31 باشد.");
return Math.floor(newNum / 10);
}
return newNum;
};
monthHandler = (num) => {
let newNum = this.numberOnly(num);
if (newNum > 12 || newNum < 0) {
toast.error("ماه باید بین 1 تا 12 باشد.");
return Math.floor(newNum / 10);
}
return newNum;
};
yearHandler = (num) => {
let newNum = this.numberOnly(num);
if (newNum > 1395) {
toast.error("سال باید کوچکتر از 1395 باشد.");
return Math.floor(newNum / 10);
}
return newNum;
};
}
const _onInput = new onInput();
export default _onInput;

@ -0,0 +1,45 @@
import React from "react";
import Breadcrumbs from "@material-ui/core/Breadcrumbs";
import { Link } from "react-router-dom";
import "./index.scss";
function handleClick(event) {
event.preventDefault();
console.info("You clicked a breadcrumb.");
}
const maxDesktopSize = 1250;
const maxMobileSize = 650;
const fontSize = {
desktop: window.innerWidth > maxDesktopSize ? 12 : window.innerWidth / 90,
mobile: window.innerWidth > maxDesktopSize ? 14 : window.innerWidth / 25,
};
export default function ActiveLastBreadcrumb(props) {
const { name } = props;
return (
<Breadcrumbs aria-label="breadcrumb">
<Link
style={{
fontSize:
window.innerWidth > 1000 ? fontSize.desktop : fontSize.mobile,
}}
to={"/"}
>
صفحه اصلی
</Link>
<Link
style={{
fontSize:
window.innerWidth > 1000 ? fontSize.desktop : fontSize.mobile,
color: "#00CC69",
}}
to={"/ar"}
>
واقعیت افزوده
</Link>
</Breadcrumbs>
);
}

@ -0,0 +1,8 @@
.MuiBreadcrumbs-li{
a {
text-decoration: none;
font-family: numeralLight;
color: #6F7074;
letter-spacing: -1px;
}
}

@ -6,6 +6,7 @@ import Navbar from "../Home/Navbar/index";
import Footer from "../Home/Footer/index";
import Loader from "~/components/Loader/index";
import Item from "./Item/index";
import BreadCrumbs from "./BreadCrumb/index";
import "./index.scss";
@ -30,8 +31,9 @@ class AR extends Component {
{window.innerWidth > 1000 ? (
arList ? (
<>
<div className="ar d-flex flex-column align-items-center">
<div className="ar d-flex flex-column">
<Navbar />
<BreadCrumbs />
<div className="ar__box d-flex flex-column"></div>
</div>
<Footer />
@ -49,6 +51,7 @@ class AR extends Component {
arList ? (
<div className="mobile-ar d-flex flex-column">
<Navbar />
<BreadCrumbs />
<div className="mobile-ar__list d-flex flex-wrap">
{arList.map((item, i) => (
<Item data={item} key={i} />

@ -1,4 +1,5 @@
import React from "react";
import onInput from "~/util/onInput";
import "./index.scss";
@ -16,11 +17,26 @@ export default function Birthdate(props) {
<div className="mobile-birthdate d-flex justify-content-between align-items-center">
<label>تاریخ تولد</label>
<div className="mobile-birthdate__date d-flex align-items-center">
<Input name="day" placeholder="روز" maxLength={2} />
<Input
name="day"
placeholder="روز"
maxLength={2}
onInput={onInput.dayHandler}
/>
<span>/</span>
<Input name="month" placeholder="ماه" maxLength={2} />
<Input
name="month"
placeholder="ماه"
maxLength={2}
onInput={onInput.monthHandler}
/>
<span>/</span>
<Input name="year" placeholder="سال" maxLength={4} />
<Input
name="year"
placeholder="سال"
maxLength={4}
onInput={onInput.yearHandler}
/>
</div>
</div>
) : null}
@ -41,7 +57,7 @@ export default function Birthdate(props) {
}
const Input = (props) => {
const { name, placeholder, maxLength } = props;
const { name, placeholder, maxLength, onInput } = props;
return (
<input
type="text"
@ -49,6 +65,7 @@ const Input = (props) => {
name={name}
placeholder={placeholder}
maxLength={maxLength}
onInput={(e) => (e.target.value = onInput(e.target.value))}
/>
);
};

@ -1,4 +1,6 @@
import React, { Component } from "react";
import { ToastContainer } from "react-toastify";
import onInput from "~/util/onInput";
import { user } from "~/Redux/actions";
import { connect } from "react-redux";
@ -117,80 +119,6 @@ class Profile extends Component {
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 (
@ -406,24 +334,29 @@ class Profile extends Component {
profile ? (
<div className="mobile-auth-profile d-flex flex-column">
<img src={logo} alt="دانوین" />
<h1 style={{ fontSize: fontSize.mobile.h1 }}>حساب کاربری</h1>
<p style={{ fontSize: fontSize.mobile.p }}>
لطفا مشحصات خود را به صورت کامل وارد نمایید
</p>
<Upload name="file" parent={this} />
<div className="d-flex align-items-center">
<div className="d-flex flex-column">
<h1 style={{ fontSize: fontSize.mobile.h1 }}>حساب کاربری</h1>
<p style={{ fontSize: fontSize.mobile.p }}>
لطفا مشحصات خود را به صورت کامل وارد نمایید
</p>
</div>
<Upload name="file" parent={this} />
</div>
<Input
name="firstName"
label="نام"
parent={this}
defaultValue={profile}
onInput={this.forcePersian}
onInput={onInput.persianOnly}
/>
<Input
name="lastName"
label="نام خانوادگی"
parent={this}
defaultValue={profile}
onInput={this.forcePersian}
onInput={onInput.persianOnly}
/>
<Input
name="username"
@ -431,6 +364,7 @@ class Profile extends Component {
parent={this}
align="left"
defaultValue={profile}
onInput={onInput.englishAndNumberWithoutSpace}
/>
<Gender
options={["دختر", "پسر"]}
@ -440,12 +374,13 @@ class Profile extends Component {
/>
<Input
name="nationalId"
label="کد ملی"
label="کدملی / اتباع"
parent={this}
align="left"
defaultValue={profile}
maxLength={10}
maxLength={13}
inputMode="numeric"
onInput={onInput.numberOnly}
/>
<Birthdate />
<Gender
@ -539,6 +474,7 @@ class Profile extends Component {
name="schoolId"
label={"نام مدرسه"}
defaultValue={profile}
onInput={onInput.persianOnly}
/>
) : null}
{this.state.userRoleId === "معلم" ? (
@ -547,6 +483,7 @@ class Profile extends Component {
name="schoolId"
label={"محل تدریس"}
defaultValue={profile}
onInput={onInput.persianOnly}
/>
) : null}
{this.state.userRoleId === "معلم" ? (
@ -557,7 +494,10 @@ class Profile extends Component {
name="postalCode"
label={"کد پستی"}
align="left"
maxLength={13}
inputMode="numeric"
defaultValue={profile}
onInput={onInput.numberOnly}
/>
<TextArea parent={this} label={"آدرس محل سکونت"} name="address" />
<div className="mobile-auth-profile__footer d-flex justify-content-center">
@ -573,6 +513,17 @@ class Profile extends Component {
</div>
)
) : null}
<ToastContainer
position="bottom-right"
autoClose={1500}
hideProgressBar={true}
newestOnTop={true}
closeOnClick
rtl={true}
pauseOnFocusLoss
draggable
pauseOnHover
/>
</>
);
}

@ -1,14 +1,14 @@
import React from 'react';
import TextField from '@material-ui/core/TextField';
import { makeStyles } from '@material-ui/core/styles';
import React from "react";
import TextField from "@material-ui/core/TextField";
import { makeStyles } from "@material-ui/core/styles";
const useStyles = makeStyles((theme) => ({
root: {
'& .MuiTextField-root': {
width: '350px',
position : 'relative',
marginTop : 20,
"& .MuiTextField-root": {
width: "100%",
maxWidth: "400px",
position: "relative",
marginTop: 20,
},
},
}));
@ -19,7 +19,12 @@ export default function FormPropsTextFields(props) {
return (
<form className={classes.root} noValidate autoComplete="off">
<div>
<TextField id="outlined-basic" name={props.name} label={props.label} variant="outlined" />
<TextField
id="outlined-basic"
name={props.name}
label={props.label}
variant="outlined"
/>
</div>
</form>
);

@ -1,5 +1,6 @@
import React from "react";
import { makeStyles, withStyles } from "@material-ui/core/styles";
import ExpandMoreRoundedIcon from "@material-ui/icons/ExpandMoreRounded";
import FormControl from "@material-ui/core/FormControl";
import NativeSelect from "@material-ui/core/NativeSelect";
import InputBase from "@material-ui/core/InputBase";
@ -11,7 +12,8 @@ const BootstrapInput = withStyles((theme) => ({
},
},
input: {
width: 350,
width: "calc(100vw - 20px) !important",
maxWidth: "400px !important",
borderRadius: 4,
position: "relative",
backgroundColor: theme.palette.background.paper,
@ -33,22 +35,31 @@ const useStyles = makeStyles((theme) => ({
export default function CustomizedSelects(props) {
const classes = useStyles();
const [age, setAge] = React.useState("");
const handleChange = (event) => {
setAge(event.target.value);
};
return (
<div className="home-search__select mr-2">
<FormControl className={classes.margin}>
<NativeSelect
id="demo-customized-select-native"
value={age}
onChange={handleChange}
onChange={(e) =>
props.parent.setState({ [props.name]: e.target.value })
}
input={<BootstrapInput />}
>
{props.options.map((item) => (
<option value={item}>{item}</option>
{props.options.map((item, i) => (
<option key={i} value={item}>
{item}
</option>
))}
</NativeSelect>
<ExpandMoreRoundedIcon
style={{
position: "absolute",
left: 5,
top: "calc(50% - 12px)",
color: "#777",
}}
/>
</FormControl>
</div>
);

@ -1,6 +1,6 @@
import React, { Component } from "react";
import { connect } from "react-redux";
import { publicApi } from "~/Redux/actions";
import { publicApi, userProduct } from "~/Redux/actions";
import Navbar from "../Home/Navbar/index";
import Footer from "../Home/Footer/index";
@ -31,7 +31,17 @@ const fontSize = {
};
class Contact extends Component {
state = {
name: null,
cellphone: null,
unit: null,
book: null,
subject: null,
text: null,
};
componentDidMount() {
this.props.getList();
this.props.getContactData();
}
@ -56,7 +66,7 @@ class Contact extends Component {
</p>
<Input label={"نامونام خانوادگی"} name={"name"} />
<Input label={"شماره تماس"} name={"mobile"} />
<Select options={["همه", "پرفروش"]} />
<Select options={["واحد فروش", "واحد محتوا", "واحد فنی"]} />
<Input label={"موضوع پیام"} name={"subject"} />
<textarea
placeholder="متن پیام"
@ -116,13 +126,37 @@ class Contact extends Component {
برای ارتباط با دنیای شگفت انگیز دانوین از فرم زیر استفاده کنید
و پس از انتخاب دپارتمان مد نظر پیام خود را ارسال کنید.
</p>
<Input label={"نامونام خانوادگی"} name={"name"} />
<Input label={"شماره تماس"} name={"mobile"} />
<Select options={["همه", "پرفروش"]} />
<Input
label={"نامونام خانوادگی"}
name={"name"}
parent={this}
/>
<Input label={"شماره تماس"} name={"cellphone"} parent={this} />
<Select
name="unit"
options={[
"واحد مورد نظر",
"واحد فروش",
"واحد محتوا",
"واحد فنی",
]}
parent={this}
/>
{this.state.unit === "واحد محتوا" ? (
<Select
name="book"
options={[
...new Set(
this.props.list.map((item) => item.product.book.name)
),
]}
parent={this}
/>
) : null}
<Input label={"موضوع پیام"} name={"subject"} />
<textarea
placeholder="متن پیام"
name="description"
name="text"
rows="5"
></textarea>
<button>ارسال</button>
@ -174,6 +208,7 @@ export default connect(
(state) => ({
loading: state.publicApi.loading,
contactData: state.publicApi.contactData,
list: state.userProduct.list,
}),
{ getContactData: publicApi.getContactData }
{ getContactData: publicApi.getContactData, getList: userProduct.list }
)(Contact);

@ -246,7 +246,8 @@
}
textarea {
width: 350px;
width: "100%";
max-width: 400;
font-family: numeralLight;
border-radius: 10px;
margin-top: 20px;

@ -16,7 +16,7 @@ export default function Flex(props) {
margin: 5,
borderRadius: 10,
color: data.color,
filter: data.link === "/chatroom" ? "grayscale(90%)" : "",
filter: data.link === "/chatroom" ? "blur(1.5px) grayscale(100%)" : "",
};
return (
<Link

@ -1,4 +1,5 @@
import React, { Component } from "react";
import { connect } from "react-redux";
import AddCircleOutlineRoundedIcon from "@material-ui/icons/AddCircleOutlineRounded";
import { Link } from "react-router-dom";
import { toast } from "react-toastify";
@ -7,8 +8,6 @@ import CheckIcon from "@material-ui/icons/Check";
import KeyboardArrowUpIcon from "@material-ui/icons/KeyboardArrowUp";
import KeyboardArrowDownIcon from "@material-ui/icons/KeyboardArrowDown";
// import { logout } from '../../../../Redux/actions/user';
// import { connect } from 'react-redux';
import user1 from "~/assets/images/user1.png";
import user2 from "~/assets/images/user2.png";
@ -29,24 +28,25 @@ class NavbarDrawer extends Component {
};
render() {
const { status } = this.props;
return (
<div className="navbar-drawer d-flex flex-column">
<div className="navbar-drawer__header d-flex">
{this.props.users.map((item, i) =>
item.status === 1 ? (
<React.Fragment key={i}>
<Avatar
style={{ width: 60, height: 60 }}
alt="Remy Sharp"
src={item.image}
/>
<div className="navbar-drawer__header--right d-fex flex-column">
<h1>{item.firstName + " " + item.lastName}</h1>
<div>{item.title}</div>
</div>
</React.Fragment>
) : null
)}
<div className="navbar-drawer__header d-flex align-items-center">
<>
<Avatar
style={{ width: 60, height: 60 }}
alt="Remy Sharp"
src={
status.picFileId
? `https://dnvn.ir/api/v1/file/${status.picFileId}`
: ""
}
/>
<div className="navbar-drawer__header--right d-fex flex-column">
<h1>{status.firstName + " " + status.lastName}</h1>
</div>
</>
{this.state.dropdown ? (
<div
className="navbar-drawer__header--dropdown"
@ -67,22 +67,22 @@ class NavbarDrawer extends Component {
</div>
{this.state.dropdown ? (
<div className="navbar-drawer__dropdown d-flex flex-column">
{/* {this.props.users.map((item, i) => (
<User data={item} key={i} />
))} */}
<Link
to={"/newProfile"}
key={this.props.users.length + 1}
// key={this.props.users.length + 1}
style={{ color: "#4e4e4e" }}
>
<div className="navbar-drawer__bottom--link d-flex">
<AddCircleOutlineRoundedIcon
style={{ fontSize: 35, color: "#4e4e4e", margin: "0px 10px" }}
style={{ fontSize: 30, color: "#777", margin: "0px 8px" }}
/>
<div>اضافه کردن کاربر </div>
{/* {item.message && <div class="badge">{item.message}</div>} */}
</div>
</Link>
{this.props.users.map((item, i) => (
<User data={item} key={i} />
))}
</div>
) : null}
<div className="navbar-drawer__bottom mt-3">
@ -112,20 +112,12 @@ class NavbarDrawer extends Component {
}
}
export default NavbarDrawer;
// export default connect((state) => ({ isLogin: state.user.isLogin }), { logout })(NavbarDrawer);
export default connect(
(state) => ({ status: state.user.status }),
{}
)(NavbarDrawer);
NavbarDrawer.defaultProps = {
users: [
{
id: 1,
firstName: "اکبر",
lastName: "خراسانی",
title: "استاد علوم تجربی",
image: user2,
status: 1,
},
],
links: [
{
name: "صفحه اصلی",
@ -170,9 +162,9 @@ NavbarDrawer.defaultProps = {
message: "",
},
{
name: "پیام رسان",
name: "دانوینیها",
link: "/",
icon: <img src={mobileProfile} alt="پیام رسان" />,
icon: <img src={mobileProfile} alt="دانوینیها" />,
toast: "",
message: "",
},

@ -82,7 +82,9 @@ export default function MobileNavbar(props) {
<img src={search} alt="جستجو" />
) : (
<div className="d-flex align-items-center">
<img src={search} alt="جستجو" />
<Link to={"/products"}>
<img src={search} alt="جستجو" />
</Link>
<Link to={"/qr-scan"}>
<img src={qr} alt="QR" />
</Link>

@ -20,7 +20,7 @@ const fontSize = {
export default function ActiveLastBreadcrumb(props) {
const { name } = props;
return (
<Breadcrumbs aria-label="breadcrumb">
<Breadcrumbs aria-label="breadcrumb" className="m-1">
<Link
style={{
fontSize:

@ -6,13 +6,8 @@ import { Link } from "react-router-dom";
import Navbar from "../Home/Navbar/index";
import Footer from "../Home/Footer/index";
import BreadCrumbs from "./BreadCrumb/index";
import Loader from "~/components/Loader/index";
import sciense_6 from "~/assets/images/olum6.jpg";
import sciense_8 from "~/assets/images/olum8.jpg";
import sciense_9 from "~/assets/images/olum9.jpg";
import sciense_7 from "~/assets/images/olum7.jpg";
import shimi_10 from "~/assets/images/shimi10.jpg";
import zist_10 from "~/assets/images/zist10.jpg";
import "./index.scss";
const maxDesktopSize = 1250;
const maxMobileSize = 550;
@ -20,11 +15,13 @@ const maxMobileSize = 550;
const fontSize = {
mobile: {
h1: window.innerWidth > maxMobileSize ? 24 : window.innerWidth / 20,
a: window.innerHeight > maxMobileSize ? 15 : window.innerWidth / 30,
a: window.innerWidth > maxMobileSize ? 15 : window.innerWidth / 30,
p: window.innerWidth > maxMobileSize ? 14 : window.innerWidth / 30,
},
desktop: {
h1: window.innerWidth > maxDesktopSize ? 18 : window.innerWidth / 70,
a: window.innerHeight > maxDesktopSize ? 15 : window.innerWidth / 85,
p: window.innerWidth > maxDesktopSize ? 14 : window.innerWidth / 90,
},
};
@ -34,7 +31,7 @@ class MyBooks extends React.Component {
}
render() {
const { list } = this.props;
const { list, checkEmpty } = this.props;
return (
<>
{window.innerWidth > 1000 ? (
@ -43,9 +40,20 @@ class MyBooks extends React.Component {
<Navbar />
<BreadCrumbs />
<div className="mybooks__list d-flex flex-wrap p-1">
{list.map((item, i) => (
<Item data={item} key={i} id={i} />
))}
{!checkEmpty ? (
list.map((item, i) => <Item data={item} key={i} id={i} />)
) : (
<div
className="mybooks__list--empty d-flex flex-column justify-content-center align-items-center"
style={{ width: "100vw", height: "calc(100vh - 400px)" }}
>
<p style={{ fontSize: fontSize.desktop.p }}>
برای استفاده از این بخش باید یک کتاب فعال خریداری کرده
باشید
</p>
<Link to="/products">فروشگاه</Link>
</div>
)}
</div>
</div>
<Footer />
@ -55,11 +63,21 @@ class MyBooks extends React.Component {
<>
<div className="mobile-products d-flex flex-column">
<Navbar />
{/* <h1 style={{ fontSize: fontSize.mobile.h1 }}>کتابهای من</h1> */}
<div className="d-flex flex-wrap p-1">
{list.map((item, i) => (
<Item data={item} key={i} id={i} />
))}
{!checkEmpty ? (
list.map((item, i) => <Item data={item} key={i} id={i} />)
) : (
<div
className="mobile-products__empty d-flex flex-column justify-content-center align-items-center text-center"
style={{ height: "calc(100vh - 100px)", width: "100vw" }}
>
<p style={{ fontSize: fontSize.mobile.p }}>
برای استفاده از این بخش باید یک کتاب فعال خریداری کرده
باشید
</p>
<Link to="/products">فروشگاه</Link>
</div>
)}
</div>
</div>
</>
@ -72,6 +90,7 @@ class MyBooks extends React.Component {
export default connect(
(state) => ({
list: state.userProduct.list,
checkEmpty: state.userProduct.checkEmpty,
// status: state.user.status,
}),
{ getList: userProduct.list }

@ -5,10 +5,25 @@
padding: 0px 10px 40px;
direction: rtl;
overflow-x: hidden;
min-height: calc(100vh - 288px);
min-height: calc(100vh - 315px);
padding-top: 70px;
&__list {
max-width: 1000px;
margin: 0px auto;
&--empty {
font-family: numeralLight;
a {
display: inline;
font-family: numeralLight;
text-decoration: none;
padding: 5px 20px 3px;
background-color: #00cc69;
border-radius: 25px;
color: white;
&:focus:enabled {
text-decoration: none;
}
}
}
}
}

@ -26,7 +26,7 @@ export default function Comment(props) {
{window.innerWidth < 1000 ? (
<div className="mobile-comment d-flex flex-column">
<strong style={{ fontSize: fontSize.mobile.strong }}>
{comment.username || "حسین"}
{comment.username}
</strong>
<p style={{ fontSize: fontSize.mobile.p }}>{comment.text}</p>
<span style={{ fontSize: fontSize.mobile.span }}>

@ -1,4 +1,6 @@
import React from "react";
import React, { useState } from "react";
import { connect } from "react-redux";
import { comment, book } from "~/Redux/actions";
import { makeStyles } from "@material-ui/core/styles";
import Modal from "@material-ui/core/Modal";
@ -43,10 +45,21 @@ const useStyles = makeStyles((theme) => ({
},
}));
export default function SimpleModal(props) {
function SimpleModal(props) {
const classes = useStyles();
// getModalStyle is not a pure function, we roll the style only on the first render
const [modalStyle] = React.useState(getModalStyle);
const [text, setText] = useState(null);
const submitComment = () => {
props.addComment({
userId: props.id,
bookId: props.info.id,
title: null,
text: text,
});
props.handleOpenComment();
};
const body = (
<div style={modalStyle} className={classes.paper + " material-modal"}>
@ -62,8 +75,16 @@ export default function SimpleModal(props) {
>
کامنت خود را وارد کرده و دکمه ثبت را بزنید.
</h2>
<textarea placeholder="متن پیام" name="description" rows="5"></textarea>
<button style={{ marginTop: 20, borderRadius: 6, padding: 8 }}>
<textarea
placeholder="متن پیام"
name="description"
rows="5"
onChange={(e) => setText(e.target.value)}
></textarea>
<button
style={{ marginTop: 20, borderRadius: 6, padding: 8 }}
onClick={() => submitComment()}
>
ثبت
</button>
</div>
@ -82,3 +103,11 @@ export default function SimpleModal(props) {
</div>
);
}
export default connect(
(state) => ({
info: state.book.info,
id: state.user.status.id,
}),
{ addComment: comment.add, getInfo: book.info }
)(SimpleModal);

@ -1,5 +1,5 @@
import React, { Component } from "react";
import { ToastContainer } from "react-toastify";
import { ToastContainer, toast } from "react-toastify";
import { Link } from "react-router-dom";
import { connect } from "react-redux";
@ -149,6 +149,12 @@ class Product extends Component {
<h2 style={{ fontSize: fontSize.mobile.h2 }}>
{info.category}
</h2>
<h3 style={{ fontSize: fontSize.mobile.h1 }}>
{page === "digital"
? info.product[0].price
: info.product[1].price}{" "}
تومان
</h3>
<div className="d-flex flex-column mt-3">
<div className="d-flex">
<Link
@ -169,6 +175,9 @@ class Product extends Component {
{page === "digital" ? "کتاب فیزیکی" : "نسخه دیجیتال"}
</Link>
<Link
onClick={() =>
toast.info("برای این کتاب نمونهای درج نشده است.")
}
className="mobile-product__header--purchase"
style={{ fontSize: fontSize.mobile.a }}
>
@ -262,8 +271,8 @@ class Product extends Component {
)
) : null}
<ToastContainer
position="bottom-right"
autoClose={1500}
position="top-right"
autoClose={2000}
hideProgressBar={true}
newestOnTop={true}
closeOnClick

@ -25,7 +25,10 @@
font-family: numeralMedium;
color: #6f7074;
}
h3 {
font-family: numeralLight;
color: #00cc69;
}
a {
border: 0px;
font-family: numeralLight;

@ -28,7 +28,10 @@ export default class Product extends Component {
return (
<>
{window.innerWidth < 1000 ? (
<div className="mobile-products-product d-flex flex-column">
<Link
to={`/products/physical/${product.id}`}
className="mobile-products-product d-flex flex-column"
>
<img
src={`https://dnvn.ir/api/v1/file/${product.fileIds}`}
alt={"عکس مجصول"}
@ -58,7 +61,7 @@ export default class Product extends Component {
</span>
</Link>
</div>
</div>
</Link>
) : null}
{window.innerWidth > 1000 ? (
<article className="products-product d-flex flex-column align-items-center">

@ -23,6 +23,21 @@
direction: rtl;
overflow-x: hidden;
padding-top: 70px;
&__empty {
font-family: numeralLight;
a {
display: inline;
font-family: numeralLight;
text-decoration: none;
padding: 5px 20px 3px;
background-color: #00cc69;
border-radius: 25px;
color: white;
&:focus:enabled {
text-decoration: none;
}
}
}
&__search {
// width: 100%;
position: relative;

@ -200,7 +200,7 @@ export default function QRImage(props) {
return (
<>
{window.innerWidth < 1000 ? (
<div className="d-flex flex-column">
<div className="d-flex flex-column" id="image">
<h3 style={{ fontSize: fontSize.mobile.h3 }}>
<PhotoLibraryRoundedIcon style={{ fontSize: 30 }} /> عکسها{" "}
</h3>
@ -208,7 +208,7 @@ export default function QRImage(props) {
</div>
) : null}
{window.innerWidth > 1000 ? (
<div className="d-flex flex-column">
<div className="d-flex flex-column" id="image">
<h3 style={{ fontSize: fontSize.desktop.h3 }}>
<PhotoLibraryRoundedIcon style={{ fontSize: 30 }} />
عکسها

@ -1,6 +1,6 @@
.video-js {
width: 100% !important;
height: 100% !important;
// width: 100% !important;
// height: 100% !important;
border-radius: 20px;
button {
&:focus {

@ -3,7 +3,7 @@
border-radius: 10px;
background-color: #eee;
margin: 0px 0px 20px;
height: calc(100vh / 4);
// height: calc(100vh / 4);
position: relative;
h2 {
font-family: numeralMedium;
@ -24,8 +24,8 @@
border-radius: 10px;
background-color: #eee;
margin: 15px auto;
height: calc(100vh / 2.5);
min-height: 300px;
// height: calc(100vh / 2.5);
// min-height: 300px;
position: relative;
h2 {
font-family: numeralMedium;

@ -72,6 +72,22 @@ class QR extends Component {
}
}
componentDidUpdate(prevProps, prevState) {
const { qrList } = this.props;
if (prevProps.qrList !== qrList) {
localStorage.setItem(
"latestQr",
JSON.stringify({
name: qrList.book.name,
pagesNum: qrList.book.pagesNum,
gradeId: qrList.book.gradeId,
link: window.location.search,
fileIds: qrList.book.fileIds,
})
);
}
}
render() {
const { QR, qrList } = this.props;
const fontSize = {
@ -99,10 +115,6 @@ class QR extends Component {
},
};
// if (this.content.clientHeight < window.innerHeight - 60) {
// this.buttons.style.display = "none";
// }
return (
<>
{window.innerWidth > 1000 ? (
@ -313,6 +325,12 @@ const Identifier = (props) => {
const MenuIdentifier = (props) => {
return (
<>
{props.data.type === "image" ? (
<a
href="#image"
className="mobile-qr__buttons--image mobile-qr__buttons--media"
></a>
) : null}
{props.data.type === "voice" ? (
<a
href="#voice"

@ -82,6 +82,11 @@
transform: translateY(120px);
margin-top: 10px;
}
&--image {
background: url(../../assets/icons/image.jpg) no-repeat #e6ffa2;
background-size: 35px;
background-position: center center;
}
&--voice {
background: url(../../assets/icons/play.svg) no-repeat #a2ffc1;
background-size: 21px;

@ -1,31 +1,45 @@
import React, { Component } from 'react';
import React, { Component } from "react";
import { Link } from "react-router-dom";
import './index.scss';
export default function LastQR(props){
const {data} = props;
return(
<>
{
window.innerWidth > 1000 ?
<div className="last-qr">
import "./index.scss";
const grades = [
"اول",
"دوم",
"سوم",
"چهارم",
"پنجم",
"ششم",
"هفتم",
"هشتم",
"نهم",
"دهم",
"یازدهم",
"دوازدهم",
];
</div> : null
}
{
window.innerWidth < 1000 ?
<div className="mobile-last-qr d-flex">
export default function LastQR(props) {
const { data } = props;
return (
<>
{window.innerWidth > 1000 ? <div className="last-qr"></div> : null}
{window.innerWidth < 1000 ? (
<Link to={`/qr${data.link}`} className="mobile-last-qr d-flex">
<div className="mobile-last-qr__right d-flex">
<img src={data.image} alt={data.title} />
<img
src={`https://dnvn.ir/api/v1/file/${data.fileIds}`}
alt={data.name}
/>
<div className="d-flex flex-column">
<strong>{data.title}</strong>
<span>{data.subTitle}</span>
<strong>{data.name}</strong>
<span>{grades[data.gradeId]}</span>
</div>
</div>
<div className="mobile-last-qr__left d-flex">
<button>صفحه {data.page}</button>
<button>صفحه {data.pagesNum}</button>
</div>
</div> : null
}
</Link>
) : null}
</>
);
}

@ -1,32 +1,34 @@
.mobile-last-qr{
.mobile-last-qr {
width: 100%;
padding: 15px 10px;
justify-content: space-between;
background-color:white;
align-items:center;
background-color: white;
align-items: center;
border-radius: 10px;
box-shadow: 0px 0px 10px rgb(226, 226, 226);
&__right{
align-items:center;
img{
text-decoration: none;
&__right {
align-items: center;
img {
height: 100px;
border-radius: 10px;
margin-left: 15px;
}
strong{
strong {
font-family: numeralMedium;
font-size: calc(100vw / 30);
font-size: calc(100vw / 25);
font-weight: 600;
letter-spacing: -1px;
color: #4e4e4e;
}
span{
span {
font-family: numeralMedium;
font-size: calc(100vw / 35);
color: #00CC69;
font-size: calc(100vw / 30);
color: #00cc69;
}
}
&__left{
button{
&__left {
button {
display: inline;
font-family: numeralLight;
text-decoration: none;
@ -35,8 +37,8 @@
background-color: white;
border-radius: 25px;
font-size: calc(100vw / 26);
color: #00cc69;
&:focus:enabled{
color: #00cc69;
&:focus:enabled {
text-decoration: none;
}
}

@ -127,12 +127,17 @@ class QRScan extends Component {
{this.state.tail === null ? null : (
<Modal parent={this} tail={this.state.tail} />
)}
<section className="mobile-qr-scan__lasts d-flex flex-column">
<h2>آخرین مشاهدات</h2>
{data.map((item, i) => (
<LastQr data={item} key={i} />
))}
</section>
{localStorage.getItem("latestQr") ? (
<section className="mobile-qr-scan__lasts d-flex flex-column">
<h2>آخرین مشاهدات</h2>
{data.map((item, i) => (
<LastQr
data={JSON.parse(localStorage.getItem("latestQr"))}
key={i}
/>
))}
</section>
) : null}
</div>
</>
) : null}

@ -56,51 +56,15 @@
}
}
&__camera {
margin-top: 20px;
// margin-top: 20px;
width: 100%;
border-radius: 10px;
margin: 30px auto;
margin: 5px auto;
position: relative;
&--shape {
position: absolute;
background-color: rgba(0, 0, 0, 0.8);
}
&--shapeTop {
width: calc(100% - 60px);
height: 30px;
left: 30px;
top: 0px;
}
&--shapeBottom {
width: calc(100% - 60px);
height: 30px;
left: 30px;
bottom: 0px;
}
&--shapeLeft {
width: 30px;
height: 100%;
left: 0px;
bottom: 0px;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}
&--shapeRight {
width: 30px;
height: 100%;
right: 0px;
bottom: 0px;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
}
&--shapeCenter {
position: absolute;
width: calc(100% - 60px);
height: calc(100% - 60px);
right: 30px;
bottom: 30px;
border: 3px solid red;
}
}
&__text {
text-align: justify;
@ -110,7 +74,7 @@
}
&__lasts {
width: 100%;
margin: 30px 0px;
margin: 15px 0px;
h2 {
font-family: numeralBold;
color: #02a255;

@ -1,10 +1,12 @@
import React, { Component } from "react";
import { userProduct } from "~/Redux/actions";
import Navbar from "../Home/Navbar/index";
import Input from "../Contact/Input/index";
import Select from "../Contact/Select/index";
import "../Contact/index.scss";
import { connect } from "react-redux";
const maxDesktopSize = 1250;
const maxMobileSize = 550;
@ -23,6 +25,18 @@ const fontSize = {
};
class Support extends Component {
state = {
name: null,
cellphone: null,
unit: null,
book: null,
subject: null,
text: null,
};
componentDidMount() {
this.props.getList();
}
render() {
return (
<>
@ -30,15 +44,31 @@ class Support extends Component {
<Navbar page={"contact"} />
<div className="mobile-contact__form d-flex flex-column">
<h1 style={{ fontSize: fontSize.mobile.h1 }}>پشتیبانی</h1>
<Input label={"نامونام خانوادگی"} name={"name"} />
<Input label={"شماره تماس"} name={"mobile"} />
{/* <Select options={["همه", "پرفروش"]} /> */}
<Input label={"موضوع پیام"} name={"subject"} />
<textarea
placeholder="متن پیام"
name="description"
rows="5"
></textarea>
<Input label={"نامونام خانوادگی"} name={"name"} parent={this} />
<Input label={"شماره تماس"} name={"cellphone"} parent={this} />
<Select
name="unit"
options={[
"واحد مورد نظر",
"واحد فروش",
"واحد محتوایی",
"واحد فنی",
]}
parent={this}
/>
{this.state.unit === "واحد محتوایی" ? (
<Select
name="book"
options={[
...new Set(
this.props.list.map((item) => item.product.book.name)
),
]}
parent={this}
/>
) : null}
<Input label={"موضوع پیام"} name={"subject"} parent={this} />
<textarea placeholder="متن پیام" name="text" rows="5"></textarea>
<button>ارسال</button>
</div>
</div>
@ -47,4 +77,9 @@ class Support extends Component {
}
}
export default Support;
export default connect(
(state) => ({
list: state.userProduct.list,
}),
{ getList: userProduct.list }
)(Support);

Loading…
Cancel
Save