admin.js
1 year ago
appointment.js
1 year ago
booking.js
1 year ago
customers.js
1 year ago
event.js
1 year ago
labelsAndOptionsTreatment.js
1 year ago
package.js
2 years ago
payment.js
1 year ago
status.js
1 year ago
admin.js
46 lines
| 1 | import { |
| 2 | createApp, |
| 3 | defineAsyncComponent |
| 4 | } from 'vue/dist/vue.esm-bundler' |
| 5 | import { |
| 6 | provide, |
| 7 | ref, |
| 8 | reactive, |
| 9 | readonly |
| 10 | } from "vue"; |
| 11 | import { useLicence } from "../common/licence"; |
| 12 | import store from '../../../store' |
| 13 | |
| 14 | const CustomizeWrapper = defineAsyncComponent({ |
| 15 | loader: () => import('../../../views/admin/customize/Customize.vue') |
| 16 | }) |
| 17 | |
| 18 | const dynamicCdn = window.wpAmeliaUrls.wpAmeliaPluginURL + 'v3/public/'; |
| 19 | |
| 20 | window.__dynamic_handler__ = function(importer) { |
| 21 | return dynamicCdn + 'assets/' + importer; |
| 22 | } |
| 23 | // @ts-ignore |
| 24 | window.__dynamic_preload__ = function(preloads) { |
| 25 | return preloads.map(preload => dynamicCdn + preload); |
| 26 | } |
| 27 | |
| 28 | createApp({ |
| 29 | setup() { |
| 30 | const baseURLs = ref(window.wpAmeliaUrls) |
| 31 | const languages = reactive(window.wpAmeliaLanguages) |
| 32 | const settings = reactive(window.wpAmeliaSettings) |
| 33 | const timeZone = ref('wpAmeliaTimeZone' in window ? window.wpAmeliaTimeZone[0] : '') |
| 34 | const localLanguage = ref(window.localeLanguage[0]) |
| 35 | const labels = reactive(window.wpAmeliaLabels) |
| 36 | const licence = reactive(useLicence()) |
| 37 | provide('settings', readonly(settings)) |
| 38 | provide('baseUrls', readonly(baseURLs)) |
| 39 | provide('timeZone', readonly(timeZone)) |
| 40 | provide('localLanguage', readonly(localLanguage)) |
| 41 | provide('languages', readonly(languages)) |
| 42 | provide('labels', readonly(labels)) |
| 43 | provide('licence', licence) |
| 44 | } |
| 45 | }).component('Customize', CustomizeWrapper).use(store).mount('#amelia-app-backend-new') |
| 46 |