forked from verdnatura/salix-front
Merge branch 'dev' into fix_VnTable_infiniteScroll
This commit is contained in:
commit
3de08826ac
|
@ -11,7 +11,7 @@ import FetchData from 'src/components/FetchData.vue';
|
|||
import { dateRange } from 'src/filters';
|
||||
|
||||
defineProps({ dataKey: { type: String, required: true } });
|
||||
const { t } = useI18n();
|
||||
const { t, te } = useI18n();
|
||||
const warehouses = ref();
|
||||
const groupedStates = ref();
|
||||
|
||||
|
@ -26,6 +26,12 @@ const handleScopeDays = (params, days, callback) => {
|
|||
}
|
||||
if (callback) callback();
|
||||
};
|
||||
|
||||
const getLocale = (label) => {
|
||||
const param = label.split('.').at(-1);
|
||||
const globalLocale = `globals.params.${param}`;
|
||||
return te(globalLocale) ? t(globalLocale) : t(`params.${param}`);
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<FetchData url="Warehouses" auto-load @on-fetch="(data) => (warehouses = data)" />
|
||||
|
@ -43,10 +49,11 @@ const handleScopeDays = (params, days, callback) => {
|
|||
:hidden-tags="['from', 'to', 'search']"
|
||||
:custom-tags="['scopeDays']"
|
||||
:unremovable-params="['from', 'to', 'scopeDays']"
|
||||
search-url="saleMonitorTickets"
|
||||
>
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong v-text="`${t(`params.${tag.label}`)}:`" />
|
||||
<strong v-text="`${getLocale(tag.label)}:`" />
|
||||
<span v-text="formatFn(tag.value)" />
|
||||
</div>
|
||||
</template>
|
||||
|
@ -110,7 +117,7 @@ const handleScopeDays = (params, days, callback) => {
|
|||
url="Workers/search"
|
||||
:params="{ departmentCodes: ['VT'] }"
|
||||
is-outlined
|
||||
option-value="code"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
:no-one="true"
|
||||
>
|
||||
|
|
|
@ -109,7 +109,7 @@ const getEntryQueryParams = (supplier) => {
|
|||
:subtitle="data.subtitle"
|
||||
:filter="filter"
|
||||
@on-fetch="setData"
|
||||
data-key="supplier"
|
||||
data-key="supplierDescriptor"
|
||||
:summary="$props.summary"
|
||||
>
|
||||
<template #body="{ entity }">
|
||||
|
|
Loading…
Reference in New Issue