Renames 'options' object as 'filterTypeOptions to prevent conflicts with mixin.'
This commit is contained in:
parent
09316b89b5
commit
78223b3e38
|
@ -60,7 +60,7 @@
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
</b-dropdown>
|
</b-dropdown>
|
||||||
<!-- <b-numberinput
|
<!-- <b-numberinput
|
||||||
v-if="options.type == 'year'"
|
v-if="filterTypeOptions.type == 'year'"
|
||||||
:placeholder="$i18n.get('instruction_type_value_year')"
|
:placeholder="$i18n.get('instruction_type_value_year')"
|
||||||
:aria-labelledby="labelId"
|
:aria-labelledby="labelId"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
|
@ -101,10 +101,10 @@
|
||||||
$i18n.get('datepicker_month_november'),
|
$i18n.get('datepicker_month_november'),
|
||||||
$i18n.get('datepicker_month_december')
|
$i18n.get('datepicker_month_december')
|
||||||
]"/>
|
]"/>
|
||||||
<!-- OPTIONS FOR TYPE
|
<!-- filterTypeOptions FOR TYPE
|
||||||
v-else
|
v-else
|
||||||
:type="options.type == 'month' ? 'month' : null"
|
:type="filterTypeOptions.type == 'month' ? 'month' : null"
|
||||||
:placeholder="options.type == 'month' ? $i18n.get('instruction_select_a_date') : $i18n.get('instruction_select_a_month')"
|
:placeholder="filterTypeOptions.type == 'month' ? $i18n.get('instruction_select_a_date') : $i18n.get('instruction_select_a_month')"
|
||||||
-->
|
-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -119,7 +119,7 @@
|
||||||
created() {
|
created() {
|
||||||
this.collection = this.filter.collection_id;
|
this.collection = this.filter.collection_id;
|
||||||
this.metadatum = (typeof this.filter.metadatum.metadatum_id == 'object' ? this.filter.metadatum.metadatum_id.metadatum_id : this.filter.metadatum.metadatum_id);
|
this.metadatum = (typeof this.filter.metadatum.metadatum_id == 'object' ? this.filter.metadatum.metadatum_id.metadatum_id : this.filter.metadatum.metadatum_id);
|
||||||
this.options = this.filter.filter_type_options;
|
this.filterTypeOptions = this.filter.filter_type_options;
|
||||||
|
|
||||||
let endpoint = '/collection/' + this.collection + '/metadata/' + this.metadatum;
|
let endpoint = '/collection/' + this.collection + '/metadata/' + this.metadatum;
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@
|
||||||
return {
|
return {
|
||||||
value: null,
|
value: null,
|
||||||
clear: false,
|
clear: false,
|
||||||
options: [],
|
filterTypeOptions: [],
|
||||||
collection: '',
|
collection: '',
|
||||||
metadatum: '',
|
metadatum: '',
|
||||||
metadatum_object: {},
|
metadatum_object: {},
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
:aria-labelledby="labelId"
|
:aria-labelledby="labelId"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
@input="validate_values()"
|
@input="validate_values()"
|
||||||
:step="options.step"
|
:step="filterTypeOptions.step"
|
||||||
v-model="valueInit"
|
v-model="valueInit"
|
||||||
/>
|
/>
|
||||||
<p class="is-size-7 has-text-centered is-marginless">{{ $i18n.get('label_until') }}</p>
|
<p class="is-size-7 has-text-centered is-marginless">{{ $i18n.get('label_until') }}</p>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
:aria-labelledby="labelId"
|
:aria-labelledby="labelId"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
@input="validate_values()"
|
@input="validate_values()"
|
||||||
:step="options.step"
|
:step="filterTypeOptions.step"
|
||||||
v-model="valueEnd"/>
|
v-model="valueEnd"/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
created() {
|
created() {
|
||||||
this.collectionId = this.filter.collection_id;
|
this.collectionId = this.filter.collection_id;
|
||||||
this.metadatumId = this.filter.metadatum.metadatum_id;
|
this.metadatumId = this.filter.metadatum.metadatum_id;
|
||||||
this.options = this.filter.filter_type_options;
|
this.filterTypeOptions = this.filter.filter_type_options;
|
||||||
|
|
||||||
this.$eventBusSearch.$on('removeFromFilterTag', this.cleanSearchFromTags);
|
this.$eventBusSearch.$on('removeFromFilterTag', this.cleanSearchFromTags);
|
||||||
},
|
},
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
isValid: false,
|
isValid: false,
|
||||||
collectionId: '',
|
collectionId: '',
|
||||||
metadatum: '',
|
metadatum: '',
|
||||||
options: [],
|
filterTypeOptions: [],
|
||||||
withError: false
|
withError: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{{ $i18n.get('label_clean') }}
|
{{ $i18n.get('label_clean') }}
|
||||||
</option>
|
</option>
|
||||||
<option
|
<option
|
||||||
v-for="(interval, index) in options.intervals"
|
v-for="(interval, index) in filterTypeOptions.intervals"
|
||||||
:value="index"
|
:value="index"
|
||||||
:key="index">
|
:key="index">
|
||||||
{{ interval.label }}
|
{{ interval.label }}
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
created() {
|
created() {
|
||||||
this.collectionId = this.filter.collection_id;
|
this.collectionId = this.filter.collection_id;
|
||||||
this.metadatumId = this.filter.metadatum.metadatum_id;
|
this.metadatumId = this.filter.metadatum.metadatum_id;
|
||||||
this.options = this.filter.filter_type_options;
|
this.filterTypeOptions = this.filter.filter_type_options;
|
||||||
this.$eventBusSearch.$on('removeFromFilterTag', this.cleanSearchFromTags);
|
this.$eventBusSearch.$on('removeFromFilterTag', this.cleanSearchFromTags);
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
isValid: false,
|
isValid: false,
|
||||||
collectionId: '',
|
collectionId: '',
|
||||||
metadatumId: '',
|
metadatumId: '',
|
||||||
options: [],
|
filterTypeOptions: [],
|
||||||
selectedInterval: ''
|
selectedInterval: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -52,8 +52,8 @@
|
||||||
},
|
},
|
||||||
changeInterval() {
|
changeInterval() {
|
||||||
if (this.selectedInterval !== '') {
|
if (this.selectedInterval !== '') {
|
||||||
this.valueInit = this.options.intervals[this.selectedInterval].from;
|
this.valueInit = this.filterTypeOptions.intervals[this.selectedInterval].from;
|
||||||
this.valueEnd = this.options.intervals[this.selectedInterval].to;
|
this.valueEnd = this.filterTypeOptions.intervals[this.selectedInterval].to;
|
||||||
this.emit();
|
this.emit();
|
||||||
} else {
|
} else {
|
||||||
this.clearSearch();
|
this.clearSearch();
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
if (values[0] != undefined && values[1] != undefined) {
|
if (values[0] != undefined && values[1] != undefined) {
|
||||||
let labelValue = this.options.intervals[this.selectedInterval].label + (this.options.showIntervalOnTag ? `(${values[0]}-${values[1]})` : '');
|
let labelValue = this.filterTypeOptions.intervals[this.selectedInterval].label + (this.filterTypeOptions.showIntervalOnTag ? `(${values[0]}-${values[1]})` : '');
|
||||||
this.$eventBusSearch.$emit( 'sendValuesToTags', {
|
this.$eventBusSearch.$emit( 'sendValuesToTags', {
|
||||||
filterId: this.filter.id,
|
filterId: this.filter.id,
|
||||||
value: labelValue
|
value: labelValue
|
||||||
|
@ -108,11 +108,11 @@
|
||||||
this.valueInit = metaquery.value[0];
|
this.valueInit = metaquery.value[0];
|
||||||
this.valueEnd = metaquery.value[1];
|
this.valueEnd = metaquery.value[1];
|
||||||
|
|
||||||
this.selectedInterval = this.options.intervals.findIndex(
|
this.selectedInterval = this.filterTypeOptions.intervals.findIndex(
|
||||||
anInterval => anInterval.from == this.valueInit && anInterval.to == this.valueEnd
|
anInterval => anInterval.from == this.valueInit && anInterval.to == this.valueEnd
|
||||||
);
|
);
|
||||||
|
|
||||||
let labelValue = this.options.intervals[this.selectedInterval].label + (this.options.showIntervalOnTag ? `(${this.valueInit}-${this.valueEnd})` : '');
|
let labelValue = this.filterTypeOptions.intervals[this.selectedInterval].label + (this.filterTypeOptions.showIntervalOnTag ? `(${this.valueInit}-${this.valueEnd})` : '');
|
||||||
this.$eventBusSearch.$emit( 'sendValuesToTags', {
|
this.$eventBusSearch.$emit( 'sendValuesToTags', {
|
||||||
filterId: this.filter.id,
|
filterId: this.filter.id,
|
||||||
value: labelValue
|
value: labelValue
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
<b-numberinput
|
<b-numberinput
|
||||||
:aria-labelledby="labelId"
|
:aria-labelledby="labelId"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
:step="Number(options.step)"
|
:step="Number(filterTypeOptions.step)"
|
||||||
@input="emit()"
|
@input="emit()"
|
||||||
v-model="value"/>
|
v-model="value"/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
created() {
|
created() {
|
||||||
this.collection = this.filter.collection_id;
|
this.collection = this.filter.collection_id;
|
||||||
this.metadatum = (typeof this.filter.metadatum.metadatum_id == 'object' ? this.filter.metadatum.metadatum_id.metadatum_id : this.filter.metadatum.metadatum_id);
|
this.metadatum = (typeof this.filter.metadatum.metadatum_id == 'object' ? this.filter.metadatum.metadatum_id.metadatum_id : this.filter.metadatum.metadatum_id);
|
||||||
this.options = this.filter.filter_type_options;
|
this.filterTypeOptions = this.filter.filter_type_options;
|
||||||
|
|
||||||
let endpoint = '/collection/' + this.collection + '/metadata/' + this.metadatum;
|
let endpoint = '/collection/' + this.collection + '/metadata/' + this.metadatum;
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
return {
|
return {
|
||||||
value: null,
|
value: null,
|
||||||
clear: false,
|
clear: false,
|
||||||
options: [],
|
filterTypeOptions: [],
|
||||||
collection: '',
|
collection: '',
|
||||||
metadatum: '',
|
metadatum: '',
|
||||||
metadatum_object: {},
|
metadatum_object: {},
|
||||||
|
|
Loading…
Reference in New Issue