Files
firefly-iii/resources/assets/v3/js/pages/transactions/shared/display-map.js
T
2026-08-21 10:56:08 +02:00

20 lines
643 B
JavaScript

export function displayMap(index) {
index = parseInt(index);
// show location?
if (true === this.formBehaviour.customFields.location) {
if(true === this.entries[index].hasLocation) {
this.renderMap(index, false);
return;
}
if (false === this.formBehaviour.defaultCoordinates.loaded) {
// load first, then show map.
this.loadDefaultCoordinates().then(data => {
this.formBehaviour.defaultCoordinates = data;
this.renderMap(index, true);
});
return;
}
this.renderMap(index, false);
}
}