show no records moved

This commit is contained in:
Yuri Kuznetsov
2024-10-22 17:16:59 +03:00
parent 9a1c843c37
commit b58e5383e0
2 changed files with 8 additions and 1 deletions
@@ -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",
+7 -1
View File
@@ -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);