Lint all the things

This commit is contained in:
Dave
2025-08-19 16:23:29 -04:00
parent f6d6b548be
commit 33fb60ca1a
640 changed files with 2129 additions and 3927 deletions

View File

@@ -1,6 +1,6 @@
import { useQuery } from "@apollo/client";
import { Result } from "antd";
import React, { useMemo } from "react";
import { useMemo } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
@@ -17,7 +17,7 @@ const mapStateToProps = createStructuredSelector({
technician: selectTechnician,
currentUser: selectCurrentUser
});
const mapDispatchToProps = (dispatch) => ({
const mapDispatchToProps = () => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
});
@@ -26,12 +26,12 @@ export function TimeTicketShiftContainer({ bodyshop, technician, currentUser, is
const employeeId = useMemo(() => {
const assoc = bodyshop.associations.filter((a) => a.useremail === currentUser.email)[0];
return assoc && assoc.user && assoc.user.employee && assoc.user.employee.id;
return assoc?.user && assoc.user.employee && assoc.user.employee.id;
}, [bodyshop, currentUser.email]);
const { loading, error, data, refetch } = useQuery(QUERY_ACTIVE_SHIFT_TIME_TICKETS, {
variables: {
employeeId: isTechConsole ? technician && technician.id : employeeId
employeeId: isTechConsole ? technician?.id : employeeId
},
fetchPolicy: "network-only",
nextFetchPolicy: "network-only"
@@ -40,7 +40,7 @@ export function TimeTicketShiftContainer({ bodyshop, technician, currentUser, is
if (loading) return <LoadingSpinner />;
if (error) return <AlertComponent message={error.message} type="error" />;
if (!employeeId && !(technician && technician.id))
if (!employeeId && !technician?.id)
return (
<div>
<Result