Message: Allow to list messages with no sender - refs BT#21015

pull/4976/head
Angel Fernando Quiroz Campos 2 years ago
parent bf80949dcc
commit f00a44fb07
  1. 11
      assets/vue/views/message/MessageList.vue
  2. 9
      assets/vue/views/message/MessageShow.vue
  3. 6
      src/CoreBundle/DataProvider/Extension/MessageExtension.php

@ -104,11 +104,18 @@
<Column selection-mode="multiple" /> <Column selection-mode="multiple" />
<Column :header="t('From')"> <Column :header="t('From')">
<template #body="slotProps"> <template #body="slotProps">
<div class="flex items-center gap-2"> <div
v-if="slotProps.data.sender"
class="flex items-center gap-2"
>
<BaseUserAvatar :image-url="slotProps.data.sender.illustrationUrl" /> <BaseUserAvatar :image-url="slotProps.data.sender.illustrationUrl" />
{{ slotProps.data.sender.username }} {{ slotProps.data.sender.username }}
</div> </div>
<div
v-else
v-t="'No sender'"
/>
</template> </template>
</Column> </Column>
<Column :header="t('Title')"> <Column :header="t('Title')">
@ -414,4 +421,4 @@ function showDlgConfirmDeleteMultiple() {
onMounted(() => { onMounted(() => {
showInbox() showInbox()
}) })
</script> </script>

@ -52,7 +52,7 @@
</div> </div>
<BaseAutocomplete <BaseAutocomplete
v-if="item.sender['@id'] !== user['@id']" v-if="item.sender && item.sender['@id'] !== user['@id']"
id="search-tags" id="search-tags"
v-model="foundTag" v-model="foundTag"
:label="t('Tags')" :label="t('Tags')"
@ -66,10 +66,15 @@
{{ t("From") }} {{ t("From") }}
<BaseChip <BaseChip
v-if="item.sender"
:value="item.sender" :value="item.sender"
image-field="illustrationUrl" image-field="illustrationUrl"
label-field="username" label-field="username"
/> />
<span
v-else
v-t="'No sender'"
/>
</div> </div>
<div> <div>
@ -299,4 +304,4 @@ async function onItemSelect({ value }) {
}) })
} }
} }
</script> </script>

@ -94,12 +94,12 @@ final class MessageExtension implements QueryCollectionExtensionInterface //, Qu
$qb->andWhere( $qb->andWhere(
" "
($alias.sender = :current AND $alias.status <> :deleted) OR ($alias.sender = :current AND $alias.status <> :deleted) OR
($alias.sender <> :current AND r.receiver = :current AND ( (r.receiver = :current AND (
($alias.msgType = :inbox) OR ($alias.msgType = :inbox) OR
($alias.msgType = :invitation) OR ($alias.msgType = :invitation) OR
($alias.msgType = :conversation) ($alias.msgType = :conversation)
) )
) )
" "
); );

Loading…
Cancel
Save