update 27 files and delete 2 files

master
amir hosein gorji 3 years ago
parent 043cee641d
commit 588cd9cc0e
  1. 78903
      public/7.pdf
  2. BIN
      public/8.pdf
  3. 2
      public/serviceworker.js
  4. 8
      src/Redux/proxy.js
  5. 48
      src/views/About/index.js
  6. 88
      src/views/About/index.scss
  7. 2
      src/views/Auth/Profile/GenderSwitch/index.js
  8. 7
      src/views/Auth/Profile/Input/index.js
  9. 9
      src/views/Auth/Profile/MultipleSelector/index.js
  10. 6
      src/views/Auth/Profile/Select/index.js
  11. 4
      src/views/Auth/Profile/Upload/index.js
  12. 5
      src/views/Auth/Profile/index.js
  13. 13
      src/views/Auth/Profile/index.scss
  14. 8
      src/views/Checkout/Input/index.js
  15. 13
      src/views/Checkout/Select/index.js
  16. 70
      src/views/Checkout/Table/index.js
  17. 5
      src/views/Checkout/TextArea/index.js
  18. 167
      src/views/Checkout/index.js
  19. 116
      src/views/Checkout/index.scss
  20. 2
      src/views/Contact/Input/index.js
  21. 4
      src/views/Contact/Select/index.js
  22. 43
      src/views/Contact/index.js
  23. 9
      src/views/Home/Navbar/Laptop/index.js
  24. 18
      src/views/Products/Product/index.js
  25. 23
      src/views/QR/VideoBox/React-video-js-player/index.js
  26. 3
      src/views/QR/VideoBox/React-video-js-player/index.scss
  27. 27
      src/views/Support/index.js
  28. 24838
      yarn.lock

File diff suppressed because one or more lines are too long

Binary file not shown.

@ -1,4 +1,4 @@
const CACHE_NAME = "version-26-6-19";
const CACHE_NAME = "version-26-6-19aaaii";
const urlsToCache = ["index.html", "offline.html"];
const self = this;

