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. 199
      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. 31
      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 urlsToCache = ["index.html", "offline.html"];
const self = this; const self = this;

@ -81,7 +81,13 @@ class Proxy {
this.post(url, params, { this.post(url, params, {
dispatch: (obj) => { dispatch: (obj) => {
let login = obj.data; 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("refresh", login.refreshToken);
localStorage.setItem("access", login.accessToken); localStorage.setItem("access", login.accessToken);
delete login.refreshToken; delete login.refreshToken;

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

@ -14,8 +14,8 @@
display: inline; display: inline;
letter-spacing: -2px; letter-spacing: -2px;
font-family: numeralMedium; font-family: numeralMedium;
background-color: #00cc69; // background-color: #00cc69;
color: white; color: #00cc69;
text-align: center; text-align: center;
} }
p { p {
@ -34,14 +34,13 @@
justify-content: space-between; justify-content: space-between;
&--right { &--right {
align-items: center; align-items: center;
width: 45%; width: 50%;
.right-top { .right-top {
h1 { h1 {
display: inline; display: inline;
letter-spacing: -2px; letter-spacing: -2px;
font-family: numeralMedium; font-family: numeralMedium;
background-color: #00cc69; color: #00cc69;
color: white;
} }
p { p {
margin-top: 10px; margin-top: 10px;
@ -52,21 +51,21 @@
} }
} }
.right-bottom { .right-bottom {
margin: 20px 60px 20px 0px; margin: 20px 30px 20px 0px;
h2 { h2 {
display: inline; display: inline;
font-family: numeralMedium; font-family: numeralMedium;
background-color: #00cc69; color: #00cc69;
color: white;
} }
ul { ul {
margin: 0px; margin: 0px;
list-style: none; // list-style: none;
padding: 0px; padding: 0px;
margin-top: 5px; margin-top: 5px;
li { li {
display: inline; // display: inline;
border-bottom: 2px solid #00cc69; // margin-bottom: 10px;
// border-bottom: 2px solid #00cc69;
font-family: numeralLight; font-family: numeralLight;
color: #6d6d6d; color: #6d6d6d;
} }
@ -78,7 +77,8 @@
height: 100%; height: 100%;
position: relative; position: relative;
& img { & img {
position: absolute; border-radius: 15px;
// position: absolute;
} }
&__1 { &__1 {
top: 100px; top: 100px;
@ -113,36 +113,38 @@
&__advantages { &__advantages {
width: 100%; width: 100%;
height: 300px; height: 300px;
margin-top: 50px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
justify-content: space-around; justify-content: space-around;
&--right { &--right {
width: 48%; width: 48%;
height: 100%; height: 100%;
& img { & img {
border-radius: 15px;
width: 100%; width: 100%;
} }
} }
&--left { &--left {
padding-top: 20px; padding-right: 20px;
padding-top: 0px;
width: 48%; width: 48%;
height: 100%; height: 100%;
align-items: flex-end; align-items: flex-end;
margin-top: 20px; margin-top: 5px;
h1 { h1 {
display: inline; display: inline;
font-family: numeralMedium; font-family: numeralMedium;
background-color: #00cc69; color: #00cc69;
color: white;
} }
ul { ul {
margin: 0px; margin: 0px;
list-style: none; // list-style: none;
padding: 0px; padding: 0px;
margin-top: 5px; margin-top: 5px;
li { li {
display: inline; // display: inline;
text-align: justify; text-align: justify;
font-family: numeralLight; font-family: numeralLight;
color: #6d6d6d; color: #6d6d6d;
} }
@ -164,8 +166,7 @@
display: inline; display: inline;
letter-spacing: -2px; letter-spacing: -2px;
font-family: numeralMedium; font-family: numeralMedium;
background-color: #00cc69; color: #00cc69;
color: white;
} }
p { p {
margin-top: 10px; margin-top: 10px;
@ -180,6 +181,7 @@
height: 330px; height: 330px;
width: 100%; width: 100%;
& img { & img {
border-radius: 15px;
position: absolute; position: absolute;
} }
&--1 { &--1 {
@ -224,17 +226,17 @@
h2 { h2 {
display: inline; display: inline;
font-family: numeralMedium; font-family: numeralMedium;
background-color: #00cc69; color: #00cc69;
color: white;
} }
ul { ul {
margin: 0px; margin: 0px;
list-style: none; // list-style: none;
padding: 0px; padding: 0px;
margin-top: 5px; margin-top: 5px;
li { li {
display: inline; // display: inline;
border-bottom: 2px solid #00cc69; // padding-bottom: 5px;
// border-bottom: 2px solid #00cc69;
font-family: numeralLight; font-family: numeralLight;
color: #6d6d6d; color: #6d6d6d;
} }
@ -242,6 +244,7 @@
} }
&__video { &__video {
img { img {
border-radius: 15px;
width: 100%; width: 100%;
} }
} }
@ -250,17 +253,16 @@
h1 { h1 {
display: inline; display: inline;
font-family: numeralMedium; font-family: numeralMedium;
background-color: #00cc69; color: #00cc69;
color: white;
// margin-bottom: 20px; // margin-bottom: 20px;
} }
ul { ul {
margin: 0px; margin: 0px;
list-style: none; // list-style: none;
padding: 0px; padding: 0px;
margin-top: 5px; margin-top: 5px;
li { li {
display: inline; // display: inline;
text-align: justify; text-align: justify;
font-family: numeralLight; font-family: numeralLight;
color: #6d6d6d; 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", border: selectedOption === 2 ? "0px" : "1px solid #ccc",
borderTopRightRadius: 10, borderTopRightRadius: 10,
borderBottomRightRadius: 10, borderBottomRightRadius: 10,
borderLeft: window.innerWidth > 1000 ? "1px solid #ccc" : "0px", // borderLeft: window.innerWidth > 1000 ? "1px solid #ccc" : "0px",
}, },
}; };
return ( return (

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

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

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

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

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

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

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

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

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

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

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

@ -118,107 +118,13 @@
justify-content: space-between; justify-content: space-between;
margin-top: 30px; margin-top: 30px;
margin-bottom: 80px; margin-bottom: 80px;
&--right { &--right,
width: 45%; &--left,
.MuiOutlinedInput-notchedOutline { &--right2 {
top: 0px !important; .MuiSelect-select {
} padding: 14px !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;
}
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 { padding: 5px;
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 {
width: 45%; width: 45%;
.MuiOutlinedInput-notchedOutline { .MuiOutlinedInput-notchedOutline {
top: 0px !important; top: 0px !important;
@ -231,8 +137,8 @@
} }
.MuiOutlinedInput-input { .MuiOutlinedInput-input {
padding: 20px 14px !important; padding: 20px 14px;
font-size: calc(100vw / 85) !important; font-size: 12 !important;
} }
.MuiInputLabel-outlined { .MuiInputLabel-outlined {
font-family: numeralLight !important; font-family: numeralLight !important;
@ -318,6 +224,9 @@
} }
} }
} }
&--right2 {
width: 95%;
}
} }
} }
@ -346,9 +255,6 @@
border-radius: 10px !important; border-radius: 10px !important;
} }
.MuiOutlinedInput-input {
padding: 20px 14px !important;
}
.MuiInputLabel-outlined { .MuiInputLabel-outlined {
font-family: numeralLight !important; font-family: numeralLight !important;
display: inline !important; display: inline !important;

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

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

@ -104,47 +104,8 @@ class Contact extends Component {
!loading ? ( !loading ? (
<div className="mobile-contact d-flex flex-column align-items-center"> <div className="mobile-contact d-flex flex-column align-items-center">
<Navbar page={"contact"} /> <Navbar page={"contact"} />
<div className="mobile-contact__form d-flex flex-column">
<h1 style={{ fontSize: fontSize.mobile.h1 }}>تماس با ما</h1> <Support />
<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>
<div className="mobile-contact__address d-flex flex-column"> <div className="mobile-contact__address d-flex flex-column">
<div className="mobile-contact__address--location d-flex align-items-center"> <div className="mobile-contact__address--location d-flex align-items-center">
<img src={location} alt="آدرس" className="m-1" /> <img src={location} alt="آدرس" className="m-1" />

@ -102,7 +102,10 @@ class LaptopNavbar extends Component {
<Link to={"/profile"}>ویرایش مشخصات</Link> <Link to={"/profile"}>ویرایش مشخصات</Link>
</MenuItem> </MenuItem>
<MenuItem onClick={() => this.setState({ dropdown: false })}> <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>
<MenuItem <MenuItem
onClick={() => { onClick={() => {
@ -127,9 +130,9 @@ class LaptopNavbar extends Component {
style={{ fontSize: "13px" }} style={{ fontSize: "13px" }}
> >
{status.firstName + " " + status.lastName} {status.firstName + " " + status.lastName}
</div> </div>{" "}
<Avatar <Avatar
style={{ width: 40, height: 40 }} style={{ width: 40, height: 40, marginRight: 10 }}
alt="Remy Sharp" alt="Remy Sharp"
src={ src={
status.picFileId status.picFileId

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

@ -1,5 +1,5 @@
import React, { Component } from "react"; import React, { Component } from "react";
import ReactPlayer from "react-player";
import "./index.scss"; import "./index.scss";
class VideoApp extends Component { class VideoApp extends Component {
player = {}; player = {};
@ -41,7 +41,26 @@ class VideoApp extends Component {
render() { render() {
return ( return (
// <div style={{ width: "100%", height: "100%" }}> // <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> // </div>
); );
} }

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

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

24838
yarn.lock

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