Showing 4,231 of 14,884 total issues
Function currentOrPastDateRangeUI
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const currentOrPastDateRangeUI = (fromOptions, toOptions, errorMessage) => {
let fromLabel = 'From date';
let toLabel = 'To date';
let fromCustomOptions = {};
let toCustomOptions = {};
Function render
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { terms, topContent } = this.props;
const enabled =
this.props.isDataAvailable === true ||
typeof this.props.isDataAvailable === 'undefined';
Function deselectBasedOnValue
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static deselectBasedOnValue(name, value, formData, properties) {
// derive the notListedTextKey by looking at the form schema properties for a 'string' field type
// be aware this logic limits the usage to a single text field for a 'write in' style field
const notListedTextKey = Object.entries(properties).reduce(
(previous, [propertyKey, { type }]) => {
Function OtherTextField
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function OtherTextField(props) {
let { inputType } = props.options;
if (!inputType) {
inputType = numberTypes.has(props.schema.type) ? 'number' : props.type;
}
Function render
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { form } = this.props;
const { formId, data } = form;
const { fullName } = data;
Function ContestableIssuesWidget
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ContestableIssuesWidget = props => {
const {
getContestableIssues,
contestableIssues,
setFormData,
Function formatServiceName
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const formatServiceName = service => {
if (!service) return null;
const lowerCaseService = service
.replace(/([A-Z])/g, ' $1')
.replace(/\s+/g, ' ')
Function submitForm
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const submitForm = (form, formConfig) => {
const body = formConfig.transformForSubmit
? formConfig.transformForSubmit(formConfig, form)
: transformForSubmit(formConfig, form);
const benefits = form.data['view:benefit'];
Function strongCaseTips
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const strongCaseTips = () => {
if (specReason) {
return (
<div>
<span>
Function StatementOfTruth
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function StatementOfTruth(signatureProps) {
const pp = (
<span>
I have read and accept the{' '}
<va-link external href="/privacy-policy/" text="privacy policy" />
Function activateInjectedAssets
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function activateInjectedAssets() {
fetch(`${getContentHostName()}/generated/headerFooter.json`)
.then(resp => {
if (resp.ok) {
return resp.json();
Function getDateRangesBetween
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getDateRangesBetween = (date1, date2) => {
const [year1, month1] = date1.split('-').map(str => parseInt(str, 10));
const [year2, month2] = date2.split('-').map(str => parseInt(str, 10));
const ranges = [];
Function getEmptyState
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getEmptyState(props) {
const {
onEdit,
hideTitle,
title,
Function FormTabBase
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const FormTabBase = props => {
const formInfo = getFormInfo(props.router);
const specialPages = formInfo?.pageList?.filter(
page =>
page.path?.includes('/introduction') ||
Function bankInfo
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const bankInfo = (state = initialState, action) => {
switch (action.type) {
case UPDATE_BANK_INFO:
return {
...state,
Function TrainingAndWebinar
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const TrainingAndWebinar = () => {
return (
<MainContentSubDiv
id="trainings-and-webinars"
header="Trainings and webinars"
Function getRepresentativeStatus
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static getRepresentativeStatus() {
const requestUrl = `${
environment.API_URL
}/representation_management/v0/power_of_attorney`;
const apiSettings = {
Function onSearch
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onSearch = (event, filterList, dropdownValue) => {
const incomingValue = event?.target?.filterBy?.value || dropdownValue;
const newSelectedOption = filterByOptions.find(
option => option?.value === incomingValue,
Function render
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { lat, long, address } = this.state;
const { multiError, multiLoading, facilityID } = this.props;
const loading = multiLoading ? multiLoading[facilityID] : false;
const error = multiError ? multiError[facilityID] : false;
Function LoadingPage
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const LoadingPage = props => {
const { router } = props;
const { t } = useTranslation();
const { goToNextPage } = useFormRouting(router);