Merged in bugfix/PMCORE-3342 (pull request #8165)
PMCORE-3342 Approved-by: Fabio Guachalla Approved-by: Rodrigo Quelca
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
commit
abd7a2b749
@@ -4,7 +4,9 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
let that = this;
|
let that = this;
|
||||||
return {
|
return {
|
||||||
typeView: "GRID",
|
typeView: this.data.settings.view && this.data.settings.view.typeView
|
||||||
|
? this.data.settings.view.typeView
|
||||||
|
: "GRID",
|
||||||
random: 1,
|
random: 1,
|
||||||
dataCasesList: [],
|
dataCasesList: [],
|
||||||
defaultColumns: [
|
defaultColumns: [
|
||||||
@@ -24,6 +26,9 @@ export default {
|
|||||||
title: "Grid",
|
title: "Grid",
|
||||||
onClick(action) {
|
onClick(action) {
|
||||||
that.typeView = "GRID";
|
that.typeView = "GRID";
|
||||||
|
that.updateRootSettings("view", {
|
||||||
|
typeView: that.typeView
|
||||||
|
});
|
||||||
},
|
},
|
||||||
icon: "fas fa-table",
|
icon: "fas fa-table",
|
||||||
},
|
},
|
||||||
@@ -32,6 +37,9 @@ export default {
|
|||||||
title: "List",
|
title: "List",
|
||||||
onClick(action) {
|
onClick(action) {
|
||||||
that.typeView = "LIST";
|
that.typeView = "LIST";
|
||||||
|
that.updateRootSettings("view", {
|
||||||
|
typeView: that.typeView
|
||||||
|
});
|
||||||
},
|
},
|
||||||
icon: "fas fa-list",
|
icon: "fas fa-list",
|
||||||
},
|
},
|
||||||
@@ -40,6 +48,9 @@ export default {
|
|||||||
title: "Card",
|
title: "Card",
|
||||||
onClick(action) {
|
onClick(action) {
|
||||||
that.typeView = "CARD";
|
that.typeView = "CARD";
|
||||||
|
that.updateRootSettings("view", {
|
||||||
|
typeView: that.typeView
|
||||||
|
});
|
||||||
},
|
},
|
||||||
icon: "fas fa-th",
|
icon: "fas fa-th",
|
||||||
},
|
},
|
||||||
@@ -213,6 +224,20 @@ export default {
|
|||||||
}
|
}
|
||||||
return { value, key: value }
|
return { value, key: value }
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Update settings for user
|
||||||
|
* @param {string} key
|
||||||
|
* @param {*} data
|
||||||
|
*/
|
||||||
|
updateRootSettings(key, data) {
|
||||||
|
this.$emit("updateSettings", {
|
||||||
|
data: data,
|
||||||
|
key: key,
|
||||||
|
page: this.data.pageParent,
|
||||||
|
type: "custom",
|
||||||
|
id: this.data.customListId
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,9 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
let that = this;
|
let that = this;
|
||||||
return {
|
return {
|
||||||
typeView: "GRID",
|
typeView: this.settings.view && this.settings.view.typeView
|
||||||
|
? this.settings.view.typeView
|
||||||
|
: "GRID",
|
||||||
random: 1,
|
random: 1,
|
||||||
dataMultiviewHeader: {
|
dataMultiviewHeader: {
|
||||||
actions: [
|
actions: [
|
||||||
@@ -12,6 +14,9 @@ export default {
|
|||||||
title: "Grid",
|
title: "Grid",
|
||||||
onClick(action) {
|
onClick(action) {
|
||||||
that.typeView = "GRID";
|
that.typeView = "GRID";
|
||||||
|
that.updateRootSettings("view", {
|
||||||
|
typeView: that.typeView
|
||||||
|
});
|
||||||
},
|
},
|
||||||
icon: "fas fa-table",
|
icon: "fas fa-table",
|
||||||
},
|
},
|
||||||
@@ -20,6 +25,9 @@ export default {
|
|||||||
title: "List",
|
title: "List",
|
||||||
onClick(action) {
|
onClick(action) {
|
||||||
that.typeView = "LIST";
|
that.typeView = "LIST";
|
||||||
|
that.updateRootSettings("view", {
|
||||||
|
typeView: that.typeView
|
||||||
|
});
|
||||||
},
|
},
|
||||||
icon: "fas fa-list",
|
icon: "fas fa-list",
|
||||||
},
|
},
|
||||||
@@ -28,6 +36,9 @@ export default {
|
|||||||
title: "Card",
|
title: "Card",
|
||||||
onClick(action) {
|
onClick(action) {
|
||||||
that.typeView = "CARD";
|
that.typeView = "CARD";
|
||||||
|
that.updateRootSettings("view", {
|
||||||
|
typeView: that.typeView
|
||||||
|
});
|
||||||
},
|
},
|
||||||
icon: "fas fa-th",
|
icon: "fas fa-th",
|
||||||
},
|
},
|
||||||
@@ -165,6 +176,20 @@ export default {
|
|||||||
}
|
}
|
||||||
this.columns = cols;
|
this.columns = cols;
|
||||||
this.random = _.random(0, 10000000000);
|
this.random = _.random(0, 10000000000);
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Update settings for user
|
||||||
|
* @param {string} key
|
||||||
|
* @param {*} data
|
||||||
|
*/
|
||||||
|
updateRootSettings(key, data) {
|
||||||
|
this.$emit("updateSettings", {
|
||||||
|
data: data,
|
||||||
|
key: key,
|
||||||
|
page: "draft",
|
||||||
|
type: "normal",
|
||||||
|
id: this.id
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -422,6 +422,7 @@ export default {
|
|||||||
this.page = "custom-case-list";
|
this.page = "custom-case-list";
|
||||||
if (this.config.setting[item.item.page] && this.config.setting[item.item.page]["customCaseList"]) {
|
if (this.config.setting[item.item.page] && this.config.setting[item.item.page]["customCaseList"]) {
|
||||||
this.pageData.settings = this.config.setting[item.item.page]["customCaseList"][item.item.id];
|
this.pageData.settings = this.config.setting[item.item.page]["customCaseList"][item.item.id];
|
||||||
|
this.settings = this.pageData.settings;
|
||||||
} else {
|
} else {
|
||||||
this.pageData.settings = {};
|
this.pageData.settings = {};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
let that = this;
|
let that = this;
|
||||||
return {
|
return {
|
||||||
typeView: "GRID",
|
typeView: this.settings.view && this.settings.view.typeView
|
||||||
|
? this.settings.view.typeView
|
||||||
|
: "GRID",
|
||||||
random: 1,
|
random: 1,
|
||||||
dataMultiviewHeader: {
|
dataMultiviewHeader: {
|
||||||
actions: [
|
actions: [
|
||||||
@@ -13,6 +15,9 @@ export default {
|
|||||||
title: "Grid",
|
title: "Grid",
|
||||||
onClick(action) {
|
onClick(action) {
|
||||||
that.typeView = "GRID";
|
that.typeView = "GRID";
|
||||||
|
that.updateRootSettings("view", {
|
||||||
|
typeView: that.typeView
|
||||||
|
});
|
||||||
},
|
},
|
||||||
icon: "fas fa-table",
|
icon: "fas fa-table",
|
||||||
},
|
},
|
||||||
@@ -21,6 +26,9 @@ export default {
|
|||||||
title: "List",
|
title: "List",
|
||||||
onClick(action) {
|
onClick(action) {
|
||||||
that.typeView = "LIST";
|
that.typeView = "LIST";
|
||||||
|
that.updateRootSettings("view", {
|
||||||
|
typeView: that.typeView
|
||||||
|
});
|
||||||
},
|
},
|
||||||
icon: "fas fa-list",
|
icon: "fas fa-list",
|
||||||
},
|
},
|
||||||
@@ -29,6 +37,9 @@ export default {
|
|||||||
title: "Card",
|
title: "Card",
|
||||||
onClick(action) {
|
onClick(action) {
|
||||||
that.typeView = "CARD";
|
that.typeView = "CARD";
|
||||||
|
that.updateRootSettings("view", {
|
||||||
|
typeView: that.typeView
|
||||||
|
});
|
||||||
},
|
},
|
||||||
icon: "fas fa-th",
|
icon: "fas fa-th",
|
||||||
},
|
},
|
||||||
@@ -167,6 +178,20 @@ export default {
|
|||||||
}
|
}
|
||||||
this.columns = cols;
|
this.columns = cols;
|
||||||
this.random = _.random(0, 10000000000);
|
this.random = _.random(0, 10000000000);
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Update settings for user
|
||||||
|
* @param {string} key
|
||||||
|
* @param {*} data
|
||||||
|
*/
|
||||||
|
updateRootSettings(key, data) {
|
||||||
|
this.$emit("updateSettings", {
|
||||||
|
data: data,
|
||||||
|
key: key,
|
||||||
|
page: "inbox",
|
||||||
|
type: "normal",
|
||||||
|
id: this.id
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,9 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
let that = this;
|
let that = this;
|
||||||
return {
|
return {
|
||||||
typeView: "GRID",
|
typeView: this.settings.view && this.settings.view.typeView
|
||||||
|
? this.settings.view.typeView
|
||||||
|
: "GRID",
|
||||||
random: 1,
|
random: 1,
|
||||||
dataMultiviewHeader: {
|
dataMultiviewHeader: {
|
||||||
actions: [
|
actions: [
|
||||||
@@ -12,6 +14,9 @@ export default {
|
|||||||
title: "Grid",
|
title: "Grid",
|
||||||
onClick(action) {
|
onClick(action) {
|
||||||
that.typeView = "GRID";
|
that.typeView = "GRID";
|
||||||
|
that.updateRootSettings("view", {
|
||||||
|
typeView: that.typeView
|
||||||
|
});
|
||||||
},
|
},
|
||||||
icon: "fas fa-table",
|
icon: "fas fa-table",
|
||||||
},
|
},
|
||||||
@@ -20,6 +25,9 @@ export default {
|
|||||||
title: "List",
|
title: "List",
|
||||||
onClick(action) {
|
onClick(action) {
|
||||||
that.typeView = "LIST";
|
that.typeView = "LIST";
|
||||||
|
that.updateRootSettings("view", {
|
||||||
|
typeView: that.typeView
|
||||||
|
});
|
||||||
},
|
},
|
||||||
icon: "fas fa-list",
|
icon: "fas fa-list",
|
||||||
},
|
},
|
||||||
@@ -28,6 +36,9 @@ export default {
|
|||||||
title: "Card",
|
title: "Card",
|
||||||
onClick(action) {
|
onClick(action) {
|
||||||
that.typeView = "CARD";
|
that.typeView = "CARD";
|
||||||
|
that.updateRootSettings("view", {
|
||||||
|
typeView: that.typeView
|
||||||
|
});
|
||||||
},
|
},
|
||||||
icon: "fas fa-th",
|
icon: "fas fa-th",
|
||||||
},
|
},
|
||||||
@@ -166,6 +177,20 @@ export default {
|
|||||||
}
|
}
|
||||||
this.columns = cols;
|
this.columns = cols;
|
||||||
this.random = _.random(0, 10000000000);
|
this.random = _.random(0, 10000000000);
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Update settings for user
|
||||||
|
* @param {string} key
|
||||||
|
* @param {*} data
|
||||||
|
*/
|
||||||
|
updateRootSettings(key, data) {
|
||||||
|
this.$emit("updateSettings", {
|
||||||
|
data: data,
|
||||||
|
key: key,
|
||||||
|
page: "paused",
|
||||||
|
type: "normal",
|
||||||
|
id: this.id
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,9 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
let that = this;
|
let that = this;
|
||||||
return {
|
return {
|
||||||
typeView: "GRID",
|
typeView: this.settings.view && this.settings.view.typeView
|
||||||
|
? this.settings.view.typeView
|
||||||
|
: "GRID",
|
||||||
random: 1,
|
random: 1,
|
||||||
dataMultiviewHeader: {
|
dataMultiviewHeader: {
|
||||||
actions: [
|
actions: [
|
||||||
@@ -12,6 +14,9 @@ export default {
|
|||||||
title: "Grid",
|
title: "Grid",
|
||||||
onClick(action) {
|
onClick(action) {
|
||||||
that.typeView = "GRID";
|
that.typeView = "GRID";
|
||||||
|
that.updateRootSettings("view", {
|
||||||
|
typeView: that.typeView
|
||||||
|
});
|
||||||
},
|
},
|
||||||
icon: "fas fa-table",
|
icon: "fas fa-table",
|
||||||
},
|
},
|
||||||
@@ -20,6 +25,9 @@ export default {
|
|||||||
title: "List",
|
title: "List",
|
||||||
onClick(action) {
|
onClick(action) {
|
||||||
that.typeView = "LIST";
|
that.typeView = "LIST";
|
||||||
|
that.updateRootSettings("view", {
|
||||||
|
typeView: that.typeView
|
||||||
|
});
|
||||||
},
|
},
|
||||||
icon: "fas fa-list",
|
icon: "fas fa-list",
|
||||||
},
|
},
|
||||||
@@ -28,6 +36,9 @@ export default {
|
|||||||
title: "Card",
|
title: "Card",
|
||||||
onClick(action) {
|
onClick(action) {
|
||||||
that.typeView = "CARD";
|
that.typeView = "CARD";
|
||||||
|
that.updateRootSettings("view", {
|
||||||
|
typeView: that.typeView
|
||||||
|
});
|
||||||
},
|
},
|
||||||
icon: "fas fa-th",
|
icon: "fas fa-th",
|
||||||
},
|
},
|
||||||
@@ -166,6 +177,20 @@ export default {
|
|||||||
}
|
}
|
||||||
this.columns = cols;
|
this.columns = cols;
|
||||||
this.random = _.random(0, 10000000000);
|
this.random = _.random(0, 10000000000);
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Update settings for user
|
||||||
|
* @param {string} key
|
||||||
|
* @param {*} data
|
||||||
|
*/
|
||||||
|
updateRootSettings(key, data) {
|
||||||
|
this.$emit("updateSettings", {
|
||||||
|
data: data,
|
||||||
|
key: key,
|
||||||
|
page: "unassigned",
|
||||||
|
type: "normal",
|
||||||
|
id: this.id
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user