Lint all the things
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user