Showing 4,231 of 14,884 total issues
Function UpcomingAppointmentsListItemAction
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const UpcomingAppointmentsListItemAction = props => {
const { appointment, router } = props;
const { t } = useTranslation();
const dispatch = useDispatch();
const { goToNextPage, jumpToPage, getNextPageFromRouter } = useFormRouting(
Function createRoutesWithStore
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createRoutesWithStore = () => {
return (
<Switch>
{routes.map((route, i) => {
const options = { appName: APP_NAMES.CHECK_IN };
Function PreCheckinConfirmation
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const PreCheckinConfirmation = props => {
const { appointments, isLoading, router } = props;
const selectForm = useMemo(makeSelectForm, []);
const currentForm = useSelector(selectForm);
const { t } = useTranslation();
Function render
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { calculatedRating } = this.props;
const placeholder = '--';
return (
Function SubmissionErrorAlert
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SubmissionErrorAlert = () => {
useEffect(() => {
focusElement('.caregiver-error-message');
}, []);
Function checkCommunityCareEligibility
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function checkCommunityCareEligibility() {
return async (dispatch, getState) => {
const state = getState();
const communityCareEnabled = selectFeatureCommunityCare(state);
Function hasConflict
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const hasConflict = (selectedDate, appointmentsByMonth, facilityTimeZone) => {
let conflict = false;
const selectedMonth = dateFns.format(new Date(selectedDate), 'yyyy-MM');
if (!(selectedMonth in appointmentsByMonth)) {
return conflict;
Function getAbbreviationsAsArray
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getAbbreviationsAsArray = value => {
if (!value) return [];
const mapping = {
OJT: [
{ abbreviation: 'APP', description: 'Apprenticeships' },
Function sections
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const sections = Object.keys(perTerm).map(section => {
const {
visible,
title,
learnMoreAriaLabel,
Function fetchSearchByLocationCoords
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchSearchByLocationCoords(
location,
coordinates,
distance,
filters,
Function renderFacilityTable
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderFacilityTable = mainMap => {
const data = Array.of(createMainRow(mainMap.institution)).concat(
createBranchesAndExtensionsRows(mainMap, viewableRowCount),
);
Function calculateTuition
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function calculateTuition(constant, eligibility, institution, derived) {
if (derived.oldGiBill) {
return { qualifier: 'per year', value: 0, ratedQualifier: '/ year' };
}
if (institution.type === 'ojt') {
Function updateSchema
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateSchema: (formData, addressSchema, addressUiSchema, index, path) => {
let currentSchema = addressSchema;
const modifiedData = { ...formData };
Function renderAddressOption
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function renderAddressOption(address, id = 'userEntered') {
if (address !== undefined) {
const { street, cityStateZip, country } =
id !== 'userEntered'
? formatAddress(address)
Function fetchTotalDisabilityRating
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchTotalDisabilityRating(recordAnalyticsEvent = recordEvent) {
return async dispatch => {
dispatch({
type: FETCH_TOTAL_RATING_STARTED,
});
Consider simplifying this complex logical expression. Open
Open
if (
(keys.email && (contactInfo.email?.emailAddress || '') !== email) ||
(keys.homePhone &&
contactInfo.homePhone?.updatedAt !== homePhone?.updatedAt) ||
(keys.mobilePhone &&
Consider simplifying this complex logical expression. Open
Open
if (
(keys.email && (contactInfo.email?.emailAddress || '') !== email) ||
(keys.homePhone &&
contactInfo.homePhone?.updatedAt !== homePhone?.updatedAt) ||
(keys.mobilePhone &&
Consider simplifying this complex logical expression. Open
Open
if (
(keys.email && (contactInfo.email?.emailAddress || '') !== email) ||
(keys.homePhone &&
contactInfo.homePhone?.updatedAt !== homePhone?.updatedAt) ||
(keys.mobilePhone &&
Consider simplifying this complex logical expression. Open
Open
if (
(keys.email && (contactInfo.email?.emailAddress || '') !== email) ||
(keys.homePhone &&
contactInfo.homePhone?.updatedAt !== homePhone?.updatedAt) ||
(keys.mobilePhone &&
Consider simplifying this complex logical expression. Open
Open
if (id) {
return (
<>
<va-card show-shadow>
<div className="auth-card">