mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
further implementation in vue elements
This commit is contained in:
parent
5cf94a5ed6
commit
3f869e9ca5
@ -1,9 +1,9 @@
|
|||||||
.confidential{
|
.confidential{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
.toggle{
|
.toggle{
|
||||||
margin-left: 10px;
|
margin-left: 30px;
|
||||||
|
margin-top: 5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.blur {
|
.blur {
|
||||||
|
@ -23,9 +23,10 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss'>
|
<style scoped lang='scss'>
|
||||||
.confidential{
|
.confidential{
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
}
|
}
|
||||||
.toggle{
|
.toggle{
|
||||||
margin-top: 28px;
|
margin-top: 28px;
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
{{ encore_entry_link_tags('mod_forkawesome') }}
|
{{ encore_entry_link_tags('mod_forkawesome') }}
|
||||||
{{ encore_entry_link_tags('mod_ckeditor5') }}
|
{{ encore_entry_link_tags('mod_ckeditor5') }}
|
||||||
{{ encore_entry_link_tags('chill') }}
|
{{ encore_entry_link_tags('chill') }}
|
||||||
|
{{ encore_entry_link_tags('mod_blur') }}
|
||||||
{% block css %}<!-- nothing added to css -->{% endblock %}
|
{% block css %}<!-- nothing added to css -->{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<persons-associated></persons-associated>
|
<persons-associated></persons-associated>
|
||||||
<course-location></course-location>
|
<course-location></course-location>
|
||||||
<origin-demand></origin-demand>
|
<origin-demand></origin-demand>
|
||||||
<requestor></requestor>
|
<requestor v-bind:isAnonymous="accompanyingCourse.requestorAnonymous"></requestor>
|
||||||
<social-issue></social-issue>
|
<social-issue></social-issue>
|
||||||
<scopes></scopes>
|
<scopes></scopes>
|
||||||
<referrer></referrer>
|
<referrer></referrer>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<h2><a id="section-40"></a>{{ $t('requestor.title') }}</h2>
|
<h2><a id="section-40"></a>{{ $t('requestor.title') }}</h2>
|
||||||
|
|
||||||
<div v-if="accompanyingCourse.requestor" class="flex-table">
|
<div v-if="accompanyingCourse.requestor && isAnonymous" class="flex-table">
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" v-model="isAnonymous" class="me-2" />
|
<input type="checkbox" v-model="isAnonymous" class="me-2" />
|
||||||
@ -68,6 +68,57 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div v-else-if="accompanyingCourse.requestor && !isAnonymous" class="flex-table">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" v-model="isAnonymous" class="me-2" />
|
||||||
|
{{ $t('requestor.is_anonymous') }}
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<third-party-render-box
|
||||||
|
v-if="accompanyingCourse.requestor.type === 'thirdparty'"
|
||||||
|
:thirdparty="accompanyingCourse.requestor"
|
||||||
|
:options="{
|
||||||
|
addLink: false,
|
||||||
|
addId: false,
|
||||||
|
addEntity: true,
|
||||||
|
addInfo: false,
|
||||||
|
hLevel: 3,
|
||||||
|
isMultiline: true,
|
||||||
|
isConfidential: true
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<template v-slot:record-actions>
|
||||||
|
<ul class="record_actions">
|
||||||
|
<li><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="show"></on-the-fly></li>
|
||||||
|
<li><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="edit" @saveFormOnTheFly="saveFormOnTheFly"></on-the-fly></li>
|
||||||
|
</ul>
|
||||||
|
</template>
|
||||||
|
</third-party-render-box>
|
||||||
|
|
||||||
|
<person-render-box render="bloc"
|
||||||
|
v-if="accompanyingCourse.requestor.type === 'person'"
|
||||||
|
:person="accompanyingCourse.requestor"
|
||||||
|
:options="{
|
||||||
|
addLink: false,
|
||||||
|
addId: false,
|
||||||
|
addAltNames: false,
|
||||||
|
addEntity: true,
|
||||||
|
addInfo: true,
|
||||||
|
hLevel: 3,
|
||||||
|
isMultiline: true,
|
||||||
|
isConfidential: false
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<template v-slot:record-actions>
|
||||||
|
<ul class="record_actions">
|
||||||
|
<li><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="show"></on-the-fly></li>
|
||||||
|
<li><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="edit" @saveFormOnTheFly="saveFormOnTheFly"></on-the-fly></li>
|
||||||
|
</ul>
|
||||||
|
</template>
|
||||||
|
</person-render-box>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<label class="chill-no-data-statement">{{ $t('requestor.counter') }}</label>
|
<label class="chill-no-data-statement">{{ $t('requestor.counter') }}</label>
|
||||||
</div>
|
</div>
|
||||||
@ -102,6 +153,7 @@ export default {
|
|||||||
ThirdPartyRenderBox,
|
ThirdPartyRenderBox,
|
||||||
Confidential
|
Confidential
|
||||||
},
|
},
|
||||||
|
props: ['isAnonymous'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
addPersons: {
|
addPersons: {
|
||||||
@ -160,4 +212,8 @@ div.flex-table {
|
|||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.confidential {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -173,6 +173,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
|
|||||||
/**
|
/**
|
||||||
* @var bool
|
* @var bool
|
||||||
* @ORM\Column(name="contact_data_anonymous", type="boolean", options={"default":false})
|
* @ORM\Column(name="contact_data_anonymous", type="boolean", options={"default":false})
|
||||||
|
* @Groups({"read"})
|
||||||
*/
|
*/
|
||||||
private bool $contactDataAnonymous = false;
|
private bool $contactDataAnonymous = false;
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
<div class="item-col">
|
<div class="item-col">
|
||||||
<div class="entity-label">
|
<div class="entity-label">
|
||||||
|
|
||||||
<div :class="'denomination h' + options.hLevel">
|
<div :class="'denomination h' + options.hLevel">
|
||||||
|
|
||||||
<a v-if="this.options.addLink === true" href="#">
|
<a v-if="this.options.addLink === true" href="#">
|
||||||
@ -19,7 +18,7 @@
|
|||||||
<span class="badge bg-thirdparty-company" v-else-if="thirdparty.kind == 'company'">
|
<span class="badge bg-thirdparty-company" v-else-if="thirdparty.kind == 'company'">
|
||||||
{{ $t('thirdparty.company')}}
|
{{ $t('thirdparty.company')}}
|
||||||
</span>
|
</span>
|
||||||
<span class="badge bg-thirdparty-contact" v-else="thirdparty.kind == 'contact'">
|
<span class="badge bg-thirdparty-contact" v-else>
|
||||||
{{ $t('thirdparty.contact')}}
|
{{ $t('thirdparty.contact')}}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@ -46,6 +45,8 @@
|
|||||||
<div class="action">
|
<div class="action">
|
||||||
<slot name="record-actions"></slot>
|
<slot name="record-actions"></slot>
|
||||||
</div>
|
</div>
|
||||||
|
<confidential v-if="thirdparty.contactDataAnonymous">
|
||||||
|
<template v-slot:confidential-content>
|
||||||
<ul class="list-content fa-ul">
|
<ul class="list-content fa-ul">
|
||||||
<li v-if="thirdparty.address">
|
<li v-if="thirdparty.address">
|
||||||
<i class="fa fa-li fa-map-marker"></i>
|
<i class="fa fa-li fa-map-marker"></i>
|
||||||
@ -60,6 +61,22 @@
|
|||||||
<a :href="'mailto: ' + thirdparty.email">{{ thirdparty.email }}</a>
|
<a :href="'mailto: ' + thirdparty.email">{{ thirdparty.email }}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</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>
|
||||||
|
</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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -73,6 +90,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import AddressRenderBox from 'ChillMainAssets/vuejs/_components/Entity/AddressRenderBox.vue';
|
import AddressRenderBox from 'ChillMainAssets/vuejs/_components/Entity/AddressRenderBox.vue';
|
||||||
import {dateToISO} from 'ChillMainAssets/chill/js/date.js';
|
import {dateToISO} from 'ChillMainAssets/chill/js/date.js';
|
||||||
|
import Confidential from 'ChillMainAssets/vuejs/_components/Confidential.vue';
|
||||||
|
|
||||||
const i18n = {
|
const i18n = {
|
||||||
messages: {
|
messages: {
|
||||||
@ -88,7 +106,8 @@ const i18n = {
|
|||||||
export default {
|
export default {
|
||||||
name: "ThirdPartyRenderBox",
|
name: "ThirdPartyRenderBox",
|
||||||
components: {
|
components: {
|
||||||
AddressRenderBox
|
AddressRenderBox,
|
||||||
|
Confidential
|
||||||
},
|
},
|
||||||
i18n,
|
i18n,
|
||||||
props: ['thirdparty', 'options'],
|
props: ['thirdparty', 'options'],
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
<div class="item-col">
|
<div class="item-col">
|
||||||
{% if options['isConfidential'] %}
|
{% if options['isConfidential'] %}
|
||||||
<div class="confidential">
|
<div class="confidential">
|
||||||
<div class="confidential-content">
|
<div class="confidential-content blur">
|
||||||
<ul class="list-content fa-ul">
|
<ul class="list-content fa-ul">
|
||||||
<li>
|
<li>
|
||||||
{{ thirdparty.getAddress|chill_entity_render_box({
|
{{ thirdparty.getAddress|chill_entity_render_box({
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<div class="flex-table">
|
<div class="flex-table">
|
||||||
{% for tp in third_parties %}
|
{% for tp in third_parties %}
|
||||||
<div class="item-bloc">
|
<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">
|
<div class="item-row separator">
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
{% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %}
|
{% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %}
|
||||||
|
@ -34,6 +34,7 @@ class ThirdPartyNormalizer implements NormalizerInterface, NormalizerAwareInterf
|
|||||||
$data['isChild'] = $thirdParty->isChild();
|
$data['isChild'] = $thirdParty->isChild();
|
||||||
$data['parent'] = $this->normalizer->normalize($thirdParty->getParent(), $format, $context);
|
$data['parent'] = $this->normalizer->normalize($thirdParty->getParent(), $format, $context);
|
||||||
$data['civility'] = $this->normalizer->normalize($thirdParty->getCivility(), $format, $context);
|
$data['civility'] = $this->normalizer->normalize($thirdParty->getCivility(), $format, $context);
|
||||||
|
$data['contactDataAnonymous'] = $thirdParty->isContactDataAnonymous();
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user