Merge branch '208-export-fix-loading-by-type-goal-result' into 'master'

Resolve "Export: le chargement de l'app vue de "filtrer les actions par type, objectif et résultat" ne se charge pas sur certains exports"

Closes #208

See merge request Chill-Projet/chill-bundles!615
This commit is contained in:
Julien Fastré 2023-11-16 10:05:56 +00:00
commit 8719b4dedd
5 changed files with 50 additions and 51 deletions

View File

@ -0,0 +1,5 @@
kind: Fixed
body: 'Export: fix loading of form for "filter action by type, goal and result"'
time: 2023-11-16T10:56:42.771516508+01:00
custom:
Issue: "208"

View File

@ -1,7 +1,6 @@
import {ShowHide} from 'ChillMainAssets/lib/show_hide/index';
document.addEventListener('DOMContentLoaded', function(_e) {
console.log('pick-rolling-date');
document.querySelectorAll('div[data-rolling-date]').forEach( (picker) => {
const
roll_wrapper = picker.querySelector('div.roll-wrapper'),
@ -11,12 +10,8 @@ document.addEventListener('DOMContentLoaded', function(_e) {
froms: [roll_wrapper],
container: [fixed_wrapper],
test: function (elems) {
console.log('testing');
console.log('elems', elems);
for (let el of elems) {
for (let select_roll of el.querySelectorAll('select[data-roll-picker]')) {
console.log('select_roll', select_roll);
console.log('value', select_roll.value);
return select_roll.value === 'fixed_date';
}
}

View File

@ -28,9 +28,7 @@
{% block js %}
{{ encore_entry_script_tags('mod_pickentity_type') }}
{{ encore_entry_script_tags('page_export') }}
{% if export_alias == 'count_social_work_actions' %}
{{ encore_entry_script_tags('vue_export_action_goal_result') }}
{% endif %}
{{ encore_entry_script_tags('mod_pick_rolling_date') }}
{% endblock js %}

View File

@ -2,6 +2,7 @@ import { createApp } from "vue";
import { _createI18n } from 'ChillMainAssets/vuejs/_js/i18n';
import App from './App.vue';
if (null !== document.getElementById('export_filters_social_work_type_filter_enabled')) {
const i18n = _createI18n({});
const app = createApp({
@ -9,5 +10,5 @@ const app = createApp({
})
.use(i18n)
.component('app', App)
.mount('#export_export')
;
.mount('#export_export');
}