Skip to content

Commit

Permalink
Merge pull request #1770 from ProcessMaker/bugfix/FOUR-20057
Browse files Browse the repository at this point in the history
bugfix/FOUR-20057: `Select a collection` label is missing when `Record ID` field has a variable
  • Loading branch information
ryancooley authored Nov 11, 2024
2 parents 4fce936 + 1978444 commit 58fae4e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/renderer/form-collection-record-control.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ export default {
this.selCollectionId = collectionId;
this.selRecordId = recordId;
this.selDisplayMode = modeId;
this.$dataProvider
.getCollectionRecordsView(collectionId, recordId)
.then((response) => {
Expand All @@ -176,9 +175,10 @@ export default {
const viewScreen = response.collection.read_screen_id;
const editScreen = response.collection.update_screen_id;
//Choose screen id regarding of the display Mode
this.screenCollectionId =
this.selDisplayMode === "View" ? viewScreen : editScreen;
this.screenCollectionId =
typeof this.selDisplayMode === 'function' ?
(this.collectionmode.modeId === "View" ? viewScreen : editScreen) :
(this.selDisplayMode === "View" ? viewScreen : editScreen);
this.loadScreen(this.screenCollectionId);
//This section validates if Collection has draft data
Expand All @@ -192,6 +192,7 @@ export default {
.catch(() => {
this.localData = {};
globalObject.ProcessMaker.alert(this.$t('This content does not exist. We could not locate indicated data'), "danger");
this.placeholder = "Select a collection";
});;
},
isMustache(record) {
Expand Down

0 comments on commit 58fae4e

Please sign in to comment.