mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-08-26 13:17:30 -05:00
20 lines
643 B
JavaScript
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);
|
|
}
|
|
}
|