note email impr
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
|
||||
{{#if hasPost}}
|
||||
<div class="stream-post-container">
|
||||
<span class="cell cell-post">{{{post}}}</span>
|
||||
<span class="cell cell-post {{#if mutedPost}} text-muted {{/if}}">{{{post}}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
|
||||
@@ -76,12 +76,19 @@ class EmailReceivedNoteStreamView extends NoteStreamView {
|
||||
*/
|
||||
emailId
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {boolean}
|
||||
*/
|
||||
emailNotLoaded = false
|
||||
|
||||
data() {
|
||||
return {
|
||||
...super.data(),
|
||||
emailId: this.emailId,
|
||||
emailName: this.emailName,
|
||||
hasPost: this.hasPost && !this.detailsIsShown,
|
||||
hasPost: this.hasPost && (!this.detailsIsShown || !this.bodyFieldView),
|
||||
mutedPost: this.hasPost && this.detailsIsShown && !this.bodyFieldView && !this.emailNotLoaded,
|
||||
hasAttachments: this.hasAttachments,
|
||||
emailIconClassName: this.getMetadata().get(['clientDefs', 'Email', 'iconClass']) || '',
|
||||
isPinned: this.isThis && this.model.get('isPinned') && this.model.collection &&
|
||||
@@ -214,7 +221,15 @@ class EmailReceivedNoteStreamView extends NoteStreamView {
|
||||
|
||||
Espo.Ui.notify(' ... ');
|
||||
|
||||
await this.formModel.fetch();
|
||||
try {
|
||||
await this.formModel.fetch();
|
||||
} catch (e) {
|
||||
this.emailNotLoaded = true;
|
||||
|
||||
await this.reRender();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
this.bodyFieldView = new EmailBodyFieldView({
|
||||
name: 'body',
|
||||
|
||||
Reference in New Issue
Block a user