<commit_before><!--
Displays a single period as a list item including controls to edit and delete it.
-->

<template>
  <v-list-item>
    <v-list-item-content class="pt-0 pb-2">
      <v-list-item-title>{{ period.description }}</v-list-item-title>
      <v-list-item-subtitle>{{ period.start }} - {{ period.end }}</v-list-item-subtitle>
    </v-list-item-content>

    <v-list-item-action style="display: inline">
      <v-item-group>
        <dialog-period-edit :period="period">
          <template v-slot:activator="{ on }">
            <button-edit class="mr-1" v-on="on" />
          </template>
        </dialog-period-edit>

        <dialog-entity-delete :entity="period">
          <template v-slot:activator="{ on }">
            <button-delete v-on="on" />
          </template>
          {{ $tc('components.dialog.dialogEntityDelete.warningText') }} <br>
          <ul><li>
          {{ period.description }}
          </li></ul>
        </dialog-entity-delete>
      </v-item-group>
    </v-list-item-action>
  </v-list-item>
</template>

<script>

import DialogPeriodEdit from '@/components/dialog/DialogPeriodEdit'
import DialogEntityDelete from '@/components/dialog/DialogEntityDelete'
import ButtonEdit from '@/components/buttons/ButtonEdit'
import ButtonDelete from '@/components/buttons/ButtonDelete'

export default {
  name: 'CampPeriods',
  components: { DialogEntityDelete, DialogPeriodEdit, ButtonEdit, ButtonDelete },
  props: {
    period: { type: Object, required: true }
  }
}
</script>

<style scoped>
</style>
<commit_msg>added cleancoding<commit_after><!--
Displays a single period as a list item including controls to edit and delete it.
-->

<template>
  <v-list-item>
    <v-list-item-content class="pt-0 pb-2">
      <v-list-item-title>{{ period.description }}</v-list-item-title>
      <v-list-item-subtitle>{{ period.start }} - {{ period.end }}</v-list-item-subtitle>
    </v-list-item-content>

    <v-list-item-action style="display: inline">
      <v-item-group>
        <dialog-period-edit :period="period">
          <template v-slot:activator="{ on }">
            <button-edit class="mr-1" v-on="on" />
          </template>
        </dialog-period-edit>

        <dialog-entity-delete :entity="period">
          <template v-slot:activator="{ on }">
            <button-delete v-on="on" />
          </template>
          {{ $tc('components.dialog.dialogEntityDelete.warningText') }} <br>
          <ul>
            <li>
              {{ period.description }}
            </li>
          </ul>
        </dialog-entity-delete>
      </v-item-group>
    </v-list-item-action>
  </v-list-item>
</template>

<script>

import DialogPeriodEdit from '@/components/dialog/DialogPeriodEdit'
import DialogEntityDelete from '@/components/dialog/DialogEntityDelete'
import ButtonEdit from '@/components/buttons/ButtonEdit'
import ButtonDelete from '@/components/buttons/ButtonDelete'

export default {
  name: 'CampPeriods',
  components: { DialogEntityDelete, DialogPeriodEdit, ButtonEdit, ButtonDelete },
  props: {
    period: { type: Object, required: true }
  }
}
</script>

<style scoped>
</style>

{'fraction_non_alphanumeric': 0.16454081632653061, 'fraction_numerical': 0.001913265306122449, 'mean_word_length': 2.7080378250591015, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 71, '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': '5521679', 'n_tokens_mistral': 986, 'n_tokens_neox': 973, 'n_words': 197}