new.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <div>
  3. <h3 class="my-8">{{ $t('new_education_timing') }}</h3>
  4. <v-card class="parameters-page-card">
  5. <UiFormCreation
  6. :model="EducationTiming"
  7. go-back-route="/parameters/education_timings"
  8. >
  9. <template #default="{ entity }">
  10. <v-container :fluid="true" class="container">
  11. <v-row>
  12. <v-col cols="12" sm="6"> </v-col>
  13. </v-row>
  14. <v-row>
  15. <v-col cols="12" sm="6">
  16. <UiInputNumber
  17. v-model="entity.timing"
  18. field="new_education_timings"
  19. :rules="rules()"
  20. />
  21. </v-col>
  22. </v-row>
  23. </v-container>
  24. </template>
  25. </UiFormCreation>
  26. </v-card>
  27. </div>
  28. </template>
  29. <script setup lang="ts">
  30. import { useI18n } from 'vue-i18n'
  31. import EducationTiming from '~/models/Education/EducationTiming'
  32. const i18n = useI18n()
  33. const rules = () => [
  34. (timing: number | null) =>
  35. (timing !== null && timing > 0) || i18n.t('please_enter_a_value'),
  36. ]
  37. </script>