3
0

Fix record organizer not prefilling group field value when adding a new record

This commit is contained in:
Jože Fortun 2024-11-27 15:52:11 +01:00
parent 3172415575
commit f767682540

View File

@ -362,13 +362,25 @@ export default {
values[groupField] = group values[groupField] = group
} }
if (this.options.displayOption === 'modal' || this.inModal) { const route = {
name: 'page.record.create',
params: { pageID },
values,
query: null,
edit: true,
}
if (this.inModal || this.options.displayOption === 'modal') {
this.$root.$emit('show-record-modal', { this.$root.$emit('show-record-modal', {
recordID: NoID, recordID: NoID,
recordPageID: (this.roRecordPage || {}).pageID, recordPageID: pageID,
values,
edit: true,
}) })
} else if (this.options.displayOption === 'newTab') {
window.open(this.$router.resolve(route).href)
} else { } else {
this.$router.push({ name: 'page.record.create', params: { pageID, values: values, refRecord: this.record } }) this.$router.push(route)
} }
}, },