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