|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
import React, { useEffect } from "react"; |
|
|
|
|
import Book from "./components/Book"; |
|
|
|
|
import { connect } from "react-redux"; |
|
|
|
|
import {publicApi} from '../../redux/actions'; |
|
|
|
|
import { publicApi } from "../../redux/actions"; |
|
|
|
|
import b1Image from "./assets/b1.png"; |
|
|
|
|
import _ from "lodash"; |
|
|
|
|
|
|
|
|
@ -13,21 +13,21 @@ const colors = { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const status = { |
|
|
|
|
1: "در حال پردازش", |
|
|
|
|
4: "درخواست رد شد", |
|
|
|
|
3: "تکمیل شد", |
|
|
|
|
2: "ارسال شده", |
|
|
|
|
1: window.t("در حال پردازش"), |
|
|
|
|
4: window.t("درخواست رد شد"), |
|
|
|
|
3: window.t("تکمیل شد"), |
|
|
|
|
2: window.t("ارسال شده"), |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
function OrderDetails({ order, setHeaderOptions, headerOptions }) { |
|
|
|
|
useEffect(() => { |
|
|
|
|
setHeaderOptions(headerOptions); |
|
|
|
|
},[]); |
|
|
|
|
}, []); |
|
|
|
|
return ( |
|
|
|
|
<div className="px-4 flex flex-col py-5 lg:pt-24 lg:w-3/5 lg:mx-auto"> |
|
|
|
|
<div className="flex flex-row w-full justify-between items-center p-3 bg-blueC0 bg-opacity-10 rounded-t-md dark:bg-blueC0 dark:bg-opacity-10"> |
|
|
|
|
<strong className="font-medium text-sm lg:text-tiny text-blue52 dark:text-white"> |
|
|
|
|
{_.join(["شماره سفارش:", order.number], " ")} |
|
|
|
|
{_.join([window.t("شماره سفارش:"), order.number], " ")} |
|
|
|
|
</strong> |
|
|
|
|
<div className="flex flex-row items-center"> |
|
|
|
|
<span className="text-xs lg:text-tiny font-light text-blue52 dark:text-white"> |
|
|
|
@ -40,20 +40,26 @@ function OrderDetails({ order, setHeaderOptions, headerOptions }) { |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div className="w-full flex flex-row items-center py-4 border-b border-solid border-blueFF1 dark:border-gray45"> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white">آدرس تحویل:</strong> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{window.t("آدرس تحویل:")} |
|
|
|
|
</strong> |
|
|
|
|
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{order.address} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
<div className="w-full flex flex-row justify-between py-0 border-b border-solid border-blueFF1 dark:border-gray45"> |
|
|
|
|
<div className="flex flex-row py-4"> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white">مشخصات تحویل گیرنده:</strong> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{window.t("مشخصات تحویل گیرنده:")} |
|
|
|
|
</strong> |
|
|
|
|
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{order.name} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
<div className="flex flex-row py-4"> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white">شماره موبایل:</strong> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{window.t("شماره موبایل:")} |
|
|
|
|
</strong> |
|
|
|
|
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{order.cellphone} |
|
|
|
|
</span> |
|
|
|
@ -61,10 +67,12 @@ function OrderDetails({ order, setHeaderOptions, headerOptions }) { |
|
|
|
|
</div> |
|
|
|
|
<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"> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{_.join(["کد تحویل", order.receiveCode], " ")} |
|
|
|
|
{_.join([window.t("کد تحویل:"), order.receiveCode], " ")} |
|
|
|
|
</strong> |
|
|
|
|
<p className="font-light text-right mt-3 text-xs lg:text-sm text-green4F dark:text-white"> |
|
|
|
|
این کد را پس از دریافت کالا، به مامور ارسال دانوین اعلام فرمایید |
|
|
|
|
{window.t( |
|
|
|
|
"این کد را پس از دریافت کالا، به مامور ارسال دانوین اعلام فرمایید" |
|
|
|
|
)} |
|
|
|
|
</p> |
|
|
|
|
</div> |
|
|
|
|
<div className="w-full flex flex-col"> |
|
|
|
@ -74,41 +82,54 @@ function OrderDetails({ order, setHeaderOptions, headerOptions }) { |
|
|
|
|
</div> |
|
|
|
|
<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"> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white">مبلغ سبد خرید:</strong> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{window.t("مبلغ سبد خرید:")} |
|
|
|
|
</strong> |
|
|
|
|
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{_.join([order.shoppingCardPrice, "تومان"], " ")} |
|
|
|
|
{_.join([order.shoppingCardPrice, window.t("تومان")], " ")} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
<div className="flex flex-row py-4"> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white">تخفیف:</strong> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{window.t("تخفیف:")} |
|
|
|
|
</strong> |
|
|
|
|
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{_.join([order.discountPrice, "تومان"], " ")} |
|
|
|
|
{_.join([order.discountPrice, window.t("تومان")], " ")} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<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"> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white"> هزینه ارسال کالا:</strong> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{window.t("هزینه ارسال کالا:")} |
|
|
|
|
</strong> |
|
|
|
|
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{_.join([order.sendPrice, "تومان"], " ")} |
|
|
|
|
{_.join([order.sendPrice, window.t("تومان")], " ")} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
<div className="flex flex-row py-4 border"> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white">جمع هزینه پرداختی:</strong> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{window.t("جمع هزینه پرداختی:")} |
|
|
|
|
</strong> |
|
|
|
|
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{_.join([order.totalPrice, "تومان"], " ")} |
|
|
|
|
{_.join([order.totalPrice, window.t("تومان")], " ")} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<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"> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white">نحوه پرداخت:</strong> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{window.t("نحوه پرداخت:")} |
|
|
|
|
</strong> |
|
|
|
|
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{order.payMethod} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
<div className="flex flex-row py-4"> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white"> شماره تراکنش:</strong> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{" "} |
|
|
|
|
{window.t("شماره تراکنش:")} |
|
|
|
|
</strong> |
|
|
|
|
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{order.transactionNumber} |
|
|
|
|
</span> |
|
|
|
@ -116,7 +137,9 @@ function OrderDetails({ order, setHeaderOptions, headerOptions }) { |
|
|
|
|
</div> |
|
|
|
|
<div className="w-full flex flex-row justify-between py-2"> |
|
|
|
|
<div className="w-full flex flex-row py-4"> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white">تاریخ تحویل:</strong> |
|
|
|
|
<strong className="text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{window.t("تاریخ تحویل:")} |
|
|
|
|
</strong> |
|
|
|
|
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> |
|
|
|
|
{order.date} |
|
|
|
|
</span> |
|
|
|
@ -126,13 +149,11 @@ function OrderDetails({ order, setHeaderOptions, headerOptions }) { |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const mapStateToProps = (state) => ({ |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
const mapStateToProps = (state) => ({}); |
|
|
|
|
|
|
|
|
|
const mapDispatchToProps = { |
|
|
|
|
setHeaderOptions: publicApi.setHeaderOptions, |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(OrderDetails); |
|
|
|
|
|
|
|
|
@ -144,15 +165,16 @@ OrderDetails.defaultProps = { |
|
|
|
|
items: [b1Image, b1Image], |
|
|
|
|
date: "1400/1/11", |
|
|
|
|
cost: "1.240.000", |
|
|
|
|
address: |
|
|
|
|
"تهران خیابان انقلاب حدفاصل ابوریحان و فلسطین بن بست سروش پلاک 2 واحد 12 شرقی", |
|
|
|
|
name: "هومن عابدی", |
|
|
|
|
address: window.t( |
|
|
|
|
"تهران خیابان انقلاب حدفاصل ابوریحان و فلسطین بن بست سروش پلاک 2 واحد 12 شرقی" |
|
|
|
|
), |
|
|
|
|
name: window.t("هومن عابدی"), |
|
|
|
|
cellphone: "09121234568", |
|
|
|
|
shoppingCardPrice: "981.000", |
|
|
|
|
discountPrice: "12.000", |
|
|
|
|
sendPrice: "18.000", |
|
|
|
|
totalPrice: "18.000", |
|
|
|
|
payMethod: "حضوری", |
|
|
|
|
payMethod: window.t("حضوری"), |
|
|
|
|
transactionNumber: " BS3194DNB98312", |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|