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

@@ -3,7 +3,6 @@ import { useApolloClient } from "@apollo/client";
import { useSplitTreatments } from "@splitsoftware/splitio-react";
import { Button, Divider, Form, Input, InputNumber, Select, Space, Switch } from "antd";
import { PageHeader } from "@ant-design/pro-layout";
import React from "react";
import { useTranslation } from "react-i18next";
import { CHECK_VENDOR_NAME } from "../../graphql/vendors.queries";
import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
@@ -19,19 +18,12 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop
});
const mapDispatchToProps = (dispatch) => ({
const mapDispatchToProps = () => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
});
export default connect(mapStateToProps, mapDispatchToProps)(VendorsFormComponent);
export function VendorsFormComponent({
bodyshop,
form,
formLoading,
handleDelete,
responsibilityCenters,
selectedvendor
}) {
export function VendorsFormComponent({ bodyshop, form, formLoading, handleDelete, selectedvendor }) {
const { t } = useTranslation();
const client = useApolloClient();
@@ -40,7 +32,7 @@ export function VendorsFormComponent({
} = useSplitTreatments({
attributes: {},
names: ["DmsAp"],
splitKey: bodyshop && bodyshop.imexshopid
splitKey: bodyshop?.imexshopid
});
const { getFieldValue } = form;
@@ -82,7 +74,7 @@ export function VendorsFormComponent({
required: true
//message: t("general.validation.required"),
},
({ getFieldValue }) => ({
() => ({
async validator(rule, value) {
if (value) {
const response = await client.query({

View File

@@ -1,7 +1,7 @@
import { useMutation, useQuery } from "@apollo/client";
import { Form } from "antd";
import queryString from "query-string";
import React, { useEffect, useState } from "react";
import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { useLocation, useNavigate } from "react-router-dom";
@@ -28,7 +28,7 @@ function VendorsFormContainer({ refetch, bodyshop }) {
variables: { id: selectedvendor },
fetchPolicy: "network-only",
nextFetchPolicy: "network-only",
skip: !!!selectedvendor || selectedvendor === "new"
skip: !selectedvendor || selectedvendor === "new"
});
const notification = useNotification();
@@ -54,7 +54,7 @@ function VendorsFormContainer({ refetch, bodyshop }) {
delete search.selectedvendor;
history({ search: queryString.stringify(search) });
if (refetch)
refetch().then((r) => {
refetch().then(() => {
form.resetFields();
});
}