mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
szybkie filtry (wip)
This commit is contained in:
@@ -30,7 +30,8 @@
|
|||||||
<p class="card_info" v-html="$t('filters.desc')"></p>
|
<p class="card_info" v-html="$t('filters.desc')"></p>
|
||||||
|
|
||||||
<section class="card_options">
|
<section class="card_options">
|
||||||
<div class="quick-actions">
|
<!-- QUICK ACTIONS (TODO) -->
|
||||||
|
<!-- <div class="quick-actions">
|
||||||
<h3 class="text--primary">{{ $t('filters.sections.quick') }}</h3>
|
<h3 class="text--primary">{{ $t('filters.sections.quick') }}</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
@@ -39,11 +40,11 @@
|
|||||||
{{ $t('filters.all-available') }}
|
{{ $t('filters.all-available') }}
|
||||||
</button>
|
</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') }}
|
{{ $t('filters.all-free') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="option-section" v-for="section in filterStore.inputs.optionSections">
|
<div class="option-section" v-for="section in filterStore.inputs.optionSections">
|
||||||
<h3 class="text--primary">
|
<h3 class="text--primary">
|
||||||
|
|||||||
@@ -58,17 +58,24 @@ export const useStationFiltersStore = defineStore('stationFiltersStore', {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Quick actions (TODO)
|
||||||
handleQuickAction(actionName: string) {
|
handleQuickAction(actionName: string) {
|
||||||
switch (actionName) {
|
// switch (actionName) {
|
||||||
case 'all-available':
|
// case 'all-available':
|
||||||
this.resetFilters();
|
// this.resetFilters();
|
||||||
|
// this.inputs.options
|
||||||
// this.changeFilterValue('non-public', false);
|
// .filter((option) => /^(free|non-public)/.test(option.id))
|
||||||
break;
|
// .forEach((option) => (option.value = !option.defaultValue));
|
||||||
|
// break;
|
||||||
default:
|
// case 'all-free':
|
||||||
break;
|
// 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) {
|
changeFilterValue(name: string, value: any) {
|
||||||
|
|||||||
Reference in New Issue
Block a user