update 42 files

front
amir hosein gorji 2 years ago
parent 8c9ec9bbb2
commit 1d1fa3e99c
  1. 8
      src/Redux/reducers/book.js
  2. 7
      src/Redux/reducers/public.js
  3. 6
      src/views/Auth/Login/Cellphone/index.js
  4. 11
      src/views/Auth/Login/Code/index.js
  5. 12
      src/views/Auth/Profile/Birthdate/index.js
  6. 22
      src/views/Auth/Profile/index.js
  7. 8
      src/views/Auth/Splash/index.js
  8. 4
      src/views/ChatList/Search/index.js
  9. 2
      src/views/ChatRoom/Body/Input/index.js
  10. 2
      src/views/ChatRoom/Body/Message/Comment/index.js
  11. 2
      src/views/ChatRoom/Body/Message/Normal/index.js
  12. 8
      src/views/ChatRoom/Info/index.js
  13. 4
      src/views/Checkout/index.js
  14. 24
      src/views/Contact/index.js
  15. 2
      src/views/Download/index.js
  16. 4
      src/views/Faq/index.js
  17. 32
      src/views/Home/Footer/index.js
  18. 29
      src/views/Home/HomeHeader/index.js
  19. 2
      src/views/Home/HomeScroll/index.js
  20. 4
      src/views/Home/HomeSearch/Select/index.js
  21. 8
      src/views/Home/HomeSearch/index.js
  22. 2
      src/views/Home/HomeSlider/Blog/index.js
  23. 8
      src/views/Home/HomeSlider/index.js
  24. 6
      src/views/Home/HomeStatic/index.js
  25. 4
      src/views/Home/Membership/index.js
  26. 4
      src/views/Home/Navbar/Laptop/index.js
  27. 38
      src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.js
  28. 16
      src/views/Home/Navbar/Mobile/index.js
  29. 42
      src/views/NewProfile/index.js
  30. 9
      src/views/Orders/index.js
  31. 64
      src/views/Product/Gallery/Modal/index.js
  32. 4
      src/views/Product/MaterialModal/index.js
  33. 20
      src/views/Product/index.js
  34. 4
      src/views/Products/Filters/index.js
  35. 2
      src/views/Products/Select/index.js
  36. 4
      src/views/Products/index.js
  37. 2
      src/views/QR/SubjectsDropdown/index.js
  38. 2
      src/views/QR/index.js
  39. 4
      src/views/QRScan/Modal/index.js
  40. 2
      src/views/Sample/index.js
  41. 13
      src/views/Support/index.js