@ -81,7 +81,13 @@ class Proxy {
this.post(url, params, {
dispatch: (obj) => {
let login = obj.data;
if (!login || !login.refreshToken) return false;
if (!login || !login.refreshToken) {
localStorage.removeItem("refresh");
localStorage.removeItem("access");
localStorage.removeItem("userData");
return false;
}
localStorage.setItem("refresh", login.refreshToken);
localStorage.setItem("access", login.accessToken);
delete login.refreshToken;

@ -57,12 +57,12 @@ export default class About extends Component {
advantages: {
title: " مزیت رقابتی دانوین",
list: [
"بکارگیری بروز ترین تکنولوژی های تولید و مدیریت محتوای آموزشی-تربیتی (مانند واقعیت افزوده)",
"دارای رویکرد آموزش سرگرم کننده ",
"بستر تعاملی و اشتراک گذاری فیلم و محتوای آموزشی",
"رویکرد معرفتی-ارزشی",
"ویدئو های منحصر بفرد",
"متن گفتگو محور ، روایی ، قابل فهم ،جذاب و سرگرم کننده",
"بکارگیری بروز ترین تکنولوژی های تولید و مدیریت محتوای آموزشی-تربیتی (مانند واقعیت افزوده)",
"دارای رویکرد آموزش سرگرم کننده ",
"بستر تعاملی و اشتراک گذاری فیلم و محتوای آموزشی",
"رویکرد معرفتی-ارزشی",
"ویدئو های منحصر بفرد",
"متن گفتگو محور ، روایی ، قابل فهم ،جذاب و سرگرم کننده",
],
},
};
@ -79,11 +79,20 @@ export default class About extends Component {
<h1 style={{ fontSize: fontSize.desktop.h1 }}>
{first.title}
</h1>
<p style={{ fontSize: fontSize.desktop.p + 2 }}>
<p
style={{
fontSize: fontSize.desktop.p + 2,
lineHeight: 2,
}}
>
{first.text}
</p>
</div>
</div>
<div
className="linegr"
style={{ width: "100%", height: "4px" }}
></div>
<div className="about__fury d-flex">
<div className="about__fury--right d-flex flex-column justify-content-center">
<div className="right-top align-self-start">
@ -92,32 +101,40 @@ export default class About extends Component {
</h1>
<p style={{ fontSize: fontSize.desktop.p }}>{fury.text}</p>
</div>
<div className="right-bottom ">
<div className="right-bottom align-self-start">
<h2 style={{ fontSize: fontSize.desktop.h2 }}>
{keywords.title}
</h2>
<ul>
{keywords.list.map((item, i) => (
<Fragment key={i}>
<li style={{ fontSize: fontSize.desktop.li }}>
<li
style={{
fontSize: fontSize.desktop.li,
padding: 5,
}}
>
{item}
</li>
<br />
</Fragment>
))}
</ul>
</div>
<div className="right-bottom align-self-end">
<div className="right-bottom align-self-start">
<h2 style={{ fontSize: fontSize.desktop.h2 }}>
{keywords2.title}
</h2>
<ul>
{keywords2.list.map((item, i) => (
<Fragment key={i}>
<li style={{ fontSize: fontSize.desktop.li }}>
<li
style={{
fontSize: fontSize.desktop.li,
padding: 5,
}}
>
{item}
</li>
<br />
</Fragment>
))}
</ul>
@ -145,10 +162,11 @@ export default class About extends Component {
<ul>
{advantages.list.map((item, i) => (
<Fragment key={i}>
<li style={{ fontSize: fontSize.desktop.li }}>
<li
style={{ fontSize: fontSize.desktop.li, padding: 5 }}
>
{item}
</li>
<br />
</Fragment>
))}
</ul>

@ -14,8 +14,8 @@
display: inline;
letter-spacing: -2px;
font-family: numeralMedium;
background-color: #00cc69;
color: white;
// background-color: #00cc69;
color: #00cc69;
text-align: center;
}
p {
@ -34,14 +34,13 @@
justify-content: space-between;
&--right {
align-items: center;
width: 45%;
width: 50%;
.right-top {
h1 {
display: inline;
letter-spacing: -2px;
font-family: numeralMedium;
background-color: #00cc69;
color: white;
color: #00cc69;
}
p {
margin-top: 10px;
@ -52,21 +51,21 @@
}
}
.right-bottom {
margin: 20px 60px 20px 0px;
margin: 20px 30px 20px 0px;
h2 {
display: inline;
font-family: numeralMedium;
background-color: #00cc69;
color: white;
color: #00cc69;
}
ul {
margin: 0px;
list-style: none;
// list-style: none;
padding: 0px;
margin-top: 5px;
li {
display: inline;
border-bottom: 2px solid #00cc69;
// display: inline;
// margin-bottom: 10px;
// border-bottom: 2px solid #00cc69;
font-family: numeralLight;
color: #6d6d6d;
}
@ -78,7 +77,8 @@
height: 100%;
position: relative;
& img {
position: absolute;
border-radius: 15px;
// position: absolute;
}
&__1 {
top: 100px;
@ -113,36 +113,38 @@
&__advantages {
width: 100%;
height: 300px;
margin-top: 50px;
margin-top: 10px;
margin-bottom: 10px;
justify-content: space-around;
&--right {
width: 48%;
height: 100%;
& img {
border-radius: 15px;
width: 100%;
}
}
&--left {
padding-top: 20px;
padding-right: 20px;
padding-top: 0px;
width: 48%;
height: 100%;
align-items: flex-end;
margin-top: 20px;
margin-top: 5px;
h1 {
display: inline;
font-family: numeralMedium;
background-color: #00cc69;
color: white;
color: #00cc69;
}
ul {
margin: 0px;
list-style: none;
// list-style: none;
padding: 0px;
margin-top: 5px;
li {
display: inline;
// display: inline;
text-align: justify;
font-family: numeralLight;
color: #6d6d6d;
}
@ -164,8 +166,7 @@
display: inline;
letter-spacing: -2px;
font-family: numeralMedium;
background-color: #00cc69;
color: white;
color: #00cc69;
}
p {
margin-top: 10px;
@ -180,6 +181,7 @@
height: 330px;
width: 100%;
& img {
border-radius: 15px;
position: absolute;
}
&--1 {
@ -224,17 +226,17 @@
h2 {
display: inline;
font-family: numeralMedium;
background-color: #00cc69;
color: white;
color: #00cc69;
}
ul {
margin: 0px;
list-style: none;
// list-style: none;
padding: 0px;
margin-top: 5px;
li {
display: inline;
border-bottom: 2px solid #00cc69;
// display: inline;
// padding-bottom: 5px;
// border-bottom: 2px solid #00cc69;
font-family: numeralLight;
color: #6d6d6d;
}
@ -242,6 +244,7 @@
}
&__video {
img {
border-radius: 15px;
width: 100%;
}
}
@ -250,17 +253,16 @@
h1 {
display: inline;
font-family: numeralMedium;
background-color: #00cc69;
color: white;
color: #00cc69;
// margin-bottom: 20px;
}
ul {
margin: 0px;
list-style: none;
// list-style: none;
padding: 0px;
margin-top: 5px;
li {
display: inline;
// display: inline;
text-align: justify;
font-family: numeralLight;
color: #6d6d6d;
@ -269,3 +271,29 @@
}
}
}
.linegr {
/* Permalink - use to edit and share this gradient: https://colorzilla.com/gradient-editor/#000000+0,000000+49,000000+100&0+0,0.65+49,0+100 */
/* Permalink - use to edit and share this gradient: https://colorzilla.com/gradient-editor/#000000+1,000000+49,000000+100&0+0,0.51+49,0+100 */
background: -moz-linear-gradient(
left,
rgba(0, 0, 0, 0) 0%,
rgba(0, 0, 0, 0.01) 1%,
rgba(0, 0, 0, 0.51) 49%,
rgba(0, 0, 0, 0) 100%
); /* FF3.6-15 */
background: -webkit-linear-gradient(
left,
rgba(0, 0, 0, 0) 0%,
rgba(0, 0, 0, 0.01) 1%,
rgba(0, 0, 0, 0.51) 49%,
rgba(0, 0, 0, 0) 100%
); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(
to right,
rgba(0, 0, 0, 0) 0%,
rgba(0, 0, 0, 0.01) 1%,
rgba(0, 0, 0, 0.51) 49%,
rgba(0, 0, 0, 0) 100%
); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 ); /* IE6-9 */
}

@ -27,7 +27,7 @@ export default function GenderSwitch(props) {
border: selectedOption === 2 ? "0px" : "1px solid #ccc",
borderTopRightRadius: 10,
borderBottomRightRadius: 10,
borderLeft: window.innerWidth > 1000 ? "1px solid #ccc" : "0px",
// borderLeft: window.innerWidth > 1000 ? "1px solid #ccc" : "0px",
},
};
return (

@ -19,7 +19,7 @@ export default function FormPropsTextFields(props) {
}));
const classes = useStyles();
const { parent, defaultValue, maxLength, onInput, variant } = props;
const { parent, defaultValue, maxLength, onInput, variant, required } = props;
return (
<form className={classes.root} noValidate autoComplete="off">
<div>
@ -29,8 +29,9 @@ export default function FormPropsTextFields(props) {
label={props.label}
variant={variant || "outlined"}
onChange={(e) => parent.onChange(e.target.name, e.target.value)}
defaultValue={defaultValue[props.name] || ""}
required={props.required}
// defaultValue={defaultValue[props.name] || ""}
value={defaultValue[props.name] || ""}
required={required}
inputProps={{ maxLength }}
onInput={
onInput

@ -65,11 +65,18 @@ export default function MultipleSelector(props) {
className={`${classes.formControl} mobile-multiple-selector`}
>
<InputLabel id="demo-mutiple-name-label">{label}</InputLabel>
{console.log(selectedOptions)}
<Select
labelId="demo-mutiple-name-label"
id="demo-mutiple-name"
multiple
value={selectedOptions.split(",")}
value={
selectedOptions
? Array.isArray(selectedOptions)
? selectedOptions
: selectedOptions.split("")
: []
}
onChange={(e) => parent.onChange(name, e.target.value.join(","))}
input={<Input />}
variant="outlined"

@ -14,7 +14,7 @@ const useStyles = makeStyles((theme) => ({
export default function CustomizedSelects(props) {
const classes = useStyles();
const { parent, selectedOptions } = props;
const { parent, selectedOptions, required } = props;
return (
<>
{window.innerWidth < 1000 ? (
@ -22,6 +22,7 @@ export default function CustomizedSelects(props) {
<FormControl variant="outlined" className={classes.marginLeft}>
<InputLabel id="demo-simple-select-outlined-label">
{props.label}
{required ? <span style={{ color: "red" }}>*</span> : null}
</InputLabel>
<Select
labelId="demo-simple-select-outlined-label"
@ -53,11 +54,12 @@ export default function CustomizedSelects(props) {
<FormControl variant="outlined" className={classes.marginLeft}>
<InputLabel id="demo-simple-select-outlined-label">
{props.label}
{required ? <span style={{ color: "red" }}>*</span> : null}
</InputLabel>
<Select
labelId="demo-simple-select-outlined-label"
id="demo-simple-select-outlined"
value={selectedOptions}
value={selectedOptions || ""}
onChange={(e) => parent.onChange(props.name, e.target.value)}
>
{/* 09366858119 */}

@ -8,14 +8,14 @@ export default function Upload(props) {
{window.innerWidth < 1000 ? (
<div className="mobile-auth-profile__upload d-flex justify-content-center align-items-center mb-3">
<>
{isNaN(+parent.state.file) ? (
{!parent.state.file || isNaN(+parent.state.file) ? (
<AddAPhotoIcon
style={{ width: 40, height: 40, color: "white" }}
/>
) : (
<img
src={
parent.state.file.name
parent.state.file?.name
? URL.createObjectURL(parent.state.file)
: window.baseURL + "file/" + parent.state.file
}

@ -88,8 +88,9 @@ class Profile extends Component {
[name]: value,
});
} else if (name === "status") {
console.log(this.state);
this.setState((prevState) => ({
gradeIds: prevState.gradeIds.slice(0, 1) || [],
gradeIds: String(prevState?.gradeIds || "").slice(0, 1) || "",
[name]: value,
}));
} else if (name === "docFileIds") {
@ -203,6 +204,7 @@ class Profile extends Component {
parent={this}
defaultValue={profile}
onInput={onInput.persianOnly}
required
/>
</div>
<div className="mb-2">
@ -212,6 +214,7 @@ class Profile extends Component {
parent={this}
defaultValue={profile}
onInput={onInput.persianOnly}
required
/>
</div>
<div className="mb-2">

@ -27,14 +27,15 @@
text-align: justify;
}
&__upload {
margin: 10px auto;
margin: 20px auto;
min-width: 100px;
min-height: 100px;
height: calc(100vh / 7);
width: calc(100vh / 7);
// height: calc(100vh / 7);
// width: calc(100vh / 7);
border-radius: 50%;
background-color: rgb(209, 209, 209);
position: relative;
input {
width: 100%;
height: 100%;
@ -180,10 +181,10 @@
justify-content: space-between;
.auth-profile__upload {
width: 150px;
height: 150px;
width: 110px;
height: 110px;
border-radius: 50%;
margin-top: 15px auto 0px;
margin-top: 25px auto 0px;
// border: 2px dotted #ccc;
position: relative;
background-color: #eee;

@ -7,9 +7,9 @@ export default function FormPropsTextFields(props) {
root: {
"& .MuiTextField-root": {
width: "100%",
position: "relative",
marginRight: 10,
marginTop: 20,
// position: "relative",
margin: 5,
"& input": {
textAlign: props.align,
direction: props.align === "right" ? "rtl" : "ltr",
@ -30,7 +30,7 @@ export default function FormPropsTextFields(props) {
label={props.label}
variant={variant || "outlined"}
onChange={(e) => parent.onChange(e.target.name, e.target.value)}
defaultValue={defaultValue[props.name] || ""}
defaultValue={defaultValue || ""}
required={props.required}
inputProps={{ maxLength }}
onInput={

@ -8,13 +8,14 @@ import InputLabel from "@material-ui/core/InputLabel";
const useStyles = makeStyles((theme) => ({
marginLeft: {
// margin: theme.spacing(1),
marginLeft: 8,
width: "100%",
margin: 5,
},
}));
export default function CustomizedSelects(props) {
const classes = useStyles();
const { parent, selectedOptions } = props;
const { parent, selectedOptions, required } = props;
return (
<>
{window.innerWidth < 1000 ? (
@ -26,8 +27,10 @@ export default function CustomizedSelects(props) {
<Select
labelId="demo-simple-select-outlined-label"
id="demo-simple-select-outlined"
style={{ padding: "15px !important" }}
value={selectedOptions}
onChange={(e) => parent.onChange(props.name, e.target.value)}
required={required ? true : false}
>
{/* 09366858119 */}
{props.options.map((item, i) => (
@ -53,12 +56,16 @@ export default function CustomizedSelects(props) {
<FormControl variant="outlined" className={classes.marginLeft}>
<InputLabel id="demo-simple-select-outlined-label">
{props.label}
<span style={{ color: "red", fontSize: 11 }}>
{required ? "*" : ""}
</span>
</InputLabel>
<Select
labelId="demo-simple-select-outlined-label"
id="demo-simple-select-outlined"
value={selectedOptions}
onChange={(e) => parent.onChange(props.name, e.target.value)}
required
>
{/* 09366858119 */}
{props.options.map((item, i) => (
@ -73,7 +80,7 @@ export default function CustomizedSelects(props) {
position: "absolute",
left: 5,
top: 25,
fontSize: 30,
fontSize: 20,
color: "#a5a5a5",
}}
/>

@ -158,6 +158,7 @@ const Item = (props) => {
<TableCell align="right" component="th" scope="row">
<div className="mobile-cart-table-product d-flex align-items-center">
<img
style={{ height: 60 }}
src={`https://dnvn.ir/api/v1/file/${data.product.book.fileIds}`}
alt={data.product.book.name}
/>
@ -174,80 +175,19 @@ const Item = (props) => {
همراه با:
{data.product.book.items || "کد فعالسازی محتوای الکترونیک"}
</span>
{route !== "callback" ? (
<div className="mobile-cart-table-product__info--delete d-flex align-items-center align-self-end">
<span
onClick={() =>
pushToCart({
productId: data.productId,
userId: id,
count: -data.count,
})
}
style={{
fontSize: fontSize.mobile.delete.span,
color: "#FC120A",
cursor: "pointer",
}}
>
حذف
</span>
</div>
) : null}
</div>
</div>
</TableCell>
<TableCell>
<div className="mobile-cart-table-price d-flex flex-column align-items-center">
<div className="mobile-cart-table-price__price d-flex flex-column justify-content-center align-items-center">
<strong style={{ fontSize: fontSize.mobile.price.strong }}>
{data.product.price * data.count || "1000"}
<strong style={{ fontSize: 14 }}>
{data.product.price * data.count || "1000"} تومان
</strong>
{route !== "callback" ? (
<span style={{ fontSize: fontSize.mobile.price.span }}>
{data.product.price || "100"} قیمت هر واحد
</span>
) : null}
</div>
{route === "cart" ? (
<div className="mobile-cart-table-price__counter d-flex justify-content-around align-items-center">
<button
onClick={() =>
pushToCart(
{
productId: data.productId,
userId: id,
count: 1,
},
{},
{ id: data.factorId }
)
}
style={{ fontSize: fontSize.mobile.counter.button }}
>
+
</button>
<span style={{ fontSize: fontSize.mobile.counter.span }}>
{data.count}
</span>
<button
onClick={() =>
data.count > 0
? pushToCart(
{
productId: data.productId,
userId: id,
count: -1,
},
{},
{ id: data.factorId }
)
: null
}
style={{ fontSize: fontSize.mobile.counter.button }}
>
-
</button>
<span style={{ fontSize: 12 }}>{data.count} عدد</span>
</div>
) : null}
</div>
@ -255,7 +195,7 @@ const Item = (props) => {
{route === "callback" ? (
<TableCell>
<strong className="d-flex justify-content-center align-items-center">
{data.count}
{data.count} عدد
</strong>
</TableCell>
) : null}

@ -5,7 +5,7 @@ import TextField from "@material-ui/core/TextField";
const useStyles = makeStyles((theme) => ({
root: {
"& .MuiTextField-root": {
margin: theme.spacing(0),
margin: 5,
width: "100%",
},
},
@ -13,7 +13,7 @@ const useStyles = makeStyles((theme) => ({
export default function MultilineTextFields(props) {
const classes = useStyles();
const { parent, defaultValue } = props;
const { parent, defaultValue, required } = props;
return (
<form className={classes.root} noValidate autoComplete="off">
<TextField
@ -25,6 +25,7 @@ export default function MultilineTextFields(props) {
defaultValue={defaultValue || ""}
name={props.name}
variant="outlined"
required={required}
/>
</form>
);

@ -1,6 +1,6 @@
import React, { Component } from "react";
import { connect } from "react-redux";
import { transport, userFactor } from "~/Redux/actions";
import { transport, userFactor, publicApi } from "~/Redux/actions";
import Navbar from "../Home/Navbar/index";
import Footer from "../Home/Footer/index";
@ -80,6 +80,9 @@ class Cart extends Component {
componentDidMount() {
window.scrollTo(0, 0);
this.props.getProvince();
if (this.props.factorInfo?.provinceId)
this.props.getCity({ provinceId: this.props.factorInfo.provinceId });
this.props.getTransportList();
this.props.getFactorInfo({});
}
@ -99,7 +102,12 @@ class Cart extends Component {
}));
}
};
onChange(name, value) {}
onChange(name, value) {
if (name === "provinceId") {
this.props.getCity({ provinceId: value });
}
this.setState({ [name]: value });
}
handleDelete = (id) => {
let list = this.state.list.filter((item) => item.id !== id);
this.setState({
@ -116,7 +124,16 @@ class Cart extends Component {
};
render() {
const { list, payPrice, payMethods, factorInfo, userId } = this.props;
const { list, payPrice, payMethods, factorInfo } = this.props;
const {
description,
provinceId,
cityId,
recieverName,
recieverPhone,
recieverAddress,
recieverPostalCode,
} = { ...factorInfo, ...this.state };
if (!factorInfo || list.length === 0)
return (
<div
@ -170,80 +187,74 @@ class Cart extends Component {
جزئیات صورتحساب
</h1>
</header>
<span>مشخصات تحویل گیرنده</span>
<br />
<div className="d-flex">
<div class="checkout__forms--right">
<Input
name="firstName"
name="recieverName"
label={"نام و نام خانوادگی"}
parent={this}
// defaultValue={profile}
defaultValue={factorInfo.recieverName}
onInput={onInput.persianOnly}
required
/>
<div className="mt-2" style={{ minWidth: "100%" }}>
<Select
parent={this}
options={this.props.provinceList}
name="provinceId"
label={"استان"}
selectedOptions={this.state.provinceId}
selectedOptions={provinceId}
required
/>
</div>
<Input
parent={this}
name="postalCode"
name="recieverPostalCode"
label={"کد پستی"}
align="left"
maxLength={10}
inputMode="numeric"
// defaultValue={profile}
defaultValue={factorInfo.recieverPostalCode}
onInput={onInput.numberOnly}
/>{" "}
required
/>
<div className="mt-2">
<TextArea
parent={this}
label={"آدرس محل سکونت"}
name="address"
// defaultValue={profile}
label={"آدرس "}
name="recieverAddress"
defaultValue={factorInfo.recieverAddress}
required
/>
</div>
</div>
<div class="checkout__forms--left">
<Input
label={"شماره تماس"}
name={"cellphone"}
name={"recieverPhone"}
parent={this}
defaultValue={factorInfo.recieverPhone}
required
/>
<div className="mt-2">
<Select
parent={this}
options={this.props.cityList}
name="cityId"
label={"شهرستان"}
selectedOptions={this.state.cityId}
/>
</div>
<Input
parent={this}
name="postalCode"
label={"کد پستی"}
align="left"
maxLength={10}
inputMode="numeric"
// defaultValue={profile}
onInput={onInput.numberOnly}
selectedOptions={cityId}
required
/>
<div className="mt-2">
<div style={{ height: "60px" }}> </div>
<TextArea
parent={this}
label={"توضیحات"}
name="description"
// defaultValue={profile}
defaultValue={factorInfo.description}
/>
</div>
</div>
</div>
</section>
<section className="cart__left d-flex flex-column p-3">
{factorInfo.transportId ? (
@ -307,7 +318,17 @@ class Cart extends Component {
</div> */}
<button
className="cart__left--submit"
onClick={() => this.props.payFactor({ userId: userId })}
onClick={() =>
this.props.payFactor({
provinceId,
cityId,
recieverName,
recieverPhone,
recieverAddress,
recieverPostalCode,
description,
})
}
>
پرداخت
</button>
@ -332,7 +353,7 @@ class Cart extends Component {
{window.location.search.includes("NOK") ? (
<div>پرداخت شما با خطا مواجه شد ، لطفا مجدد تلاش نمایید</div>
) : null}
<h1 style={{ fontSize: fontSize.mobile.h1 }}>جزئیات صورتحساب</h1>
<h1 style={{ fontSize: 19 }}>جزئیات صورتحساب</h1>
<div className="d-flex">
<Table
list={list}
@ -342,6 +363,71 @@ class Cart extends Component {
route={"cart"}
/>
</div>
<span>مشخصات تحویل گیرنده</span>
<br />
<div className="d-flex">
<div class="checkout__forms--right2">
<Input
name="recieverName"
label={"نام و نام خانوادگی"}
parent={this}
defaultValue={factorInfo.recieverName}
onInput={onInput.persianOnly}
required
/>
<Input
label={"شماره تماس"}
name={"recieverPhone"}
parent={this}
defaultValue={factorInfo.recieverPhone}
required
/>
<Select
parent={this}
options={this.props.provinceList}
name="provinceId"
label={"استان"}
selectedOptions={provinceId}
required
/>
<Select
parent={this}
options={this.props.cityList}
name="cityId"
label={"شهرستان"}
selectedOptions={cityId}
required
/>
<Input
parent={this}
name="recieverPostalCode"
label={"کد پستی"}
align="left"
maxLength={10}
inputMode="numeric"
defaultValue={factorInfo.recieverPostalCode}
onInput={onInput.numberOnly}
required
/>
<div className="mt-2">
<TextArea
parent={this}
label={"آدرس "}
name="recieverAddress"
defaultValue={factorInfo.recieverAddress}
required
/>
</div>
<TextArea
parent={this}
label={"توضیحات"}
name="description"
defaultValue={factorInfo.description}
/>
</div>
</div>
{factorInfo.transportId ? (
<div className="mobile-cart__payMethods d-flex flex-column">
<h2 style={{ fontSize: fontSize.mobile.h2 }}>روشهای ارسال</h2>
@ -399,9 +485,20 @@ class Cart extends Component {
پرداخت
</button> */}
<Link
style={{ textAlign: "center", textDecoration: "none" }}
to="/checkout"
className="mobile-cart__submit"
// onClick={() => this.props.payFactor({ userId: userId })}
onClick={() =>
this.props.payFactor({
provinceId,
cityId,
recieverName,
recieverPhone,
recieverAddress,
recieverPostalCode,
description,
})
}
>
پرداخت
</Link>
@ -440,5 +537,7 @@ export default connect(
getFactorInfo: userFactor.info,
payFactor: userFactor.payment,
getVerify: userFactor.verify,
getProvince: publicApi.getProvince,
getCity: publicApi.getCity,
}
)(Cart);

@ -118,107 +118,13 @@
justify-content: space-between;
margin-top: 30px;
margin-bottom: 80px;
&--right {
width: 45%;
.MuiOutlinedInput-notchedOutline {
top: 0px !important;
}
.MuiOutlinedInput-notchedOutline {
border-color: #cecece !important;
border-width: 1px !important;
color: green !important;
border-radius: 10px !important;
}
.MuiOutlinedInput-input {
padding: 20px 14px !important;
font-size: calc(100vw / 85) !important;
}
.MuiInputLabel-outlined {
font-family: numeralLight !important;
display: inline !important;
position: absolute;
text-align: right !important;
right: 10px;
top: 12px;
padding: 0px !important;
transform: translate(0px, 0px) scale(1) !important;
}
.MuiInputLabel-shrink {
text-align: right !important;
display: inline;
position: absolute;
right: -5px;
top: -8px;
transform: translate(0px, 0px) scale(0.75) !important;
padding-right: 15px !important;
&--right,
&--left,
&--right2 {
.MuiSelect-select {
padding: 14px !important;
}
label {
background-color: white;
max-width: 120px;
text-align: center;
color: #797979 !important;
letter-spacing: -1px;
}
.Mui-focused {
color: rgba(0, 0, 0, 0.54) !important;
border-color: #c4c4c5 !important;
}
h1 {
letter-spacing: -2px;
color: #6cbe44;
font-family: numeralMedium;
font-size: calc(100vw / 40);
}
p {
font-family: numeralLight;
font-size: calc(100vw / 95);
color: #6f7074;
}
button {
align-self: flex-start;
margin-top: 30px;
font-family: numeralLight;
text-decoration: none;
color: white;
background-color: #6cbe44;
border-radius: 6px;
padding: 5px 25px;
font-size: calc(100vw / 90);
max-width: 110px;
border: 0px;
&:hover {
color: white;
}
}
.MuiFormControl-root {
select {
font-family: numeralLight;
height: 100%;
direction: rtl;
border: 1px solid #cecece !important;
text-align: center !important;
border-radius: 10px !important;
color: #76797e !important;
&:focus {
background-color: white !important;
}
option {
padding: 5px !important;
}
}
.MuiNativeSelect-icon {
display: none;
}
.MuiNativeSelect-select {
padding: 8px 10px 8px 100px !important;
}
}
}
&--left {
padding: 5px;
width: 45%;
.MuiOutlinedInput-notchedOutline {
top: 0px !important;
@ -231,8 +137,8 @@
}
.MuiOutlinedInput-input {
padding: 20px 14px !important;
font-size: calc(100vw / 85) !important;
padding: 20px 14px;
font-size: 12 !important;
}
.MuiInputLabel-outlined {
font-family: numeralLight !important;
@ -318,6 +224,9 @@
}
}
}
&--right2 {
width: 95%;
}
}
}
@ -346,9 +255,6 @@
border-radius: 10px !important;
}
.MuiOutlinedInput-input {
padding: 20px 14px !important;
}
.MuiInputLabel-outlined {
font-family: numeralLight !important;
display: inline !important;

@ -18,6 +18,7 @@ export default function FormPropsTextFields({
name,
label,
multiline,
required,
}) {
const classes = useStyles();
@ -31,6 +32,7 @@ export default function FormPropsTextFields({
label={label}
variant="outlined"
onChange={(e) => parent.onChange(name, e.target.value)}
required={required}
/>
</div>
</form>

@ -47,8 +47,8 @@ export default function CustomizedSelects(props) {
input={<BootstrapInput />}
>
{props.options.map((item, i) => (
<option key={i} value={item}>
{item}
<option key={i} value={item[0]}>
{item[1]}
</option>
))}
</NativeSelect>

@ -104,47 +104,8 @@ class Contact extends Component {
!loading ? (
<div className="mobile-contact d-flex flex-column align-items-center">
<Navbar page={"contact"} />
<div className="mobile-contact__form d-flex flex-column">
<h1 style={{ fontSize: fontSize.mobile.h1 }}>تماس با ما</h1>
<p style={{ fontSize: fontSize.mobile.p }}>
برای ارتباط با دنیای شگفت انگیز دانوین از فرم زیر استفاده کنید
و پس از انتخاب دپارتمان مد نظر پیام خود را ارسال کنید.
</p>
<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="text"
rows="5"
></textarea>
<button>ارسال</button>
</div>
<Support />
<div className="mobile-contact__address d-flex flex-column">
<div className="mobile-contact__address--location d-flex align-items-center">
<img src={location} alt="آدرس" className="m-1" />

@ -102,7 +102,10 @@ class LaptopNavbar extends Component {
<Link to={"/profile"}>ویرایش مشخصات</Link>
</MenuItem>
<MenuItem onClick={() => this.setState({ dropdown: false })}>
<Link to={"/newProfile"}>افزودن حساب</Link>
<Link to={"/orders"}>پیگری سفارشات</Link>
</MenuItem>
<MenuItem onClick={() => this.setState({ dropdown: false })}>
<Link to={"/myBooks"}>کتاب های من</Link>
</MenuItem>
<MenuItem
onClick={() => {
@ -127,9 +130,9 @@ class LaptopNavbar extends Component {
style={{ fontSize: "13px" }}
>
{status.firstName + " " + status.lastName}
</div>
</div>{" "}
<Avatar
style={{ width: 40, height: 40 }}
style={{ width: 40, height: 40, marginRight: 10 }}
alt="Remy Sharp"
src={
status.picFileId

@ -74,13 +74,15 @@ class Product extends Component {
</div>
</div>
<div className="d-flex" style={{ width: "100%", opacity: 0.3 }}>
<Link
<span
to={`/products/digital/${product.id}`}
className="mobile-products-product__links--ar d-flex justify-content-between align-items-center"
>
<h2> الکترونیکی</h2>
<span>{product.product[0].price} تومان</span>
</Link>
{/* <span>{product.product[0].price} تومان</span> */}
<span> به زودی</span>
</span>
<div
className="mobile-products-product__links--basket d-flex"
// onClick={() => {
@ -142,16 +144,16 @@ class Product extends Component {
</div>
</div>
<div className="d-flex" style={{ width: "100%", opacity: 0.3 }}>
<Link
// to={`/products/digital/${product.id}`}
<div
to={`/products/digital/${product.id}`}
className="products-product--ar d-flex justify-content-between align-items-center"
>
<h2 style={{ fontSize: 12 }}>نسخه الکترونیک</h2>
<span style={{ fontSize: 12 }}>
{product.product[0].price} تومان
{/* {product.product[0].price} تومان */}
به زودی
</span>
</Link>
</div>
<div
className="products-product--basket d-flex"
// onClick={() => {

@ -1,5 +1,5 @@
import React, { Component } from "react";
import ReactPlayer from "react-player";
import "./index.scss";
class VideoApp extends Component {
player = {};
@ -41,7 +41,26 @@ class VideoApp extends Component {
render() {
return (
// <div style={{ width: "100%", height: "100%" }}>
<video controls={true} src={this.state.video.src} type="video/mp4" />
<ReactPlayer
height="100%"
width={"100%"}
url={this.state.video.src}
type="video/mp4"
autoplay={true}
controls
playing
light
config={{
file: {
attributes: {
disablePictureInPicture: true,
controlsList:
"nodownload nofullscreen noremoteplayback noplaybackrate",
},
},
}}
// controlsList="nofullscreen"
/>
// </div>
);
}

@ -1,4 +1,7 @@
.video-js {
video::-webkit-media-controls-fullscreen-button {
display: none;
}
// width: 100% !important;
// height: 100% !important;
border-radius: 20px;

@ -81,6 +81,8 @@ class Support extends Component {
render() {
let { myProductList, status } = this.props;
console.log({ myProductList });
let opt = ["واحد مورد نظر", "واحد فروش", "واحد فنی", "واحد محتوایی"];
opt = opt.map((e) => [e, e]);
return (
<>
<div className="mobile-support d-flex flex-column align-items-center">
@ -102,33 +104,40 @@ class Support extends Component {
</>
)}
<Select
required
name="unit"
options={
status && this.props.myProductList?.length
? ["واحد مورد نظر", "واحد فروش", "واحد محتوایی", "واحد فنی"]
: ["واحد مورد نظر", "واحد فروش", "واحد فنی"]
? opt
: opt.slice(0, 3)
}
parent={this}
/>
{this.state.unit === "واحد محتوایی" ? (
<Select
required
name="bookId"
options={[
"انتخاب کتاب",
...new Set(
this.props.myProductList?.map(
(item) =>
this.props.myProductList?.map((item) => [
item.product.book.id,
`${item.product.book.name} پایه ${
grades[item.product.book.gradeId]
}`
) || []
}`,
]) || []
),
]}
parent={this}
/>
) : null}
<Input label={"موضوع "} name={"subject"} parent={this} />
<Input label={"متن"} name={"text"} parent={this} multiline />
<Input label={"موضوع "} name={"subject"} parent={this} required />
<Input
label={"متن"}
name={"text"}
parent={this}
multiline
required
/>
{/* <textarea placeholder="متن " name="text" rows="8" o></textarea> */}
<Upload

24838
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save