Merged in bugfix/PMCORE-3342 (pull request #8165)

PMCORE-3342

Approved-by: Fabio Guachalla
Approved-by: Rodrigo Quelca
This commit is contained in:
Henry Jonathan Quispe Quispe
2021-09-24 18:52:29 +00:00
committed by Julio Cesar Laura Avendaño
6 changed files with 170 additions and 44 deletions

View File

@@ -4,7 +4,9 @@ export default {
data() {
let that = this;
return {
typeView: "GRID",
typeView: this.data.settings.view && this.data.settings.view.typeView
? this.data.settings.view.typeView
: "GRID",
random: 1,
dataCasesList: [],
defaultColumns: [
@@ -24,6 +26,9 @@ export default {
title: "Grid",
onClick(action) {
that.typeView = "GRID";
that.updateRootSettings("view", {
typeView: that.typeView
});
},
icon: "fas fa-table",
},
@@ -32,6 +37,9 @@ export default {
title: "List",
onClick(action) {
that.typeView = "LIST";
that.updateRootSettings("view", {
typeView: that.typeView
});
},
icon: "fas fa-list",
},
@@ -40,6 +48,9 @@ export default {
title: "Card",
onClick(action) {
that.typeView = "CARD";
that.updateRootSettings("view", {
typeView: that.typeView
});
},
icon: "fas fa-th",
},
@@ -213,6 +224,20 @@ export default {
}
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
});
}
}
}

View File

@@ -3,7 +3,9 @@ export default {
data() {
let that = this;
return {
typeView: "GRID",
typeView: this.settings.view && this.settings.view.typeView
? this.settings.view.typeView
: "GRID",
random: 1,
dataMultiviewHeader: {
actions: [
@@ -12,6 +14,9 @@ export default {
title: "Grid",
onClick(action) {
that.typeView = "GRID";
that.updateRootSettings("view", {
typeView: that.typeView
});
},
icon: "fas fa-table",
},
@@ -20,6 +25,9 @@ export default {
title: "List",
onClick(action) {
that.typeView = "LIST";
that.updateRootSettings("view", {
typeView: that.typeView
});
},
icon: "fas fa-list",
},
@@ -28,6 +36,9 @@ export default {
title: "Card",
onClick(action) {
that.typeView = "CARD";
that.updateRootSettings("view", {
typeView: that.typeView
});
},
icon: "fas fa-th",
},
@@ -165,6 +176,20 @@ export default {
}
this.columns = cols;
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
});
}
}
}

View File

@@ -422,6 +422,7 @@ export default {
this.page = "custom-case-list";
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.settings = this.pageData.settings;
} else {
this.pageData.settings = {};
}

View File

@@ -4,7 +4,9 @@ export default {
data() {
let that = this;
return {
typeView: "GRID",
typeView: this.settings.view && this.settings.view.typeView
? this.settings.view.typeView
: "GRID",
random: 1,
dataMultiviewHeader: {
actions: [
@@ -13,6 +15,9 @@ export default {
title: "Grid",
onClick(action) {
that.typeView = "GRID";
that.updateRootSettings("view", {
typeView: that.typeView
});
},
icon: "fas fa-table",
},
@@ -21,6 +26,9 @@ export default {
title: "List",
onClick(action) {
that.typeView = "LIST";
that.updateRootSettings("view", {
typeView: that.typeView
});
},
icon: "fas fa-list",
},
@@ -29,6 +37,9 @@ export default {
title: "Card",
onClick(action) {
that.typeView = "CARD";
that.updateRootSettings("view", {
typeView: that.typeView
});
},
icon: "fas fa-th",
},
@@ -167,6 +178,20 @@ export default {
}
this.columns = cols;
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
});
}
}
}

View File

@@ -3,7 +3,9 @@ export default {
data() {
let that = this;
return {
typeView: "GRID",
typeView: this.settings.view && this.settings.view.typeView
? this.settings.view.typeView
: "GRID",
random: 1,
dataMultiviewHeader: {
actions: [
@@ -12,6 +14,9 @@ export default {
title: "Grid",
onClick(action) {
that.typeView = "GRID";
that.updateRootSettings("view", {
typeView: that.typeView
});
},
icon: "fas fa-table",
},
@@ -20,6 +25,9 @@ export default {
title: "List",
onClick(action) {
that.typeView = "LIST";
that.updateRootSettings("view", {
typeView: that.typeView
});
},
icon: "fas fa-list",
},
@@ -28,6 +36,9 @@ export default {
title: "Card",
onClick(action) {
that.typeView = "CARD";
that.updateRootSettings("view", {
typeView: that.typeView
});
},
icon: "fas fa-th",
},
@@ -166,6 +177,20 @@ export default {
}
this.columns = cols;
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
});
}
}
}

View File

@@ -3,7 +3,9 @@ export default {
data() {
let that = this;
return {
typeView: "GRID",
typeView: this.settings.view && this.settings.view.typeView
? this.settings.view.typeView
: "GRID",
random: 1,
dataMultiviewHeader: {
actions: [
@@ -12,6 +14,9 @@ export default {
title: "Grid",
onClick(action) {
that.typeView = "GRID";
that.updateRootSettings("view", {
typeView: that.typeView
});
},
icon: "fas fa-table",
},
@@ -20,6 +25,9 @@ export default {
title: "List",
onClick(action) {
that.typeView = "LIST";
that.updateRootSettings("view", {
typeView: that.typeView
});
},
icon: "fas fa-list",
},
@@ -28,6 +36,9 @@ export default {
title: "Card",
onClick(action) {
that.typeView = "CARD";
that.updateRootSettings("view", {
typeView: that.typeView
});
},
icon: "fas fa-th",
},
@@ -166,6 +177,20 @@ export default {
}
this.columns = cols;
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
});
}
}
}