Bug fixes and formatting for RO guard.

This commit is contained in:
Patrick Fic
2024-04-11 09:49:00 -07:00
parent e5599ff4c4
commit 453236cf3a
11 changed files with 146 additions and 130 deletions

View File

@@ -1,17 +1,17 @@
import React from 'react';
import React from "react";
import { useQuery } from '@apollo/client';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { QUERY_BILLS_BY_JOBID } from '../../graphql/bills.queries';
import { selectJobReadOnly } from '../../redux/application/application.selectors';
import { selectBodyshop } from '../../redux/user/user.selectors';
import AlertComponent from '../alert/alert.component';
import JobBillsTotalComponent from '../job-bills-total/job-bills-total.component';
import { useQuery } from "@apollo/client";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { QUERY_BILLS_BY_JOBID } from "../../graphql/bills.queries";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import AlertComponent from "../alert/alert.component";
import JobBillsTotalComponent from "../job-bills-total/job-bills-total.component";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
bodyshop: selectBodyshop,
jobRO: selectJobReadOnly,
jobRO: selectJobReadOnly
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
@@ -21,8 +21,8 @@ export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRoGuardBills
export function JobCloseRoGuardBills({ job, jobRO, bodyshop, form, warningCallback }) {
const { loading, error, data } = useQuery(QUERY_BILLS_BY_JOBID, {
variables: { jobid: job.id },
fetchPolicy: 'network-only',
nextFetchPolicy: 'network-only',
fetchPolicy: "network-only",
nextFetchPolicy: "network-only"
});
if (error) return <AlertComponent message={error.message} type="error" />;