szybkie filtry (wip)

This commit is contained in:
2023-09-05 16:10:38 +02:00
parent 439f59fedc
commit ee7c50f59b
2 changed files with 21 additions and 13 deletions
@@ -30,7 +30,8 @@
<p class="card_info" v-html="$t('filters.desc')"></p>
<section class="card_options">
<div class="quick-actions">
<!-- QUICK ACTIONS (TODO) -->
<!-- <div class="quick-actions">
<h3 class="text--primary">{{ $t('filters.sections.quick') }}</h3>
<hr />
@@ -39,11 +40,11 @@
{{ $t('filters.all-available') }}
</button>
<button class="btn--action" style="width: 100%" @click="saveFilters">
<button class="btn--action" style="width: 100%" @click="filterStore.handleQuickAction('all-free')">
{{ $t('filters.all-free') }}
</button>
</div>
</div>
</div> -->
<div class="option-section" v-for="section in filterStore.inputs.optionSections">
<h3 class="text--primary">
+17 -10
View File
@@ -58,17 +58,24 @@ export const useStationFiltersStore = defineStore('stationFiltersStore', {
});
},
// Quick actions (TODO)
handleQuickAction(actionName: string) {
switch (actionName) {
case 'all-available':
this.resetFilters();
// this.changeFilterValue('non-public', false);
break;
default:
break;
}
// switch (actionName) {
// case 'all-available':
// this.resetFilters();
// this.inputs.options
// .filter((option) => /^(free|non-public)/.test(option.id))
// .forEach((option) => (option.value = !option.defaultValue));
// break;
// case 'all-free':
// this.resetFilters();
// this.inputs.options
// .filter((option) => /^(free|occupied)/.test(option.id))
// .forEach((option) => (option.value = !option.defaultValue));
// break;
// default:
// break;
// }
},
changeFilterValue(name: string, value: any) {