This commit is contained in:
Yuri Kuznetsov
2024-08-08 17:06:22 +03:00
parent 701422892a
commit 16ce6eb0b9
2 changed files with 37 additions and 42 deletions
+8 -12
View File
@@ -26,18 +26,14 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
define('views/extension/record/list', ['views/record/list'], function (Dep) {
import ListRecordView from 'views/record/list';
return Dep.extend({
export default class extends ListRecordView {
rowActionsView: 'views/extension/record/row-actions',
rowActionsView = 'views/extension/record/row-actions'
checkboxes: false,
quickDetailDisabled: true,
quickEditDisabled: true,
massActionList: [],
});
});
checkboxes = false
quickDetailDisabled = true
quickEditDisabled = true
massActionList = []
}
@@ -26,43 +26,42 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
define('views/extension/record/row-actions', ['views/record/row-actions/default'], function (Dep) {
import DefaultRowActionsView from 'views/record/row-actions/default';
return Dep.extend({
export default class extends DefaultRowActionsView {
getActionList: function () {
if (!this.options.acl.edit) {
return [];
}
if (this.model.get('isInstalled')) {
return [
{
action: 'uninstall',
label: 'Uninstall',
data: {
id: this.model.id,
},
},
];
}
getActionList() {
if (!this.options.acl.edit) {
return [];
}
if (this.model.get('isInstalled')) {
return [
{
action: 'install',
label: 'Install',
data: {
id: this.model.id,
},
},
{
action: 'quickRemove',
label: 'Remove',
action: 'uninstall',
label: 'Uninstall',
data: {
id: this.model.id,
},
},
];
},
});
});
}
return [
{
action: 'install',
label: 'Install',
data: {
id: this.model.id,
},
},
{
action: 'quickRemove',
label: 'Remove',
data: {
id: this.model.id,
},
},
];
}
}