From a4e7325ac6c838d4fc34645f113a518acec1aec1 Mon Sep 17 00:00:00 2001 From: CarliPinell Date: Wed, 18 Sep 2024 08:26:21 -0400 Subject: [PATCH 01/19] saving progrss 1 --- .../inspector/collection-data-source.vue | 46 ++++++++++- src/components/inspector/column-setup.vue | 78 +++++++++++++++++-- src/components/renderer/form-record-list.vue | 5 +- 3 files changed, 119 insertions(+), 10 deletions(-) diff --git a/src/components/inspector/collection-data-source.vue b/src/components/inspector/collection-data-source.vue index a55446e83..71a6f95a8 100644 --- a/src/components/inspector/collection-data-source.vue +++ b/src/components/inspector/collection-data-source.vue @@ -50,9 +50,11 @@ diff --git a/src/components/renderer/form-record-list.vue b/src/components/renderer/form-record-list.vue index eb19d0d9d..5887afa16 100644 --- a/src/components/renderer/form-record-list.vue +++ b/src/components/renderer/form-record-list.vue @@ -335,7 +335,6 @@ export default { 100 ); - const dataRecordList = this.source?.collectionFieldsColumns?.dataRecordList?.length ? this.source.collectionFieldsColumns.dataRecordList : this.source?.collectionFields?.dataRecordList; @@ -348,7 +347,7 @@ export default { this.perPage = this.paginationOption; } - this.$root.$emit("record-list-option", this.source.sourceOptions); + this.$root.$emit("record-list-option", this.source?.sourceOptions); }, methods: { setCollectionIntoList(array) { From 8dd3a7b75b2bbb99873269c449a9c1df98eb25da Mon Sep 17 00:00:00 2001 From: CarliPinell Date: Fri, 20 Sep 2024 23:31:22 -0400 Subject: [PATCH 12/19] adding more use cases --- src/components/inspector/collection-data-source.vue | 2 ++ src/components/inspector/column-setup.vue | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/components/inspector/collection-data-source.vue b/src/components/inspector/collection-data-source.vue index 6db073b70..c7f1dc360 100644 --- a/src/components/inspector/collection-data-source.vue +++ b/src/components/inspector/collection-data-source.vue @@ -97,6 +97,8 @@ displayOptionChange() { this.collectionFields = []; this.collectionFieldsColumns = []; + //window.ProcessMaker.EventBus.$emit('reset-multiselect'); + this.$root.$emit("collection-changed", true); }, collectionChanged(data) { if (Array.isArray(data)) { diff --git a/src/components/inspector/column-setup.vue b/src/components/inspector/column-setup.vue index fc5af73f2..74cb78277 100644 --- a/src/components/inspector/column-setup.vue +++ b/src/components/inspector/column-setup.vue @@ -373,6 +373,11 @@ export default { this.optionsList = []; } }); + this.$root.$on("option-source-changed", (change) => { + if(change) { + this.optionsList = []; + } + }); }, methods: { handleColumnSelection() { From 2cc587d84c21f6491a7cf2ba8767674748876d4c Mon Sep 17 00:00:00 2001 From: CarliPinell Date: Sat, 21 Sep 2024 00:41:59 -0400 Subject: [PATCH 13/19] ready for PR2 --- .../inspector/collection-data-source.vue | 47 +++++++++++-------- src/components/inspector/column-setup.vue | 2 +- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/src/components/inspector/collection-data-source.vue b/src/components/inspector/collection-data-source.vue index c7f1dc360..d4cb7dcd3 100644 --- a/src/components/inspector/collection-data-source.vue +++ b/src/components/inspector/collection-data-source.vue @@ -90,14 +90,17 @@ mounted() { this.$root.$on("collection-columns", (optionList) => { this.collectionFieldsColumns = _.cloneDeep(this.collectionFields); - this.changeCollectionColumns(optionList); - }); + this.$nextTick(() => { + if (this.collectionFieldsColumns?.dataRecordList?.length) { + this.changeCollectionColumns(optionList); + } + }); + }); }, methods: { displayOptionChange() { this.collectionFields = []; this.collectionFieldsColumns = []; - //window.ProcessMaker.EventBus.$emit('reset-multiselect'); this.$root.$emit("collection-changed", true); }, collectionChanged(data) { @@ -111,25 +114,28 @@ }, changeCollectionColumns(columnsSelected) { let selectedKeys = columnsSelected.map(column => column.content); - let dataObject = {}; + + //if (this.collectionFieldsColumns && Array.isArray(this.collectionFieldsColumns.dataRecordList)) { + if (Array.isArray(this.collectionFieldsColumns?.dataRecordList)) { + this.collectionFieldsColumns.dataRecordList.forEach(record => { + let dataObject = record.data; - this.collectionFieldsColumns.dataRecordList.forEach(record => { - dataObject = record.data; + if (dataObject && typeof dataObject === 'object') { + Object.keys(dataObject).forEach(key => { + if (!selectedKeys.includes(key)) { + delete dataObject[key]; + } else { + const matchingColumn = columnsSelected.find(column => column.content === key); - Object.keys(dataObject).forEach(key => { - if (!selectedKeys.includes(key)) { - delete dataObject[key]; - } else { - const matchingColumn = columnsSelected.find(column => column.content === key); - - // Rename header from collection columns whit new labels(only for display) - if (matchingColumn && matchingColumn.key !== key) { - dataObject[matchingColumn.key] = dataObject[key]; - delete dataObject[key]; - } - } + if (matchingColumn && matchingColumn.key !== key) { + dataObject[matchingColumn.key] = dataObject[key]; + delete dataObject[key]; + } + } + }); + } }); - }); + } } }, computed: { @@ -157,7 +163,8 @@ collectionFields: { handler(collectionFieldsData) { this.$root.$emit("record-list-collection", collectionFieldsData); - } + }, + deep: true }, pmql: { handler(newPmql) { diff --git a/src/components/inspector/column-setup.vue b/src/components/inspector/column-setup.vue index 74cb78277..8df40ff52 100644 --- a/src/components/inspector/column-setup.vue +++ b/src/components/inspector/column-setup.vue @@ -540,7 +540,7 @@ export default { [this.valueField]: this.optionValueCollection, } ); - + this.optionsList = this.optionsList.filter(option => option["content"] !== "all"); this.sendOptionList(this.optionsList); } else { From a72257169d2765c6ee4a4abafc752cd2111c9a8e Mon Sep 17 00:00:00 2001 From: CarliPinell Date: Sat, 21 Sep 2024 17:55:31 -0400 Subject: [PATCH 14/19] Refactor complete working OK cleaning pending --- src/DataProvider.js | 2 +- .../inspector/collection-data-source.vue | 16 +-- src/components/renderer/form-record-list.vue | 102 ++++++++++++++++-- 3 files changed, 103 insertions(+), 17 deletions(-) diff --git a/src/DataProvider.js b/src/DataProvider.js index db9fb0dc8..b77971dde 100644 --- a/src/DataProvider.js +++ b/src/DataProvider.js @@ -303,7 +303,7 @@ export default { .catch((error) => { if (error.response && error.response.status === 404) { const data = { data: [] }; - return [data, nonce]; + return [data]; } throw error; }); diff --git a/src/components/inspector/collection-data-source.vue b/src/components/inspector/collection-data-source.vue index d4cb7dcd3..1247e99f4 100644 --- a/src/components/inspector/collection-data-source.vue +++ b/src/components/inspector/collection-data-source.vue @@ -88,14 +88,14 @@ }; }, mounted() { - this.$root.$on("collection-columns", (optionList) => { - this.collectionFieldsColumns = _.cloneDeep(this.collectionFields); - this.$nextTick(() => { - if (this.collectionFieldsColumns?.dataRecordList?.length) { - this.changeCollectionColumns(optionList); - } - }); - }); + // this.$root.$on("collection-columns", (optionList) => { + // this.collectionFieldsColumns = _.cloneDeep(this.collectionFields); + // this.$nextTick(() => { + // if (this.collectionFieldsColumns?.dataRecordList?.length) { + // this.changeCollectionColumns(optionList); + // } + // }); + // }); }, methods: { displayOptionChange() { diff --git a/src/components/renderer/form-record-list.vue b/src/components/renderer/form-record-list.vue index 5887afa16..533861995 100644 --- a/src/components/renderer/form-record-list.vue +++ b/src/components/renderer/form-record-list.vue @@ -335,24 +335,109 @@ export default { 100 ); - const dataRecordList = this.source?.collectionFieldsColumns?.dataRecordList?.length - ? this.source.collectionFieldsColumns.dataRecordList - : this.source?.collectionFields?.dataRecordList; + // const dataRecordList = this.source?.collectionFieldsColumns?.dataRecordList?.length + // ? this.source.collectionFieldsColumns.dataRecordList + // : this.source?.collectionFields?.dataRecordList; - if (dataRecordList) { - this.setCollectionIntoList(dataRecordList); - } + // if (dataRecordList) { + // this.setCollectionIntoList(dataRecordList); + // } if (this.paginationOption != null) { this.perPage = this.paginationOption; } - + console.log("source", this.source); + console.log("los fields: ", this.fields); + if(this.source?.sourceOptions === "Collection") { + this.onCollectionChange(this.source?.collectionFields?.collectionId, this.source?.collectionFields?.pmql); + } + this.$root.$emit("record-list-option", this.source?.sourceOptions); }, methods: { + onCollectionChange(collectionId,pmql) { + let param = {params:{pmql:pmql}}; + let filasColeccion = []; + //const validParam = this.validatePmqlString(param.params.pmql) ? param : null; + this.$dataProvider + .getCollectionRecordsList(collectionId, param) + .then((response) => { + //this.dataRecordList = response.data; + console.log("response.data: ", response.data); + //this.setCollectionIntoList(response.data); + filasColeccion = response.data; + //this.setCollectionIntoList(response.data); + + this.changeCollectionColumns(filasColeccion,this.fields); + }); + //this.$emit('change', this.dataRecordList); + this.$emit('change', this.field); + }, + // changeCollectionColumns(collectionFieldsColumns,columnsSelected) { + // console.log("en changeCollectionColumns collectionFieldsColumns: ",collectionFieldsColumns, "columnsSelected:", columnsSelected); + // let selectedKeys = columnsSelected.optionsList.map(column => column.content); + // console.log("selectedKeys: ", selectedKeys); + + // let colFields = collectionFieldsColumns.data.forEach(record => { + // let dataObject = record.data; + + // if (dataObject && typeof dataObject === 'object') { + // Object.keys(dataObject).forEach(key => { + // if (!selectedKeys.includes(key)) { + // delete dataObject[key]; + // } else { + // const matchingColumn = columnsSelected.find(column => column.content === key); + + // if (matchingColumn && matchingColumn.key !== key) { + // dataObject[matchingColumn.key] = dataObject[key]; + // delete dataObject[key]; + // } + // } + // }); + // } + // }); + + // console.log("Esto deberia ser lo que renderiza la tabla: ", colFields); + // this.setCollectionIntoList(colFields); + + // }, + changeCollectionColumns(collectionFieldsColumns,columnsSelected) { + console.log("en changeCollectionColumns collectionFieldsColumns: ",collectionFieldsColumns, "columnsSelected:", columnsSelected); + + // Obtener el optionsList de fieldsColumns + const optionsList = columnsSelected.optionsList; + + // Iterar sobre collectionFieldsColumns + collectionFieldsColumns.forEach(column => { + let dataObject = column.data; // Acceder al objeto "data" + + // Crear un nuevo objeto para almacenar los keys que hagan match + let newDataObject = {}; + + // Iterar sobre los keys del objeto "data" + Object.keys(dataObject).forEach(dataKey => { + // Buscar si el key de "data" coincide con algún "content" en optionsList + const matchingOption = optionsList.find(option => option.content === dataKey); + + if (matchingOption) { + // Si hay coincidencia, renombrar el key en "data" con el valor de "key" de optionsList + newDataObject[matchingOption.key] = dataObject[dataKey]; + } + }); + + // Reemplazar el dataObject original por el nuevo dataObject con los keys actualizados + column.data = newDataObject; + }); + + //console.log(collectionFieldsColumns); + + console.log("Esto deberia ser lo que renderiza la tabla: ", collectionFieldsColumns); + this.setCollectionIntoList(collectionFieldsColumns); + + }, setCollectionIntoList(array) { const result = []; - + console.log("array: ", array); array.forEach((row) => { if (row.hasOwnProperty('data')) { const dataObject = row.data; @@ -367,6 +452,7 @@ export default { }); //sets Collection result(columns and rows) into this.collectionData this.collectionData = result; + console.log("esto es collectionData: ", this.collectionData); }, updateRowDataNamePrefix() { this.setUploadDataNamePrefix(this.currentRowIndex); From e43b48f6d24f3c43614b774f98a64e18c17bfcdb Mon Sep 17 00:00:00 2001 From: CarliPinell Date: Sat, 21 Sep 2024 18:22:28 -0400 Subject: [PATCH 15/19] cleaning stage 1 ok --- .../inspector/collection-data-source.vue | 12 +-- .../inspector/collection-records-list.vue | 9 ++- src/components/renderer/form-record-list.vue | 75 +++---------------- 3 files changed, 22 insertions(+), 74 deletions(-) diff --git a/src/components/inspector/collection-data-source.vue b/src/components/inspector/collection-data-source.vue index 1247e99f4..a99198430 100644 --- a/src/components/inspector/collection-data-source.vue +++ b/src/components/inspector/collection-data-source.vue @@ -88,6 +88,7 @@ }; }, mounted() { + // comentado // this.$root.$on("collection-columns", (optionList) => { // this.collectionFieldsColumns = _.cloneDeep(this.collectionFields); // this.$nextTick(() => { @@ -166,11 +167,12 @@ }, deep: true }, - pmql: { - handler(newPmql) { - this.$root.$emit("change-pmql", newPmql); - } - }, + //comentado + // pmql: { + // handler(newPmql) { + // this.$root.$emit("change-pmql", newPmql); + // } + // }, submitCollectionCheck(newValue) { this.submitCollectionCheck = newValue; }, diff --git a/src/components/inspector/collection-records-list.vue b/src/components/inspector/collection-records-list.vue index 6047378a6..34a19f12c 100644 --- a/src/components/inspector/collection-records-list.vue +++ b/src/components/inspector/collection-records-list.vue @@ -74,10 +74,11 @@ export default { }, 1000); }, mounted() { - this.$root.$on("change-pmql", (val) => { - this.pmql = val; - this.onCollectionChange(); - }); + // comentado + // this.$root.$on("change-pmql", (val) => { + // this.pmql = val; + // this.onCollectionChange(); + // }); this.getCollections(); if (this.collectionId) { this.getFields(); diff --git a/src/components/renderer/form-record-list.vue b/src/components/renderer/form-record-list.vue index 533861995..db28b27cf 100644 --- a/src/components/renderer/form-record-list.vue +++ b/src/components/renderer/form-record-list.vue @@ -335,19 +335,10 @@ export default { 100 ); - // const dataRecordList = this.source?.collectionFieldsColumns?.dataRecordList?.length - // ? this.source.collectionFieldsColumns.dataRecordList - // : this.source?.collectionFields?.dataRecordList; - - // if (dataRecordList) { - // this.setCollectionIntoList(dataRecordList); - // } - if (this.paginationOption != null) { this.perPage = this.paginationOption; } - console.log("source", this.source); - console.log("los fields: ", this.fields); + if(this.source?.sourceOptions === "Collection") { this.onCollectionChange(this.source?.collectionFields?.collectionId, this.source?.collectionFields?.pmql); } @@ -357,88 +348,43 @@ export default { methods: { onCollectionChange(collectionId,pmql) { let param = {params:{pmql:pmql}}; - let filasColeccion = []; - //const validParam = this.validatePmqlString(param.params.pmql) ? param : null; + let rowsCollection = []; + this.$dataProvider .getCollectionRecordsList(collectionId, param) .then((response) => { - //this.dataRecordList = response.data; - console.log("response.data: ", response.data); - //this.setCollectionIntoList(response.data); - filasColeccion = response.data; - //this.setCollectionIntoList(response.data); + rowsCollection = response.data; - this.changeCollectionColumns(filasColeccion,this.fields); + this.changeCollectionColumns(rowsCollection,this.fields); }); - //this.$emit('change', this.dataRecordList); + this.$emit('change', this.field); }, - // changeCollectionColumns(collectionFieldsColumns,columnsSelected) { - // console.log("en changeCollectionColumns collectionFieldsColumns: ",collectionFieldsColumns, "columnsSelected:", columnsSelected); - // let selectedKeys = columnsSelected.optionsList.map(column => column.content); - // console.log("selectedKeys: ", selectedKeys); - - // let colFields = collectionFieldsColumns.data.forEach(record => { - // let dataObject = record.data; - - // if (dataObject && typeof dataObject === 'object') { - // Object.keys(dataObject).forEach(key => { - // if (!selectedKeys.includes(key)) { - // delete dataObject[key]; - // } else { - // const matchingColumn = columnsSelected.find(column => column.content === key); - - // if (matchingColumn && matchingColumn.key !== key) { - // dataObject[matchingColumn.key] = dataObject[key]; - // delete dataObject[key]; - // } - // } - // }); - // } - // }); - - // console.log("Esto deberia ser lo que renderiza la tabla: ", colFields); - // this.setCollectionIntoList(colFields); - - // }, changeCollectionColumns(collectionFieldsColumns,columnsSelected) { - console.log("en changeCollectionColumns collectionFieldsColumns: ",collectionFieldsColumns, "columnsSelected:", columnsSelected); - // Obtener el optionsList de fieldsColumns const optionsList = columnsSelected.optionsList; - // Iterar sobre collectionFieldsColumns collectionFieldsColumns.forEach(column => { - let dataObject = column.data; // Acceder al objeto "data" - - // Crear un nuevo objeto para almacenar los keys que hagan match + let dataObject = column.data; let newDataObject = {}; - // Iterar sobre los keys del objeto "data" Object.keys(dataObject).forEach(dataKey => { - // Buscar si el key de "data" coincide con algún "content" en optionsList const matchingOption = optionsList.find(option => option.content === dataKey); if (matchingOption) { - // Si hay coincidencia, renombrar el key en "data" con el valor de "key" de optionsList newDataObject[matchingOption.key] = dataObject[dataKey]; } }); - // Reemplazar el dataObject original por el nuevo dataObject con los keys actualizados column.data = newDataObject; }); - //console.log(collectionFieldsColumns); - - console.log("Esto deberia ser lo que renderiza la tabla: ", collectionFieldsColumns); - this.setCollectionIntoList(collectionFieldsColumns); + this.setCollectionIntoList(collectionFieldsColumns); }, - setCollectionIntoList(array) { + setCollectionIntoList(arrayCollection) { const result = []; - console.log("array: ", array); - array.forEach((row) => { + arrayCollection.forEach((row) => { if (row.hasOwnProperty('data')) { const dataObject = row.data; const extracted = {}; @@ -452,7 +398,6 @@ export default { }); //sets Collection result(columns and rows) into this.collectionData this.collectionData = result; - console.log("esto es collectionData: ", this.collectionData); }, updateRowDataNamePrefix() { this.setUploadDataNamePrefix(this.currentRowIndex); From fa8f606e6e9e75878bdb79b49c866bff7f34c677 Mon Sep 17 00:00:00 2001 From: CarliPinell Date: Mon, 23 Sep 2024 09:17:56 -0400 Subject: [PATCH 16/19] feature complete and clean --- .../inspector/collection-data-source.vue | 23 ++++--------------- .../inspector/collection-records-list.vue | 16 ++++--------- src/components/inspector/column-setup.vue | 8 +------ src/components/renderer/form-record-list.vue | 1 - 4 files changed, 10 insertions(+), 38 deletions(-) diff --git a/src/components/inspector/collection-data-source.vue b/src/components/inspector/collection-data-source.vue index a99198430..af63089f1 100644 --- a/src/components/inspector/collection-data-source.vue +++ b/src/components/inspector/collection-data-source.vue @@ -87,17 +87,6 @@ ] }; }, - mounted() { - // comentado - // this.$root.$on("collection-columns", (optionList) => { - // this.collectionFieldsColumns = _.cloneDeep(this.collectionFields); - // this.$nextTick(() => { - // if (this.collectionFieldsColumns?.dataRecordList?.length) { - // this.changeCollectionColumns(optionList); - // } - // }); - // }); - }, methods: { displayOptionChange() { this.collectionFields = []; @@ -116,7 +105,6 @@ changeCollectionColumns(columnsSelected) { let selectedKeys = columnsSelected.map(column => column.content); - //if (this.collectionFieldsColumns && Array.isArray(this.collectionFieldsColumns.dataRecordList)) { if (Array.isArray(this.collectionFieldsColumns?.dataRecordList)) { this.collectionFieldsColumns.dataRecordList.forEach(record => { let dataObject = record.data; @@ -167,12 +155,11 @@ }, deep: true }, - //comentado - // pmql: { - // handler(newPmql) { - // this.$root.$emit("change-pmql", newPmql); - // } - // }, + pmql: { + handler(newPmql) { + this.$root.$emit("change-pmql", newPmql); + } + }, submitCollectionCheck(newValue) { this.submitCollectionCheck = newValue; }, diff --git a/src/components/inspector/collection-records-list.vue b/src/components/inspector/collection-records-list.vue index 34a19f12c..91e35bd38 100644 --- a/src/components/inspector/collection-records-list.vue +++ b/src/components/inspector/collection-records-list.vue @@ -74,11 +74,9 @@ export default { }, 1000); }, mounted() { - // comentado - // this.$root.$on("change-pmql", (val) => { - // this.pmql = val; - // this.onCollectionChange(); - // }); + this.$root.$on("change-pmql", (val) => { + this.pmql = val; + }); this.getCollections(); if (this.collectionId) { this.getFields(); @@ -86,10 +84,8 @@ export default { }, methods: { onCollectionChange() { - let param = {params:{pmql:this.pmql}}; - const validParam = this.validatePmqlString(param.params.pmql) ? param : null; this.$dataProvider - .getCollectionRecordsList(this.collectionId, validParam) + .getCollectionRecordsList(this.collectionId) .then((response) => { this.dataRecordList = response.data; }); @@ -108,10 +104,6 @@ export default { ]; }); }, - validatePmqlString(pmql) { - const pmqlRegex = /^[a-zA-Z_][a-zA-Z0-9_]*\s*(=|<|>|<=|>=|!=)\s*('[^']*'|[0-9]+)$/; - return pmqlRegex.test(pmql); - }, getFields() { if (!this.collectionId) { return; diff --git a/src/components/inspector/column-setup.vue b/src/components/inspector/column-setup.vue index 8df40ff52..2aa97bd12 100644 --- a/src/components/inspector/column-setup.vue +++ b/src/components/inspector/column-setup.vue @@ -35,7 +35,7 @@ data-cy="inspector-collection-columns" @change="handleColumnSelection" /> - +
{{ optionError }}
@@ -541,12 +541,10 @@ export default { } ); this.optionsList = this.optionsList.filter(option => option["content"] !== "all"); - this.sendOptionList(this.optionsList); } else { this.optionsList[this.editIndex][this.keyFieldCollection] = this.optionContentCollection; this.optionsList[this.editIndex][this.valueField] = this.optionValueCollection; - this.sendOptionList(this.optionsList); } this.jsonError = ''; @@ -560,7 +558,6 @@ export default { this.jsonData = JSON.stringify(this.optionsList); this.showRemoveWarning = false; this.removeIndex = null; - this.sendOptionList(this.optionsList); }, removeOption(index) { this.removeIndex = index; @@ -572,9 +569,6 @@ export default { closePopup() { this.showPopup = false; }, - sendOptionList(optionsList) { - this.$root.$emit("collection-columns", optionsList); - } }, }; diff --git a/src/components/renderer/form-record-list.vue b/src/components/renderer/form-record-list.vue index db28b27cf..1243a109a 100644 --- a/src/components/renderer/form-record-list.vue +++ b/src/components/renderer/form-record-list.vue @@ -349,7 +349,6 @@ export default { onCollectionChange(collectionId,pmql) { let param = {params:{pmql:pmql}}; let rowsCollection = []; - this.$dataProvider .getCollectionRecordsList(collectionId, param) .then((response) => { From db990568f6da4158da2bd7db56be6b29bf66d8e9 Mon Sep 17 00:00:00 2001 From: CarliPinell Date: Mon, 23 Sep 2024 10:05:35 -0400 Subject: [PATCH 17/19] Adjusting descriptions in inspector controls --- src/components/inspector/collection-data-source.vue | 6 +++++- src/components/inspector/column-setup.vue | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/inspector/collection-data-source.vue b/src/components/inspector/collection-data-source.vue index af63089f1..4662c1885 100644 --- a/src/components/inspector/collection-data-source.vue +++ b/src/components/inspector/collection-data-source.vue @@ -9,6 +9,9 @@ data-cy="inspector-collection-data-source" @change="displayOptionChange" /> + {{ + $t("A record list can display the data of a defined variable or a collection") + }}
@@ -29,7 +32,7 @@ > {{ - $t("Advanced data search") + $t("Leave this field empty to show all the records of the collection") }} @@ -91,6 +94,7 @@ displayOptionChange() { this.collectionFields = []; this.collectionFieldsColumns = []; + this.pmql = null; this.$root.$emit("collection-changed", true); }, collectionChanged(data) { diff --git a/src/components/inspector/column-setup.vue b/src/components/inspector/column-setup.vue index 2aa97bd12..0f38e5a2b 100644 --- a/src/components/inspector/column-setup.vue +++ b/src/components/inspector/column-setup.vue @@ -35,7 +35,7 @@ data-cy="inspector-collection-columns" @change="handleColumnSelection" /> - +
{{ optionError }}
From 3eabe350402ac2f689c71e5b1d7fe97231ec0a00 Mon Sep 17 00:00:00 2001 From: CarliPinell Date: Mon, 30 Sep 2024 15:26:27 -0400 Subject: [PATCH 18/19] fixing pagination.spec.js --- src/components/inspector/page-select.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/inspector/page-select.vue b/src/components/inspector/page-select.vue index c761e3a5d..7f2b7d10e 100644 --- a/src/components/inspector/page-select.vue +++ b/src/components/inspector/page-select.vue @@ -9,6 +9,7 @@ :show-labels="false" :options="options.map(option => option.value)" :custom-label="getLabelFromValue" + data-cy="inspector-eventData" >