diff --git a/src/boot/i18n.js b/src/boot/i18n.js index e1492d3bb..837bad936 100644 --- a/src/boot/i18n.js +++ b/src/boot/i18n.js @@ -8,6 +8,7 @@ const i18n = createI18n({ globalInjection: true, messages, missingWarn: false, + fallbackWarn: false, legacy: false, }); diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index 29967d8c7..b99598e10 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -16,6 +16,8 @@ const props = defineProps({ }, }); +const emit = defineEmits(['refresh', 'clear']); + const arrayData = useArrayData(props.dataKey); const store = arrayData.store; const userParams = ref({}); @@ -36,11 +38,22 @@ async function search() { } } - // if (Object.keys(params)) - await arrayData.addFilter({ params }); } +async function reload() { + await arrayData.fetch({ append: false }); + emit('refresh'); +} + +async function clearFilters() { + userParams.value = {}; + await arrayData.applyFilter({ params: {} }); + await reload(); + + emit('clear'); +} + const tags = computed(() => { const params = []; @@ -56,67 +69,104 @@ const tags = computed(() => { async function remove(key) { delete userParams.value[key]; + delete store.userParams[key]; await search(); } -{ - "en": { - "appliedFilters": "Applied filters" - }, - "es": { - "appliedFilters": "Filtros aplicados" - } -} +es: + You didn't enter any filter: No has introducido ningún filtro + Applied filters: Filtros aplicados + Remove filters: Eliminar filtros + Refresh: Refrescar + Search: Buscar diff --git a/src/pages/Claim/ClaimFilter.vue b/src/pages/Claim/ClaimFilter.vue new file mode 100644 index 000000000..a64ee7367 --- /dev/null +++ b/src/pages/Claim/ClaimFilter.vue @@ -0,0 +1,223 @@ + + + + + +en: + params: + fi: FI + name: Name + socialName: Social Name + salesPersonFk: Salesperson + provinceFk: Province + city: City + phone: Phone + email: Email + zoneFk: Zone + postcode: Postcode +es: + params: + fi: NIF + name: Nombre + socialName: Razón Social + salesPersonFk: Comercial + provinceFk: Provincia + city: Ciudad + phone: Teléfono + email: Email + zoneFk: Zona + postcode: CP + FI: NIF + Name: Nombre + Social Name: Razón social + Salesperson: Comercial + Province: Provincia + City: Ciudad + More options: Más opciones + Phone: Teléfono + Email: Email + Zone: Zona + Postcode: Código postal + + + diff --git a/src/pages/Claim/ClaimList.vue b/src/pages/Claim/ClaimList.vue index 9ab22117e..4373b0354 100644 --- a/src/pages/Claim/ClaimList.vue +++ b/src/pages/Claim/ClaimList.vue @@ -1,38 +1,31 @@