Removes unused Date Filter options.

This commit is contained in:
mateuswetah 2024-01-29 16:32:20 -03:00
parent ab3207e4e2
commit e9e3370504
3 changed files with 0 additions and 64 deletions

View File

@ -1,46 +0,0 @@
<template>
<div>
<b-field :addons="false">
<label class="label is-inline">
{{ $i18n.getHelperTitle('tainacan-filter-date', 'type') }}<span>&nbsp;*&nbsp;</span>
<help-button
:title="$i18n.getHelperTitle('tainacan-filter-date', 'type')"
:message="$i18n.getHelperMessage('tainacan-filter-date', 'type')"/>
</label>
<b-select
name="type_options"
v-model="type"
@update:model-value="onUpdateType">
<option value="day">{{ $i18n.get('label_day') }}</option>
<option value="month">{{ $i18n.get('label_month') }}</option>
<option value="year">{{ $i18n.get('label_year') }}</option>
</b-select>
</b-field>
</div>
</template>
<script>
export default {
props: {
filter: {
type: Object
},
value: [String, Number, Array],
disabled: false,
},
data() {
return {
type: [String]
}
},
emits: [
'input',
],
methods: {
onUpdateType(type) {
this.$emit('input', { type: type });
},
}
}
</script>

View File

@ -13,11 +13,7 @@ class Date extends Filter_Type {
$this->set_name( __('Date', 'tainacan') ); $this->set_name( __('Date', 'tainacan') );
$this->set_supported_types(['date']); $this->set_supported_types(['date']);
$this->set_component('tainacan-filter-date'); $this->set_component('tainacan-filter-date');
// $this->set_form_component('tainacan-filter-form-date');
$this->set_use_max_options(false); $this->set_use_max_options(false);
// $this->set_default_options([
// 'type' => 'day'
// ]);
$this->set_preview_template(' $this->set_preview_template('
<div> <div>
<div> <div>
@ -61,18 +57,6 @@ class Date extends Filter_Type {
'); ');
} }
// /**
// * @inheritdoc
// */
// public function get_form_labels(){
// return [
// 'type' => [
// 'title' => __( 'Type', 'tainacan' ),
// 'description' => __( 'The type of the date picker, may be for day, month or year.', 'tainacan' ),
// ]
// ];
// }
} }
class Date_Helper { class Date_Helper {

View File

@ -62,7 +62,6 @@ import TermEditionForm from '../components/edition/term-edition-form.vue';
import FormFilterNumeric from '../components/filter-types/numeric/FormNumeric.vue'; import FormFilterNumeric from '../components/filter-types/numeric/FormNumeric.vue';
import FormFilterNumericInterval from '../components/filter-types/numeric-interval/FormNumericInterval.vue'; import FormFilterNumericInterval from '../components/filter-types/numeric-interval/FormNumericInterval.vue';
import FormFilterNumericListInterval from '../components/filter-types/numeric-list-interval/FormNumericListInterval.vue'; import FormFilterNumericListInterval from '../components/filter-types/numeric-list-interval/FormNumericListInterval.vue';
// import FormDate from '../../../classes/filter-types/date/FormDate.vue';
import TainacanFormItem from '../components/metadata-types/tainacan-form-item.vue'; import TainacanFormItem from '../components/metadata-types/tainacan-form-item.vue';
@ -252,7 +251,6 @@ export default (element) => {
app.component('tainacan-filter-form-numeric', FormFilterNumeric); app.component('tainacan-filter-form-numeric', FormFilterNumeric);
app.component('tainacan-filter-form-numeric-interval', FormFilterNumericInterval); app.component('tainacan-filter-form-numeric-interval', FormFilterNumericInterval);
app.component('tainacan-filter-form-numeric-list-interval', FormFilterNumericListInterval); app.component('tainacan-filter-form-numeric-list-interval', FormFilterNumericListInterval);
// app.component('tainacan-filter-form-date', FormDate);
// Metadadum parent containers // Metadadum parent containers
app.component('tainacan-form-item', TainacanFormItem); app.component('tainacan-form-item', TainacanFormItem);