src/applications/vaos/appointment-list/redux/actions.js
File actions.js
has 544 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable no-prototype-builtins */
import moment from 'moment';
import * as Sentry from '@sentry/browser';
import { recordEvent } from '@department-of-veterans-affairs/platform-monitoring/exports';
import {
Function fetchConfirmedAppointmentDetails
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchConfirmedAppointmentDetails(id, type) {
return async (dispatch, getState) => {
try {
const state = getState();
const featureVAOSServiceVAAppointments = selectFeatureVAOSServiceVAAppointments(
Function fetchPastAppointments
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchPastAppointments(startDate, endDate, selectedIndex) {
return async (dispatch, getState) => {
const featureVAOSServiceVAAppointments = selectFeatureVAOSServiceVAAppointments(
getState(),
);
Function fetchPendingAppointments
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchPendingAppointments() {
return async (dispatch, getState) => {
try {
dispatch({
type: FETCH_PENDING_APPOINTMENTS,
Function fetchRequestDetails
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchRequestDetails(id) {
return async (dispatch, getState) => {
try {
const state = getState();
let request = selectAppointmentById(state, id, [