Skip to content
Snippets Groups Projects
Commit 305db5b1 authored by ml bonhomme's avatar ml bonhomme :bee: Committed by Erwan Rouchet
Browse files

Display disabled element list filters for non configurable processes

parent 61ee39a8
No related branches found
No related tags found
1 merge request!1637Display disabled element list filters for non configurable processes
......@@ -30,7 +30,7 @@
<div class="columns mb-0">
<div class="column">
<div v-if="isConfigurable" class="field is-grouped">
<div class="field is-grouped">
<div>
<abbr title="Filter elements with a name containing the input (case-insensitive)">
Filter by name
......@@ -42,7 +42,7 @@
placeholder="Element name"
v-model="nameFilter"
v-on:change="updateFilters({ element_name_contains: nameFilter })"
:disabled="processFiltering || null"
:disabled="processFiltering || !isConfigurable || null"
/>
</div>
</div>
......@@ -55,7 +55,7 @@
<select
v-model="typeFilter"
v-on:change="updateFilters({ element_type: typeFilter })"
:disabled="processFiltering || null"
:disabled="processFiltering || !isConfigurable || null"
>
<option value=""></option>
<option
......@@ -78,7 +78,7 @@
<select
v-model="classFilter"
v-on:change="updateFilters({ ml_class_id: classFilter || null })"
:disabled="processFiltering || null"
:disabled="processFiltering || !isConfigurable || null"
>
<option value=""></option>
<option
......@@ -102,7 +102,7 @@
type="checkbox"
class="switch is-info is-rounded"
:checked="process.load_children"
:disabled="processFiltering || null"
:disabled="processFiltering || !isConfigurable || null"
/>
<label
for="recursiveSwitch"
......@@ -187,11 +187,11 @@ export default {
async mounted () {
await this.getProcess()
// Sync initial filters value from the process
this.nameFilter = this.process.element_name_contains ?? ''
this.typeFilter = this.process.element_type ?? ''
this.classFilter = this.process.ml_class_id ?? ''
if (this.isConfigurable) {
// Sync initial filters value from the process
this.nameFilter = this.process.element_name_contains ?? ''
this.typeFilter = this.process.element_type ?? ''
this.classFilter = this.process.ml_class_id ?? ''
this.loadChildren()
} else {
/**
......@@ -281,7 +281,7 @@ export default {
this.typeFilter = this.process.element_type
},
async updateFilters (payload = {}) {
if (this.processFiltering) return
if (this.processFiltering || !this.isConfigurable) return
// Update process filters and list new elements
this.processFiltering = true
try {
......@@ -318,7 +318,7 @@ export default {
immediate: true,
handler (newValue) {
// The corpus ID may be undefined if the process has not loaded yet
if (newValue && !this.isReadOnly) this.listAllCorpusMlClasses(newValue)
if (newValue) this.listAllCorpusMlClasses(newValue)
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment