diff --git a/src/admin/components/advanced-search/advanced-search.vue b/src/admin/components/advanced-search/advanced-search.vue new file mode 100644 index 000000000..27afacd4d --- /dev/null +++ b/src/admin/components/advanced-search/advanced-search.vue @@ -0,0 +1,123 @@ + + + + + \ No newline at end of file diff --git a/src/admin/components/navigation/tainacan-header.vue b/src/admin/components/navigation/tainacan-header.vue index 2f6b0abc1..5fa34bcb6 100644 --- a/src/admin/components/navigation/tainacan-header.vue +++ b/src/admin/components/navigation/tainacan-header.vue @@ -20,7 +20,7 @@
@@ -28,7 +28,7 @@
- {{ $i18n.get('advanced_search') }} + {{ $i18n.get('advanced_search') }}

- +
{{ $i18n.get('advanced_search') }}

{{ $i18n.get('filters') }}

- + + @@ -332,7 +336,7 @@ import ItemsList from '../../components/lists/items-list.vue'; import FiltersItemsList from '../../components/search/filters-items-list.vue'; import Pagination from '../../components/search/pagination.vue' - // import AdvancedSearch from '../../components/advanced-search/advanced-search.vue'; + import AdvancedSearch from '../../components/advanced-search/advanced-search.vue'; import { mapActions, mapGetters } from 'vuex'; export default { @@ -361,6 +365,10 @@ enabledViewModes: Object // Used only on theme }, computed: { + openAdvancedSearch(){ + console.log('Called here', this.$route.meta); + return this.$route.meta.openAdvancedSearch; + }, items() { return this.getItems(); }, @@ -396,7 +404,7 @@ ItemsList, FiltersItemsList, Pagination, - // AdvancedSearch, + AdvancedSearch, }, watch: { tableFields() { @@ -428,6 +436,11 @@ 'getViewMode', 'getTotalItems' ]), + openAdvancedSearchComponent(){ + console.log('Called here', this.$route.meta); + this.$set(this.$route.meta, 'openAdvancedSearch', !this.$route.meta.openAdvancedSearch); + console.log('Called here', this.$route.meta); + }, updateSearch() { this.$eventBusSearch.setSearchQuery(this.futureSearchQuery); }, diff --git a/src/api/endpoints/class-tainacan-rest-filters-controller.php b/src/api/endpoints/class-tainacan-rest-filters-controller.php index c1e9d168c..7a93f4c13 100644 --- a/src/api/endpoints/class-tainacan-rest-filters-controller.php +++ b/src/api/endpoints/class-tainacan-rest-filters-controller.php @@ -327,7 +327,7 @@ class REST_Filters_Controller extends REST_Controller { $item_arr['enabled'] = $item->get_enabled_for_collection(); } - $item_arr['filter_type_object'] = $item->get_filter_type_object()->_toArray(); + $item_arr['filter_type_object'] = $item->get_filter_type_object() ? $item->get_filter_type_object()->_toArray() : $item->get_filter_type_object(); return $item_arr; } diff --git a/src/classes/filter-types/custom-interval/CustomInterval.vue b/src/classes/filter-types/custom-interval/CustomInterval.vue index 4b08e2ef3..2ebbf6999 100644 --- a/src/classes/filter-types/custom-interval/CustomInterval.vue +++ b/src/classes/filter-types/custom-interval/CustomInterval.vue @@ -4,7 +4,7 @@
get_id().'.txt', 'w' ); fwrite( $file, $tmp['body'] ); fclose( $file );