mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 08:03:49 +00:00
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:
@@ -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);
|
||||
});
|
Reference in New Issue
Block a user