Merge branch 'fix'
This commit is contained in:
@@ -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'));
|
||||
|
||||
|
||||
Generated
+2
-2
@@ -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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "espocrm",
|
||||
"version": "8.4.1",
|
||||
"version": "8.4.2",
|
||||
"description": "Open-source CRM.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Reference in New Issue
Block a user