WIP Read Only for Jobs BOD-409
This commit is contained in:
@@ -4,6 +4,7 @@ import React, { useMemo } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
||||
@@ -12,6 +13,7 @@ import JobTotalsTable from "../job-totals-table/job-totals-table.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
jobRO: selectJobReadOnly,
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
@@ -23,6 +25,7 @@ const stripeTestEnv = process.env.REACT_APP_STRIPE_PUBLIC_KEY; //.includes("test
|
||||
|
||||
export function JobsDetailTotals({
|
||||
job,
|
||||
jobRO,
|
||||
bodyshop,
|
||||
setPaymentContext,
|
||||
refetch,
|
||||
@@ -96,6 +99,7 @@ export function JobsDetailTotals({
|
||||
</table>
|
||||
<Space direction="vertical">
|
||||
<Button
|
||||
disabled={jobRO}
|
||||
onClick={() =>
|
||||
setPaymentContext({
|
||||
actions: { refetch: refetch },
|
||||
|
||||
Reference in New Issue
Block a user