Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprint/mewtwo 2024 05 02 hotfix #135

Merged
merged 3 commits into from
May 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions src/components/common/CreateNewLibraryDialog.tsx
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@
.map((element) => element.name);
setOrganizations(organizationsList);
});
}, []);

Check warning on line 56 in src/components/common/CreateNewLibraryDialog.tsx

GitHub Actions / Checkout, install, lint, build and test with coverage

React Hook useEffect has a missing dependency: 'organizationApi'. Either include it or remove the dependency array
async function createCqlLibrary(cqlLibrary: CqlLibrary) {
cqlLibrary.librarySetId = uuidv4();
cqlLibraryServiceApi
@@ -142,6 +142,19 @@
setFocusedField(field);
};

const getFormikErrorMessage = (() => {
if (
(formik.touched["cqlLibraryName"] || focusedField === "cqlLibraryName") &&
formikErrorHandler("cqlLibraryName")
) {
return formikErrorHandler("cqlLibraryName");
} else {
if (formik.values.model === Model.QDM_5_6) {
return "Library name must start with an upper case letter, followed by alpha-numeric character(s) and must not contain spaces or other special characters except underscore for QDM.";
}
return "Library name must start with an upper case letter, followed by alpha-numeric character(s) and must not contain spaces or other special characters";
}
})();
return (
<div>
<MadieDialog
@@ -196,14 +209,7 @@
"aria-required": true,
required: true,
}}
helperText={
(formik.touched["cqlLibraryName"] ||
focusedField === "cqlLibraryName") &&
(formikErrorHandler("cqlLibraryName") ||
formik.values.model === Model.QDM_5_6
? "Library name must start with an upper case letter, followed by alpha-numeric character(s) and must not contain spaces or other special characters except of underscore for QDM."
: "Library name must start with an upper case letter, followed by alpha-numeric character(s) and must not contain spaces or other special characters")
}
helperText={getFormikErrorMessage}
size="small"
error={
formik.touched.cqlLibraryName &&

Unchanged files with check annotations Beta

if (cqlLibraryList != null && cqlLibraryList.length > 0) {
setCurrentFilter(filter);
}
}, [cqlLibraryList]);

Check warning on line 52 in src/components/cqlLibraryLanding/CqlLibraryLanding.tsx

GitHub Actions / Checkout, install, lint, build and test with coverage

React Hook useEffect has a missing dependency: 'filter'. Either include it or remove the dependency array. You can also replace multiple useState variables with useReducer if 'setCurrentFilter' needs the current value of 'filter'
const handleTabChange = (event, nextTab) => {
setCqlLibraryList(null);
setErrorMessage("An error occurred while fetching the CQL Library!");
});
}
}, [id, resetForm, loadedCqlLibrary, cqlLibraryServiceApi]);

Check warning on line 163 in src/components/editCqlLibrary/EditCqlLibrary.tsx

GitHub Actions / Checkout, install, lint, build and test with coverage

React Hook useEffect has a missing dependency: 'handleAnnotations'. Either include it or remove the dependency array
// fetch organizations DB using measure service and sorts alphabetically
useEffect(() => {
const message = `Error fetching organizations`;
handleToast("danger", message, true);
});
}, []);

Check warning on line 179 in src/components/editCqlLibrary/EditCqlLibrary.tsx

GitHub Actions / Checkout, install, lint, build and test with coverage

React Hook useEffect has a missing dependency: 'organizationApi'. Either include it or remove the dependency array
async function updateCqlLibrary(cqlLibrary: CqlLibrary) {
setActiveSpinner(true);