Merge branch '232_resources_comment' into 'master'

232 resources comment

See merge request Chill-Projet/chill-bundles!276
This commit is contained in:
2022-01-13 11:05:15 +00:00
31 changed files with 502 additions and 71 deletions

View File

@@ -133,7 +133,6 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
/**
* @ORM\Column(name="comment", type="text", nullable=true)
* @Groups({"read"})
*/
private ?string $comment = null;

View File

@@ -38,25 +38,9 @@
<i class="fa fa-li fa-hand-o-right"></i>
<b class="me-2">{{ $t('child_of') }}</b>
<span class="chill-entity badge-thirdparty">{{ thirdparty.parent.text }}</span>
<!-- console: [Vue warn]: Failed to resolve component: on-the-fly ...
<on-the-fly type="thirdparty" action="show" :id="thirdparty.parent.id"
:buttonText="thirdparty.parent.text" :displayBadge="'true' === 'true'"
></on-the-fly>
-->
</li>
<!-- TODO hasChildren
<li v-if="hasChildren">
<i class="fa fa-li fa-hand-o-right"></i>
<b class="me-2">{{ $t('children') }}</b>
<span v-for="child in thirdparty.activeChildren">
<on-the-fly type="thirdparty"
action="show"
:id="child.id"
:buttonText="child.text"
displayBadge="'true' === 'true'">
</on-the-fly>
</span>
</li>
NB: we cannot call on-the-fly from RenderBox. See error message in previous version of this file.
-->
</ul>
<confidential v-if="thirdparty.contactDataAnonymous">
@@ -91,9 +75,6 @@
<a :href="'mailto: ' + thirdparty.email">{{ thirdparty.email }}</a>
</li>
</ul>
<div v-if="options.addComment && !thirdparty.contactDataAnonymous && thirdparty.comment">
<blockquote class="chill-user-quote">{{ thirdparty.comment }}</blockquote>
</div>
</div>
</div>
</div>

View File

@@ -14,7 +14,6 @@
hLevel: 3,
addCenter: true,
addNoData: true,
addComment: true,
isMultiline: true
}"
></third-party-render-box>
@@ -169,7 +168,7 @@ export default {
getThirdparty(this.id).then(thirdparty => new Promise((resolve, reject) => {
this.thirdparty = thirdparty;
this.thirdparty.kind = thirdparty.kind;
console.log('get thirdparty', thirdparty);
//console.log('get thirdparty', thirdparty);
if (this.action !== 'show') {
if (thirdparty.address !== null) {
// bof! we force getInitialAddress because addressId not available when mounted
@@ -190,7 +189,7 @@ export default {
}
},
mounted() {
console.log('mounted', this.action);
//console.log('mounted', this.action);
if (this.action !== 'create') {
this.loadData();
} else {

View File

@@ -46,7 +46,6 @@ class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterf
'parent' => $this->normalizer->normalize($thirdParty->getParent(), $format, $context),
'civility' => $this->normalizer->normalize($thirdParty->getCivility(), $format, $context),
'contactDataAnonymous' => $thirdParty->isContactDataAnonymous(),
'comment' => $thirdParty->getComment(),
];
}