Merge branch 'fix'

This commit is contained in:
Yuri Kuznetsov
2024-10-10 18:21:11 +03:00
3 changed files with 18 additions and 6 deletions
+15 -3
View File
@@ -124,6 +124,7 @@ class KanbanRecordView extends ListRecordView {
* @property {boolean} [topBarDisabled] Disable the top bar.
* @property {function(string, string[]): Promise} [onGroupOrder] On group order function.
* @property {function(string): Promise<Record>} [getCreateAttributes] Get create attributes function.
* @property {function(import('model').default): Promise} [groupChangeSaveHandler] Handles record saving after drop.
* @property {function(string)} [createActionHandler] A create handler.
* @property {string} [statusField] A status field.
* @property {boolean} [canChangeGroup] Can change group.
@@ -144,6 +145,8 @@ class KanbanRecordView extends ListRecordView {
this.getCreateAttributes = options.getCreateAttributes;
/** @private */
this.createActionHandler = options.createActionHandler;
/** @private */
this.groupChangeSaveHandler = options.groupChangeSaveHandler;
}
events = {
@@ -636,11 +639,20 @@ class KanbanRecordView extends ListRecordView {
$list.sortable('disable');
model
.save(attributes, {
const processSave = async () =>{
if (this.groupChangeSaveHandler) {
model.set(attributes, {isDrop: true});
return this.groupChangeSaveHandler(model);
}
return model.save(attributes, {
patch: true,
isDrop: true,
})
});
};
processSave()
.then(() => {
Espo.Ui.success(this.translate('Saved'));
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "espocrm",
"version": "8.4.1",
"version": "8.4.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "espocrm",
"version": "8.4.1",
"version": "8.4.2",
"hasInstallScript": true,
"license": "AGPL-3.0-or-later",
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "espocrm",
"version": "8.4.1",
"version": "8.4.2",
"description": "Open-source CRM.",
"repository": {
"type": "git",