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 :header="t('From')">
<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" />
{{ slotProps.data.sender.username }}
</div>
<div
v-else
v-t="'No sender'"
/>
</template>
</Column>
<Column :header="t('Title')">
@ -414,4 +421,4 @@ function showDlgConfirmDeleteMultiple() {
onMounted(() => {
showInbox()
})
</script>
</script>

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

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

Loading…
Cancel
Save