mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-24 15:44:59 +00:00
adapting vuejs form for accompanyingPeriodWork: include template for
specific evaluation
This commit is contained in:
@@ -1,24 +1,27 @@
|
||||
import {createApp} from 'vue';
|
||||
import PickTemplate from 'ChillDocGeneratorAssets/vuejs/_components/PickTemplate.vue';
|
||||
import {fetchTemplates} from 'ChillDocGeneratorAssets/api/pickTemplate.js';
|
||||
import {_createI18n} from 'ChillMainAssets/vuejs/_js/i18n';
|
||||
|
||||
const i18n = _createI18n({});
|
||||
|
||||
document.querySelectorAll('div[data-docgen-template-picker]').forEach(el => {
|
||||
let
|
||||
picker = {
|
||||
template: '<pick-template :entityClass="this.entityClass" :entityId="this.entityId"></pick-template>',
|
||||
components: {
|
||||
PickTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
entityClass: el.dataset.entityClass,
|
||||
entityId: el.dataset.entityId,
|
||||
}
|
||||
},
|
||||
}
|
||||
;
|
||||
fetchTemplates(el.dataset.entityClass).then(templates => {
|
||||
let
|
||||
picker = {
|
||||
template: '<pick-template :templates="this.templates" :entityId="this.entityId"></pick-template>',
|
||||
components: {
|
||||
PickTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
templates: templates,
|
||||
entityId: el.dataset.entityId,
|
||||
}
|
||||
},
|
||||
}
|
||||
;
|
||||
createApp(picker).use(i18n).mount(el);
|
||||
})
|
||||
|
||||
createApp(picker).use(i18n).mount(el);
|
||||
});
|
||||
|
Reference in New Issue
Block a user