|
|
@@ -4,7 +4,7 @@ Contient toutes les informations sur l'organization courante
|
|
|
-->
|
|
|
<template>
|
|
|
<LayoutContainer>
|
|
|
- <UiForm :id="id" :model="models.Organization" :query="repositories.organizationRepository.query()">
|
|
|
+ <UiForm :id="id" :model="models().Organization" :query="repositories().organizationRepository.query()">
|
|
|
<template #form.input="{entry, updateRepository}">
|
|
|
<v-expansion-panels :value="panel" focusable accordion>
|
|
|
<!-- Description -->
|
|
|
@@ -12,32 +12,13 @@ Contient toutes les informations sur l'organization courante
|
|
|
<v-container fluid class="container">
|
|
|
<v-row>
|
|
|
<v-col cols="12" sm="6">
|
|
|
- <UiInputText field="name" :data="entry['name']" @update="updateRepository" />
|
|
|
+ <UiInputText field="name" :data="entry['name']" @update="updateRepository" :rules="rules().nameRules" />
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12" sm="6">
|
|
|
<UiInputText field="acronym" :data="entry['acronym']" @update="updateRepository" />
|
|
|
</v-col>
|
|
|
|
|
|
- <v-col cols="12" sm="6">
|
|
|
- <UiInputText
|
|
|
- field="siretNumber"
|
|
|
- :data="entry['siretNumber']"
|
|
|
- :error="siretError"
|
|
|
- :error-message="siretErrorMessage"
|
|
|
- :rules="rules.siretRule"
|
|
|
- @update="checkSiretHook($event, 'siretNumber', updateRepository)"
|
|
|
- />
|
|
|
- </v-col>
|
|
|
-
|
|
|
- <v-col cols="12" sm="6">
|
|
|
- <UiInputText field="apeNumber" :data="entry['apeNumber']" @update="updateRepository" />
|
|
|
- </v-col>
|
|
|
-
|
|
|
- <v-col v-if="entry['legalStatus'] === 'ASSOCIATION_LAW_1901'" cols="12" sm="6">
|
|
|
- <UiInputText field="waldecNumber" :data="entry['waldecNumber']" @update="updateRepository" />
|
|
|
- </v-col>
|
|
|
-
|
|
|
<v-col v-if="organizationProfile.isInsideNetwork()" cols="12" sm="6">
|
|
|
<UiInputText :label="organizationProfile.isCmf() ? 'identifierCmf' : 'identifierFfec'" field="identifier" :data="entry['identifier']" @update="updateRepository" />
|
|
|
</v-col>
|
|
|
@@ -51,16 +32,48 @@ Contient toutes les informations sur l'organization courante
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12" sm="6">
|
|
|
- <UiInputText field="logo" :data="entry['logo']" @update="updateRepository" />
|
|
|
+ <UiImage
|
|
|
+ :id="getIdFromUri(entry['logo'])"
|
|
|
+ :upload="true"
|
|
|
+ :width="200"
|
|
|
+ field="logo"
|
|
|
+ :ownerId="id"
|
|
|
+ @update="updateRepository"
|
|
|
+ ></UiImage>
|
|
|
</v-col>
|
|
|
|
|
|
- <!-- @todo: ajouter les if et transformer en select-->
|
|
|
- <v-col cols="12" sm="6">
|
|
|
- <UiInputText field="typeOfPractices" :data="entry['typeOfPractices']" @update="updateRepository" />
|
|
|
+ <v-col v-if="!organizationProfile.isManagerProduct()" cols="12" sm="6">
|
|
|
+ <UiInputEnum field="principalType" :data="entry['principalType']" enum-type="organization_principal_type" @update="updateRepository" />
|
|
|
</v-col>
|
|
|
|
|
|
- <v-col cols="12" sm="6">
|
|
|
- <UiInputText field="otherPractice" :data="entry['otherPractice']" @update="updateRepository" />
|
|
|
+ <v-col v-if="!organizationProfile.isFfec() && !organizationProfile.isManagerProduct() && !organizationProfile.isArtist()" cols="12" sm="6">
|
|
|
+ <UiInputEnum field="schoolCategory" :data="entry['schoolCategory']" enum-type="organization_school_cat" @update="updateRepository" />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col v-if="organizationProfile.isFfec()" cols="12" sm="6">
|
|
|
+ <UiInputEnum field="typeEstablishment" :data="entry['typeEstablishment']" enum-type="organization_type_establishment" @update="updateRepository" />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col v-if="entry.typeEstablishment === 'MULTIPLE'" cols="12" sm="6">
|
|
|
+ <UiInputEnum field="typeEstablishmentDetail" :data="entry['typeEstablishmentDetail']" enum-type="organization_type_establishment_detail" @update="updateRepository" />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col cols="12" sm="6" v-if="organizationProfile.isCmf()">
|
|
|
+ <UiInputAutocomplete
|
|
|
+ field="typeOfPractices"
|
|
|
+ :items="typeOfPractices"
|
|
|
+ :isLoading="typeOfPracticesFetchingState.pending"
|
|
|
+ :item-text="['name']"
|
|
|
+ :data="getIdsFromUris(entry['typeOfPractices'])"
|
|
|
+ :translate="true"
|
|
|
+ :multiple="true"
|
|
|
+ group="category"
|
|
|
+ :rules="rules().typeOfPractice"
|
|
|
+ @update="updateRepository($event.map((id) => `/api/type_of_practices/${id}`), 'typeOfPractices')"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+ <v-col cols="12" sm="6" v-if="getIdsFromUris(entry['typeOfPractices']).indexOf(37) >= 0">
|
|
|
+ <UiInputTextArea field="otherPractice" :data="entry['otherPractice']" @update="updateRepository" />
|
|
|
</v-col>
|
|
|
</v-row>
|
|
|
</v-container>
|
|
|
@@ -71,11 +84,11 @@ Contient toutes les informations sur l'organization courante
|
|
|
<v-container fluid class="container">
|
|
|
<v-row>
|
|
|
<v-col cols="12" sm="12">
|
|
|
- <UiSubList
|
|
|
- :query="repositories.addressRepository.with('addressPostal')"
|
|
|
- :root-model="models.Organization"
|
|
|
+ <UiSubResource
|
|
|
+ :query="repositories().addressRepository.with('addressPostal')"
|
|
|
+ :root-model="models().Organization"
|
|
|
:root-id="id"
|
|
|
- :model="models.OrganizationAddressPostal"
|
|
|
+ :model="models().OrganizationAddressPostal"
|
|
|
loaderType="image"
|
|
|
newLink="/organization/address/new"
|
|
|
>
|
|
|
@@ -90,7 +103,7 @@ Contient toutes les informations sur l'organization courante
|
|
|
<UiCard
|
|
|
:id="item.id"
|
|
|
:link="`/organization/address/${item.id}`"
|
|
|
- :model="models.OrganizationAddressPostal"
|
|
|
+ :model="models().OrganizationAddressPostal"
|
|
|
>
|
|
|
<template #card.title>
|
|
|
{{ $t(item.type) }}
|
|
|
@@ -102,8 +115,8 @@ Contient toutes les informations sur l'organization courante
|
|
|
{{ item.addressPostal.postalCode }} {{ item.addressPostal.addressCity }}<br>
|
|
|
<span v-if="item.addressPostal.addressCountry">
|
|
|
<UiItemFromUri
|
|
|
- :model="models.Country"
|
|
|
- :query="repositories.countryRepository.query()"
|
|
|
+ :model="models().Country"
|
|
|
+ :query="repositories().countryRepository.query()"
|
|
|
:uri="item.addressPostal.addressCountry"
|
|
|
>
|
|
|
<template #item.text="{item}">
|
|
|
@@ -117,7 +130,7 @@ Contient toutes les informations sur l'organization courante
|
|
|
</v-row>
|
|
|
</v-container>
|
|
|
</template>
|
|
|
- </UiSubList>
|
|
|
+ </UiSubResource>
|
|
|
</v-col>
|
|
|
</v-row>
|
|
|
</v-container>
|
|
|
@@ -128,11 +141,11 @@ Contient toutes les informations sur l'organization courante
|
|
|
<v-container class="container">
|
|
|
<v-row>
|
|
|
<v-col cols="12" sm="12">
|
|
|
- <UiSubList
|
|
|
- :query="repositories.contactPointRepository.query()"
|
|
|
- :root-model="models.Organization"
|
|
|
+ <UiSubResource
|
|
|
+ :query="repositories().contactPointRepository.query()"
|
|
|
+ :root-model="models().Organization"
|
|
|
:root-id="id"
|
|
|
- :model="models.ContactPoint"
|
|
|
+ :model="models().ContactPoint"
|
|
|
loaderType="image"
|
|
|
newLink="/organization/contact_points/new"
|
|
|
>
|
|
|
@@ -147,7 +160,7 @@ Contient toutes les informations sur l'organization courante
|
|
|
<UiCard
|
|
|
:id="item.id"
|
|
|
:link="`/organization/contact_points/${item.id}`"
|
|
|
- :model="models.ContactPoint"
|
|
|
+ :model="models().ContactPoint"
|
|
|
>
|
|
|
<template #card.title>
|
|
|
{{ $t(item.contactType) }}
|
|
|
@@ -167,7 +180,7 @@ Contient toutes les informations sur l'organization courante
|
|
|
</v-row>
|
|
|
</v-container>
|
|
|
</template>
|
|
|
- </UiSubList>
|
|
|
+ </UiSubResource>
|
|
|
</v-col>
|
|
|
</v-row>
|
|
|
</v-container>
|
|
|
@@ -178,39 +191,48 @@ Contient toutes les informations sur l'organization courante
|
|
|
<v-container fluid class="container">
|
|
|
<v-row>
|
|
|
<v-col cols="12" sm="6">
|
|
|
- <UiInputDatePicker field="creationDate" :data="entry['creationDate']" @update="updateRepository" />
|
|
|
+ <UiInputText
|
|
|
+ field="siretNumber"
|
|
|
+ :data="entry['siretNumber']"
|
|
|
+ :error="siretError"
|
|
|
+ :error-message="siretErrorMessage"
|
|
|
+ :rules="rules().siretRule"
|
|
|
+ @update="checkSiretHook($event, 'siretNumber', updateRepository)"
|
|
|
+ />
|
|
|
</v-col>
|
|
|
+
|
|
|
<v-col cols="12" sm="6">
|
|
|
- <UiInputText field="prefectureName" :data="entry['prefectureName']" @update="updateRepository" />
|
|
|
+ <UiInputText field="apeNumber" :data="entry['apeNumber']" @update="updateRepository" />
|
|
|
</v-col>
|
|
|
|
|
|
- <v-col cols="12" sm="6">
|
|
|
- <UiInputText field="prefectureNumber" :data="entry['prefectureNumber']" @update="updateRepository" />
|
|
|
+ <v-col v-if="entry['legalStatus'] === 'ASSOCIATION_LAW_1901'" cols="12" sm="6">
|
|
|
+ <UiInputText field="waldecNumber" :data="entry['waldecNumber']" @update="updateRepository" />
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12" sm="6">
|
|
|
- <UiInputText field="tvaNumber" :data="entry['tvaNumber']" @update="updateRepository" />
|
|
|
+ <UiInputDatePicker field="creationDate" :data="entry['creationDate']" @update="updateRepository" />
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12" sm="6">
|
|
|
- <UiInputEnum field="legalStatus" :data="entry['legalStatus']" enum-type="organization_legal" @update="updateRepository" />
|
|
|
+ <UiInputText field="prefectureName" :data="entry['prefectureName']" @update="updateRepository" />
|
|
|
</v-col>
|
|
|
|
|
|
- <v-col v-if="!organizationProfile.isManagerProduct()" cols="12" sm="6">
|
|
|
- <UiInputEnum field="principalType" :data="entry['principalType']" enum-type="organization_principal_type" @update="updateRepository" />
|
|
|
+ <v-col cols="12" sm="6">
|
|
|
+ <UiInputText field="prefectureNumber" :data="entry['prefectureNumber']" @update="updateRepository" />
|
|
|
</v-col>
|
|
|
|
|
|
- <v-col v-if="!organizationProfile.isFfec() && !organizationProfile.isManagerProduct() && !organizationProfile.isArtist()" cols="12" sm="6">
|
|
|
- <UiInputEnum field="schoolCategory" :data="entry['schoolCategory']" enum-type="organization_school_cat" @update="updateRepository" />
|
|
|
+ <v-col cols="12" sm="6">
|
|
|
+ <UiInputDatePicker field="declarationDate" :data="entry['declarationDate']" @update="updateRepository" />
|
|
|
</v-col>
|
|
|
|
|
|
- <v-col v-if="organizationProfile.isFfec()" cols="12" sm="6">
|
|
|
- <UiInputEnum field="typeEstablishment" :data="entry['typeEstablishment']" enum-type="organization_type_establishment" @update="updateRepository" />
|
|
|
+ <v-col cols="12" sm="6">
|
|
|
+ <UiInputText field="tvaNumber" :data="entry['tvaNumber']" @update="updateRepository" />
|
|
|
</v-col>
|
|
|
|
|
|
- <v-col v-if="entry.typeEstablishment === 'MULTIPLE'" cols="12" sm="6">
|
|
|
- <UiInputEnum field="typeEstablishmentDetail" :data="entry['typeEstablishmentDetail']" enum-type="organization_type_establishment_detail" @update="updateRepository" />
|
|
|
+ <v-col cols="12" sm="6">
|
|
|
+ <UiInputEnum field="legalStatus" :data="entry['legalStatus']" enum-type="organization_legal" @update="updateRepository" />
|
|
|
</v-col>
|
|
|
+
|
|
|
</v-row>
|
|
|
</v-container>
|
|
|
</UiExpansionPanel>
|
|
|
@@ -261,6 +283,21 @@ Contient toutes les informations sur l'organization courante
|
|
|
<UiExpansionPanel v-if="organizationProfile.isInsideNetwork()" id="network" icon="fa-share-alt">
|
|
|
<v-container class="container">
|
|
|
<v-row>
|
|
|
+ <v-col cols="12" sm="12">
|
|
|
+ <UiSubResource
|
|
|
+ :query="repositories().netWorkOrganizationRepository.with('network')"
|
|
|
+ :root-model="models().Organization"
|
|
|
+ :root-id="id"
|
|
|
+ :model="models().NetworkOrganization"
|
|
|
+ loaderType="text"
|
|
|
+ >
|
|
|
+ <template #list.item="{items}">
|
|
|
+ <div v-for="item in items" :key="item.id">
|
|
|
+ <span>{{ item.network.name }}</span> - <span>{{$t('first_subscription')}} : <UiTemplateDate :data="item.startDate" /></span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </UiSubResource>
|
|
|
+ </v-col>
|
|
|
<v-col v-if="organizationProfile.isFfec()" cols="12" sm="6">
|
|
|
<UiInputText field="budget" :data="entry['budget']" type="number" @update="updateRepository" />
|
|
|
</v-col>
|
|
|
@@ -284,6 +321,10 @@ Contient toutes les informations sur l'organization courante
|
|
|
<UiInputText field="twitter" :data="entry['twitter']" @update="updateRepository" />
|
|
|
</v-col>
|
|
|
|
|
|
+ <v-col cols="12" sm="6">
|
|
|
+ <UiInputText field="youtube" :data="entry['youtube']" @update="updateRepository" />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
<v-col cols="12" sm="6">
|
|
|
<UiInputText field="facebook" :data="entry['facebook']" @update="updateRepository" />
|
|
|
</v-col>
|
|
|
@@ -297,8 +338,40 @@ Contient toutes les informations sur l'organization courante
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12" sm="6">
|
|
|
- <UiInputText field="image" :data="entry['image']" @update="updateRepository" />
|
|
|
+ <UiImage
|
|
|
+ :id="getIdFromUri(entry['image'])"
|
|
|
+ :upload="true"
|
|
|
+ :width="200"
|
|
|
+ field="image"
|
|
|
+ :ownerId="id"
|
|
|
+ @update="updateRepository"
|
|
|
+ ></UiImage>
|
|
|
</v-col>
|
|
|
+
|
|
|
+ <v-col cols="12" sm="12">
|
|
|
+ <UiSubResource
|
|
|
+ :query="repositories().organizationArticleRepository.query()"
|
|
|
+ :root-model="models().Organization"
|
|
|
+ :root-id="id"
|
|
|
+ :model="models().OrganizationArticle"
|
|
|
+ loaderType="text"
|
|
|
+ >
|
|
|
+ <template #list.item="{items}">
|
|
|
+ <h4 class="ot_grey--text font-weight-regular">{{$t('organizationArticle')}}</h4>
|
|
|
+ <UiTemplateDataTable
|
|
|
+ :headers="[
|
|
|
+ { text: $t('title'), value: 'title' },
|
|
|
+ { text: $t('link'), value: 'link' },
|
|
|
+ { text: $t('date'), value: 'date' },
|
|
|
+ ]"
|
|
|
+ :items="items"
|
|
|
+ >
|
|
|
+ <template #item.date="{item}"><UiTemplateDate :data="item.date" /></template>
|
|
|
+ </UiTemplateDataTable>
|
|
|
+ </template>
|
|
|
+ </UiSubResource>
|
|
|
+ </v-col>
|
|
|
+
|
|
|
</v-row>
|
|
|
</v-container>
|
|
|
</UiExpansionPanel>
|
|
|
@@ -308,13 +381,43 @@ Contient toutes les informations sur l'organization courante
|
|
|
<v-container class="container">
|
|
|
<v-row>
|
|
|
<v-col cols="12" sm="12">
|
|
|
- <UiDataTable
|
|
|
- :query="repositories.bankAccountRepository.query()"
|
|
|
- :root-model="models.Organization"
|
|
|
+ <UiSubResource
|
|
|
+ :query="repositories().bankAccountRepository.query()"
|
|
|
+ :root-model="models().Organization"
|
|
|
:root-id="id"
|
|
|
- :model="models.BankAccount"
|
|
|
- :headers="datatableHeaders.headersBankAccount"
|
|
|
- />
|
|
|
+ :model="models().BankAccount"
|
|
|
+ loaderType="image"
|
|
|
+ newLink="/organization/bank_account/new"
|
|
|
+ >
|
|
|
+ <template #list.item="{items}">
|
|
|
+ <v-container fluid>
|
|
|
+ <v-row dense>
|
|
|
+ <v-col
|
|
|
+ v-for="item in items"
|
|
|
+ :key="item.id"
|
|
|
+ cols="4"
|
|
|
+ >
|
|
|
+ <UiCard
|
|
|
+ :id="item.id"
|
|
|
+ :link="`/organization/bank_account/${item.id}`"
|
|
|
+ :model="models().BankAccount"
|
|
|
+ >
|
|
|
+ <template #card.text>
|
|
|
+ <span v-if="item.bankName"><strong>{{ $t('bankName') }}</strong> : {{ item.bankName }} <br></span>
|
|
|
+
|
|
|
+ <span v-if="item.bic"><strong>{{ $t('bic') }}</strong> : {{ item.bic }} <br></span>
|
|
|
+ <span v-if="item.bicInvalid" class="ot_danger--text"><v-icon class="ot_danger--text">mdi-alert</v-icon> <strong>{{ $t('bicInvalid') }}</strong> : {{ item.bicInvalid }} <br></span>
|
|
|
+
|
|
|
+ <span v-if="item.iban"><strong>{{ $t('iban') }}</strong> : {{ item.iban }} <br></span>
|
|
|
+ <span v-if="item.ibanInvalid" class="ot_danger--text"><v-icon class="ot_danger--text">mdi-alert</v-icon> <strong>{{ $t('ibanInvalid') }}</strong> : {{ item.ibanInvalid }} <br></span>
|
|
|
+
|
|
|
+ </template>
|
|
|
+ </UiCard>
|
|
|
+ </v-col>
|
|
|
+ </v-row>
|
|
|
+ </v-container>
|
|
|
+ </template>
|
|
|
+ </UiSubResource>
|
|
|
</v-col>
|
|
|
</v-row>
|
|
|
</v-container>
|
|
|
@@ -326,7 +429,7 @@ Contient toutes les informations sur l'organization courante
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import { defineComponent, useContext } from '@nuxtjs/composition-api'
|
|
|
+import {defineComponent, useContext, reactive} from '@nuxtjs/composition-api'
|
|
|
import { $organizationProfile } from '~/services/profile/organizationProfile'
|
|
|
import { Organization } from '@/models/Organization/Organization'
|
|
|
import { OrganizationAddressPostal } from '~/models/Organization/OrganizationAddressPostal'
|
|
|
@@ -337,18 +440,22 @@ import UseValidator from '~/use/form/useValidator'
|
|
|
import { UseNavigationHelpers } from '~/use/form/useNavigationHelpers'
|
|
|
import I18N from '~/services/utils/i18n'
|
|
|
import {Country} from "~/models/Core/Country";
|
|
|
+import {UseTypeOfPractice} from "~/use/data/useTypeOfPractice";
|
|
|
+import ModelsUtils from "~/services/utils/modelsUtils";
|
|
|
+import {NetworkOrganization} from "~/models/Network/NetworkOrganization";
|
|
|
+import {OrganizationArticle} from "~/models/Organization/OrganizationArticle";
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'OrganizationParent',
|
|
|
setup () {
|
|
|
const { store, app: { i18n }, $dataProvider } = useContext()
|
|
|
- const organizationProfile = $organizationProfile(store)
|
|
|
+ const organizationProfile = reactive($organizationProfile(store))
|
|
|
const id: number = store.state.profile.organization.id
|
|
|
|
|
|
- const repositories = getRepositories()
|
|
|
-
|
|
|
const { siretError, siretErrorMessage, checkSiret } = UseValidator.useHandleSiret(i18n, $dataProvider)
|
|
|
|
|
|
+ const {typeOfPractices, fetchState:typeOfPracticesFetchingState} = new UseTypeOfPractice().getAll()
|
|
|
+
|
|
|
const checkSiretHook = async (siret: string, field: string, updateRepository: any) => {
|
|
|
await checkSiret(siret)
|
|
|
if (!siretError.value) { updateRepository(siret, field) }
|
|
|
@@ -360,23 +467,36 @@ export default defineComponent({
|
|
|
return I18N.formatPhoneNumber(number)
|
|
|
}
|
|
|
|
|
|
+ const getIdsFromUris = (uris: Array<string>) => {
|
|
|
+ const ids:Array<any> = []
|
|
|
+ for(const uri of uris){
|
|
|
+ ids.push(ModelsUtils.extractIdFromUri(uri))
|
|
|
+ }
|
|
|
+ return ids
|
|
|
+ }
|
|
|
+
|
|
|
+ const getIdFromUri = (uri: string) => ModelsUtils.extractIdFromUri(uri)
|
|
|
+
|
|
|
return {
|
|
|
- repositories,
|
|
|
+ repositories: () => getRepositories(),
|
|
|
id,
|
|
|
organizationProfile,
|
|
|
- models: { Organization, ContactPoint, BankAccount, OrganizationAddressPostal, Country },
|
|
|
- datatableHeaders: getDataTablesHeaders(i18n),
|
|
|
- rules: getRules(i18n),
|
|
|
+ models: () => { return { Organization, ContactPoint, BankAccount, OrganizationAddressPostal, Country, NetworkOrganization, OrganizationArticle } },
|
|
|
+ rules: () => getRules(i18n, organizationProfile),
|
|
|
siretError,
|
|
|
siretErrorMessage,
|
|
|
checkSiretHook,
|
|
|
formatPhoneNumber,
|
|
|
- panel
|
|
|
+ typeOfPractices,
|
|
|
+ typeOfPracticesFetchingState,
|
|
|
+ panel,
|
|
|
+ getIdFromUri,
|
|
|
+ getIdsFromUris
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
|
|
|
-function getRules (i18n: any) {
|
|
|
+function getRules (i18n: any, $organizationProfile:any) {
|
|
|
return {
|
|
|
nameRules: [
|
|
|
(nameValue: string) => !!nameValue || i18n.t('required'),
|
|
|
@@ -384,28 +504,13 @@ function getRules (i18n: any) {
|
|
|
],
|
|
|
siretRule: [
|
|
|
(siretValue: string) => /^([0-9]{9}|[0-9]{14})$/.test(siretValue) || i18n.t('siret_error')
|
|
|
- ]
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-function getDataTablesHeaders (i18n: any) {
|
|
|
- return {
|
|
|
- headersContactPoint: [
|
|
|
- { text: i18n.t('email'), value: 'email' },
|
|
|
- { text: i18n.t('telphone'), value: 'telphone' },
|
|
|
- { text: i18n.t('mobilPhone'), value: 'mobilPhone' },
|
|
|
- { text: i18n.t('actions'), value: 'actions', sortable: false }
|
|
|
- ],
|
|
|
- headersBankAccount: [
|
|
|
- { text: i18n.t('bankName'), value: 'bankName' },
|
|
|
- { text: i18n.t('iban'), value: 'iban' },
|
|
|
- { text: i18n.t('bic'), value: 'bic' },
|
|
|
- { text: i18n.t('actions'), value: 'actions', sortable: false }
|
|
|
],
|
|
|
- headersAddressPostal: [
|
|
|
- { text: i18n.t('address_postal_type'), value: 'type' },
|
|
|
- { text: i18n.t('address'), value: 'address' },
|
|
|
- { text: i18n.t('actions'), value: 'actions', sortable: false }
|
|
|
+ typeOfPractice: [
|
|
|
+ (typeOfPracticeValue: Array<number>) => {
|
|
|
+ if(!$organizationProfile.isManagerProduct())
|
|
|
+ return typeOfPracticeValue.length > 0 || i18n.t('required')
|
|
|
+ return true
|
|
|
+ }
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
@@ -416,7 +521,9 @@ function getRepositories () {
|
|
|
contactPointRepository: repositoryHelper.getRepository(ContactPoint),
|
|
|
bankAccountRepository: repositoryHelper.getRepository(BankAccount),
|
|
|
addressRepository: repositoryHelper.getRepository(OrganizationAddressPostal),
|
|
|
- countryRepository: repositoryHelper.getRepository(Country)
|
|
|
+ countryRepository: repositoryHelper.getRepository(Country),
|
|
|
+ netWorkOrganizationRepository: repositoryHelper.getRepository(NetworkOrganization),
|
|
|
+ organizationArticleRepository: repositoryHelper.getRepository(OrganizationArticle),
|
|
|
}
|
|
|
}
|
|
|
</script>
|