Added payment reprint and print wrapper component IO-543

This commit is contained in:
Patrick Fic
2021-01-28 16:43:26 -08:00
parent 5cae88d05f
commit 99348c6400
4 changed files with 55 additions and 33 deletions

View File

@@ -9,7 +9,9 @@ import { setModalContext } from "../../redux/modals/modals.actions";
import { selectBodyshop } from "../../redux/user/user.selectors";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
import { DateTimeFormatter } from "../../utils/DateFormatter";
import { TemplateList } from "../../utils/TemplateConstants";
import JobTotalsTable from "../job-totals-table/job-totals-table.component";
import PrintWrapperComponent from "../print-wrapper/print-wrapper.component";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -65,6 +67,7 @@ export function JobsDetailTotals({
<th>{t("payments.fields.type")}</th>
<th>{t("payments.fields.transactionid")}</th>
<th>{t("payments.fields.stripeid")}</th>
<th>{t("general.labels.actions")}</th>
</tr>
</thead>
<tbody>
@@ -93,6 +96,14 @@ export function JobsDetailTotals({
</a>
) : null}
</td>
<td>
<PrintWrapperComponent
templateObject={{
name: TemplateList("payment").payment_receipt.key,
variables: { id: p.id },
}}
/>
</td>
</tr>
))}
</tbody>