diff --git a/src/redux/actions/userFactor.js b/src/redux/actions/userFactor.js index 83e5ad4..2c7920a 100644 --- a/src/redux/actions/userFactor.js +++ b/src/redux/actions/userFactor.js @@ -27,6 +27,10 @@ const userFactor = { async (dispatch) => await proxy.get("userFactor/fullList", data, { dispatch }), + selectOrder: + (data = {}) => + (dispatch) => + dispatch({ type: "userFactor/selectOrder", data }), //vod vodPayment: (data1 = {}, data2 = {}) => diff --git a/src/redux/reducers/userFactor.js b/src/redux/reducers/userFactor.js index e64e6f8..a80a1d0 100644 --- a/src/redux/reducers/userFactor.js +++ b/src/redux/reducers/userFactor.js @@ -8,6 +8,7 @@ const initialState = { checkEmpty: false, isVerified: null, fullList: [], + selectedOrder: null, }; export default function userFactor(state = initialState, action) { @@ -32,6 +33,13 @@ export default function userFactor(state = initialState, action) { fullList: data, error: null, }; + case "userFactor/selectOrder": + return { + ...state, + loading: false, + selectedOrder: data, + error: null, + }; case "userFactor/info": return { ...state, loading: false, info: data, error: null }; case "userFactor/add": diff --git a/src/views/Order/components/Book.js b/src/views/Order/components/Book.js index c7b381f..2d2c22e 100644 --- a/src/views/Order/components/Book.js +++ b/src/views/Order/components/Book.js @@ -1,35 +1,37 @@ import React from "react"; -import _ from "lodash"; +import { connect } from "react-redux"; -export default function Book({ book }) { +function Book({ book, grades }) { return (
{window.t( "این کد را پس از دریافت کالا، به مامور ارسال دانوین اعلام فرمایید" @@ -79,62 +93,52 @@ function OrderDetails({ order, setHeaderOptions, headerOptions, isMobile }) {