super_admin.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <div>
  3. <LayoutParametersSection>
  4. <div class="explanation">
  5. <div class="px-4 d-flex flex-row align-center justify-center py-2">
  6. <v-icon class="theme-info">fa fa-info</v-icon>
  7. </div>
  8. <div class="px-2 d-flex flex-row align-center justify-center">
  9. {{ $t('super_admin_explanation_text') }}
  10. </div>
  11. </div>
  12. <UiLoadingPanel v-if="pending" />
  13. <UiForm
  14. v-else-if="adminAccess"
  15. ref="form"
  16. v-model="adminAccess"
  17. class="w-100"
  18. >
  19. <v-table class="mb-4">
  20. <tbody>
  21. <tr>
  22. <td>{{ $t('username') }} :</td>
  23. <td><b>{{ adminAccess.username }}</b></td>
  24. </tr>
  25. </tbody>
  26. </v-table>
  27. <UiInputEmail
  28. v-model="adminAccess.email"
  29. field="email"
  30. label="associated_email"
  31. class="mx-4"
  32. />
  33. </UiForm>
  34. <span v-else>{{ $t('no_admin_access_recorded') }}</span>
  35. </LayoutParametersSection>
  36. </div>
  37. </template>
  38. <script setup lang="ts">
  39. import { useEntityFetch } from '~/composables/data/useEntityFetch'
  40. import { useAccessProfileStore } from '~/stores/accessProfile'
  41. import AdminAccess from '~/models/Access/AdminAccess'
  42. definePageMeta({
  43. name: 'parameters_super_admin_page',
  44. })
  45. const { fetch } = useEntityFetch()
  46. const accessProfile = useAccessProfileStore()
  47. if (accessProfile.id === null) {
  48. throw new Error('Missing access profile id')
  49. }
  50. const { data: adminAccess, pending } = fetch(AdminAccess, accessProfile.id)
  51. </script>
  52. <style scoped lang="scss">
  53. .explanation {
  54. display: flex;
  55. flex-direction: row;
  56. margin: 32px;
  57. padding: 8px 4px;
  58. border-radius: 6px;
  59. text-align: justify;
  60. color: rgb(var(--v-theme-info));
  61. border: solid 1px rgb(var(--v-theme-info));
  62. .v-icon {
  63. color: rgb(var(--v-theme-info));
  64. font-size: 22px;
  65. border-radius: 16px;
  66. margin: 3px 1px;
  67. padding: 3px;
  68. height: 28px;
  69. width: 28px;
  70. }
  71. @media (max-width: 600px) {
  72. flex-direction: column;
  73. justify-content: center;
  74. }
  75. }
  76. .v-table td:first-child {
  77. width: 180px;
  78. }
  79. </style>