|
|
@ -8,10 +8,23 @@ import Select from "../Contact/Select/index"; |
|
|
|
import Upload from "./Upload"; |
|
|
|
import Upload from "./Upload"; |
|
|
|
import "./index.scss"; |
|
|
|
import "./index.scss"; |
|
|
|
import { connect } from "react-redux"; |
|
|
|
import { connect } from "react-redux"; |
|
|
|
|
|
|
|
|
|
|
|
const maxDesktopSize = 1250; |
|
|
|
const maxDesktopSize = 1250; |
|
|
|
const maxMobileSize = 550; |
|
|
|
const maxMobileSize = 550; |
|
|
|
|
|
|
|
const grades = [ |
|
|
|
|
|
|
|
"پیش دبستان", |
|
|
|
|
|
|
|
"اول", |
|
|
|
|
|
|
|
"دوم", |
|
|
|
|
|
|
|
"سوم", |
|
|
|
|
|
|
|
"چهارم", |
|
|
|
|
|
|
|
"پنجم", |
|
|
|
|
|
|
|
"ششم", |
|
|
|
|
|
|
|
"هفتم", |
|
|
|
|
|
|
|
"هشتم", |
|
|
|
|
|
|
|
"نهم", |
|
|
|
|
|
|
|
"دهم", |
|
|
|
|
|
|
|
"یازدهم", |
|
|
|
|
|
|
|
"دوازدهم", |
|
|
|
|
|
|
|
]; |
|
|
|
const fontSize = { |
|
|
|
const fontSize = { |
|
|
|
desktop: { |
|
|
|
desktop: { |
|
|
|
h1: window.innerWidth > maxDesktopSize ? 30 : window.innerWidth / 40, |
|
|
|
h1: window.innerWidth > maxDesktopSize ? 30 : window.innerWidth / 40, |
|
|
@ -66,13 +79,18 @@ class Support extends Component { |
|
|
|
//todo redirectHome
|
|
|
|
//todo redirectHome
|
|
|
|
} |
|
|
|
} |
|
|
|
render() { |
|
|
|
render() { |
|
|
|
let { status } = this.props; |
|
|
|
let { myProductList, status } = this.props; |
|
|
|
|
|
|
|
console.log({ myProductList }); |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
<div className="mobile-support d-flex flex-column align-items-center"> |
|
|
|
<div className="mobile-support d-flex flex-column align-items-center"> |
|
|
|
<Navbar page={"support"} /> |
|
|
|
<Navbar page={"support"} /> |
|
|
|
<div className="mobile-support__form d-flex flex-column"> |
|
|
|
<div className="mobile-support__form d-flex flex-column"> |
|
|
|
<h1 style={{ fontSize: fontSize.mobile.h1 }}>پشتیبانی</h1> |
|
|
|
<h1 style={{ fontSize: fontSize.mobile.h1 }}>پشتیبانی</h1> |
|
|
|
|
|
|
|
<p> |
|
|
|
|
|
|
|
برای ارتباط با دنیای شگفت انگیز دانوین از فرم زیر استفاده کنید و |
|
|
|
|
|
|
|
پس از انتخاب دپارتمان مد نظر پیام خود را ارسال کنید. |
|
|
|
|
|
|
|
</p> |
|
|
|
{status ? null : ( |
|
|
|
{status ? null : ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
<Input |
|
|
|
<Input |
|
|
@ -86,7 +104,7 @@ class Support extends Component { |
|
|
|
<Select |
|
|
|
<Select |
|
|
|
name="unit" |
|
|
|
name="unit" |
|
|
|
options={ |
|
|
|
options={ |
|
|
|
status |
|
|
|
status && this.props.myProductList.length |
|
|
|
? ["واحد مورد نظر", "واحد فروش", "واحد محتوایی", "واحد فنی"] |
|
|
|
? ["واحد مورد نظر", "واحد فروش", "واحد محتوایی", "واحد فنی"] |
|
|
|
: ["واحد مورد نظر", "واحد فروش", "واحد فنی"] |
|
|
|
: ["واحد مورد نظر", "واحد فروش", "واحد فنی"] |
|
|
|
} |
|
|
|
} |
|
|
@ -96,10 +114,13 @@ class Support extends Component { |
|
|
|
<Select |
|
|
|
<Select |
|
|
|
name="bookId" |
|
|
|
name="bookId" |
|
|
|
options={[ |
|
|
|
options={[ |
|
|
|
"کتاب", |
|
|
|
"انتخاب کتاب", |
|
|
|
...new Set( |
|
|
|
...new Set( |
|
|
|
this.props.myProductList?.map( |
|
|
|
this.props.myProductList?.map( |
|
|
|
(item) => item.product.book.name |
|
|
|
(item) => |
|
|
|
|
|
|
|
`${item.product.book.name} پایه ${ |
|
|
|
|
|
|
|
grades[item.product.book.gradeId] |
|
|
|
|
|
|
|
}` |
|
|
|
) || [] |
|
|
|
) || [] |
|
|
|
), |
|
|
|
), |
|
|
|
]} |
|
|
|
]} |
|
|
@ -127,12 +148,12 @@ class Support extends Component { |
|
|
|
|
|
|
|
|
|
|
|
export default connect( |
|
|
|
export default connect( |
|
|
|
(state) => ({ |
|
|
|
(state) => ({ |
|
|
|
myProductList: state.userProduct.mylist || [], |
|
|
|
myProductList: state.userProduct.myList, |
|
|
|
status: state.user.status, |
|
|
|
status: state.user.status, |
|
|
|
uploadFileId: state.file.supportFileId, |
|
|
|
uploadFileId: state.file.supportFileId, |
|
|
|
}), |
|
|
|
}), |
|
|
|
{ |
|
|
|
{ |
|
|
|
getUserProductList: userProduct.mylist, |
|
|
|
getUserProductList: userProduct.myList, |
|
|
|
submit: comment.add, |
|
|
|
submit: comment.add, |
|
|
|
upload: file.upload, |
|
|
|
upload: file.upload, |
|
|
|
} |
|
|
|
} |
|
|
|