- 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

@@ -33,7 +33,7 @@ export function NoteUpsertModalContainer({
const [insertNote] = useMutation(INSERT_NEW_NOTE);
const [updateNote] = useMutation(UPDATE_NOTE);
const { visible, context, actions } = noteUpsertModal;
const { open, context, actions } = noteUpsertModal;
const { jobId, existingNote, text } = context;
const { refetch } = actions;
@@ -41,16 +41,16 @@ export function NoteUpsertModalContainer({
useEffect(() => {
//Required to prevent infinite looping.
if (existingNote && visible) {
if (existingNote && open) {
form.setFieldsValue(existingNote);
} else if (!existingNote && visible) {
} else if (!existingNote && open) {
form.resetFields();
if (text) {
form.setFieldValue("text", text);
}
}
}, [existingNote, form, visible, text]);
}, [existingNote, form, open, text]);
const handleFinish = async (formValues) => {
const { relatedros, ...values } = formValues;
@@ -122,7 +122,7 @@ export function NoteUpsertModalContainer({
return (
<Modal
title={existingNote ? t("notes.actions.edit") : t("notes.actions.new")}
open={visible}
open={open}
okText={t("general.actions.save")}
onOk={() => {
form.submit();