master
mahdi 2 years ago
parent 6a98f0a86f
commit 7aaf28e0ab
  1. 15
      src/components/Design2D/index.js
  2. 7
      src/components/Product/index.js
  3. 10
      src/views/Contact/index.js
  4. 7
      src/views/Dashboard/layouts/Main/MyBooks/index.js
  5. 2
      src/views/Dashboard/layouts/Main/UserItems/ProductSuggestion/index.js
  6. 10
      src/views/Dashboard/layouts/Mobile/ProfileAddress/index.js
  7. 4
      src/views/DeliveryForm/TransportDate/index.js
  8. 11
      src/views/DeliveryForm/TransportMethod/index.js
  9. 27
      src/views/DeliveryForm/index.js
  10. 21
      src/views/Faq/index.js
  11. 14
      src/views/Favorites/index.js
  12. 6
      src/views/Home/Portrait/Private/MyBooks/index.js
  13. 4
      src/views/Order/components/Book.js
  14. 13
      src/views/Order/index.js
  15. 8
      src/views/Orders/components/Order.js
  16. 2
      src/views/Orders/index.js
  17. 2
      src/views/Product/Desktop/ProductOverAll/index.js
  18. 10
      src/views/Product/index.js

@ -3,7 +3,7 @@ import React from "react";
const Design2D = ({ array }) => { const Design2D = ({ array }) => {
return ( return (
<section <section
className="flex items-center justify-around p-2 bg-red-400" className="flex items-center justify-around"
style={{ height: "420px" }} style={{ height: "420px" }}
> >
{array.map((item, index) => ( {array.map((item, index) => (
@ -11,10 +11,6 @@ const Design2D = ({ array }) => {
className={`flex flex-col justify-center h-full`} className={`flex flex-col justify-center h-full`}
style={{ style={{
flex: item.flex, flex: item.flex,
// display:'-webkit-box',
// display:'flex',
// maxHeight: '400px',
// minHeight: '400px'
}} }}
key={index} key={index}
> >
@ -32,14 +28,7 @@ const Design2D = ({ array }) => {
backgroundRepeat: "no-repeat", backgroundRepeat: "no-repeat",
backgroundPosition: "center", backgroundPosition: "center",
}} }}
> ></div>
{/* <p>inside div</p> */}
{/* <img src={item1.image} className=' rounded-xl' style={{
objectFit: 'cover',
display: 'block',
minWidth: '100%'
}}/> */}
</div>
</div> </div>
))} ))}
</div> </div>

@ -122,12 +122,13 @@ const ProductDesign = ({
{/* price with line on it */} {/* price with line on it */}
{discountPrice && ( {discountPrice && (
<p className="line-through text-xs text-borderColor mr-2"> <p className="line-through text-xs text-borderColor mr-2">
145<span>{window.t("تومان")}</span> {separate(product.product?.masterPrice)}
<span>{window.t("تومان")}</span>
</p> </p>
)} )}
</div> </div>
<p className="text-lg text-productPrice font-semibold inline text-green4F"> <p className="text-lg text-productPrice font-semibold inline text-green4F">
{separate(product.product[type]?.price)}{" "} {separate(product.product[type]?.price)}
<span>{window.t("تومان")}</span> <span>{window.t("تومان")}</span>
</p> </p>
</div> </div>
@ -191,7 +192,7 @@ ProductDesign.defaultProps = {
discount: false, discount: false,
discountPricePercent: false, discountPricePercent: false,
// product price // product price
discountPrice: false, discountPrice: true,
priceHolder: true, priceHolder: true,
productContent: false, productContent: false,

@ -96,11 +96,6 @@ Contact.defaultProps = {
tel: null, tel: null,
color: "#766600", color: "#766600",
}, },
// link: {
// title: window.t("ارتباط با بخش پشتیبانی"),
// link: "/support",
// color: "#766600",
// },
bg: "#D3B70222", bg: "#D3B70222",
borderColor: "#D3B70255", borderColor: "#D3B70255",
}, },
@ -128,11 +123,6 @@ Contact.defaultProps = {
tel: null, tel: null,
color: "#066A5C", color: "#066A5C",
}, },
// link: {
// title: window.t("لیست نمایندگیهای فروش"),
// link: "/sell",
// color: "#0A7769",
// },
bg: "#0A776922", bg: "#0A776922",
borderColor: "#0A776955", borderColor: "#0A776955",
}, },

