Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions src/modules/client/pages/ni/courses/ContactProfile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,15 @@
de la formation.
</span>
<div class="interlocutor-container q-mt-lg">
<ni-interlocutor-cell :interlocutor="billingRepresentative" caption="Chargé de facturation Compani"
:can-update="false" />
<ni-interlocutor-cell :interlocutor="salesRepresentative" caption="Chargé d'accompagnement" :can-update="false" />
</div>
</q-page>
</template>

<script>
import { ref, computed } from 'vue';
import { computed } from 'vue';
import { useStore } from 'vuex';
import get from 'lodash/get';
import VendorCompanies from '@api/VendorCompanies';
import TitleHeader from '@components/TitleHeader';
import InterlocutorCell from '@components/courses/InterlocutorCell';

Expand All @@ -28,26 +25,10 @@ export default {
'ni-interlocutor-cell': InterlocutorCell,
},
setup () {
const billingRepresentative = ref({});

const $store = useStore();
const salesRepresentative = computed(() => get($store.getters['main/getCompany'], 'salesRepresentative'));

const getBillingRepresentative = async () => {
const vendorCompany = await VendorCompanies.get();

billingRepresentative.value = get(vendorCompany, 'billingRepresentative');
};

const created = async () => {
getBillingRepresentative();
};

created();

return {
// Data
billingRepresentative,
// Computed
salesRepresentative,
};
Expand Down
Loading