<commit_before>import { createSelector } from 'reselect';

import { getCustomer } from '@waldur/workspace/selectors';
import { PaymentProfile } from '@waldur/workspace/types';

import { InvoiceItem } from '../types';

export function getItemName(item: InvoiceItem) {
  if (item.details) {
    // eslint-disable-next-line no-unused-vars
    const {
      offering_name,
      offering_type,
      plan_name,
      offering_component_name,
    } = item.details;
    if (
      offering_name &&
      offering_type &&
      plan_name &&
      offering_component_name
    ) {
      return `${offering_name} - ${offering_component_name} - (${offering_type} / ${plan_name})`;
    }
  }
  return item.name;
}

const groupInvoiceSubItems = (items: InvoiceItem[], projects) => {
  items.forEach((item) => {
    if (!item.project_uuid) {
      projects.default.items.push(item);
    } else {
      if (!projects[item.project_uuid]) {
        projects[item.project_uuid] = {
          items: [],<commit_msg>Remove technical offering type labe from invoice item display [WAL-3724]<commit_after>import { createSelector } from 'reselect';

import { getCustomer } from '@waldur/workspace/selectors';
import { PaymentProfile } from '@waldur/workspace/types';

import { InvoiceItem } from '../types';

export function getItemName(item: InvoiceItem) {
  if (item.details) {
    // eslint-disable-next-line no-unused-vars
    const { offering_name, plan_name, offering_component_name } = item.details;
    if (offering_name && plan_name && offering_component_name) {
      return `${offering_name} - ${offering_component_name} - ${plan_name}`;
    }
  }
  return item.name;
}

const groupInvoiceSubItems = (items: InvoiceItem[], projects) => {
  items.forEach((item) => {
    if (!item.project_uuid) {
      projects.default.items.push(item);
    } else {
      if (!projects[item.project_uuid]) {
        projects[item.project_uuid] = {
          items: [],
{'fraction_non_alphanumeric': 0.13666838576585869, 'fraction_numerical': 0.0020629190304280558, 'mean_word_length': 3.379232505643341, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4913021', 'n_tokens_mistral': 606, 'n_tokens_neox': 609, 'n_words': 118}