"Improve filter reset UI in PaginationDisplayFilters.vue, update translation for 'reload' label, and remove redundant LoadButtonWhileAwait component in VehiclesPagination.vue for cleaner code and enhanced UX."

This commit is contained in:
Jeppe Bundgaard
2025-12-06 20:12:38 +01:00
parent d2de664186
commit f2f9d24652
3 changed files with 10 additions and 6 deletions
@@ -213,11 +213,16 @@ const renderFilterName = (filter: FilterType) => {
{{ renderFilterName(filter) }}
<span class="is-float-right">
<!-- Reset "button" -->
<span class="button is-small" v-if="isFilterSet(filter)" >
<span class="icon is-small" @click="filter.onChange ? filter.onChange(filter.multiple ? [] : '*') : null">
<i class="fas fa-times"></i>
<template v-if="isFilterSet(filter)">
<span @click="filter.onChange ? filter.onChange(filter.multiple ? [] : '*') : null" class="is-clickable">
<span class="mr-1">
{{ SessionUser.objects.global.language.reset }}
</span>
<span class="icon is-small">
<i class="fas fa-times-circle"></i>
</span>
</span>
</span>
</template>
</span>
</label>
<div class="control">
@@ -56,7 +56,6 @@ loadList();
</PaginationDisplay>
<VehiclesTable :vehicles="list" :show_add_vehicle="props.customer_id" :add_other_customer_id="props.add_other_customer_id"/>
<PaginationNavigation :currentPage="metaCurrentPage" :totalPages="Math.ceil(metaTotalItems / metaItemsPerPage)" :loadFunction="loadList" :setPage="setPage" :isLoading="isLoading" />
<LoadButtonWhileAwait class="is-dark" :isLoading="!isLoaded()" :loadFunction="loadList" icon="fas fa-sync-alt">Opdater</LoadButtonWhileAwait>
</template>
<style scoped>
@@ -176,7 +176,7 @@ export const ObjectsGlobal = {
remove: 'Fjern',
showing: 'Viser',
add: 'Tilføj',
reload: 'Genindlæs',
reload: 'Opdater',
time: {
at_hour: 'Kl.',
today: 'I dag',