<commit_before>import React from 'react';
import {Badge} from 'react-bootstrap';
import {displayMonthWithYear} from '../ProjectMonthsLists';
import {IFeature} from '../../controls/feature/feature-models';
import {FullProjectMonthModel} from '../models/FullProjectMonthModel';
import {ListFilters} from '../../controls/table/table-models';
import {Button} from '../../controls/form-controls/Button';
import {t} from '../../utils';
import {Icon} from '../../controls/Icon';


type ProjectMonthListCollapsedProps = {
  feature: IFeature<FullProjectMonthModel, ListFilters>;
  onOpen: () => void;
}



export const ProjectMonthListCollapsed = ({feature, onOpen}: ProjectMonthListCollapsedProps) => {
  if (!feature.list.data.length) {
    return null;
  }

  const data = feature.list.data;
  const withInbound = data.filter(x => x.project.projectMonthConfig.inboundInvoice);

  const totals = {
    total: data.length,
    verified: data.filter(x => x.details.verified).length,
    timesheetPending: data.filter(x => !x.details.timesheet.validated).length,
    inboundPending: withInbound.filter(x => x.details.inbound.status !== 'paid').length,
    inboundNew: withInbound.filter(x => x.details.inbound.status === 'new').length,
    inboundValidated: withInbound.filter(x => x.details.inbound.status === 'validated').length,
    inboundPaid: withInbound.filter(x => x.details.inbound.status === 'paid').length,
  };

  const results = {
    verified: totals.verified === totals.total,
    timesheetPending: totals.timesheetPending !== 0,
    inboundPending: totals.inboundPending !== 0,
  };

  const projectsMonthDetails = feature.list.data[0].details;<commit_msg>projectMonth: collapsed months: do not show summary for verified==='firced' rows<commit_after>import React from 'react';
import {Badge} from 'react-bootstrap';
import {displayMonthWithYear} from '../ProjectMonthsLists';
import {IFeature} from '../../controls/feature/feature-models';
import {FullProjectMonthModel} from '../models/FullProjectMonthModel';
import {ListFilters} from '../../controls/table/table-models';
import {Button} from '../../controls/form-controls/Button';
import {t} from '../../utils';
import {Icon} from '../../controls/Icon';


type ProjectMonthListCollapsedProps = {
  feature: IFeature<FullProjectMonthModel, ListFilters>;
  onOpen: () => void;
}



export const ProjectMonthListCollapsed = ({feature, onOpen}: ProjectMonthListCollapsedProps) => {
  if (!feature.list.data.length) {
    return null;
  }

  const data = feature.list.data.filter(x => x.details.verified !== 'forced');
  const withInbound = data.filter(x => x.project.projectMonthConfig.inboundInvoice);

  const totals = {
    total: data.length,
    verified: data.filter(x => x.details.verified).length,
    timesheetPending: data.filter(x => !x.details.timesheet.validated).length,
    inboundPending: withInbound.filter(x => x.details.inbound.status !== 'paid').length,
    inboundNew: withInbound.filter(x => x.details.inbound.status === 'new').length,
    inboundValidated: withInbound.filter(x => x.details.inbound.status === 'validated').length,
    inboundPaid: withInbound.filter(x => x.details.inbound.status === 'paid').length,
  };

  const results = {
    verified: totals.verified === totals.total,
    timesheetPending: totals.timesheetPending !== 0,
    inboundPending: totals.inboundPending !== 0,
  };

  const projectsMonthDetails = feature.list.data[0].details;
{'fraction_non_alphanumeric': 0.1591041303083188, 'fraction_numerical': 0.0017452006980802793, 'mean_word_length': 4.555735056542811, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5630267', 'n_tokens_mistral': 1041, 'n_tokens_neox': 1049, 'n_words': 210}