Lint all the things
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { Form, Input, Space } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
@@ -9,12 +8,12 @@ import FormItemCurrency from "../form-items-formatted/currency-form-item.compone
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
inventoryUpsertModal: selectInventoryUpsert
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
const mapDispatchToProps = () => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(NoteUpsertModalComponent);
|
||||
|
||||
export function NoteUpsertModalComponent({ form, inventoryUpsertModal }) {
|
||||
export function NoteUpsertModalComponent({ inventoryUpsertModal }) {
|
||||
const { t } = useTranslation();
|
||||
const { existingInventory } = inventoryUpsertModal.context;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useMutation } from "@apollo/client";
|
||||
import { Form, Modal } from "antd";
|
||||
import React, { useEffect } from "react";
|
||||
import { useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
@@ -8,20 +8,19 @@ import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import { INSERT_INVENTORY_LINE, UPDATE_INVENTORY_LINE } from "../../graphql/inventory.queries";
|
||||
import { toggleModalVisible } from "../../redux/modals/modals.actions";
|
||||
import { selectInventoryUpsert } from "../../redux/modals/modals.selectors";
|
||||
import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import InventoryUpsertModal from "./inventory-upsert-modal.component";
|
||||
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
currentUser: selectCurrentUser,
|
||||
inventoryUpsertModal: selectInventoryUpsert
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
toggleModalVisible: () => dispatch(toggleModalVisible("inventoryUpsert"))
|
||||
});
|
||||
|
||||
export function InventoryUpsertModalContainer({ currentUser, bodyshop, inventoryUpsertModal, toggleModalVisible }) {
|
||||
export function InventoryUpsertModalContainer({ bodyshop, inventoryUpsertModal, toggleModalVisible }) {
|
||||
const { t } = useTranslation();
|
||||
const [insertInventory] = useMutation(INSERT_INVENTORY_LINE);
|
||||
const [updateInventoryLine] = useMutation(UPDATE_INVENTORY_LINE);
|
||||
@@ -53,7 +52,7 @@ export function InventoryUpsertModalContainer({ currentUser, bodyshop, inventory
|
||||
inventoryId: existingInventory.id,
|
||||
inventoryItem: values
|
||||
}
|
||||
}).then((r) => {
|
||||
}).then(() => {
|
||||
notification["success"]({
|
||||
message: t("inventory.successes.updated")
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user