organization.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template>
  2. <UiFormEdition :model="Organization">
  3. <template #default="{ entity : organization }">
  4. <div v-if="organization">
  5. <LayoutCommonSection>
  6. <v-row>
  7. <v-col cols="12">
  8. <h4 class="mb-8">{{ $t('general_informations') }}</h4>
  9. <UiInputText v-model="organization.name" field="name" :rules="getAsserts('name')" />
  10. <UiInputTextArea v-model="organization.description" field="description" />
  11. <UiInputImage
  12. v-model="organization.logo"
  13. field="logo"
  14. :width="120"
  15. :cropping-enabled="true"
  16. />
  17. </v-col>
  18. </v-row>
  19. </LayoutCommonSection>
  20. <LayoutCommonSection>
  21. <v-row>
  22. <v-col cols="12">
  23. <h4 class="mb-8">{{ $t('coordinate') }}</h4>
  24. <UiInputText v-model="organization.email" field="email" :rules="getAsserts('email')" />
  25. <UiInputPhone v-model="organization.tel" field="tel"/>
  26. </v-col>
  27. </v-row>
  28. </LayoutCommonSection>
  29. <LayoutCommonSection>
  30. <v-row>
  31. <v-col cols="12">
  32. <h4 class="mb-8">{{ $t('postal_address') }}</h4>
  33. <UiInputText v-model="organization.streetAddress" field="streetAddress" />
  34. <UiInputText v-model="organization.streetAddressSecond" field="streetAddressSecond" />
  35. <UiInputText v-model="organization.streetAddressThird" field="streetAddressThird" />
  36. <UiInputText v-model="organization.postalCode" field="postalCode" />
  37. <UiInputText v-model="organization.addressCity" field="addressCity" />
  38. <UiInputAutocompleteApiResources
  39. v-model="organization.addressCountry"
  40. field="addressCountry"
  41. :model="Country"
  42. listValue="id"
  43. listLabel="name"
  44. />
  45. <client-only>
  46. <UiMapLeaflet
  47. v-model:latitude="organization.latitude"
  48. v-model:longitude="organization.longitude"
  49. :streetAddress="organization.streetAddress"
  50. :streetAddressSecond="organization.streetAddressSecond"
  51. :streetAddressThird="organization.streetAddressThird"
  52. :postalCode="organization.postalCode"
  53. :addressCity="organization.addressCity"
  54. :addressCountryId="organization.addressCountry"
  55. :searchButton="true"
  56. ></UiMapLeaflet>
  57. </client-only>
  58. </v-col>
  59. </v-row>
  60. </LayoutCommonSection>
  61. <LayoutCommonSection>
  62. <v-row>
  63. <v-col cols="12">
  64. <h4 class="mb-8">{{ $t('communication_params') }}</h4>
  65. <UiInputText v-model="organization.facebook" field="facebook" />
  66. <UiInputText v-model="organization.twitter" field="twitter" />
  67. <UiInputText v-model="organization.youtube" field="youtube" />
  68. <UiInputText v-model="organization.instagram" field="instagram" />
  69. <UiInputCheckbox
  70. v-model="organization.portailVisibility"
  71. field="portailVisibility"
  72. />
  73. </v-col>
  74. </v-row>
  75. </LayoutCommonSection>
  76. </div>
  77. </template>
  78. </UiFormEdition>
  79. </template>
  80. <script setup lang="ts">
  81. import Organization from "~/models/Freemium/Organization";
  82. import {getAssertUtils} from "~/services/asserts/getAssertUtils";
  83. import Country from "~/models/Core/Country";
  84. definePageMeta({
  85. name: 'freemium_organization_page',
  86. })
  87. const getAsserts = (key) => getAssertUtils(Organization.getAsserts(), key)
  88. </script>