diff --git a/src/components/ui/VnSearchbar.vue b/src/components/ui/VnSearchbar.vue index a78403b5c..dc6d4751c 100644 --- a/src/components/ui/VnSearchbar.vue +++ b/src/components/ui/VnSearchbar.vue @@ -108,6 +108,7 @@ async function search() { ...Object.fromEntries(staticParams), search: searchText.value, }, + ...{ filter: props.filter }, }; if (props.whereFilter) { diff --git a/src/pages/Account/AccountList.vue b/src/pages/Account/AccountList.vue index d698596b9..1beac0d0b 100644 --- a/src/pages/Account/AccountList.vue +++ b/src/pages/Account/AccountList.vue @@ -9,7 +9,9 @@ import { useSummaryDialog } from 'src/composables/useSummaryDialog'; const { t } = useI18n(); const { viewSummary } = useSummaryDialog(); const tableRef = ref(); - +const filter = { + include: { relation: 'role', scope: { fields: ['id', 'name'] } }, +}; const columns = computed(() => [ { align: 'left', @@ -29,7 +31,22 @@ const columns = computed(() => [ }, { align: 'left', - name: 'username', + name: 'roleFk', + label: t('role'), + columnFilter: { + component: 'select', + name: 'roleFk', + attrs: { + url: 'VnRoles', + optionValue: 'id', + optionLabel: 'name', + }, + }, + format: ({ role }, dashIfEmpty) => dashIfEmpty(role?.name), + }, + { + align: 'left', + name: 'nickname', label: t('Nickname'), isTitle: true, component: 'input', @@ -104,12 +121,13 @@ const exprBuilder = (param, value) => { :expr-builder="exprBuilder" :label="t('account.search')" :info="t('account.searchInfo')" + :filter="filter" /> - + + + + + + + +en: + travel: + Id: Contains + ref: Reference + agency: Agency + warehouseInFk: W. In + shipped: Shipped + shipmentHour: Shipment Hour + warehouseOut: W. Out + landed: Landed + landingHour: Landing Hour + totalEntries: Σ +es: + travel: + Id: Id + ref: Referencia + agency: Agencia + warehouseInFk: Alm.Salida + shipped: F.Envío + shipmentHour: Hora de envío + warehouseOut: Alm.Entrada + landed: F.Entrega + landingHour: Hora de entrega + totalEntries: Σ + diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue index e56f5d2ff..05d2e5eda 100644 --- a/src/pages/Travel/TravelList.vue +++ b/src/pages/Travel/TravelList.vue @@ -9,6 +9,8 @@ import TravelSummary from './Card/TravelSummary.vue'; import VnSearchbar from 'components/ui/VnSearchbar.vue'; import { toDate } from 'src/filters'; import { getDateQBadgeColor } from 'src/composables/getDateQBadgeColor.js'; +import RightMenu from 'src/components/common/RightMenu.vue'; +import TravelFilter from './TravelFilter.vue'; const { viewSummary } = useSummaryDialog(); const router = useRouter(); @@ -24,6 +26,7 @@ const $props = defineProps({ }); const entityId = computed(() => $props.id || route.params.id); +const travelFilterRef = ref(); onMounted(async () => { stateStore.rightDrawer = true; }); @@ -201,6 +204,11 @@ const columns = computed(() => [ :label="t('Search travel')" data-key="TravelList" /> + + + [ editorFk: entityId, }, }" + :right-search="false" :user-params="{ daysOnward: 7 }" order="landed DESC" :columns="columns" @@ -220,7 +229,6 @@ const columns = computed(() => [ redirect="travel" :is-editable="false" :use-model="true" - chip-locale="travel.travelList.tableVisibleColumns" >