Feature: bootstrapping an app to show a modal for address details and showing it inside twig address's render box

Feature: showing map and link to external map, and address details inside address details modal

Feature: AddressDetailsMap show a warning if the address is incomplete
This commit is contained in:
2023-03-14 22:12:30 +01:00
parent c56ae08fae
commit b740a88ae3
16 changed files with 283 additions and 11 deletions

View File

@@ -0,0 +1,25 @@
import AddressDetailsButton from "../../vuejs/_components/AddressDetails/AddressDetailsButton.vue";
import {createApp} from "vue";
import {createI18n} from "vue-i18n";
import {_createI18n} from "../../vuejs/_js/i18n";
const i18n = _createI18n({});
document.querySelectorAll<HTMLSpanElement>('span[data-address-details]').forEach((el) => {
const dataset = el.dataset as {
addressId: string
};
const app = createApp({
components: {AddressDetailsButton},
data() {
return {
addressId: Number.parseInt(dataset.addressId),
}
},
template: '<address-details-button :address_id="addressId"></address-details-button>'
});
app.use(i18n);
app.mount(el);
});