mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
further implementation in vue elements
This commit is contained in:
@@ -173,6 +173,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
|
||||
/**
|
||||
* @var bool
|
||||
* @ORM\Column(name="contact_data_anonymous", type="boolean", options={"default":false})
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
private bool $contactDataAnonymous = false;
|
||||
|
||||
|
@@ -5,7 +5,6 @@
|
||||
|
||||
<div class="item-col">
|
||||
<div class="entity-label">
|
||||
|
||||
<div :class="'denomination h' + options.hLevel">
|
||||
|
||||
<a v-if="this.options.addLink === true" href="#">
|
||||
@@ -19,7 +18,7 @@
|
||||
<span class="badge bg-thirdparty-company" v-else-if="thirdparty.kind == 'company'">
|
||||
{{ $t('thirdparty.company')}}
|
||||
</span>
|
||||
<span class="badge bg-thirdparty-contact" v-else="thirdparty.kind == 'contact'">
|
||||
<span class="badge bg-thirdparty-contact" v-else>
|
||||
{{ $t('thirdparty.contact')}}
|
||||
</span>
|
||||
|
||||
@@ -46,20 +45,38 @@
|
||||
<div class="action">
|
||||
<slot name="record-actions"></slot>
|
||||
</div>
|
||||
<ul class="list-content fa-ul">
|
||||
<confidential v-if="thirdparty.contactDataAnonymous">
|
||||
<template v-slot:confidential-content>
|
||||
<ul class="list-content fa-ul">
|
||||
<li v-if="thirdparty.address">
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
<address-render-box :address="thirdparty.address" :isMultiline="isMultiline"></address-render-box>
|
||||
</li>
|
||||
<li v-if="thirdparty.phonenumber">
|
||||
<i class="fa fa-li fa-mobile"></i>
|
||||
<a :href="'tel: ' + thirdparty.phonenumber">{{ thirdparty.phonenumber }}</a>
|
||||
</li>
|
||||
<li v-if="thirdparty.email">
|
||||
<i class="fa fa-li fa-envelope-o"></i>
|
||||
<a :href="'mailto: ' + thirdparty.email">{{ thirdparty.email }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
</confidential>
|
||||
<ul v-else class="list-content fa-ul">
|
||||
<li v-if="thirdparty.address">
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
<address-render-box :address="thirdparty.address" :isMultiline="isMultiline"></address-render-box>
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
<address-render-box :address="thirdparty.address" :isMultiline="isMultiline"></address-render-box>
|
||||
</li>
|
||||
<li v-if="thirdparty.phonenumber">
|
||||
<i class="fa fa-li fa-mobile"></i>
|
||||
<a :href="'tel: ' + thirdparty.phonenumber">{{ thirdparty.phonenumber }}</a>
|
||||
<i class="fa fa-li fa-mobile"></i>
|
||||
<a :href="'tel: ' + thirdparty.phonenumber">{{ thirdparty.phonenumber }}</a>
|
||||
</li>
|
||||
<li v-if="thirdparty.email">
|
||||
<i class="fa fa-li fa-envelope-o"></i>
|
||||
<a :href="'mailto: ' + thirdparty.email">{{ thirdparty.email }}</a>
|
||||
<i class="fa fa-li fa-envelope-o"></i>
|
||||
<a :href="'mailto: ' + thirdparty.email">{{ thirdparty.email }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -73,6 +90,7 @@
|
||||
<script>
|
||||
import AddressRenderBox from 'ChillMainAssets/vuejs/_components/Entity/AddressRenderBox.vue';
|
||||
import {dateToISO} from 'ChillMainAssets/chill/js/date.js';
|
||||
import Confidential from 'ChillMainAssets/vuejs/_components/Confidential.vue';
|
||||
|
||||
const i18n = {
|
||||
messages: {
|
||||
@@ -88,7 +106,8 @@ const i18n = {
|
||||
export default {
|
||||
name: "ThirdPartyRenderBox",
|
||||
components: {
|
||||
AddressRenderBox
|
||||
AddressRenderBox,
|
||||
Confidential
|
||||
},
|
||||
i18n,
|
||||
props: ['thirdparty', 'options'],
|
||||
|
@@ -87,7 +87,7 @@
|
||||
<div class="item-col">
|
||||
{% if options['isConfidential'] %}
|
||||
<div class="confidential">
|
||||
<div class="confidential-content">
|
||||
<div class="confidential-content blur">
|
||||
<ul class="list-content fa-ul">
|
||||
<li>
|
||||
{{ thirdparty.getAddress|chill_entity_render_box({
|
||||
|
@@ -22,7 +22,7 @@
|
||||
<div class="flex-table">
|
||||
{% for tp in third_parties %}
|
||||
<div class="item-bloc">
|
||||
{{ tp|chill_entity_render_box({'render': 'bloc', 'addLink': false, 'showContacts': true, 'isConfidential': true }) }}
|
||||
{{ tp|chill_entity_render_box({'render': 'bloc', 'addLink': false, 'showContacts': true, 'isConfidential': (tp.contactDataAnonymous ? true : false) }) }}
|
||||
<div class="item-row separator">
|
||||
<ul class="record_actions">
|
||||
{% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %}
|
||||
|
@@ -34,6 +34,7 @@ class ThirdPartyNormalizer implements NormalizerInterface, NormalizerAwareInterf
|
||||
$data['isChild'] = $thirdParty->isChild();
|
||||
$data['parent'] = $this->normalizer->normalize($thirdParty->getParent(), $format, $context);
|
||||
$data['civility'] = $this->normalizer->normalize($thirdParty->getCivility(), $format, $context);
|
||||
$data['contactDataAnonymous'] = $thirdParty->isContactDataAnonymous();
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
Reference in New Issue
Block a user