Showing 438 of 1,408 total issues
File impact-calculator.service.ts
has 412 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
Injectable,
Logger,
ServiceUnavailableException,
} from '@nestjs/common';
Function up
has 146 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
CREATE OR REPLACE FUNCTION ${get_annual_commodity_weighted_impact_over_georegion}(
geo_region_id uuid,
Function How
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const How: React.FC = () => {
const [ref, percentage] = useScrollPercentage({
threshold: 0,
});
Function AdminUsersPage
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const AdminUsersPage: React.FC = () => {
const { query } = useRouter();
const [sorting, setSorting] = useState<SortingState>([]);
const [pagination, setPaginationState] = useState<PaginationState>({
pageIndex: 1,
Function up
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async up(queryRunner: QueryRunner): Promise<void> {
/**
* @description: This function is used to get the h3 table name and column name for a given indicator by its name code
*/
await queryRunner.query(`
Function Regulations
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Regulations: React.FC = () => {
return (
<section className="relative bg-white">
<Wrapper>
<div className="relative py-12 border-t border-black/10">
Function StayUpToDate
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const StayUpToDate: FC = () => {
const [submitting, setSubmitting] = useState(false);
const [success, setSuccess] = useState(false);
const { register, handleSubmit, formState, reset } = useForm<SubSchema>({
resolver: yupResolver(schema),
Function EURDLegend
has 139 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const EURDLegend = () => {
const dispatch = useAppDispatch();
const { supplierLayer, contextualLayers } = useAppSelector((state) => state.eudr);
const [isOpen, setIsOpen] = useState(false);
File base-impact.service.ts
has 387 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Injectable, Logger } from '@nestjs/common';
import {
AnyImpactTableDto,
GetActualVsScenarioImpactTableDto,
GetImpactTableDto,
Function buildIndex
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function buildIndex<F>(clusterLevels: ClusterLevels): ClusterIndex<F> {
const nodesByZoom = new Map<number, ClusterNode[]>();
const clustersById = new Map<string, Cluster>();
const minZoomByLocationId = new Map<string, number>();
for (const { zoom, nodes } of clusterLevels) {
Function Cookie
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Cookie(props: any) {
const [selected, setSelected] = useState(false);
const cookieRef = useRef<Group>();
File impact.service.ts
has 377 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Injectable, Logger } from '@nestjs/common';
import {
GetImpactTableDto,
GetRankedImpactTableDto,
GROUP_BY_VALUES,
Function SignUp
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SignUp: NextPageWithLayout = () => {
const [isLoading, setIsLoading] = useState(false);
const router = useRouter();
const {
Function Hero
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Hero: React.FC = () => {
const videoRef = useRef<HTMLVideoElement>();
const [playing, setPlaying] = useState(false);
const onTogglePlay = useCallback(() => {
Function CategoryList
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const CategoryList = (): JSX.Element => {
const {
viewBy,
filters: { dates, suppliers, origins, materials, plots },
table: { filters: tableFilters },
Function geoCodeAggregationPoint
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async geoCodeAggregationPoint(sourcingData: SourcingData): Promise<any> {
/**
* The user must specify a country, and either an address OR coordinates
*/
if (this.hasBothAddressAndCoordinates(sourcingData))
File actual-vs-scenario.service.ts
has 358 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Injectable, Logger } from '@nestjs/common';
import {
GetActualVsScenarioImpactTableDto,
GROUP_BY_VALUES,
ORDER_BY,
Function SourcingModel
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SourcingModel: React.FC = () => {
return (
<section className="relative py-12 space-y-12 bg-blue-600 bg-cover md:space-y-64 md:py-32">
<Wrapper>
<div className="space-y-10 text-white md:space-y-20">
Function SignIn
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SignIn: NextPageWithLayout = () => {
const [isLoading, setIsLoading] = useState<boolean>(false);
const router = useRouter();
const {
File FlowMapLayer.ts
has 351 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// @ts-nocheck
/*
* Copyright 2022 FlowmapBlue
*
* Licensed under the Apache License, Version 2.0 (the "License");