<commit_before><template>
  <div>
    <table class="table table-striped">
      <thead>
        <tr>
          <th style="width: 1%">#</th>
          <th :style="missionSlotRoleStyle">{{ $t('mission.slot.role') }}</th>
          <th :style="missionSlotPlayerStyle">{{ $t('mission.slot.player') }}</th>
          <th style="width: 30%" v-if="hasAnyMissionSlotDescription">{{ $t('mission.slot.description') }}</th>
          <th style="width: 10%" class="text-center">{{ $t('misc.actions') }}</th>
        </tr>
      </thead>
      <tbody>
        <mission-slotlist-group-slots-row v-for="missionSlot in missionSlots" :missionSlotDetails="missionSlot" :key="missionSlot.uid" :hasAnyMissionSlotDescription="hasAnyMissionSlotDescription"></mission-slotlist-group-slots-row>
      </tbody>
      <tfoot v-show="missionSlots.length >= 10">
        <tr>
          <th style="width: 1%">#</th>
          <th :style="missionSlotRoleStyle">{{ $t('mission.slot.role') }}</th>
          <th :style="missionSlotPlayerStyle">{{ $t('mission.slot.player') }}</th>
          <th style="width: 30%" v-if="hasAnyMissionSlotDescription">{{ $t('mission.slot.description') }}</th>
          <th style="width: 10%" class="text-center">{{ $t('misc.actions') }}</th>
        </tr>
      </tfoot>
    </table>
  </div>
</template>

<script>
import * as _ from 'lodash'

import MissionSlotlistGroupSlotsRow from './MissionSlotlistGroupSlotsRow.vue'

export default {
  components: {
    MissionSlotlistGroupSlotsRow
  },
  props: [
    'missionSlots'
  ],
  computed: {
    hasAnyMissionSlotDescription() {
      return _.some(this.missionSlots, (slot) => {
        return !_.isNil(slot.description)
      });
    },
    missionSlotPlayerStyle() {
      if (this.hasAnyMissionSlotDescription) {
        return 'width: 34%'
      } else {
        return 'width: 49%'
      }
    },
    missionSlotRoleStyle() {
      if (this.hasAnyMissionSlotDescription) {
        return 'width: 25%'
      } else {<commit_msg>Fixed width for mission slot order number column<commit_after><template>
  <div>
    <table class="table table-striped">
      <thead>
        <tr>
          <th style="width: 6%">#</th>
          <th :style="missionSlotRoleStyle">{{ $t('mission.slot.role') }}</th>
          <th :style="missionSlotPlayerStyle">{{ $t('mission.slot.player') }}</th>
          <th style="width: 28%" v-if="hasAnyMissionSlotDescription">{{ $t('mission.slot.description') }}</th>
          <th style="width: 10%" class="text-center">{{ $t('misc.actions') }}</th>
        </tr>
      </thead>
      <tbody>
        <mission-slotlist-group-slots-row v-for="missionSlot in missionSlots" :missionSlotDetails="missionSlot" :key="missionSlot.uid" :hasAnyMissionSlotDescription="hasAnyMissionSlotDescription"></mission-slotlist-group-slots-row>
      </tbody>
      <tfoot v-show="missionSlots.length >= 10">
        <tr>
          <th style="width: 6%">#</th>
          <th :style="missionSlotRoleStyle">{{ $t('mission.slot.role') }}</th>
          <th :style="missionSlotPlayerStyle">{{ $t('mission.slot.player') }}</th>
          <th style="width: 28%" v-if="hasAnyMissionSlotDescription">{{ $t('mission.slot.description') }}</th>
          <th style="width: 10%" class="text-center">{{ $t('misc.actions') }}</th>
        </tr>
      </tfoot>
    </table>
  </div>
</template>

<script>
import * as _ from 'lodash'

import MissionSlotlistGroupSlotsRow from './MissionSlotlistGroupSlotsRow.vue'

export default {
  components: {
    MissionSlotlistGroupSlotsRow
  },
  props: [
    'missionSlots'
  ],
  computed: {
    hasAnyMissionSlotDescription() {
      return _.some(this.missionSlots, (slot) => {
        return !_.isNil(slot.description)
      });
    },
    missionSlotPlayerStyle() {
      if (this.hasAnyMissionSlotDescription) {
        return 'width: 28%'
      } else {
        return 'width: 45%'
      }
    },
    missionSlotRoleStyle() {
      if (this.hasAnyMissionSlotDescription) {
        return 'width: 27%'
      } else {
{'fraction_non_alphanumeric': 0.18077403245942572, 'fraction_numerical': 0.008988764044943821, 'mean_word_length': 2.9980039920159682, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 85, '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': '6269634', 'n_tokens_mistral': 1350, 'n_tokens_neox': 1299, 'n_words': 231}