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,11 +1,10 @@
import { Card, Col, Row, Table } from "antd";
import _ from "lodash";
import dayjs from "../../utils/day";
import React, { useMemo, useState } from "react";
import { useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { onlyUnique } from "../../utils/arrayHelper";
import { alphaSort } from "../../utils/sorters";
import { TemplateList } from "../../utils/TemplateConstants";
@@ -13,14 +12,12 @@ import PrintWrapperComponent from "../print-wrapper/print-wrapper.component";
import Dinero from "dinero.js";
import InstanceRenderManager from "../../utils/instanceRenderMgr";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop
});
const mapDispatchToProps = (dispatch) => ({
const mapStateToProps = createStructuredSelector({});
const mapDispatchToProps = () => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
});
export function TimeTicketsSummaryEmployees({ bodyshop, loading, timetickets, startDate, endDate }) {
export function TimeTicketsSummaryEmployees({ loading, timetickets, startDate, endDate }) {
//Group everything by employee
//Then sum the individual time TimeTicketsSummary.
@@ -29,7 +26,7 @@ export function TimeTicketsSummaryEmployees({ bodyshop, loading, timetickets, st
timetickets
.filter((i) => i.cost_center !== "timetickets.labels.shift")
.map((tt) => {
if (!!!jobTicketsByEmployee[tt.employeeid]) {
if (!jobTicketsByEmployee[tt.employeeid]) {
jobTicketsByEmployee[tt.employeeid] = [];
}
jobTicketsByEmployee[tt.employeeid].push(tt);
@@ -48,7 +45,7 @@ export function TimeTicketsSummaryEmployees({ bodyshop, loading, timetickets, st
timetickets
.filter((i) => i.cost_center === "timetickets.labels.shift")
.map((tt) => {
if (!!!shiftTicketsByEmployee[tt.employeeid]) {
if (!shiftTicketsByEmployee[tt.employeeid]) {
shiftTicketsByEmployee[tt.employeeid] = [];
}
shiftTicketsByEmployee[tt.employeeid].push(tt);
@@ -88,7 +85,7 @@ const JobRelatedTicketsTable = ({ loading, jobTickets, startDate, endDate }) =>
});
const data = useMemo(() => {
return _.flatten(
jobTickets.map((item, idx) => {
jobTickets.map((item) => {
const employeeCostCenters = item.tickets.map((i) => i.cost_center).filter(onlyUnique);
return employeeCostCenters.map((costCenter) => {