diff --git a/src/components/inspector/collection-records-list.vue b/src/components/inspector/collection-records-list.vue index 15a4abe69..cb4731858 100644 --- a/src/components/inspector/collection-records-list.vue +++ b/src/components/inspector/collection-records-list.vue @@ -10,8 +10,12 @@ />
@@ -42,7 +46,10 @@ export default { collectionId: null, pmql: "", unique: false, - dataRecordList: [] + dataRecordList: [], + idCollectionScreenView: null, + idCollectionScreenEdit: null, + screenMode: null }; }, computed: { @@ -87,6 +94,9 @@ export default { if (this.collectionId) { this.getFields(); } + this.$root.$on("collection-screen-mode", (mode) => { + this.screenMode = mode; + }); }, methods: { onCollectionChange() { @@ -99,6 +109,9 @@ export default { }, getCollections() { this.$dataProvider.getCollections().then((response) => { + const [firstItem = {}] = response.data.data || []; + this.idCollectionScreenView = firstItem.read_screen_id; + this.idCollectionScreenEdit = firstItem.create_screen_id; this.collections = [ { value: null, text: this.$t("Select a collection") }, ...response.data.data.map((collection) => { diff --git a/src/components/renderer/form-collection-view-control.vue b/src/components/renderer/form-collection-view-control.vue index 2b935eeaf..f1f84cfd6 100644 --- a/src/components/renderer/form-collection-view-control.vue +++ b/src/components/renderer/form-collection-view-control.vue @@ -201,6 +201,7 @@ export default { collection(collection) { if(collection) { this.selCollectionId = collection.collectionId; + this.$root.$emit("collection-screen-mode", "display"); } }, record(record) {