Lint all the things
This commit is contained in:
@@ -1,27 +1,21 @@
|
||||
import React from "react";
|
||||
|
||||
import { useQuery } from "@apollo/client";
|
||||
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { GET_LINE_TICKET_BY_PK } from "../../graphql/jobs-lines.queries";
|
||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import LaborAllocationsTableComponent from "../labor-allocations-table/labor-allocations-table.component";
|
||||
import PayrollLaborAllocationsTable from "../labor-allocations-table/labor-allocations-table.payroll.component";
|
||||
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
bodyshop: selectBodyshop,
|
||||
jobRO: selectJobReadOnly
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
bodyshop: selectBodyshop
|
||||
});
|
||||
const mapDispatchToProps = () => ({});
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRoGuardLabor);
|
||||
|
||||
export function JobCloseRoGuardLabor({ job, jobRO, bodyshop, form, warningCallback }) {
|
||||
export function JobCloseRoGuardLabor({ job, bodyshop, warningCallback }) {
|
||||
const { loading, error, data, refetch } = useQuery(GET_LINE_TICKET_BY_PK, {
|
||||
variables: { id: job.id },
|
||||
fetchPolicy: "network-only",
|
||||
|
||||
@@ -1,26 +1,20 @@
|
||||
import React, { useEffect } from "react";
|
||||
|
||||
import { useEffect, useMemo } from "react";
|
||||
import { Alert, Card } from "antd";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import { useMemo } from "react";
|
||||
import Dinero from "dinero.js";
|
||||
import DataLabel from "../data-label/data-label.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
bodyshop: selectBodyshop,
|
||||
jobRO: selectJobReadOnly
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
const mapDispatchToProps = () => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRoGuardProfit);
|
||||
|
||||
export function JobCloseRoGuardProfit({ job, jobRO, bodyshop, form, warningCallback }) {
|
||||
export function JobCloseRoGuardProfit({ job, warningCallback }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const total = useMemo(() => {
|
||||
@@ -34,7 +28,7 @@ export function JobCloseRoGuardProfit({ job, jobRO, bodyshop, form, warningCallb
|
||||
}, [job.payments]);
|
||||
|
||||
const balance = useMemo(() => {
|
||||
if (job && job.job_totals && job.job_totals.totals.total_repairs)
|
||||
if (job?.job_totals && job.job_totals.totals.total_repairs)
|
||||
return Dinero(job.job_totals.totals.total_repairs).subtract(total);
|
||||
return Dinero({ amount: 0 }).subtract(total);
|
||||
}, [job, total]);
|
||||
|
||||
@@ -1,24 +1,17 @@
|
||||
import React from "react";
|
||||
|
||||
import { useQuery } from "@apollo/client";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { QUERY_PARTS_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
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
const mapStateToProps = createStructuredSelector({});
|
||||
const mapDispatchToProps = () => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRoGuardBills);
|
||||
|
||||
export function JobCloseRoGuardBills({ job, jobRO, bodyshop, form, warningCallback }) {
|
||||
export function JobCloseRoGuardBills({ job, warningCallback }) {
|
||||
const { loading, error, data } = useQuery(QUERY_PARTS_BILLS_BY_JOBID, {
|
||||
variables: { jobid: job.id },
|
||||
fetchPolicy: "network-only",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { LockOutlined } from "@ant-design/icons";
|
||||
import { Badge, Card, Col, Collapse, Form, Input, Row, Space, Tooltip } from "antd";
|
||||
import React, { useCallback, useState } from "react";
|
||||
import { useCallback, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
@@ -20,7 +20,7 @@ const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
jobRO: selectJobReadOnly
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
const mapDispatchToProps = () => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRoGuardContainer);
|
||||
@@ -98,7 +98,7 @@ export function JobCloseRoGuardContainer({ job, jobRO, bodyshop, form }) {
|
||||
name="masterbypass"
|
||||
label={t("jobs.labels.masterbypass")}
|
||||
rules={[
|
||||
({ getFieldValue }) => ({
|
||||
() => ({
|
||||
validator(_, value) {
|
||||
if (
|
||||
!PasswordCheck({ bodyshop, value }) &&
|
||||
@@ -114,7 +114,7 @@ export function JobCloseRoGuardContainer({ job, jobRO, bodyshop, form }) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
}),
|
||||
({ getFieldValue }) => ({
|
||||
() => ({
|
||||
validator(_, value) {
|
||||
if (
|
||||
!PasswordCheck({ bodyshop, value }) &&
|
||||
@@ -130,7 +130,7 @@ export function JobCloseRoGuardContainer({ job, jobRO, bodyshop, form }) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
}),
|
||||
({ getFieldValue }) => ({
|
||||
() => ({
|
||||
validator(_, value) {
|
||||
if (
|
||||
!PasswordCheck({ bodyshop, value }) &&
|
||||
@@ -146,7 +146,7 @@ export function JobCloseRoGuardContainer({ job, jobRO, bodyshop, form }) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
}),
|
||||
({ getFieldValue }) => ({
|
||||
() => ({
|
||||
validator(_, value) {
|
||||
if (
|
||||
!PasswordCheck({ bodyshop, value }) &&
|
||||
@@ -162,7 +162,7 @@ export function JobCloseRoGuardContainer({ job, jobRO, bodyshop, form }) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
}),
|
||||
({ getFieldValue }) => ({
|
||||
() => ({
|
||||
validator(_, value) {
|
||||
if (
|
||||
!PasswordCheck({ bodyshop, value }) &&
|
||||
@@ -178,7 +178,7 @@ export function JobCloseRoGuardContainer({ job, jobRO, bodyshop, form }) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
}),
|
||||
({ getFieldValue }) => ({
|
||||
() => ({
|
||||
validator(_, value) {
|
||||
if (
|
||||
!PasswordCheck({ bodyshop, value }) &&
|
||||
@@ -194,7 +194,7 @@ export function JobCloseRoGuardContainer({ job, jobRO, bodyshop, form }) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
}),
|
||||
({ getFieldValue }) => ({
|
||||
() => ({
|
||||
validator(_, value) {
|
||||
if (
|
||||
!PasswordCheck({ bodyshop, value }) &&
|
||||
|
||||
@@ -1,24 +1,18 @@
|
||||
import React, { useEffect } from "react";
|
||||
|
||||
import { useEffect } from "react";
|
||||
import { Alert, Card, Table } from "antd";
|
||||
import { t } from "i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
||||
import { alphaSort } from "../../utils/sorters";
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
bodyshop: selectBodyshop,
|
||||
jobRO: selectJobReadOnly
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
|
||||
const mapStateToProps = createStructuredSelector({});
|
||||
|
||||
const mapDispatchToProps = () => ({});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRGuardPpd);
|
||||
|
||||
export function JobCloseRGuardPpd({ job, jobRO, bodyshop, form, warningCallback }) {
|
||||
export function JobCloseRGuardPpd({ job, warningCallback }) {
|
||||
const linesWithPPD = job?.joblines.filter((j) => j.act_price_before_ppc !== 0 && j.act_price_before_ppc !== null);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -1,26 +1,23 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { Alert, Card } from "antd";
|
||||
import axios from "axios";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import JobCostingStatistics from "../job-costing-statistics/job-costing-statistics.component";
|
||||
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
bodyshop: selectBodyshop,
|
||||
jobRO: selectJobReadOnly
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
bodyshop: selectBodyshop
|
||||
});
|
||||
|
||||
const mapDispatchToProps = () => ({});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRoGuardProfit);
|
||||
|
||||
export function JobCloseRoGuardProfit({ job, jobRO, bodyshop, form, warningCallback }) {
|
||||
export function JobCloseRoGuardProfit({ job, bodyshop, warningCallback }) {
|
||||
const [costingData, setCostingData] = useState(null);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const { t } = useTranslation();
|
||||
@@ -33,7 +30,9 @@ export function JobCloseRoGuardProfit({ job, jobRO, bodyshop, form, warningCallb
|
||||
const { data } = await axios.post("/job/costing", { jobid: job.id });
|
||||
setCostingData(data);
|
||||
}
|
||||
} catch (error) {}
|
||||
} catch {
|
||||
// NO OP
|
||||
}
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,24 +1,19 @@
|
||||
import React, { useEffect } from "react";
|
||||
import { useEffect } from "react";
|
||||
|
||||
import { Alert, Card, Table } from "antd";
|
||||
import { t } from "i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
||||
import { alphaSort } from "../../utils/sorters";
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
bodyshop: selectBodyshop,
|
||||
jobRO: selectJobReadOnly
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
|
||||
const mapStateToProps = createStructuredSelector({});
|
||||
|
||||
const mapDispatchToProps = () => ({});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRGuardSublet);
|
||||
|
||||
export function JobCloseRGuardSublet({ job, jobRO, bodyshop, form, warningCallback }) {
|
||||
export function JobCloseRGuardSublet({ job, warningCallback }) {
|
||||
const subletsNotDone = job?.joblines.filter(
|
||||
(j) => (j.part_type === "PAS" || j.part_type === "PASL") && (!j.sublet_completed || !j.sublet_ignored)
|
||||
);
|
||||
|
||||
@@ -1,23 +1,16 @@
|
||||
import React from 'react';
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import JobTotalsTableTotals from "../job-totals-table/job-totals.table.totals.component";
|
||||
import { Card } from "antd";
|
||||
import { t } from "i18next";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({});
|
||||
|
||||
const mapDispatchToProps = () => ({});
|
||||
|
||||
import { connect } from 'react-redux';
|
||||
import { createStructuredSelector } from 'reselect';
|
||||
import { selectJobReadOnly } from '../../redux/application/application.selectors';
|
||||
import { selectBodyshop } from '../../redux/user/user.selectors';
|
||||
import JobTotalsTableTotals from '../job-totals-table/job-totals.table.totals.component';
|
||||
import { Card } from 'antd';
|
||||
import { t } from 'i18next';
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
bodyshop: selectBodyshop,
|
||||
jobRO: selectJobReadOnly,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRGuardTotals);
|
||||
|
||||
export function JobCloseRGuardTotals({ job, jobRO, bodyshop, form }) {
|
||||
export function JobCloseRGuardTotals({ job }) {
|
||||
return (
|
||||
<Card title={t("jobs.labels.cards.totals")}>
|
||||
<JobTotalsTableTotals job={job} />
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
import React from "react";
|
||||
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import JobLifecycleComponent from "../job-lifecycle/job-lifecycle.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
bodyshop: selectBodyshop,
|
||||
jobRO: selectJobReadOnly
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
bodyshop: selectBodyshop
|
||||
});
|
||||
|
||||
const mapDispatchToProps = () => ({});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRoGuardTTLifeCycle);
|
||||
|
||||
export function JobCloseRoGuardTTLifeCycle({ job, jobRO, bodyshop, form }) {
|
||||
export function JobCloseRoGuardTTLifeCycle({ job, bodyshop }) {
|
||||
return (
|
||||
<div>
|
||||
<JobLifecycleComponent job={job} statuses={bodyshop.md_ro_statuses} />
|
||||
|
||||
Reference in New Issue
Block a user