Commit a991b7e2 authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_web_renderjs_ui: avoid duplicated options

parent 939ff733
......@@ -477,7 +477,8 @@
column_id,
column_title,
not_concatenated_list = [field_json.column_list, (field_json.all_column_list || [])],
option_list = field_json.domain_root_list || [];
option_list = field_json.domain_root_list || [],
key_list = [];
// Calculate the list of all displayable columns
for (i = 0; i < not_concatenated_list.length; i += 1) {
......@@ -509,7 +510,9 @@
for (i = 0; i < not_concatenated_list.length; i += 1) {
for (j = 0; j < not_concatenated_list[i].length; j += 1) {
if (not_concatenated_list[i][j][0].indexOf("_state") !== -1) {
if (not_concatenated_list[i][j][0].indexOf("_state") !== -1 &&
key_list.indexOf(not_concatenated_list[i][j][0]) === -1) {
key_list.push(not_concatenated_list[i][j][0]);
option_list.push([
not_concatenated_list[i][j][0],
not_concatenated_list[i][j][1]
......@@ -1210,22 +1213,6 @@
if (column_list_json[i][0] === modification_dict.graphic_type) {
group_by = column_list_json[i][0];
group_by_title = column_list_json[i][1];
console.log({
group_by: group_by,
query_by: {},
title: group_by_title,
list_method_template: gadget.state.list_method_template,
list_method: gadget.state.list_method,
layout: {
x: {
"title": group_by_title,
"key": group_by
},
y: {
"title": "Quantity"
}
}
});
return graphic_gadget.render({
group_by: group_by,
query_by: {},
......@@ -1543,7 +1530,6 @@
if ((evt.target.type === 'button') &&
((evt.target.name === 'SelectAction') || (evt.target.name === 'ClipboardAction'))) {
console.log("I am here");
evt.preventDefault();
checked_uid_list = [];
......
......@@ -240,7 +240,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>994.22784.37631.18722</string> </value>
<value> <string>994.25329.16170.62481</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>1629990890.83</float>
<float>1630077204.4</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -138,7 +138,7 @@
}
}
}
console.log(select_list, [data.y, options.layout.x.key]);
select_list = select_list.concat(
[data.y, options.layout.x.key].filter(function (el, index) {
return select_list.indexOf(el) !== index;
......@@ -221,8 +221,6 @@
})
];
console.log("query", gadget.state.query);
console.log("query_list", query_list);
if (gadget.state.query) {
queue_list.push(gadget.jio_allDocs(gadget.state.query));
}
......
......@@ -246,7 +246,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>994.24186.33564.18483</string> </value>
<value> <string>994.25329.489.41745</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -264,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>1630008647.86</float>
<float>1630077214.53</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment