#8448 - devToTest #1254

Merged
alexm merged 365 commits from 8448-devToTest into test 2025-01-21 10:44:46 +00:00
5 changed files with 179 additions and 167 deletions
Showing only changes of commit a9a09ad0a3 - Show all commits

View File

@ -1,21 +1,11 @@
<script setup> <script setup>
import VnCard from 'components/common/VnCard.vue'; import VnCardBeta from 'components/common/VnCardBeta.vue';
import EntryDescriptor from './EntryDescriptor.vue'; import EntryDescriptor from './EntryDescriptor.vue';
import EntryFilter from '../EntryFilter.vue';
import filter from './EntryFilter.js';
</script> </script>
<template> <template>
<VnCard <VnCardBeta
data-key="Entry" data-key="Entry"
base-url="Entries" base-url="Entries"
:filter="filter"
:descriptor="EntryDescriptor" :descriptor="EntryDescriptor"
:filter-panel="EntryFilter"
search-data-key="EntryList"
:searchbar-props="{
url: 'Entries/filter',
label: 'Search entries',
info: 'You can search by entry reference',
}"
/> />
</template> </template>

View File

@ -2,19 +2,19 @@
import { onMounted, ref, computed } from 'vue'; import { onMounted, ref, computed } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import EntryFilter from './EntryFilter.vue'; import EntryFilter from './EntryFilter.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import { useStateStore } from 'stores/useStateStore'; import { useStateStore } from 'stores/useStateStore';
import VnTable from 'components/VnTable/VnTable.vue'; import VnTable from 'components/VnTable/VnTable.vue';
import RightMenu from 'src/components/common/RightMenu.vue';
import { toDate } from 'src/filters'; import { toDate } from 'src/filters';
import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import EntrySummary from './Card/EntrySummary.vue'; import EntrySummary from './Card/EntrySummary.vue';
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue'; import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue'; import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue';
import VnSection from 'src/components/common/VnSection.vue';
const stateStore = useStateStore(); const stateStore = useStateStore();
const { t } = useI18n(); const { t } = useI18n();
const tableRef = ref(); const tableRef = ref();
const dataKey = 'EntryList';
const { viewSummary } = useSummaryDialog(); const { viewSummary } = useSummaryDialog();
const entryFilter = { const entryFilter = {
@ -180,30 +180,32 @@ const columns = computed(() => [
}, },
]); ]);
</script> </script>
<template> <template>
<VnSearchbar <VnSection
data-key="EntryList" :data-key="dataKey"
:columns="columns"
prefix="entry"
url="Entries/filter" url="Entries/filter"
:label="t('Search entries')" :array-data-props="{
:info="t('You can search by entry reference')" url: 'Entries/filter',
/> order: 'id DESC',
<RightMenu> exprBuilder,
<template #right-panel> }"
>
<template #rightMenu>
<EntryFilter data-key="EntryList" /> <EntryFilter data-key="EntryList" />
</template> </template>
</RightMenu> <template #body>
<VnTable <VnTable
ref="tableRef" ref="tableRef"
data-key="EntryList" :data-key="dataKey"
url="Entries/filter"
:filter="entryFilter"
:create="{ :create="{
urlCreate: 'Entries', urlCreate: 'Entries',
title: t('Create entry'), title: t('Create entry'),
onDataSaved: ({ id }) => tableRef.redirect(id), onDataSaved: ({ id }) => tableRef.redirect(id),
formInitialData: {}, formInitialData: {},
}" }"
order="id DESC"
:columns="columns" :columns="columns"
redirect="entry" redirect="entry"
:right-search="false" :right-search="false"
@ -241,6 +243,8 @@ const columns = computed(() => [
</span> </span>
</template> </template>
</VnTable> </VnTable>
</template>
</VnSection>
</template> </template>
<i18n> <i18n>

View File

@ -1,3 +1,6 @@
entry:
search: Search entries
searchInfo: You can search by entry reference
entryList: entryList:
list: list:
inventoryEntry: Inventory entry inventoryEntry: Inventory entry

View File

@ -1,6 +1,6 @@
Search entries: Buscar entradas entry:
You can search by entry reference: Puedes buscar por referencia de la entrada search: Buscar entradas
searchInfo: Puedes buscar por referencia de entrada
entryList: entryList:
list: list:
inventoryEntry: Es inventario inventoryEntry: Es inventario

View File

@ -1,98 +1,23 @@
import { RouterView } from 'vue-router'; import { RouterView } from 'vue-router';
export default { const entryCard = {
path: '/entry',
name: 'Entry',
meta: {
title: 'entries',
icon: 'vn:entry',
moduleName: 'Entry',
keyBinding: 'e',
},
component: RouterView,
redirect: { name: 'EntryMain' },
menus: {
main: [
'EntryList',
'MyEntries',
'EntryLatestBuys',
'EntryStockBought',
'EntryWasteRecalc',
],
card: ['EntryBasicData', 'EntryBuys', 'EntryNotes', 'EntryDms', 'EntryLog'],
},
children: [
{
path: '',
name: 'EntryMain',
component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'EntryList' },
children: [
{
path: 'list',
name: 'EntryList',
meta: {
title: 'list',
icon: 'view_list',
},
component: () => import('src/pages/Entry/EntryList.vue'),
},
{
path: 'my',
name: 'MyEntries',
meta: {
title: 'labeler',
icon: 'sell',
},
component: () => import('src/pages/Entry/MyEntries.vue'),
},
{
path: 'create',
name: 'EntryCreate',
meta: {
title: 'entryCreate',
icon: 'add',
},
component: () => import('src/pages/Entry/EntryCreate.vue'),
},
{
path: 'latest-buys',
name: 'EntryLatestBuys',
meta: {
title: 'latestBuys',
icon: 'contact_support',
},
component: () => import('src/pages/Entry/EntryLatestBuys.vue'),
},
{
path: 'stock-Bought',
name: 'EntryStockBought',
meta: {
title: 'reserves',
icon: 'deployed_code_history',
},
component: () => import('src/pages/Entry/EntryStockBought.vue'),
},
{
path: 'waste-recalc',
name: 'EntryWasteRecalc',
meta: {
title: 'wasteRecalc',
icon: 'compost',
},
component: () => import('src/pages/Entry/EntryWasteRecalc.vue'),
},
],
},
{
name: 'EntryCard', name: 'EntryCard',
path: ':id', path: ':id',
component: () => import('src/pages/Entry/Card/EntryCard.vue'), component: () => import('src/pages/Entry/Card/EntryCard.vue'),
redirect: { name: 'EntrySummary' }, redirect: { name: 'EntrySummary' },
meta: {
menu: [
'EntryBasicData',
'EntryBuys',
'EntryNotes',
'EntryDms',
'EntryLog',
],
},
children: [ children: [
{ {
name: 'EntrySummary',
path: 'summary', path: 'summary',
name: 'EntrySummary',
meta: { meta: {
title: 'summary', title: 'summary',
icon: 'launch', icon: 'launch',
@ -150,6 +75,96 @@ export default {
component: () => import('src/pages/Entry/Card/EntryLog.vue'), component: () => import('src/pages/Entry/Card/EntryLog.vue'),
}, },
], ],
};
export default {
name: 'Entry',
path: '/entry',
meta: {
title: 'entries',
icon: 'vn:entry',
moduleName: 'Entry',
keyBinding: 'e',
menu: [
'EntryList',
'MyEntries',
'EntryLatestBuys',
'EntryStockBought',
'EntryWasteRecalc',
]
},
component: RouterView,
redirect: { name: 'EntryMain' },
children: [
{
name: 'EntryMain',
path: '',
component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'EntryIndexMain' },
children: [
{
path:'',
name: 'EntryIndexMain',
redirect: { name: 'EntryList' },
component: () => import('src/pages/Entry/EntryList.vue'),
children: [
{
name: 'EntryList',
path: 'list',
meta: {
title: 'list',
icon: 'view_list',
},
},
entryCard,
],
},
{
path: 'create',
name: 'EntryCreate',
meta: {
title: 'entryCreate',
icon: 'add',
},
component: () => import('src/pages/Entry/EntryCreate.vue'),
},
{
path: 'my',
name: 'MyEntries',
meta: {
title: 'labeler',
icon: 'sell',
},
component: () => import('src/pages/Entry/MyEntries.vue'),
},
{
path: 'latest-buys',
name: 'EntryLatestBuys',
meta: {
title: 'latestBuys',
icon: 'contact_support',
},
component: () => import('src/pages/Entry/EntryLatestBuys.vue'),
},
{
path: 'stock-Bought',
name: 'EntryStockBought',
meta: {
title: 'reserves',
icon: 'deployed_code_history',
},
component: () => import('src/pages/Entry/EntryStockBought.vue'),
},
{
path: 'waste-recalc',
name: 'EntryWasteRecalc',
meta: {
title: 'wasteRecalc',
icon: 'compost',
},
component: () => import('src/pages/Entry/EntryWasteRecalc.vue'),
},
],
}, },
], ],
}; };