<!-- Page de détails des parametres -->

<template>
  <LayoutContainer>

      <v-row justify="center" align="center" class="bannerTopForm mt-5">
        <v-col cols="12" class="ot_dark_grey ot_white--text">
          <h4>{{ $t('parameters') }}</h4>
        </v-col>
      </v-row>

    <!-- Rend le contenu de la page -->
    <NuxtChild />
  </LayoutContainer>
</template>

<script lang="ts">
import { defineComponent } from '@nuxtjs/composition-api'
import { repositoryHelper } from '~/services/store/repository'
import {Parameters} from "~/models/Organization/Parameters";
import {Organization} from "~/models/Organization/Organization";
import {Cycle} from "~/models/Education/Cycle";
import {AdminAccess} from "~/models/Access/AdminAccess";

export default defineComponent({
  name: 'parameters',
  layout: 'parameters',
  middleware({ $ability, redirect }) {
    if(!$ability.can('display', 'parameters_page'))
      return redirect('/error')
  },
  setup () {
    return {}
  },
  beforeDestroy() {
    repositoryHelper.cleanRepository(Parameters)
    repositoryHelper.cleanRepository(Organization)
    repositoryHelper.cleanRepository(Cycle)
    repositoryHelper.cleanRepository(AdminAccess)
  },
})

</script>
