<commit_before>'use strict'

import m from 'mithril'

import CellContainer from '../../containers/Cell'

import {
  setSort,
  NAME_TYPE,
  EMAIL_TYPE,
  OPENING_TIMESTAMP_TYPE,
  CLOSING_TIMESTAMP_TYPE,
  EMPLOYEE_TYPE,
  STATUS_TYPE,
} from '../../actions'

import styles from './styles.scss'

const sortableItems = [
  NAME_TYPE,
  EMAIL_TYPE,
  OPENING_TIMESTAMP_TYPE,
  CLOSING_TIMESTAMP_TYPE,
  EMPLOYEE_TYPE,
  STATUS_TYPE,
]

function headerClickHandler(type) {
  if (sortableItems.indexOf(type) !== -1) {
    this.attrs.store.dispatch(setSort(type))
  }
}

const Table = {
  view(vdom) {
    // console.log(vdom)
    return m(`ul.${styles.table}`, [
      // 'Hey',
      vdom.attrs.columns.map((column, index) => {
        return m(`li.${styles.column}`,
          {
            class: index === 2 ? `${styles.three}` : '',
          },
          m(`ul.${styles.contentColumn}`, [
            // Header Cell<commit_msg>fix(Sort): change referrence to OPEN_STATUS_TYPE reference in table<commit_after>'use strict'

import m from 'mithril'

import CellContainer from '../../containers/Cell'

import {
  setSort,
  NAME_TYPE,
  EMAIL_TYPE,
  OPENING_TIMESTAMP_TYPE,
  CLOSING_TIMESTAMP_TYPE,
  EMPLOYEE_TYPE,
  OPEN_STATUS_TYPE,
} from '../../actions'

import styles from './styles.scss'

const sortableItems = [
  NAME_TYPE,
  EMAIL_TYPE,
  OPENING_TIMESTAMP_TYPE,
  CLOSING_TIMESTAMP_TYPE,
  EMPLOYEE_TYPE,
  OPEN_STATUS_TYPE,
]

function headerClickHandler(type) {
  if (sortableItems.indexOf(type) !== -1) {
    this.attrs.store.dispatch(setSort(type))
  }
}

const Table = {
  view(vdom) {
    // console.log(vdom)
    return m(`ul.${styles.table}`, [
      // 'Hey',
      vdom.attrs.columns.map((column, index) => {
        return m(`li.${styles.column}`,
          {
            class: index === 2 ? `${styles.three}` : '',
          },
          m(`ul.${styles.contentColumn}`, [
            // Header Cell
{'fraction_non_alphanumeric': 0.15036420395421435, 'fraction_numerical': 0.002081165452653486, 'mean_word_length': 2.877016129032258, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7036165', 'n_tokens_mistral': 703, 'n_tokens_neox': 685, 'n_words': 118}