5050 @change ="{{ id }}.search() ">
5151 < option value =""> - {% trans 'Choose an option' %} -</ option >
5252 < option v-for ="item in programtypes "
53- v-if ="!excluded_programtypes .includes(String(item.TypeProgramId)) "
53+ v-if ="programtypes_filter .includes(String(item.TypeProgramId)) "
5454 :value ="item.TypeProgramId "
5555 :selected ="item.TypeProgramId == selected_programtype ">
5656 [[ item.TypeProgramDescription ]]
210210{% storage_api_root "CMS_STORAGE_PROJECTS_PROGRAMS_TYPES_API" as programtypes_api %}
211211{% storage_api_root "CMS_STORAGE_DEPARTMENTS_API" as departments_api %}
212212{% storage_api_root "CMS_STORAGE_PROJECTS_INFRASTRUCTURES_API" as infrastructures_api %}
213- {% storage_settings_value "PROJECTS_PRIN_ID_LIST" as prin_id_list %}
214213
215214search_dict: {},
216215programtypes: [],
225224selected_search: this.getItemFromSession("{{ id }}", 'search'),
226225selected_programtype: this.getItemFromSession("{{ id }}", 'programtype'),
227226selected_infrastructure: this.getItemFromSession("{{ id }}", 'infrastructure'),
228-
229- id_list: {{ prin_id_list|safe }},
230227{% endblock extra_data %}
231228
232229{% block extra_mounted %}
@@ -235,15 +232,15 @@ <h5>
235232this.callProgramTypes();
236233this.callInfrastructures();
237234
238- this.excluded_programtypes = {{ id }}_get_param("- programtype").split(",");
235+ this.programtypes_filter = {{ id }}_get_param("programtype").split(",");
239236{% endblock extra_mounted %}
240237
241238{% block extra_methods %}
242239callProgramTypes() {
243240 axios
244241 .get(this.loader_source_programtypes)
245242 .then(response => {
246- this.programtypes = response.data.results.filter( p => this.id_list .includes( p.TypeProgramId ) );
243+ this.programtypes = response.data.results.filter( p => this.programtypes_filter .includes( p.TypeProgramId ) );
247244 this.is_loading_programtypes = false
248245 })
249246},
0 commit comments