show no records moved
This commit is contained in:
@@ -120,6 +120,7 @@
|
||||
"Retrieve from Trash": "Retrieve from Trash",
|
||||
"Move to Folder": "Move to Folder",
|
||||
"Moved to Archive": "Moved to Archive",
|
||||
"No Records Moved": "No Records Moved",
|
||||
"Filters": "Filters",
|
||||
"Folders": "Folders",
|
||||
"Group Folders": "Group Folders",
|
||||
|
||||
@@ -282,7 +282,7 @@ class EmailListRecordView extends ListRecordView {
|
||||
|
||||
Espo.Ui.notify(this.translate('pleaseWait', 'messages'));
|
||||
|
||||
/** @type {{id?: string}} */
|
||||
/** @type {{id?: string, count?: number}} */
|
||||
const result = await Espo.Ajax.postRequest('MassAction', {
|
||||
entityType: this.entityType,
|
||||
action: 'moveToFolder',
|
||||
@@ -305,6 +305,12 @@ class EmailListRecordView extends ListRecordView {
|
||||
return;
|
||||
}
|
||||
|
||||
if (result.count === 0) {
|
||||
Espo.Ui.warning(this.translate('No Records Moved', 'labels', 'Email'));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (folderId === 'archive') {
|
||||
[...this.checkedList].forEach(id => {
|
||||
this.collection.trigger('moving-to-archive', id);
|
||||
|
||||
Reference in New Issue
Block a user