@ -55,11 +55,6 @@ export const MyBooks = ({ books, grades, isMobile, userProducts }) => {
) : null} ) : null}
</div> </div>
</div> </div>
{/* <ProductSuggestion
products={books?.slice(0, 3)}
grades={grades}
isMobile={isMobile}
/> */}
</div> </div>
); );
}; };
@ -67,7 +62,7 @@ export const MyBooks = ({ books, grades, isMobile, userProducts }) => {
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
userProducts: state.userProduct.list, userProducts: state.userProduct.list,
grades: state.publicApi.grades, grades: state.publicApi.grades,
isMobile: state.config.device === 'mobile', isMobile: state.config.device === "mobile",
books: state.book.list, books: state.book.list,
}); });

@ -8,7 +8,7 @@ function Suggestion({ products, grades, isMobile }) {
return ( return (
<div className="flex flex-col pl-7 pr-8 pt-4 border border-solid border-gray-200 bg-blueC0 bg-opacity-5 shadow-all rounded-md w-full"> <div className="flex flex-col pl-7 pr-8 pt-4 border border-solid border-gray-200 bg-blueC0 bg-opacity-5 shadow-all rounded-md w-full">
<strong className="text-green7B dark:text-white font-bold text-2xl lg:text-base my-4"> <strong className="text-green7B dark:text-white font-bold text-2xl lg:text-base my-4">
پیشنهادات ما به شما {window.t("پیشنهادات ما به شما")}
</strong> </strong>
{products?.length ? ( {products?.length ? (
<div className="relative w-full ltr"> <div className="relative w-full ltr">

@ -144,7 +144,7 @@ const Location = ({
className="py-3 pr-2 pl-10 border-none m-0 text-sm text-red19 font-bold" className="py-3 pr-2 pl-10 border-none m-0 text-sm text-red19 font-bold"
onClick={() => delAddress(address.id)} onClick={() => delAddress(address.id)}
> >
حذف {window.t("حذف")}
</button> </button>
</div> </div>
<div className={"flex flex-col flex-1 mr-2"}> <div className={"flex flex-col flex-1 mr-2"}>
@ -177,20 +177,20 @@ const Location = ({
<div className={`flex w-full ${active ? "" : "flex-row"}`}> <div className={`flex w-full ${active ? "" : "flex-row"}`}>
<div className={"flex flex-col flex-1 mb-4"}> <div className={"flex flex-col flex-1 mb-4"}>
<span className={"text-sm leading-6"}> <span className={"text-sm leading-6"}>
{`{window.t("آدرس:")}` + " " + address.address} {`${window.t("آدرس:")}` + " " + address.address}
</span> </span>
<span className={"text-sm leading-6 mt-1.5"}> <span className={"text-sm leading-6 mt-1.5"}>
{`{window.t("نام:")}` + {`${window.t("نام:")}` +
" " + " " +
address.firstName + address.firstName +
" " + " " +
address.lastName} address.lastName}
</span> </span>
<span className={"text-sm leading-6 mt-1.5"}> <span className={"text-sm leading-6 mt-1.5"}>
{`{window.t("کد پستی:")}` + " " + address.postalCode} {`${window.t("کد پستی:")}` + " " + address.postalCode}
</span> </span>
<span className={"text-sm leading-6 mt-1.5"}> <span className={"text-sm leading-6 mt-1.5"}>
{`{window.t("شماره تماس:")}` + " " + address.cellphone} {`${window.t("شماره تماس:")}` + " " + address.cellphone}
</span> </span>
</div> </div>
{!active && ( {!active && (

@ -11,7 +11,7 @@ function TransportDate({ transportDate, isMobile }) {
return isMobile ? ( return isMobile ? (
<ButtonBetween <ButtonBetween
item={time.time} item={time.time}
status={"تکمیل ظرفیت"} status={window.t("تکمیل ظرفیت")}
width="100%" width="100%"
onClick={() => setActiveDate(time)} onClick={() => setActiveDate(time)}
active={activeDate === time} active={activeDate === time}
@ -35,7 +35,7 @@ function TransportDate({ transportDate, isMobile }) {
onClick={() => setActiveDate(time)} onClick={() => setActiveDate(time)}
active={activeDate === time} active={activeDate === time}
toggle={true} toggle={true}
status={"تکمیل ظرفیت"} status={window.t("تکمیل ظرفیت")}
> >
<strong <strong
className={`text-tiny transition-all duration-500 dark:text-white ${ className={`text-tiny transition-all duration-500 dark:text-white ${

@ -35,8 +35,8 @@ function TransportMethod({
) )
: {} : {}
} }
item={"ارسال با" + " " + method.name} item={window.t("ارسال با") + " " + method.name}
status={separate(method.price) + " " + "تومان"} status={separate(method.price) + " " + window.t("تومان")}
active={active} active={active}
toggle={true} toggle={true}
/> />
@ -77,7 +77,8 @@ function TransportMethod({
: "text-blue52 dark:text-white" : "text-blue52 dark:text-white"
}`} }`}
> >
هزینه ارسال &nbsp; {separate(method.price)} {window.t("هزینه ارسال")}
&nbsp; {separate(method.price)}
</span> </span>
</button> </button>
); );
@ -85,7 +86,7 @@ function TransportMethod({
return isMobile ? ( return isMobile ? (
<section className="mt-0 w-full"> <section className="mt-0 w-full">
<strong className="text-green7B font-bold dark:text-white text-base"> <strong className="text-green7B font-bold dark:text-white text-base">
لطفا یک روش ارسال انتخاب کنید {window.t("یک روش ارسال انتخاب کنید")}
</strong> </strong>
<ul className="list-none p-0 m-0 flex flex-col gap-4 w-full mt-5"> <ul className="list-none p-0 m-0 flex flex-col gap-4 w-full mt-5">
{list.map((method, index) => ( {list.map((method, index) => (
@ -100,7 +101,7 @@ function TransportMethod({
) : ( ) : (
<section className="mt-1 w-full"> <section className="mt-1 w-full">
<strong className="font-medium dark:text-white"> <strong className="font-medium dark:text-white">
لطفا یک روش ارسال انتخاب کنید {window.t("لطفا یک روش ارسال انتخاب کنید")}
</strong> </strong>
<ul className="list-none p-0 m-0 flex gap-5 flex-wrap"> <ul className="list-none p-0 m-0 flex gap-5 flex-wrap">
{list.map((method, index) => ( {list.map((method, index) => (

@ -40,7 +40,7 @@ export const DeliveryForm = ({
color: !isDark ? (type === "error" ? "#F1420D" : "#246E8A") : "", color: !isDark ? (type === "error" ? "#F1420D" : "#246E8A") : "",
}} }}
> >
{value + " " + "تومان"} {value + " " + window.t("تومان")}
</span> </span>
</div> </div>
); );
@ -65,7 +65,7 @@ export const DeliveryForm = ({
}} }}
> >
<strong className="text-green4F text-lg font-semibold dark:text-white"> <strong className="text-green4F text-lg font-semibold dark:text-white">
تکمیل اطلاعات {window.t("تکمیل اطلاعات")}
</strong> </strong>
<img <img
src={ src={
@ -73,7 +73,7 @@ export const DeliveryForm = ({
? "/assets/icons/arrow-white.svg" ? "/assets/icons/arrow-white.svg"
: "/assets/icons/arrow-primary.svg" : "/assets/icons/arrow-primary.svg"
} }
alt="بازگشت" alt={window.t("بازگشت")}
className="w-6" className="w-6"
onClick={() => setPhase("products")} onClick={() => setPhase("products")}
/> />
@ -124,21 +124,22 @@ DeliveryForm.defaultProps = {
form: { form: {
addresses: [ addresses: [
{ {
address: address: window.t(
" تهران میدان احمد آباد خیابان شریعتی بعد از میدان فجر بن بست شکوفه پلاک 4 زنگ 12", "تهران میدان احمد آباد خیابان شریعتی بعد از میدان فجر بن بست شکوفه پلاک 4 زنگ 12"
receiver: "احمد نام آور", ),
receiver: window.t("احمد نام آور"),
postalCode: "54352432", postalCode: "54352432",
cellphone: "09123456789", cellphone: "09123456789",
}, },
], ],
transportMethods: [ transportMethods: [
{ {
name: "ارسال اکسپرس مخصوص شهر تهران", name: window.t("ارسال اکسپرس مخصوص شهر تهران"),
cost: "25.000", cost: "25.000",
icon: ExpressIcon, icon: ExpressIcon,
}, },
{ {
name: "ارسال با پست پیشتاز", name: window.t("ارسال با پست پیشتاز"),
cost: "25.000", cost: "25.000",
icon: PishtazIcon, icon: PishtazIcon,
}, },
@ -147,25 +148,25 @@ DeliveryForm.defaultProps = {
day: new Date(), day: new Date(),
times: [ times: [
{ {
time: "ساعت 9 تا 12", time: window.t("ساعت 9 تا 12"),
status: "completed", status: "completed",
}, },
{ {
time: "ساعت 12 تا 15", time: window.t("ساعت 12 تا 15"),
status: "free", status: "free",
}, },
{ {
time: "ساعت 15 تا 18", time: window.t("ساعت 15 تا 18"),
status: "free", status: "free",
}, },
], ],
}, },
paymentMethods: [ paymentMethods: [
{ {
name: "پرداخت آنلاین با کلیه کارتهای عضو شبکه شتاب", name: window.t("پرداخت آنلاین با کلیه کارتهای عضو شبکه شتاب"),
}, },
{ {
name: "پرداخت در محل", name: window.t("پرداخت در محل"),
}, },
], ],
}, },

@ -12,7 +12,14 @@ import faqBgImage from "./faq-bg.svg";
import desktopFaqBgImage from "./desktop-faq-bg.svg"; import desktopFaqBgImage from "./desktop-faq-bg.svg";
import searchLight from "../../assets/icons/search-light.svg"; import searchLight from "../../assets/icons/search-light.svg";
function Faq({ headerOptions, setHeaderOptions, isMobile, list, getList, selectFaq }) { function Faq({
headerOptions,
setHeaderOptions,
isMobile,
list,
getList,
selectFaq,
}) {
useEffect(() => { useEffect(() => {
setHeaderOptions(headerOptions); setHeaderOptions(headerOptions);
getList(); getList();
@ -24,7 +31,7 @@ function Faq({ headerOptions, setHeaderOptions, isMobile, list, getList, selectF
> >
<Header <Header
bg={isMobile ? faqBgImage : desktopFaqBgImage} bg={isMobile ? faqBgImage : desktopFaqBgImage}
title="پرسشهای متداول" title={window.t("پرسش های متداول")}
/> />
<div className="w-full flex flex-col px-4 transform -translate-y-12 items-center"> <div className="w-full flex flex-col px-4 transform -translate-y-12 items-center">
@ -43,8 +50,8 @@ function Faq({ headerOptions, setHeaderOptions, isMobile, list, getList, selectF
</div> </div>
<div className="w-full flex lg:w-4/5 justify-end"> <div className="w-full flex lg:w-4/5 justify-end">
<NotFound <NotFound
title={"پرسش خود را در لیست بالا پیدا نکردید؟"} title={window.t("پرسش خود را در لیست بالا پیدا نکردید؟")}
subTitle={"برای ما پیام ارسال کنید"} subTitle={window.t("برای ما پیام ارسال کنید")}
link="/contact-us" link="/contact-us"
/> />
</div> </div>
@ -55,13 +62,13 @@ function Faq({ headerOptions, setHeaderOptions, isMobile, list, getList, selectF
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
isMobile: state.publicApi.isMobile, isMobile: state.publicApi.isMobile,
list : state.faq.list, list: state.faq.list,
active : state.faq.active active: state.faq.active,
}); });
const mapDispatchToProps = { const mapDispatchToProps = {
setHeaderOptions: publicApi.setHeaderOptions, setHeaderOptions: publicApi.setHeaderOptions,
getList: faq.list, getList: faq.list,
selectFaq: faq.selectFaq selectFaq: faq.selectFaq,
}; };
export default connect(mapStateToProps, mapDispatchToProps)(Faq); export default connect(mapStateToProps, mapDispatchToProps)(Faq);

@ -35,7 +35,7 @@ const Favorites = ({
<Bookmark key={index} bookmark={bookmark} /> <Bookmark key={index} bookmark={bookmark} />
)) ))
) : ( ) : (
<Empty text="هیج موردی در علاقهمندیهای شما وجود ندارد." /> <Empty text={window.t("هیج موردی در علاقهمندیهای شما وجود ندارد.")} />
)} )}
</div> </div>
); );
@ -78,18 +78,18 @@ export default connect(mapStateToProps, mapDispatchToProps)(Favorites);
Favorites.defaultProps = { Favorites.defaultProps = {
bookmarkList: [ bookmarkList: [
{ {
name: "کتاب آموزشی علوم تجربی", name: window.t("کتاب آموزشی علوم تجربی"),
grade: "پایه ششم ابتدایی", grade: window.t("پایه ششم ابتدایی"),
image: bookImage, image: bookImage,
}, },
{ {
name: "کتاب آموزشی علوم تجربی", name: window.t("کتاب آموزشی علوم تجربی"),
grade: "پایه ششم ابتدایی", grade: window.t("پایه ششم ابتدایی"),
image: bookImage, image: bookImage,
}, },
{ {
name: "کتاب آموزشی علوم تجربی", name: window.t("کتاب آموزشی علوم تجربی"),
grade: "پایه ششم ابتدایی", grade: window.t("پایه ششم ابتدایی"),
image: bookImage, image: bookImage,
}, },
], ],

@ -63,13 +63,13 @@ function MyBooks({ books, grades, isMobile }) {
to={"/scan"} to={"/scan"}
className="w-full text-center py-3 bg-blueC0 text-white font-medium rounded-sm text-tiny" className="w-full text-center py-3 bg-blueC0 text-white font-medium rounded-sm text-tiny"
> >
اسکن کد QR {window.t(" اسکن کد QR")}
</Link> </Link>
<a <a
href={`https://ar.dnvn.ir/lunch?id=${book.id}`} href={`https://ar.dnvn.ir/lunch?id=${book.id}`}
className="w-full text-center py-3 bg-gray-400 text-white font-medium rounded-sm text-tiny" className="w-full text-center py-3 bg-gray-400 text-white font-medium rounded-sm text-tiny"
> >
واقعیت افزوده {window.t("واقعیت افزوده")}
</a> </a>
</div> </div>
</Modal> </Modal>
@ -83,7 +83,7 @@ function MyBooks({ books, grades, isMobile }) {
<div className="px-4 mb-5 lg:mb-0" style={{ maxWidth: "100%" }}> <div className="px-4 mb-5 lg:mb-0" style={{ maxWidth: "100%" }}>
<div className=" w-full flex flex-col rounded-md pt-4 lg:py-5 px-2 lg:px-4 bg-opacity-5 border border-green-200 border-solid dark:bg-gray2077 dark:border-opacity-40 overflow-hidden"> <div className=" w-full flex flex-col rounded-md pt-4 lg:py-5 px-2 lg:px-4 bg-opacity-5 border border-green-200 border-solid dark:bg-gray2077 dark:border-opacity-40 overflow-hidden">
<strong className="text-green7B dark:text-white font-bold text-base lg:text-base mb-2"> <strong className="text-green7B dark:text-white font-bold text-base lg:text-base mb-2">
کتابهای من {window.t("کتابهای من")}
</strong> </strong>
<ul className=" list-none w-full overflow-x-scroll pt-2 flex lg:hidden lg:pt-5 lg:flex-wrap lg:overflow-y-scroll gap-3 lg:gap-10 no-scrollbar"> <ul className=" list-none w-full overflow-x-scroll pt-2 flex lg:hidden lg:pt-5 lg:flex-wrap lg:overflow-y-scroll gap-3 lg:gap-10 no-scrollbar">
{books?.slice(0, 5)?.map((book, index) => ( {books?.slice(0, 5)?.map((book, index) => (

@ -14,7 +14,7 @@ function Book({ book, grades }) {
{book?.product?.book?.name || " "} {book?.product?.book?.name || " "}
</strong> </strong>
<span className="mt-4 text-xs lg:text-sm text-gray70 dark:text-greenBA"> <span className="mt-4 text-xs lg:text-sm text-gray70 dark:text-greenBA">
{"پایه" + " " + grades[book?.product?.book?.gradeId]} {window.t("پایه") + " " + grades[book?.product?.book?.gradeId]}
</span> </span>
</div> </div>
</div> </div>
@ -23,7 +23,7 @@ function Book({ book, grades }) {
{book?.product?.count} {book?.product?.count}
</span> </span>
<div className="mr-3 text-blueC0 text-xs lg:text-base dark:text-white"> <div className="mr-3 text-blueC0 text-xs lg:text-base dark:text-white">
{book?.product?.price + " " + "تومان"} {book?.product?.price + " " + window.t("تومان")}
</div> </div>
</div> </div>
</div> </div>

@ -33,7 +33,7 @@ function OrderDetails({ order, setHeaderOptions, headerOptions, isMobile }) {
<div className="flex w-full justify-between items-center p-3 bg-blueC0 bg-opacity-10 rounded-t-md dark:bg-blueC0 dark:bg-opacity-10"> <div className="flex w-full justify-between items-center p-3 bg-blueC0 bg-opacity-10 rounded-t-md dark:bg-blueC0 dark:bg-opacity-10">
{order?.transactionId ? ( {order?.transactionId ? (
<strong className="font-medium text-sm lg:text-tiny text-blue52 dark:text-white"> <strong className="font-medium text-sm lg:text-tiny text-blue52 dark:text-white">
{"شماره سفارش:" + " " + order?.transactionId} {window.t("شماره سفارش:") + " " + order?.transactionId}
</strong> </strong>
) : null} ) : null}
{order?.condition ? ( {order?.condition ? (
@ -83,7 +83,7 @@ function OrderDetails({ order, setHeaderOptions, headerOptions, isMobile }) {
<div className="w-full rounded-md flex flex-col p-4 mt-2 bg-blueC0 bg-opacity-10 dark:bg-blueC0 dark:bg-opacity-20 dark:border-blueC0 dark:border dark:border-solid"> <div className="w-full rounded-md flex flex-col p-4 mt-2 bg-blueC0 bg-opacity-10 dark:bg-blueC0 dark:bg-opacity-20 dark:border-blueC0 dark:border dark:border-solid">
{order?.recieverPostalCode ? ( {order?.recieverPostalCode ? (
<strong className="text-xs lg:text-tiny text-green4F dark:text-white"> <strong className="text-xs lg:text-tiny text-green4F dark:text-white">
{"کد تحویل" + " " + order?.recieverPostalCode} {window.t("کد تحویل") + " " + order?.recieverPostalCode}
</strong> </strong>
) : null} ) : null}
<p className="font-light text-right mt-3 text-xs lg:text-sm text-green4F dark:text-white"> <p className="font-light text-right mt-3 text-xs lg:text-sm text-green4F dark:text-white">
@ -104,7 +104,7 @@ function OrderDetails({ order, setHeaderOptions, headerOptions, isMobile }) {
{window.t("مبلغ سبد خرید:")} {window.t("مبلغ سبد خرید:")}
</strong> </strong>
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> <span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white">
{order?.sumPrice + " " + "تومان"} {order?.sumPrice + " " + window.t("تومان")}
</span> </span>
</div> </div>
) : null} ) : null}
@ -116,7 +116,7 @@ function OrderDetails({ order, setHeaderOptions, headerOptions, isMobile }) {
{window.t("هزینه ارسال کالا:")} {window.t("هزینه ارسال کالا:")}
</strong> </strong>
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> <span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white">
{order?.transportPrice + " " + "تومان"} {order?.transportPrice + " " + window.t("تومان")}
</span> </span>
</div> </div>
) : null} ) : null}
@ -126,7 +126,7 @@ function OrderDetails({ order, setHeaderOptions, headerOptions, isMobile }) {
{window.t("جمع هزینه پرداختی:")} {window.t("جمع هزینه پرداختی:")}
</strong> </strong>
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> <span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white">
{order?.payPrice + " " + "تومان"} {order?.payPrice + " " + window.t("تومان")}
</span> </span>
</div> </div>
) : null} ) : null}
@ -134,7 +134,6 @@ function OrderDetails({ order, setHeaderOptions, headerOptions, isMobile }) {
<div className="w-full flex flex-row justify-between py-2 border-b border-solid border-blueFF1 dark:border-gray45"> <div className="w-full flex flex-row justify-between py-2 border-b border-solid border-blueFF1 dark:border-gray45">
<div className="flex flex-row py-4"> <div className="flex flex-row py-4">
<strong className="text-xs lg:text-tiny text-green4F dark:text-white"> <strong className="text-xs lg:text-tiny text-green4F dark:text-white">
{" "}
{window.t("شماره تراکنش:")} {window.t("شماره تراکنش:")}
</strong> </strong>
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> <span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white">
@ -158,7 +157,7 @@ function OrderDetails({ order, setHeaderOptions, headerOptions, isMobile }) {
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
isMobile: state.config.device === "mobile", isMobile: state.config.device === "mobile",
order: state.userFactor.selectedOrder order: state.userFactor.selectedOrder,
}); });
const mapDispatchToProps = { const mapDispatchToProps = {

@ -27,7 +27,7 @@ function Order({ order, setDashboardPage, isDashboard, selectOrder }) {
<div className="flex w-full justify-between items-center p-3 bg-blueC0 bg-opacity-10 dark:bg-blueC0 dark:bg-opacity-10"> <div className="flex w-full justify-between items-center p-3 bg-blueC0 bg-opacity-10 dark:bg-blueC0 dark:bg-opacity-10">
{order?.transactionId ? ( {order?.transactionId ? (
<strong className="font-medium text-sm lg:text-sm text-green4F dark:text-white"> <strong className="font-medium text-sm lg:text-sm text-green4F dark:text-white">
{"شماره سفارش:" + " " + order?.transactionId} {window.t("شماره سفارش:") + " " + order?.transactionId}
</strong> </strong>
) : null} ) : null}
{order?.condition ? ( {order?.condition ? (
@ -68,7 +68,7 @@ function Order({ order, setDashboardPage, isDashboard, selectOrder }) {
<div> <div>
{order?.followCode ? ( {order?.followCode ? (
<div className="p-2 rounded-md text-center text-xs bg-grayEE dark:bg-gray-400 dark:text-white text-blue5F lg:hidden"> <div className="p-2 rounded-md text-center text-xs bg-grayEE dark:bg-gray-400 dark:text-white text-blue5F lg:hidden">
{"کد تحویل:" + " " + order?.followCode} {window.t("کد تحویل:") + " " + order?.followCode}
</div> </div>
) : null} ) : null}
</div> </div>
@ -81,7 +81,7 @@ function Order({ order, setDashboardPage, isDashboard, selectOrder }) {
fontFamily: "bold", fontFamily: "bold",
}} }}
> >
{"جمع فاکتور:" + " " + order?.payPrice} {window.t("جمع فاکتور:") + " " + order?.payPrice}
</strong> </strong>
) : null} ) : null}
<Link <Link
@ -106,7 +106,7 @@ function Order({ order, setDashboardPage, isDashboard, selectOrder }) {
</Link> </Link>
{order?.payedAt ? ( {order?.payedAt ? (
<span className="my-5 text-xs text-blue52 font-light dark:text-white lg:hidden"> <span className="my-5 text-xs text-blue52 font-light dark:text-white lg:hidden">
{"تاریخ سفارش:" + {window.t("تاریخ سفارش:") +
" " + " " +
moment(order?.payedAt)?.format("jYYYY/jMM/jDD")}{" "} moment(order?.payedAt)?.format("jYYYY/jMM/jDD")}{" "}
</span> </span>

@ -40,7 +40,7 @@ function Orders({
</div> </div>
) : ( ) : (
<Empty <Empty
text="هیچ محصولی برای شما به ثبت نرسیده است." text={window.t("هیچ محصولی برای شما به ثبت نرسیده است.")}
buttonText="ثبت اولین سفارش" buttonText="ثبت اولین سفارش"
buttonAction={() => navigation("/products")} buttonAction={() => navigation("/products")}
/> />

@ -60,7 +60,7 @@ export const ProductOverAll = ({
</h1> </h1>
{book?.gradeId ? ( {book?.gradeId ? (
<div className="text-blueC0 text-tiny dark:text-greenBA"> <div className="text-blueC0 text-tiny dark:text-greenBA">
{"پایه" + " " + grades[book?.gradeId]} {window.t("پایه") + " " + grades[book?.gradeId]}
</div> </div>
) : null} ) : null}

@ -84,9 +84,8 @@ export const Product = ({
}, [userProducts, book]); }, [userProducts, book]);
useEffect(() => { useEffect(() => {
if(!isMobile){ if (!isMobile) {
setHeaderOptions(headerOptions); setHeaderOptions(headerOptions);
} }
getInfo({ id: location.getId(), vod: true }); getInfo({ id: location.getId(), vod: true });
if (!isMobile) { if (!isMobile) {
@ -157,7 +156,7 @@ export const Product = ({
</li> </li>
{book?.rate ? ( {book?.rate ? (
<li className="border-solid border-blueFE flex-1 flex-shrink-0 text-center text-tiny leading-5 font-medium text-green7B dark:text-white"> <li className="border-solid border-blueFE flex-1 flex-shrink-0 text-center text-tiny leading-5 font-medium text-green7B dark:text-white">
{book?.rate} <br /> امتیاز {book?.rate} <br /> {window.t("امتیاز")}
</li> </li>
) : null} ) : null}
</ul> </ul>
@ -258,7 +257,10 @@ export const Product = ({
</div> </div>
) : ( ) : (
<div className="flex flex-col items-center justify-center lg:py-24"> <div className="flex flex-col items-center justify-center lg:py-24">
<DesktopProductLayout physicalProduct={physicalProduct} rate={book?.rate || 0} /> <DesktopProductLayout
physicalProduct={physicalProduct}
rate={book?.rate || 0}
/>
</div> </div>
)} )}
</> </>

Loading…
Cancel
Save