Fixes item creation not working from relationship modal.

This commit is contained in:
mateuswetah 2024-05-02 09:40:03 -03:00
parent 992f34d6b0
commit 932d2871b7
2 changed files with 7 additions and 4 deletions

View File

@ -1213,7 +1213,7 @@ export default {
// Sends info to iframe containing item edition form and other use cases
parent.postMessage({
type: 'itemEditionMessage',
item: this.$adminOptions.itemEditionMode ? this.item : null
item: this.$adminOptions.itemEditionMode ? JSON.parse(JSON.stringify(this.item)) : null
},
tainacan_plugin.admin_url);
@ -1224,7 +1224,7 @@ export default {
webkit.messageHandlers &&
webkit.messageHandlers.cordova_iab
)
webkit.messageHandlers.cordova_iab.postMessage(JSON.stringify({ 'type': 'item_updated', 'item': this.item }));
webkit.messageHandlers.cordova_iab.postMessage(JSON.stringify({ 'type': 'item_updated', 'item': JSON.parse(JSON.stringify(this.item)) }));
})
.catch((errors) => {
@ -1868,7 +1868,7 @@ export default {
webkit.messageHandlers &&
webkit.messageHandlers.cordova_iab
)
webkit.messageHandlers.cordova_iab.postMessage(JSON.stringify({ 'type': 'exited_from_navigation', 'item': this.item }));
webkit.messageHandlers.cordova_iab.postMessage(JSON.stringify({ 'type': 'exited_from_navigation', 'item': JSON.parse(JSON.stringify(this.item)) }));
},
isSectionHidden(sectionId) {
return this.conditionalSections[sectionId] && this.conditionalSections[sectionId].hide;

View File

@ -448,8 +448,11 @@
valuesAsHtml: this.getItemMetadataValuesAsHtml(data.item),
img: data.item.thumbnail ? data.item.thumbnail : ''
});
this.onInput(this.selected);
if ( this.itemMetadatum.metadatum.multiple != 'yes' )
this.activeTab = 1;
}
}
}