- nuke visible from the face of the earth with fire.

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-01-12 17:25:25 -05:00
parent 7d6e61043e
commit ba32a71786
58 changed files with 227 additions and 229 deletions

View File

@@ -36,7 +36,7 @@ export function InventoryUpsertModalContainer({
const [insertInventory] = useMutation(INSERT_INVENTORY_LINE);
const [updateInventoryLine] = useMutation(UPDATE_INVENTORY_LINE);
const { visible, context, actions } = inventoryUpsertModal;
const { open, context, actions } = inventoryUpsertModal;
const { existingInventory } = context;
const { refetch } = actions;
@@ -44,12 +44,12 @@ export function InventoryUpsertModalContainer({
useEffect(() => {
//Required to prevent infinite looping.
if (existingInventory && visible) {
if (existingInventory && open) {
form.setFieldsValue(existingInventory);
} else if (!existingInventory && visible) {
} else if (!existingInventory && open) {
form.resetFields();
}
}, [existingInventory, form, visible]);
}, [existingInventory, form, open]);
const handleFinish = async (formValues) => {
const values = formValues;
@@ -103,7 +103,7 @@ export function InventoryUpsertModalContainer({
? t("inventory.actions.edit")
: t("inventory.actions.new")
}
open={visible}
open={open}
okText={t("general.actions.save")}
onOk={() => {
form.submit();