WIP CA_BC_ETFTable decoder
This commit is contained in:
@@ -3,31 +3,39 @@ import { Button, Card, Input, Space, Table, Typography } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { Link, useHistory, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
||||
import { DateFormatter, DateTimeFormatter } from "../../utils/DateFormatter";
|
||||
import { alphaSort } from "../../utils/sorters";
|
||||
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||
import PrintWrapperComponent from "../print-wrapper/print-wrapper.component";
|
||||
import { TemplateList } from "../../utils/TemplateConstants";
|
||||
import CaBcEtfTableModalContainer from "../ca-bc-etf-table-modal/ca-bc-etf-table-modal.container";
|
||||
import PrintWrapperComponent from "../print-wrapper/print-wrapper.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
setPaymentContext: (context) =>
|
||||
dispatch(setModalContext({ context: context, modal: "payment" })),
|
||||
setCaBcEtfTableContext: (context) =>
|
||||
dispatch(
|
||||
setModalContext({ context: context, modal: "ca_bc_eftTableConvert" })
|
||||
),
|
||||
});
|
||||
|
||||
export function PaymentsListPaginated({
|
||||
setPaymentContext,
|
||||
setCaBcEtfTableContext,
|
||||
refetch,
|
||||
loading,
|
||||
payments,
|
||||
total,
|
||||
bodyshop,
|
||||
}) {
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const { page, sortcolumn, sortorder } = search;
|
||||
@@ -193,6 +201,14 @@ export function PaymentsListPaginated({
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
{bodyshop.region_config === "CA_BC" && (
|
||||
<>
|
||||
<CaBcEtfTableModalContainer />
|
||||
<Button onClick={() => setCaBcEtfTableContext()}>
|
||||
{t("payments.labels.ca_bc_etf_table")}
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
<Button onClick={() => refetch()}>
|
||||
<SyncOutlined />
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user