@ -9,7 +9,11 @@ const initialState = {
filterResult: [], filterResult: [],
subjects: [], subjects: [],
levels: [], levels: [],
sortFilters: [window.t("مرتب سازی"), window.t("محبوب ترین"), window.t("جدیدترین")], sortFilters: [
window.t("مرتب سازی"),
window.t("محبوب ترین"),
window.t("جدیدترین"),
],
}; };
const grades = [ const grades = [
@ -42,7 +46,7 @@ export default function book(state = initialState, action) {
.sort((a, b) => a - b) .sort((a, b) => a - b)
.map((e) => grades[e]); .map((e) => grades[e]);
if (window.innerWidth < 1000) { if (window.innerWidth < 1000) {
itemsLevel.unshift(window.t(window.t("پایه تحصیلی"))); itemsLevel.unshift(window.t("پایه تحصیلی"));
} }
return { return {
...state, ...state,

@ -52,7 +52,7 @@ export default function publicApi(state = initialState, action) {
.sort((a, b) => a - b) .sort((a, b) => a - b)
.map((e) => grades[e]) .map((e) => grades[e])
: []; : [];
itemsLevel.unshift(window.t(window.t("پایه تحصیلی"))); itemsLevel.unshift(window.t("پایه تحصیلی"));
// } // }
return { return {
@ -69,8 +69,9 @@ export default function publicApi(state = initialState, action) {
case "public/filter": case "public/filter":
const realList = const realList =
state.newProducts.length === 0 state.newProducts.length === 0
? state.homeData.filter((item) => item.title === window.t("کتابهای دانوین"))[0] ? state.homeData.filter(
.data (item) => item.title === window.t("کتابهای دانوین")
)[0].data
: state.newProducts; : state.newProducts;
if (state.newProducts.length === 0) { if (state.newProducts.length === 0) {
state = { state = {

@ -48,7 +48,7 @@ export default class Cellphone extends Component {
} }
> >
<span style={{ fontSize: fontSize.desktop.span }}>09</span> <span style={{ fontSize: fontSize.desktop.span }}>09</span>
<img src={iran} alt=window.t("پرچم") /> <img src={iran} alt={window.t("پرچم")} />
<input <input
style={{ fontSize: fontSize.desktop.span }} style={{ fontSize: fontSize.desktop.span }}
id="cellphone" id="cellphone"
@ -93,7 +93,7 @@ export default class Cellphone extends Component {
<div style={{ width: "48%", height: "100%", opacity: 0 }}> <div style={{ width: "48%", height: "100%", opacity: 0 }}>
<img <img
src={pic} src={pic}
alt=window.t("عکس") alt={window.t("عکس")}
style={{ width: "100%", height: "100%" }} style={{ width: "100%", height: "100%" }}
/> />
</div> </div>
@ -119,7 +119,7 @@ export default class Cellphone extends Component {
} }
> >
<span style={{ fontSize: fontSize.mobile.span }}>09</span> <span style={{ fontSize: fontSize.mobile.span }}>09</span>
<img src={iran} alt=window.t("پرچم") /> <img src={iran} alt={window.t("پرچم")} />
<input <input
id="cellphone" id="cellphone"
type="text" type="text"

@ -205,13 +205,10 @@ export default class Code extends Component {
بازگشت به مرحله قبل و اصلاح شماره بازگشت به مرحله قبل و اصلاح شماره
</div> </div>
</div> </div>
<div style={{ width: "48%", height: "100%" }} className="d-flex"> <div
{/* <img style={{ width: "48%", height: "100%" }}
src={pic} className="d-flex"
alt=window.t("عکس") ></div>
style={{ width: "100%", height: "100%" }}
/> */}
</div>
</div> </div>
</div> </div>
) : null} ) : null}

@ -31,7 +31,7 @@ export default function Birthdate(props) {
<Input <Input
variant="standard" variant="standard"
name="day" name="day"
placeholder=window.t("روز") placeholder={window.t("روز")}
maxLength={2} maxLength={2}
onInput={onInput.dayHandler} onInput={onInput.dayHandler}
parent={{ onChange }} parent={{ onChange }}
@ -41,7 +41,7 @@ export default function Birthdate(props) {
<Input <Input
variant="standard" variant="standard"
name="month" name="month"
placeholder=window.t("ماه") placeholder={window.t("ماه")}
maxLength={2} maxLength={2}
onInput={onInput.monthHandler} onInput={onInput.monthHandler}
parent={{ onChange }} parent={{ onChange }}
@ -51,7 +51,7 @@ export default function Birthdate(props) {
<Input <Input
variant="standard" variant="standard"
name="year" name="year"
placeholder=window.t("سال") placeholder={window.t("سال")}
maxLength={4} maxLength={4}
onInput={onInput.yearHandler} onInput={onInput.yearHandler}
parent={{ onChange }} parent={{ onChange }}
@ -67,7 +67,7 @@ export default function Birthdate(props) {
<Input <Input
variant="standard" variant="standard"
name="day" name="day"
placeholder=window.t("روز") placeholder={window.t("روز")}
maxLength={2} maxLength={2}
onInput={onInput.dayHandler} onInput={onInput.dayHandler}
parent={{ onChange }} parent={{ onChange }}
@ -77,7 +77,7 @@ export default function Birthdate(props) {
<Input <Input
variant="standard" variant="standard"
name="month" name="month"
placeholder=window.t("ماه") placeholder={window.t("ماه")}
maxLength={2} maxLength={2}
onInput={onInput.monthHandler} onInput={onInput.monthHandler}
parent={{ onChange }} parent={{ onChange }}
@ -87,7 +87,7 @@ export default function Birthdate(props) {
<Input <Input
variant="standard" variant="standard"
name="year" name="year"
placeholder=window.t("سال") placeholder={window.t("سال")}
maxLength={4} maxLength={4}
onInput={onInput.yearHandler} onInput={onInput.yearHandler}
parent={{ onChange }} parent={{ onChange }}

@ -199,7 +199,7 @@ class Profile extends Component {
<div className="mb-2"> <div className="mb-2">
<Input <Input
name="firstName" name="firstName"
label=window.t("نام") label={window.t("نام")}
parent={this} parent={this}
defaultValue={profile} defaultValue={profile}
onInput={onInput.persianOnly} onInput={onInput.persianOnly}
@ -209,7 +209,7 @@ class Profile extends Component {
<div className="mb-2"> <div className="mb-2">
<Input <Input
name="lastName" name="lastName"
label=window.t("نام خانوادگی") label={window.t("نام خانوادگی")}
parent={this} parent={this}
defaultValue={profile} defaultValue={profile}
onInput={onInput.persianOnly} onInput={onInput.persianOnly}
@ -219,7 +219,7 @@ class Profile extends Component {
<div className="mb-2"> <div className="mb-2">
<Input <Input
name="username" name="username"
label=window.t(window.t("نام کاربری")) label={window.t("نام کاربری")}
parent={this} parent={this}
defaultValue={profile} defaultValue={profile}
align="left" align="left"
@ -238,7 +238,7 @@ class Profile extends Component {
<div className="mb-2"> <div className="mb-2">
<Input <Input
name="nationalId" name="nationalId"
label=window.t("کد ملی/اتباع") label={window.t("کد ملی/اتباع")}
parent={this} parent={this}
align="left" align="left"
maxLength={13} maxLength={13}
@ -273,7 +273,7 @@ class Profile extends Component {
parent={this} parent={this}
options={grades} options={grades}
name="gradeIds" name="gradeIds"
label={window.t(window.t("پایه تحصیلی"))} label={window.t("پایه تحصیلی")}
selectedOptions={this.state.gradeIds} selectedOptions={this.state.gradeIds}
/> />
</div> </div>
@ -284,7 +284,7 @@ class Profile extends Component {
parent={this} parent={this}
options={grades} options={grades}
name="gradeIds" name="gradeIds"
label={window.t(window.t("پایه تحصیلی"))} label={window.t("پایه تحصیلی")}
selectedOptions={this.state.gradeIds} selectedOptions={this.state.gradeIds}
/> />
</div> </div>
@ -418,7 +418,7 @@ class Profile extends Component {
<Input <Input
name="firstName" name="firstName"
label=window.t("نام") label={window.t("نام")}
parent={this} parent={this}
defaultValue={profile} defaultValue={profile}
onInput={onInput.persianOnly} onInput={onInput.persianOnly}
@ -426,7 +426,7 @@ class Profile extends Component {
/> />
<Input <Input
name="lastName" name="lastName"
label=window.t("نام خانوادگی") label={window.t("نام خانوادگی")}
parent={this} parent={this}
defaultValue={profile} defaultValue={profile}
onInput={onInput.persianOnly} onInput={onInput.persianOnly}
@ -434,7 +434,7 @@ class Profile extends Component {
/> />
<Input <Input
name="username" name="username"
label=window.t(window.t("نام کاربری")) label={window.t("نام کاربری")}
parent={this} parent={this}
align="left" align="left"
defaultValue={profile} defaultValue={profile}
@ -472,7 +472,7 @@ class Profile extends Component {
parent={this} parent={this}
options={grades} options={grades}
name="gradeIds" name="gradeIds"
label={window.t(window.t("پایه تحصیلی"))} label={window.t("پایه تحصیلی")}
selectedOptions={this.state.gradeIds} selectedOptions={this.state.gradeIds}
/> />
) : null} ) : null}
@ -481,7 +481,7 @@ class Profile extends Component {
parent={this} parent={this}
options={grades} options={grades}
name="gradeIds" name="gradeIds"
label={window.t(window.t("پایه تحصیلی"))} label={window.t("پایه تحصیلی")}
selectedOptions={this.state.gradeIds} selectedOptions={this.state.gradeIds}
/> />
) : null} ) : null}

@ -9,16 +9,18 @@ export default function Splash(props) {
<> <>
{window.innerWidth > 1000 ? ( {window.innerWidth > 1000 ? (
<div className="splash d-flex flex-column justify-content-center align-items-center"> <div className="splash d-flex flex-column justify-content-center align-items-center">
<img src={logo} alt=window.t("لوگو") /> <img src={logo} alt={window.t("لوگو")} />
<ProgressBar interval={600} offset={10} /> <ProgressBar interval={600} offset={10} />
<span className="splash__span">در حال بارگیری اطلاعات از سرور</span> <span className="splash__span">در حال بارگیری اطلاعات از سرور</span>
</div> </div>
) : null} ) : null}
{window.innerWidth < 1000 ? ( {window.innerWidth < 1000 ? (
<div className="mobile-splash d-flex flex-column justify-content-center align-items-center"> <div className="mobile-splash d-flex flex-column justify-content-center align-items-center">
<img src={logo} alt=window.t("لوگو") /> <img src={logo} alt={window.t("لوگو")} />
<ProgressBar interval={600} offset={10} /> <ProgressBar interval={600} offset={10} />
<span className="mobile-splash__span">در حال بارگیری اطلاعات از سرور</span> <span className="mobile-splash__span">
در حال بارگیری اطلاعات از سرور
</span>
</div> </div>
) : null} ) : null}
</> </>

@ -17,9 +17,9 @@ export default function Search(props) {
<input <input
type="search" type="search"
style={{ fontSize: fontSize.desktop.input }} style={{ fontSize: fontSize.desktop.input }}
placeholder=window.t(window.t("جستجو")) placeholder={window.t("جستجو")}
/> />
<img src={navbarSearch} alt=window.t(window.t("جستجو")) /> <img src={navbarSearch} alt={window.t("جستجو")} />
</div> </div>
); );
} }

@ -145,7 +145,7 @@ export default class ChatInputs extends Component {
id="standard-textarea" id="standard-textarea"
label="" label=""
value={message} value={message}
placeholder=window.t("یک پیام بنویسید...") placeholder={window.t("یک پیام بنویسید...")}
rowsMax={4} rowsMax={4}
onChange={(e) => typeText("text", e.target.value)} onChange={(e) => typeText("text", e.target.value)}
multiline multiline

@ -19,7 +19,7 @@ const menu = [
const selfMenu = [ const selfMenu = [
{ text: window.t("باز ارسال"), icon: ForwardIcon, onClick: () => {} }, { text: window.t("باز ارسال"), icon: ForwardIcon, onClick: () => {} },
{ text: window.t("ویرایش"), icon: EditIcon, onClick: () => {} }, { text: window.t("ویرایش"), icon: EditIcon, onClick: () => {} },
{ text: window.t(window.t("حذف")), icon: DeleteIcon, onClick: () => {} }, { text: window.t("حذف")), icon: DeleteIcon, onClick: () => {} },
]; ];
export default class Comment extends Component { export default class Comment extends Component {
state = { messageMenu: null }; state = { messageMenu: null };

@ -27,7 +27,7 @@ const menu = [
const selfMenu = [ const selfMenu = [
{ text: window.t("باز ارسال"), icon: ForwardIcon, onClick: () => {} }, { text: window.t("باز ارسال"), icon: ForwardIcon, onClick: () => {} },
{ text: window.t("ویرایش"), icon: EditIcon, onClick: () => {} }, { text: window.t("ویرایش"), icon: EditIcon, onClick: () => {} },
{ text: window.t(window.t("حذف")), icon: DeleteIcon, onClick: () => {} }, { text: window.t("حذف"), icon: DeleteIcon, onClick: () => {} },
]; ];
export default class NormalMessage extends Component { export default class NormalMessage extends Component {
state = { messageMenu: null }; state = { messageMenu: null };

@ -80,7 +80,9 @@ export default class ChatInfo extends Component {
], ],
name: window.t("محسن محمدی"), name: window.t("محسن محمدی"),
lastAct: window.t("2 دقیقه پیش آنلاین بوده"), lastAct: window.t("2 دقیقه پیش آنلاین بوده"),
bio: window.t("لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است. چاپگرها و متون بلکه روزنام"), bio: window.t(
"لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است. چاپگرها و متون بلکه روزنام"
),
}, },
}; };
} }
@ -136,7 +138,7 @@ export default class ChatInfo extends Component {
<img <img
className="desktop-contact-info__body--profileImage" className="desktop-contact-info__body--profileImage"
src={user.profileImages[0].src} src={user.profileImages[0].src}
alt=window.t("عکس کاربر") alt={window.t("عکس کاربر")}
/> />
<h1 style={{ fontSize: fontSize.desktop.h1 }}>{user.name}</h1> <h1 style={{ fontSize: fontSize.desktop.h1 }}>{user.name}</h1>
<div className="desktop-contact-info__body--bio d-flex flex-column"> <div className="desktop-contact-info__body--bio d-flex flex-column">
@ -243,7 +245,7 @@ export default class ChatInfo extends Component {
<img <img
className="desktop-contact-info__body--profileImage" className="desktop-contact-info__body--profileImage"
src={user.profileImages[0].src} src={user.profileImages[0].src}
alt=window.t("عکس کاربر") alt={window.t("عکس کاربر")}
/> />
<h1 style={{ fontSize: fontSize.mobile.h1 }}>{user.name}</h1> <h1 style={{ fontSize: fontSize.mobile.h1 }}>{user.name}</h1>
<div className="desktop-contact-info__body--bio d-flex flex-column"> <div className="desktop-contact-info__body--bio d-flex flex-column">

@ -230,7 +230,7 @@ class Cart extends Component {
</div> </div>
<div class="checkout__forms--left"> <div class="checkout__forms--left">
<Input <Input
label={window.t(window.t(window.t("شماره تماس")))} label={window.t("شماره تماس")}
name={"recieverPhone"} name={"recieverPhone"}
parent={this} parent={this}
defaultValue={factorInfo.recieverPhone} defaultValue={factorInfo.recieverPhone}
@ -376,7 +376,7 @@ class Cart extends Component {
required required
/> />
<Input <Input
label={window.t(window.t(window.t("شماره تماس")))} label={window.t("شماره تماس")}
name={"recieverPhone"} name={"recieverPhone"}
parent={this} parent={this}
defaultValue={factorInfo.recieverPhone} defaultValue={factorInfo.recieverPhone}

@ -58,7 +58,11 @@ class Contact extends Component {
</div> </div>
<div className="contact__forms--left d-flex flex-column"> <div className="contact__forms--left d-flex flex-column">
<div className="contact__location d-flex align-items-center"> <div className="contact__location d-flex align-items-center">
<img src={location} alt=window.t("آدرس") className="m-1" /> <img
src={location}
alt={window.t("آدرس")}
className="m-1"
/>
<p style={{ fontSize: fontSize.desktop.p }}> <p style={{ fontSize: fontSize.desktop.p }}>
{contactData?.address || ""} {contactData?.address || ""}
</p> </p>
@ -71,13 +75,21 @@ class Contact extends Component {
<span style={{ fontSize: fontSize.desktop.span }}> <span style={{ fontSize: fontSize.desktop.span }}>
{contactData?.cellphone || ""} {contactData?.cellphone || ""}
</span> </span>
<img src={contact} alt=window.t("تماس") className="m-1" /> <img
src={contact}
alt={window.t("تماس")}
className="m-1"
/>
</div> </div>
<div className="d-flex align-items-center"> <div className="d-flex align-items-center">
<span style={{ fontSize: fontSize.desktop.span }}> <span style={{ fontSize: fontSize.desktop.span }}>
{contactData?.email || ""} {contactData?.email || ""}
</span> </span>
<img src={home} alt=window.t(window.t(window.t("خانه"))) className="m-1" /> <img
src={home}
alt={window.t("خانه")}
className="m-1"
/>
</div> </div>
</div> </div>
<div className="contact__map d-flex align-items-center mt-3"> <div className="contact__map d-flex align-items-center mt-3">
@ -106,7 +118,7 @@ class Contact extends Component {
<Support /> <Support />
<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=window.t("آدرس") className="m-1" /> <img src={location} alt={window.t("آدرس")} className="m-1" />
<p style={{ fontSize: fontSize.mobile.p }}> <p style={{ fontSize: fontSize.mobile.p }}>
{contactData?.address || ""}{" "} {contactData?.address || ""}{" "}
</p> </p>
@ -119,13 +131,13 @@ class Contact extends Component {
<span style={{ fontSize: fontSize.mobile.span }}> <span style={{ fontSize: fontSize.mobile.span }}>
{contactData?.cellphone || ""}{" "} {contactData?.cellphone || ""}{" "}
</span> </span>
<img src={contact} alt=window.t("تماس") className="m-1" /> <img src={contact} alt={window.t("تماس")} className="m-1" />
</div> </div>
<div className="d-flex align-items-center"> <div className="d-flex align-items-center">
<span style={{ fontSize: fontSize.mobile.span }}> <span style={{ fontSize: fontSize.mobile.span }}>
{contactData?.email || ""} {contactData?.email || ""}
</span> </span>
<img src={home} alt=window.t(window.t(window.t("خانه"))) className="m-1" /> <img src={home} alt={window.t("خانه")} className="m-1" />
</div> </div>
</div> </div>
<div className="mobile-contact__address--map d-flex align-items-center mt-3"> <div className="mobile-contact__address--map d-flex align-items-center mt-3">

@ -45,7 +45,7 @@ class AR extends Component {
> >
<img <img
src="https://dnvn.ir/api/v1/file/1851" src="https://dnvn.ir/api/v1/file/1851"
alt=window.t(window.t("واقعیت افزوده")) alt={window.t("واقعیت افزوده")}
width="150" width="150"
/> />
</div> </div>

@ -99,7 +99,7 @@ class Faq extends Component {
<div className="faq__header--search d-flex align-items-center"> <div className="faq__header--search d-flex align-items-center">
<input <input
type="search" type="search"
placeholder=window.t("دنبال چه چیزی برات باشیم؟") placeholder={window.t("دنبال چه چیزی برات باشیم؟")}
onChange={(e) => this.handleSearch(e.target.value)} onChange={(e) => this.handleSearch(e.target.value)}
/> />
<button <button
@ -150,7 +150,7 @@ class Faq extends Component {
</h1> </h1>
<input <input
type="search" type="search"
placeholder=window.t("دنبال چه چیزی برات باشیم؟") placeholder={window.t("دنبال چه چیزی برات باشیم؟")}
onChange={(e) => this.handleSearch(e.target.value)} onChange={(e) => this.handleSearch(e.target.value)}
/> />
<button type="submit">جستجو</button> <button type="submit">جستجو</button>

@ -22,7 +22,11 @@ export default class Footer extends Component {
آموزش و پرورش کشور ایجاد کنیم. آموزش و پرورش کشور ایجاد کنیم.
</p> </p>
<div className="footer__location d-flex align-items-center mt-2"> <div className="footer__location d-flex align-items-center mt-2">
<img src={location} alt=window.t("آدرس") className="m-1" /> <img
src={location}
alt={window.t("آدرس")}
className="m-1"
/>
<p>آدرس: تهران، میدان فردوسی، خیابان موسوی، پلاک ۳۰</p> <p>آدرس: تهران، میدان فردوسی، خیابان موسوی، پلاک ۳۰</p>
</div> </div>
<div <div
@ -40,7 +44,11 @@ export default class Footer extends Component {
58795 58795
</a> </a>
<img src={contact} alt=window.t("تماس") className="m-1" /> <img
src={contact}
alt={window.t("تماس")}
className="m-1"
/>
</div> </div>
{/* <div {/* <div
className="d-flex align-items-center" className="d-flex align-items-center"
@ -54,11 +62,11 @@ export default class Footer extends Component {
> >
021-88814673 021-88814673
</a> </a>
<img src={contact} alt=window.t("تماس") className="m-1" /> <img src={contact} alt={window.t("تماس") className="m-1" />
</div> */} </div> */}
<div className="d-flex align-items-center"> <div className="d-flex align-items-center">
<span>Info@Danovin.ir</span> <span>Info@Danovin.ir</span>
<img src={home} alt=window.t(window.t(window.t("خانه"))) className="m-1" /> <img src={home} alt={window.t("خانه")} className="m-1" />
</div> </div>
</div> </div>
</div> </div>
@ -103,7 +111,11 @@ export default class Footer extends Component {
کاربردی می باشد، کتابهای زیادی در شصت و سه{" "} کاربردی می باشد، کتابهای زیادی در شصت و سه{" "}
</p> </p>
<div className="mobile-footer__location d-flex align-items-center mt-2"> <div className="mobile-footer__location d-flex align-items-center mt-2">
<img src={location} alt=window.t("آدرس") className="m-1" /> <img
src={location}
alt={window.t("آدرس")}
className="m-1"
/>
<p> <p>
تهران خیابان انقلاب اسلامی بن بست سروش پلاک 2 طبقه چهار تهران خیابان انقلاب اسلامی بن بست سروش پلاک 2 طبقه چهار
</p> </p>
@ -114,16 +126,20 @@ export default class Footer extends Component {
> >
<div className="d-flex align-items-center"> <div className="d-flex align-items-center">
<span>02163462405</span> <span>02163462405</span>
<img src={contact} alt=window.t("تماس") className="m-1" /> <img
src={contact}
alt={window.t("تماس")}
className="m-1"
/>
</div> </div>
<div className="d-flex align-items-center"> <div className="d-flex align-items-center">
<span>Info@Danovin.ir</span> <span>Info@Danovin.ir</span>
<img src={home} alt=window.t(window.t(window.t("خانه"))) className="m-1" /> <img src={home} alt={window.t("خانه")} className="m-1" />
</div> </div>
</div> </div>
</div> </div>
<div className="mobile-footer-container__content--box second d-flex flex-column"> <div className="mobile-footer-container__content--box second d-flex flex-column">
<h1>دسترسی سریع</h1> <h1>{window.t("دسترسی سریع")}</h1>
<ul> <ul>
{fastAccess.map((item) => ( {fastAccess.map((item) => (
<li> <li>

@ -1,6 +1,6 @@
import React, { Component } from "react"; import React, { Component } from "react";
import ChevronLeftIcon from "@material-ui/icons/ChevronLeft"; import ChevronLeftIcon from "@material-ui/icons/ChevronLeft";
import {Link} from 'react-router-dom'; import { Link } from "react-router-dom";
import "./index.scss"; import "./index.scss";
export default class HomeHeader extends Component { export default class HomeHeader extends Component {
@ -12,23 +12,27 @@ export default class HomeHeader extends Component {
height ? "home-header d-flex flex-column" : "home-header d-flex" height ? "home-header d-flex flex-column" : "home-header d-flex"
} }
> >
{ {title ? (
title ? <div className="home-scroll__header d-flex"> <div className="home-scroll__header d-flex">
<h1>{title}</h1> <h1>{title}</h1>
<div className="home-scroll__header--more d-flex"> <div className="home-scroll__header--more d-flex">
<span>موارد بیشتر</span> <span>{window.t("موارد بیشتر")}</span>
<ChevronLeftIcon <ChevronLeftIcon
style={{ width: 20, height: 20, color: "black", marginRight: 1 }} style={{
width: 20,
height: 20,
color: "black",
marginRight: 1,
}}
/> />
</div> </div>
</div> : null </div>
} ) : null}
<div className="home-scroll__list d-flex"> <div className="home-scroll__list d-flex">
{data.map((item, i) => ( {data.map((item, i) => (
<Item data={item} key={i} /> <Item data={item} key={i} />
))} ))}
</div> </div>
</header> </header>
); );
} }
@ -36,13 +40,16 @@ export default class HomeHeader extends Component {
const Item = (props) => { const Item = (props) => {
return ( return (
<Link to={props.data.link} style={{ <Link
to={props.data.link}
style={{
width: `${props.data.width}%`, width: `${props.data.width}%`,
height: "100%", height: "100%",
}}> }}
>
<img <img
src={props.data.image} src={props.data.image}
alt=window.t("عکس") alt={window.t("عکس")}
style={{ style={{
width: `${props.data.width}%`, width: `${props.data.width}%`,
height: "100%", height: "100%",

@ -20,7 +20,7 @@ export default class HomeScroll extends Component {
</div> </div>
<div className="mobile-home-scroll__header--more d-flex"> <div className="mobile-home-scroll__header--more d-flex">
<span>{moreText}</span> <span>{moreText}</span>
<img src={dropdown} alt=window.t("فلش") /> <img src={dropdown} alt={window.t("فلش")} />
</div> </div>
</div> </div>
<div className="mobile-home-scroll__list d-flex"> <div className="mobile-home-scroll__list d-flex">

@ -56,7 +56,9 @@ export default function CustomizedSelects(props) {
filters: { filters: {
...parent.state.filters, ...parent.state.filters,
[name]: [name]:
e.target.value === window.t(window.t("پایه تحصیلی")) ? [] : [e.target.value], e.target.value === window.t("پایه تحصیلی")
? []
: [e.target.value],
}, },
}) })
} }

@ -28,7 +28,7 @@ class HomeSearch extends Component {
return window.innerWidth > 1000 ? ( return window.innerWidth > 1000 ? (
<div className="home-search d-flex"> <div className="home-search d-flex">
<input <input
placeholder=window.t("جستجو در عناوین کتاب ...") placeholder={window.t("جستجو در عناوین کتاب ...")}
className="home-search__input d-flex" className="home-search__input d-flex"
type="text" type="text"
name="searchBox" name="searchBox"
@ -40,7 +40,7 @@ class HomeSearch extends Component {
/> />
<div className="home-search__select"> <div className="home-search__select">
<Select options={levels} name="levels" parent={this} /> <Select options={levels} name="levels" parent={this} />
{/* <img src={dropdown} alt=window.t("فلش") style={{ position: "relative" }} /> */} {/* <img src={dropdown} alt={window.t("فلش") style={{ position: "relative" }} /> */}
</div> </div>
<button className="home-search__submit">جستجو</button> <button className="home-search__submit">جستجو</button>
</div> </div>
@ -49,13 +49,13 @@ class HomeSearch extends Component {
<div className="home-mobile-search d-flex"> <div className="home-mobile-search d-flex">
<div className="home-mobile-search__select" style={{ width: "100%" }}> <div className="home-mobile-search__select" style={{ width: "100%" }}>
<Select options={levels} name="levels" parent={this} /> <Select options={levels} name="levels" parent={this} />
<img src={dropdown} alt=window.t("فلش") /> <img src={dropdown} alt={window.t("فلش")} />
</div> </div>
</div> </div>
<div className="home-mobile-search "> <div className="home-mobile-search ">
<input <input
ref="input" ref="input"
placeholder=window.t("نام یک کتاب را جستجو کنید") placeholder={window.t("نام یک کتاب را جستجو کنید")}
className="home-mobile-search__input " className="home-mobile-search__input "
type="text" type="text"
name="searchBox" name="searchBox"

@ -132,7 +132,7 @@ export default class Simple extends Component {
</div> </div>
</div> </div>
<Link to={`/blogs/${data.id}`}> <Link to={`/blogs/${data.id}`}>
{data.buttonText || window.t(window.t("ادامه مطلب"))} {data.buttonText || window.t("ادامه مطلب")}
</Link> </Link>
</div> </div>
<span <span

@ -34,7 +34,7 @@ const SimpleHeader = (props) => {
className="home-scroll__header--more d-flex align-items-center" className="home-scroll__header--more d-flex align-items-center"
> >
<span style={{ fontSize: fontSize.desktop.h1 }}>بیشتر</span> <span style={{ fontSize: fontSize.desktop.h1 }}>بیشتر</span>
<img src={dropdown} alt=window.t("فلش") /> <img src={dropdown} alt={window.t("فلش")} />
</Link> </Link>
) : null} ) : null}
</div> </div>
@ -51,7 +51,7 @@ const SimpleHeader = (props) => {
className="mobile-home-scroll__header--more d-flex align-items-center" className="mobile-home-scroll__header--more d-flex align-items-center"
> >
<span>بیشتر</span> <span>بیشتر</span>
<img src={dropdown} alt=window.t("فلش") /> <img src={dropdown} alt={window.t("فلش")} />
</Link> </Link>
) : null} */} ) : null} */}
</div> </div>
@ -74,7 +74,7 @@ const TabHeader = (props) => {
className="home-scroll__header--more d-flex align-items-center" className="home-scroll__header--more d-flex align-items-center"
> >
<span style={{ fontSize: fontSize.desktop.h1 }}>بیشتر</span> <span style={{ fontSize: fontSize.desktop.h1 }}>بیشتر</span>
<img src={dropdown} alt=window.t("فلش") /> <img src={dropdown} alt={window.t("فلش")} />
</Link> */} </Link> */}
</div> </div>
) : null} ) : null}
@ -86,7 +86,7 @@ const TabHeader = (props) => {
</div> </div>
{/* <div className="mobile-home-scroll__header--more d-flex align-items-center"> {/* <div className="mobile-home-scroll__header--more d-flex align-items-center">
<span>بیشتر</span> <span>بیشتر</span>
<img src={dropdown} alt=window.t("فلش") /> <img src={dropdown} alt={window.t("فلش")} />
</div> */} </div> */}
</div> </div>
) : null} ) : null}

@ -28,7 +28,7 @@ export default class HomeStatic extends Component {
<div className="home-scroll__header d-flex"> <div className="home-scroll__header d-flex">
<h1>{title}</h1> <h1>{title}</h1>
<div className="home-scroll__header--more d-flex"> <div className="home-scroll__header--more d-flex">
<span>موارد بیشتر</span> <span>{window.t("موارد بیشتر")}</span>
<ChevronLeftIcon <ChevronLeftIcon
style={{ style={{
width: 20, width: 20,
@ -87,7 +87,7 @@ const Item = (props) => {
</div> </div>
<img <img
src={`https://dnvn.ir/api/v1/file/${props.data.fileId}`} src={`https://dnvn.ir/api/v1/file/${props.data.fileId}`}
alt=window.t("عکس") alt={window.t("عکس")}
/> />
</div> </div>
) : ( ) : (
@ -100,7 +100,7 @@ const Item = (props) => {
> >
<img <img
src={`https://dnvn.ir/api/v1/file/${props.data.fileId}`} src={`https://dnvn.ir/api/v1/file/${props.data.fileId}`}
alt=window.t("عکس") alt={window.t("عکس")}
style={{ float: "left" }} style={{ float: "left" }}
/> />
<div className="d-flex flex-column"> <div className="d-flex flex-column">

@ -17,7 +17,7 @@ class Membership extends Component {
</div> </div>
<div className="d-flex"> <div className="d-flex">
<Input label={window.t("نام و نام خانوادگی")} name={"name"} /> <Input label={window.t("نام و نام خانوادگی")} name={"name"} />
<Input label={window.t(window.t(window.t("شماره تماس")))} name={"mobile"} /> <Input label={window.t("شماره تماس")} name={"mobile"} />
<button className="membership__submit">ثبت </button> <button className="membership__submit">ثبت </button>
</div> </div>
</div> </div>
@ -35,7 +35,7 @@ class Membership extends Component {
<Input label={"نامونام خانوادگی"} name={"name"} /> <Input label={"نامونام خانوادگی"} name={"name"} />
</div> </div>
<div> <div>
<Input label={window.t(window.t(window.t("شماره تماس")))} name={"mobile"} /> <Input label={window.t("شماره تماس")} name={"mobile"} />
</div> </div>
<button className="mobile-membership__submit">ثبت </button> <button className="mobile-membership__submit">ثبت </button>
</div> </div>

@ -36,7 +36,7 @@ class LaptopNavbar extends Component {
<nav className="laptop-navbar d-flex"> <nav className="laptop-navbar d-flex">
<div className="d-flex"> <div className="d-flex">
<Link to="/" className="laptop-navbar__logo"> <Link to="/" className="laptop-navbar__logo">
<img src={logo} alt=window.t("لوگو") /> <img src={logo} alt={window.t("لوگو")} />
</Link> </Link>
<ul className="laptop-navbar__list d-flex"> <ul className="laptop-navbar__list d-flex">
{links.map((item, i) => ( {links.map((item, i) => (
@ -92,7 +92,7 @@ class LaptopNavbar extends Component {
width="20" width="20"
height="23" height="23"
src={basket} src={basket}
alt=window.t("سبد خرید") alt={window.t("سبد خرید")}
style={{ marginRight: 5 }} style={{ marginRight: 5 }}
/> />
</Link> </Link>

@ -31,35 +31,35 @@ class NavbarDrawer extends Component {
{ {
name: window.t("صفحه اصلی"), name: window.t("صفحه اصلی"),
link: "/", link: "/",
icon: <img src={mobileHome} alt=window.t("صفحه اصلی") />, icon: <img src={mobileHome} alt={window.t("صفحه اصلی")} />,
toast: "", toast: "",
message: "", message: "",
}, },
{ {
name: "ورود یا ثبت نام", name: "ورود یا ثبت نام",
link: "/auth", link: "/auth",
icon: <img src={mobileLogout} alt=window.t("کتابهای من") />, icon: <img src={mobileLogout} alt={window.t("کتابهای من")} />,
toast: "", toast: "",
message: "", message: "",
}, },
{ {
name: window.t("درباره ما"), name: window.t("درباره ما"),
link: "/about", link: "/about",
icon: <img src={mobileBlog} alt=window.t("کتابهای من") />, icon: <img src={mobileBlog} alt={window.t("کتابهای من")} />,
toast: "", toast: "",
message: "", message: "",
}, },
{ {
name: window.t("فروشگاه"), name: window.t("فروشگاه"),
link: "/products", link: "/products",
icon: <img src={mobileBlog} alt=window.t("کتابهای من") />, icon: <img src={mobileBlog} alt={window.t("کتابهای من")} />,
toast: "", toast: "",
message: "", message: "",
}, },
{ {
name: window.t("سبد خرید"), name: window.t("سبد خرید"),
link: "/cart", link: "/cart",
icon: <img src={mobileBlog} alt=window.t("کتابهای من") />, icon: <img src={mobileBlog} alt={window.t("کتابهای من")} />,
toast: "", toast: "",
message: "", message: "",
}, },
@ -73,7 +73,7 @@ class NavbarDrawer extends Component {
{ {
name: window.t("پشتیبانی"), name: window.t("پشتیبانی"),
link: "/support", link: "/support",
icon: <img src={mobileDanger} alt=window.t("پشتیبانی") />, icon: <img src={mobileDanger} alt={window.t("پشتیبانی")} />,
toast: "", toast: "",
message: "", message: "",
// onClick: this.props.logout, // onClick: this.props.logout,
@ -83,35 +83,35 @@ class NavbarDrawer extends Component {
{ {
name: window.t("صفحه اصلی"), name: window.t("صفحه اصلی"),
link: "/", link: "/",
icon: <img src={mobileHome} alt=window.t("صفحه اصلی") />, icon: <img src={mobileHome} alt={window.t("صفحه اصلی")} />,
toast: "", toast: "",
message: "", message: "",
}, },
{ {
name: window.t(window.t("واقعیت افزوده")), name: window.t("واقعیت افزوده"),
link: "/ar", link: "/ar",
icon: <img src={mobileAr} alt=window.t(window.t("واقعیت افزوده")) />, icon: <img src={mobileAr} alt={window.t("واقعیت افزوده")} />,
toast: "", toast: "",
message: "", message: "",
}, },
{ {
name: window.t("بارکد خوان"), name: window.t("بارکد خوان"),
link: "/qr-scan", link: "/qr-scan",
icon: <img src={qrcode} alt=window.t("بارکد خوان") />, icon: <img src={qrcode} alt={window.t("بارکد خوان")} />,
toast: "", toast: "",
message: "", message: "",
}, },
{ {
name: window.t("کتابهای من"), name: window.t("کتابهای من"),
link: "/mybooks", link: "/mybooks",
icon: <img src={mobileBlog} alt=window.t("کتابهای من") />, icon: <img src={mobileBlog} alt={window.t("کتابهای من")} />,
toast: "", toast: "",
message: "", message: "",
}, },
{ {
name: window.t("سبد خرید"), name: window.t("سبد خرید"),
link: "/cart", link: "/cart",
icon: <img src={mobileBasket} alt=window.t("فروشگاه") />, icon: <img src={mobileBasket} alt={window.t("فروشگاه")} />,
toast: "", toast: "",
message: "", message: "",
}, },
@ -125,29 +125,29 @@ class NavbarDrawer extends Component {
{ {
name: window.t("دانوینیها"), name: window.t("دانوینیها"),
link: "/", link: "/",
icon: <img src={mobileProfile} alt=window.t("دانوینیها") />, icon: <img src={mobileProfile} alt={window.t("دانوینیها")} />,
toast: window.t("به زودی این بخش فعال می شود"), toast: window.t("به زودی این بخش فعال می شود"),
message: "به زودی", message: "به زودی",
}, },
{ {
name: window.t("پشتیبانی"), name: window.t("پشتیبانی"),
link: "/support", link: "/support",
icon: <img src={mobileDanger} alt=window.t("پشتیبانی") />, icon: <img src={mobileDanger} alt={window.t("پشتیبانی")} />,
toast: "", toast: "",
message: "", message: "",
// onClick: this.props.logout, // onClick: this.props.logout,
}, },
{ {
name: window.t(window.t("ویرایش مشخصات")), name: window.t("ویرایش مشخصات"),
link: "/profile", link: "/profile",
icon: <img src={mobileMail} alt=window.t(window.t("ویرایش مشخصات")) />, icon: <img src={mobileMail} alt={window.t("ویرایش مشخصات")} />,
toast: "", toast: "",
// message: "4 پیام", // message: "4 پیام",
}, },
{ {
name: window.t("بروز رسانی"), name: window.t("بروز رسانی"),
link: "/", link: "/",
icon: <img src={mobileLogout} alt=window.t(window.t(window.t("خروج"))) />, icon: <img src={mobileLogout} alt={window.t("خروج")} />,
toast: "", toast: "",
message: "", message: "",
onClick: () => { onClick: () => {
@ -155,9 +155,9 @@ class NavbarDrawer extends Component {
}, },
}, },
{ {
name: window.t(window.t(window.t("خروج"))), name: window.t("خروج"),
link: "/auth", link: "/auth",
icon: <img src={mobileLogout} alt=window.t(window.t(window.t("خروج"))) />, icon: <img src={mobileLogout} alt={window.t("خروج")} />,
toast: "", toast: "",
message: "", message: "",
onClick: () => { onClick: () => {

@ -18,7 +18,7 @@ function BackButton({ children }) {
let history = useHistory(); let history = useHistory();
return ( return (
<div type="button" onClick={() => history.goBack()}> <div type="button" onClick={() => history.goBack()}>
<img src={back} alt=window.t("بازگشت") /> <img src={back} alt={window.t("بازگشت")} />
</div> </div>
); );
} }
@ -82,10 +82,10 @@ export default function MobileNavbar(props) {
style={{ marginTop: 10 }} style={{ marginTop: 10 }}
onClick={toggleDrawer("right", true)} onClick={toggleDrawer("right", true)}
> >
<img src={hamburger} alt=window.t("منو") /> <img src={hamburger} alt={window.t("منو")} />
</div> </div>
<Link to="/" className="mobile-navbar__logo2" style={{}}> <Link to="/" className="mobile-navbar__logo2" style={{}}>
<img src={logo} alt=window.t("لوگو") className="logo" /> <img src={logo} alt={window.t("لوگو")} className="logo" />
</Link> </Link>
</div> </div>
<div className="mobile-navbar__left d-flex" style={{ marginLeft: 10 }}> <div className="mobile-navbar__left d-flex" style={{ marginLeft: 10 }}>
@ -115,23 +115,23 @@ export default function MobileNavbar(props) {
// style={{ transform: page !== "home" ? "translateX(-29px)" : "none" }} // style={{ transform: page !== "home" ? "translateX(-29px)" : "none" }}
> >
<Link to="/"> <Link to="/">
<img src={logo} alt=window.t("لوگو") /> <img src={logo} alt={window.t("لوگو")} />
</Link> </Link>
</div> */} </div> */}
<div <div
className="mobile-navbar__menu" className="mobile-navbar__menu"
onClick={toggleDrawer("right", true)} onClick={toggleDrawer("right", true)}
> >
<img src={hamburger} alt=window.t("منو") /> <img src={hamburger} alt={window.t("منو")} />
<Link to="/"> <Link to="/">
<img src={logo} alt=window.t("لوگو") className="logo" /> <img src={logo} alt={window.t("لوگو")} className="logo" />
</Link> </Link>
</div> </div>
<div className="mobile-navbar__left"> <div className="mobile-navbar__left">
{page === "home" || page === "download" ? ( {page === "home" || page === "download" ? (
<Link to={"/products"}> <Link to={"/products"}>
<img src={search} alt=window.t(window.t("جستجو")) /> <img src={search} alt={window.t("جستجو")} />
</Link> </Link>
) : ( ) : (
<div className="d-flex align-items-center"> <div className="d-flex align-items-center">
@ -139,7 +139,7 @@ export default function MobileNavbar(props) {
window.location.pathname !== "/mybooks" && window.location.pathname !== "/mybooks" &&
window.location.pathname !== "/profile" && ( window.location.pathname !== "/profile" && (
<Link to={"/products"}> <Link to={"/products"}>
<img src={search} alt=window.t(window.t("جستجو")) /> <img src={search} alt={window.t("جستجو")} />
</Link> </Link>
)} )}
{window.location.pathname !== "/qr-scan" && {window.location.pathname !== "/qr-scan" &&

@ -221,7 +221,7 @@ class NewProfile extends Component {
<div className="mb-2"> <div className="mb-2">
<Input <Input
name="firstName" name="firstName"
label=window.t("نام") label={window.t("نام")}
parent={this} parent={this}
defaultValue={profile} defaultValue={profile}
/> />
@ -229,7 +229,7 @@ class NewProfile extends Component {
<div className="mb-2"> <div className="mb-2">
<Input <Input
name="lastName" name="lastName"
label=window.t("نام خانوادگی") label={window.t("نام خانوادگی")}
parent={this} parent={this}
defaultValue={profile} defaultValue={profile}
/> />
@ -237,7 +237,7 @@ class NewProfile extends Component {
<div className="mb-2"> <div className="mb-2">
<Input <Input
name="username" name="username"
label=window.t(window.t("نام کاربری")) label={window.t("نام کاربری")}
parent={this} parent={this}
defaultValue={profile} defaultValue={profile}
align="left" align="left"
@ -255,7 +255,7 @@ class NewProfile extends Component {
<div className="mb-2"> <div className="mb-2">
<Input <Input
name="nationalId" name="nationalId"
label=window.t("کد ملی") label={window.t("کد ملی")}
parent={this} parent={this}
align="left" align="left"
defaultValue={profile} defaultValue={profile}
@ -284,7 +284,7 @@ class NewProfile extends Component {
parent={this} parent={this}
options={grades} options={grades}
name="gradeId" name="gradeId"
label={window.t(window.t("پایه تحصیلی"))} label={window.t("پایه تحصیلی")}
/> />
</div> </div>
) : null} ) : null}
@ -294,7 +294,7 @@ class NewProfile extends Component {
parent={this} parent={this}
options={grades} options={grades}
name="gradeId" name="gradeId"
label={window.t(window.t("پایه تحصیلی"))} label={window.t("پایه تحصیلی")}
selectedOptions={this.state.gradeId} selectedOptions={this.state.gradeId}
/> />
</div> </div>
@ -398,19 +398,19 @@ class NewProfile extends Component {
<Upload name="file" parent={this} /> <Upload name="file" parent={this} />
<Input <Input
name="firstName" name="firstName"
label=window.t("نام") label={window.t("نام")}
parent={this} parent={this}
onInput={this.forcePersian} onInput={this.forcePersian}
/> />
<Input <Input
name="lastName" name="lastName"
label=window.t("نام خانوادگی") label={window.t("نام خانوادگی")}
parent={this} parent={this}
onInput={this.forcePersian} onInput={this.forcePersian}
/> />
<Input <Input
name="username" name="username"
label=window.t(window.t("نام کاربری")) label={window.t("نام کاربری")}
parent={this} parent={this}
align="left" align="left"
/> />
@ -422,7 +422,7 @@ class NewProfile extends Component {
/> />
<Input <Input
name="nationalId" name="nationalId"
label=window.t("کد ملی") label={window.t("کد ملی")}
parent={this} parent={this}
align="left" align="left"
maxLength={10} maxLength={10}
@ -440,7 +440,7 @@ class NewProfile extends Component {
parent={this} parent={this}
options={grades} options={grades}
name="gradeId" name="gradeId"
label={window.t(window.t("پایه تحصیلی"))} label={window.t("پایه تحصیلی")}
/> />
) : null} ) : null}
{this.state.userRoleId === window.t("معلم") ? ( {this.state.userRoleId === window.t("معلم") ? (
@ -448,7 +448,7 @@ class NewProfile extends Component {
parent={this} parent={this}
options={grades} options={grades}
name="gradeId" name="gradeId"
label={window.t(window.t("پایه تحصیلی"))} label={window.t("پایه تحصیلی")}
selectedOptions={this.state.gradeId} selectedOptions={this.state.gradeId}
/> />
) : null} ) : null}
@ -489,10 +489,18 @@ class NewProfile extends Component {
label={window.t("شهر/روستا")} label={window.t("شهر/روستا")}
/> />
{this.state.userRoleId === window.t("دانش آموز") ? ( {this.state.userRoleId === window.t("دانش آموز") ? (
<Input parent={this} name="schoolId" label={window.t("نام مدرسه")} /> <Input
parent={this}
name="schoolId"
label={window.t("نام مدرسه")}
/>
) : null} ) : null}
{this.state.userRoleId === window.t("معلم") ? ( {this.state.userRoleId === window.t("معلم") ? (
<Input parent={this} name="schoolId" label={window.t("محل تدریس")} /> <Input
parent={this}
name="schoolId"
label={window.t("محل تدریس")}
/>
) : null} ) : null}
{this.state.userRoleId === window.t("معلم") ? ( {this.state.userRoleId === window.t("معلم") ? (
<Document parent={this} name="docFileIds" /> <Document parent={this} name="docFileIds" />
@ -503,7 +511,11 @@ class NewProfile extends Component {
label={window.t("کد پستی")} label={window.t("کد پستی")}
align="left" align="left"
/> />
<TextArea parent={this} label={window.t("آدرس محل سکونت")} name="address" /> <TextArea
parent={this}
label={window.t("آدرس محل سکونت")}
name="address"
/>
<div className="mobile-auth-profile__footer d-flex justify-content-center"> <div className="mobile-auth-profile__footer d-flex justify-content-center">
<button onClick={() => this.onSubmit()}>ذخیره</button> <button onClick={() => this.onSubmit()}>ذخیره</button>
</div> </div>

@ -61,9 +61,12 @@ class Orders extends Component {
className="order-data-container-item-row1-order-status-text" className="order-data-container-item-row1-order-status-text"
> >
{ {
[window.t("پرداخت نشده"), window.t("در حال پردازش"), window.t(window.t("ارسال شد")), window.t("لغو شد")][ [
item.condition window.t("پرداخت نشده"),
] window.t("در حال پردازش"),
window.t("ارسال شد"),
window.t("لغو شد"),
][item.condition]
} }
</div> </div>
</div> </div>

@ -1,27 +1,29 @@
import React, {useState} from 'react'; import React, { useState } from "react";
import Carousel from 'react-elastic-carousel'; import Carousel from "react-elastic-carousel";
import Video from '../../../QR/VideoBox/React-video-js-player/index'; import Video from "../../../QR/VideoBox/React-video-js-player/index";
import exit from '../../../../assets/icons/exit.svg'; import exit from "../../../../assets/icons/exit.svg";
import './index.scss'; import "./index.scss";
const Modal = (props) => { const Modal = (props) => {
const [displayed, setDisplayed] = useState(props.first ? props.first : props.gallery[0]) const [displayed, setDisplayed] = useState(
props.first ? props.first : props.gallery[0]
);
const { gallery, setModal } = props; const { gallery, setModal } = props;
return ( return (
<> <>
{ {window.innerWidth > 1000 ? (
window.innerWidth > 1000 ?
<section className="modal d-flex flex-column align-items-center justify-content-center"> <section className="modal d-flex flex-column align-items-center justify-content-center">
<img className="modal__exit" src={exit} alt="خروح" onClick={() => setModal(null)} /> <img
className="modal__exit"
src={exit}
alt="خروح"
onClick={() => setModal(null)}
/>
<div className="modal__display"> <div className="modal__display">
{ {displayed.type === "image" ? (
displayed.type === 'image' ? <img src={displayed.value} alt={window.t("عکس")} />
<img src={displayed.value} alt=window.t("عکس") /> : null ) : null}
} {displayed.type === "film" ? <Video /> : null}
{
displayed.type === 'film' ?
<Video /> : null
}
</div> </div>
<footer className="modal__footer d-flex"> <footer className="modal__footer d-flex">
<Carousel <Carousel
@ -41,28 +43,26 @@ const Modal = (props) => {
))} ))}
</Carousel> </Carousel>
</footer> </footer>
</section> : null </section>
} ) : null}
</> </>
); );
} };
export default Modal; export default Modal;
const Item = (props) => { const Item = (props) => {
return ( return (
<div className="modal-carousel-item"> <div className="modal-carousel-item">
{ {props.data.type === "image" ? (
props.data.type === 'image' ? <img src={props.data.value} alt={window.t("عکس")} />
<img src={props.data.value} alt=window.t("عکس") /> : null ) : null}
} {props.data.type === "film" ? <Video /> : null}
{ <div
props.data.type === 'film' ? style={{ border: props.active ? "4px solid #1BBC6E" : "" }}
<Video /> : null className="modal-carousel-item__cover"
} onClick={() => props.setDisplayed(props.data)}
<div style={{ border: props.active ? '4px solid #1BBC6E' : '' }} className="modal-carousel-item__cover" onClick={() => props.setDisplayed(props.data)}> ></div>
</div>
</div> </div>
); );
} };

@ -71,10 +71,10 @@ function SimpleModal(props) {
letterSpacing: "-1px", letterSpacing: "-1px",
}} }}
> >
کامنت خود را وارد کرده و دکمه ثبت را بزنید. {window.t("کامنت خود را وارد کرده و دکمه ثبت را بزنید.")}
</h2> </h2>
<textarea <textarea
placeholder=window.t("متن پیام") placeholder={window.t("متن پیام")}
name="description" name="description"
rows="5" rows="5"
onChange={(e) => setText(e.target.value)} onChange={(e) => setText(e.target.value)}

@ -145,7 +145,9 @@ class Product extends Component {
<Info <Info
subTitle={`پایه ${grades[info.gradeId]}`} subTitle={`پایه ${grades[info.gradeId]}`}
title={`${info.name} ${grades[info.gradeId]}`} title={`${info.name} ${grades[info.gradeId]}`}
description={info.description || window.t("توضیحات محصول خالیست")} description={
info.description || window.t("توضیحات محصول خالیست")
}
/> />
<AddToCart <AddToCart
@ -169,7 +171,7 @@ class Product extends Component {
</h3> </h3>
<button onClick={() => this.handleOpenComment()}> <button onClick={() => this.handleOpenComment()}>
ارسال نظر ارسال نظر
<img src={send_comment} alt=window.t("ارسال نظر") /> <img src={send_comment} alt={window.t("ارسال نظر")} />
</button> </button>
</div> </div>
@ -217,7 +219,9 @@ class Product extends Component {
info.name info.name
} پایه ${grades[info.gradeId]}`}</h1> } پایه ${grades[info.gradeId]}`}</h1>
<h2 style={{ fontSize: fontSize.mobile.h2 }}> <h2 style={{ fontSize: fontSize.mobile.h2 }}>
{page !== "digital" ? window.t("نسخه چاپی") : window.t("نسخه الکترونیک")} {page !== "digital"
? window.t("نسخه چاپی")
: window.t("نسخه الکترونیک")}
</h2> </h2>
<h3 style={{ fontSize: fontSize.mobile.h1 }}> <h3 style={{ fontSize: fontSize.mobile.h1 }}>
{page === "digital" {page === "digital"
@ -242,7 +246,9 @@ class Product extends Component {
className="mobile-product__header--digitalButton" className="mobile-product__header--digitalButton"
style={{ fontSize: fontSize.mobile.a, opacity: 0.3 }} style={{ fontSize: fontSize.mobile.a, opacity: 0.3 }}
> >
{page === "digital" ? window.t("نسخه چاپی") : window.t("نسخه الکترونیک")} {page === "digital"
? window.t("نسخه چاپی")
: window.t("نسخه الکترونیک")}
</Link> </Link>
<Link <Link
to={ to={
@ -250,7 +256,9 @@ class Product extends Component {
} }
onClick={() => onClick={() =>
!info.sampleFileId !info.sampleFileId
? toast.info(window.t("برای این کتاب نمونهای درج نشده است.")) ? toast.info(
window.t("برای این کتاب نمونهای درج نشده است.")
)
: null : null
} }
className="mobile-product__header--purchase" className="mobile-product__header--purchase"
@ -299,7 +307,7 @@ class Product extends Component {
</h3> </h3>
<button onClick={() => this.handleOpenComment()}> <button onClick={() => this.handleOpenComment()}>
ارسال نظر ارسال نظر
<img src={send_comment} alt=window.t("ارسال نظر") /> <img src={send_comment} alt={window.t("ارسال نظر")} />
</button> </button>
</div> </div>
<div className="mobile-product__comments--list d-flex"> <div className="mobile-product__comments--list d-flex">

@ -20,14 +20,14 @@ export default class Filtesrs extends React.Component {
name="subject" name="subject"
parent={parent} parent={parent}
data={parent.props.subjects} data={parent.props.subjects}
title=window.t("دسته بندی موضوعی") title={window.t("دسته بندی موضوعی")}
theme="#D7FF17" theme="#D7FF17"
/> />
<TypicalFilters <TypicalFilters
name="level" name="level"
parent={parent} parent={parent}
data={parent.props.levels} data={parent.props.levels}
title=window.t(window.t("پایه تحصیلی")) title={window.t("پایه تحصیلی")}
theme="#FF8917" theme="#FF8917"
/> />
</div> </div>

@ -50,7 +50,7 @@ export default function CustomizedSelects(props) {
onChange={(e) => onChange={(e) =>
e.target.value !== window.t("نام کتاب") && e.target.value !== window.t("نام کتاب") &&
e.target.value !== window.t("مرتب سازی") && e.target.value !== window.t("مرتب سازی") &&
e.target.value !== window.t(window.t("پایه تحصیلی")) e.target.value !== window.t("پایه تحصیلی")
? props.parent.setState({ ? props.parent.setState({
selectedFilters: { selectedFilters: {
...props.parent.state.selectedFilters, ...props.parent.state.selectedFilters,

@ -92,10 +92,10 @@ class Products extends Component {
<input <input
type="search" type="search"
style={{ fontSize: 15 }} style={{ fontSize: 15 }}
placeholder={window.t(window.t("جستجو"))} placeholder={window.t("جستجو")}
onChange={(e) => this.handleProductSearch(e.target.value)} onChange={(e) => this.handleProductSearch(e.target.value)}
/> />
<img src={navbarSearch} alt=window.t(window.t("جستجو")) /> <img src={navbarSearch} alt={window.t("جستجو")} />
</div> </div>
<div className="mobile-products__filters d-flex"> <div className="mobile-products__filters d-flex">
<div className="d-flex"> <div className="d-flex">

@ -55,7 +55,7 @@ export default function Dropdown(props) {
style={{ fontSize: fontSize.desktop.input }} style={{ fontSize: fontSize.desktop.input }}
onChange={(e) => handleSearch(e.target.value)} onChange={(e) => handleSearch(e.target.value)}
/> />
<img src={navbarSearch} alt=window.t(window.t("جستجو")) /> <img src={navbarSearch} alt={window.t("جستجو")} />
</div> </div>
<ul> <ul>
{search {search

@ -224,7 +224,7 @@ class QR extends Component {
<div> <div>
<img <img
src={exit} src={exit}
alt=window.t("انصراف") alt={window.t("انصراف")}
onClick={() => onClick={() =>
// this.props.logout({}) // this.props.logout({})
this.setState({ menu: !this.state.menu }) this.setState({ menu: !this.state.menu })

@ -45,7 +45,7 @@ class QRModal extends Component {
<div className="d-flex" style={{ justifyContent: "center" }}> <div className="d-flex" style={{ justifyContent: "center" }}>
<Input <Input
name="pageNumber" name="pageNumber"
// label=window.t("نام") // label={window.t("نام")
parent={this} parent={this}
defaultValue={pageNumber} defaultValue={pageNumber}
maxLength={3} maxLength={3}
@ -105,7 +105,7 @@ class QRModal extends Component {
</span> </span>
<Input <Input
name="pageNumber" name="pageNumber"
// label=window.t("نام") // label={window.t("نام")
parent={this} parent={this}
defaultValue={pageNumber} defaultValue={pageNumber}
maxLength={3} maxLength={3}

@ -35,7 +35,7 @@ export default function Sample({ fileId }) {
> >
<Page <Page
pageNumber={pageNumber} pageNumber={pageNumber}
noData=window.t("نمونه ای برای این محصول درج نشده است") noData={window.t("نمونه ای برای این محصول درج نشده است")
/> />
</Document> </Document>
<p> <p>

@ -81,7 +81,12 @@ class Support extends Component {
} }
render() { render() {
let { status } = this.props; let { status } = this.props;
let opt = [window.t("واحد مورد نظر"), window.t("واحد فروش"), window.t("واحد فنی"), window.t("واحد محتوایی")]; let opt = [
window.t("واحد مورد نظر"),
window.t("واحد فروش"),
window.t("واحد فنی"),
window.t("واحد محتوایی"),
];
opt = opt.map((e) => [e, e]); opt = opt.map((e) => [e, e]);
return ( return (
<> <>
@ -100,7 +105,11 @@ class Support extends Component {
name={"name"} name={"name"}
parent={this} parent={this}
/> />
<Input label={window.t(window.t(window.t("شماره تماس")))} name={"cellphone"} parent={this} /> <Input
label={window.t("شماره تماس")}
name={"cellphone"}
parent={this}
/>
</> </>
)} )}
<Select <Select

Loading…
Cancel
Save