_id.vue 797 B

123456789101112131415161718192021222324252627282930313233
  1. <!-- Page de détails d'un point de contact (Edit mode) -->
  2. <template>
  3. <main>
  4. <v-skeleton-loader
  5. v-if="fetchState.pending"
  6. type="text"
  7. />
  8. <FormOrganizationContactPoint :id="id" v-else></FormOrganizationContactPoint>
  9. </main>
  10. </template>
  11. <script lang="ts">
  12. import {defineComponent, useContext} from '@nuxtjs/composition-api'
  13. import { ContactPoint } from '~/models/Core/ContactPoint'
  14. import {useDataUtils} from "~/composables/data/useDataUtils";
  15. export default defineComponent({
  16. name: 'EditContactPoint',
  17. setup () {
  18. const {$dataProvider, route} = useContext()
  19. const {getItemToEdit} = useDataUtils($dataProvider)
  20. const {id, fetchState} = getItemToEdit(route, ContactPoint)
  21. return {
  22. id,
  23. fetchState
  24. }
  25. }
  26. })
  27. </script>
  28. <style>
  29. </style>