0
0
Fork 0

refs #6897 fix trad, latestBuys

This commit is contained in:
Carlos Satorres 2024-06-27 14:02:45 +02:00
parent 9e636c1ded
commit ed4517183e
4 changed files with 30 additions and 21 deletions

View File

@ -322,6 +322,14 @@ entry:
log: Log log: Log
entryCreate: New entry entryCreate: New entry
latestBuys: Latest buys latestBuys: Latest buys
tableVisibleColumns:
id: Id
reference: Reference
created: Creation
supplierFk: Supplier
isBooked: Booked
isConfirmed: Confirmed
isOrdered: Ordered
list: list:
newEntry: New entry newEntry: New entry
landed: Landed landed: Landed

View File

@ -329,6 +329,14 @@ entry:
booked: Asentado booked: Asentado
confirmed: Confirmado confirmed: Confirmado
ordered: Pedida ordered: Pedida
tableVisibleColumns:
id: Id
reference: Referencia
created: Creación
supplierFk: Proveedor
isBooked: Asentado
isConfirmed: Confirmado
isOrdered: Pedida
summary: summary:
commission: Comisión commission: Comisión
currency: Moneda currency: Moneda

View File

@ -639,21 +639,6 @@ onUnmounted(() => (stateStore.rightDrawer = false));
auto-load auto-load
@on-fetch="(data) => (intrastatOptions = data)" @on-fetch="(data) => (intrastatOptions = data)"
/> />
<VnSubToolbar>
<template #st-data>
<TableVisibleColumns
:all-columns="allColumnNames"
table-code="latestBuys"
labels-traductions-path="entry.latestBuys"
@on-config-saved="visibleColumns = ['picture', ...$event]"
/>
</template>
</VnSubToolbar>
<RightMenu>
<template #right-panel>
<EntryLatestBuysFilter data-key="EntryLatestBuys" />
</template>
</RightMenu>
<Teleport to="#actions-append"> <Teleport to="#actions-append">
<div class="row q-gutter-x-sm"> <div class="row q-gutter-x-sm">
<QBtn flat @click="stateStore.toggleRightDrawer()" round dense icon="menu"> <QBtn flat @click="stateStore.toggleRightDrawer()" round dense icon="menu">
@ -739,12 +724,12 @@ onUnmounted(() => (stateStore.rightDrawer = false));
</QTd> </QTd>
</template> </template>
</QTable> </QTable>
<QPageSticky v-if="rowsSelected.length > 0" :offset="[20, 20]"> <!-- <QPageSticky v-if="rowsSelected.length > 0" :offset="[20, 20]">
<QBtn @click="openEditTableCellDialog()" color="primary" fab icon="edit" /> <QBtn @click="openEditTableCellDialog()" color="primary" fab icon="edit" />
<QTooltip> <QTooltip>
{{ t('Edit buy(s)') }} {{ t('Edit buy(s)') }}
</QTooltip> </QTooltip>
</QPageSticky> </QPageSticky> -->
<QDialog ref="editTableCellDialogRef"> <QDialog ref="editTableCellDialogRef">
<EditTableCellValueForm <EditTableCellValueForm
edit-url="Buys/editLatestBuys" edit-url="Buys/editLatestBuys"

View File

@ -9,6 +9,7 @@ import { useStateStore } from 'stores/useStateStore';
import VnTable from 'components/VnTable/VnTable.vue'; import VnTable from 'components/VnTable/VnTable.vue';
import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import RightMenu from 'src/components/common/RightMenu.vue'; import RightMenu from 'src/components/common/RightMenu.vue';
import { toDate } from 'src/filters';
const stateStore = useStateStore(); const stateStore = useStateStore();
const router = useRouter(); const router = useRouter();
@ -45,6 +46,10 @@ const columns = computed(() => [
name: 'created', name: 'created',
create: true, create: true,
component: 'date', component: 'date',
columnField: {
component: null,
},
format: (row, dashIfEmpty) => dashIfEmpty(toDate(row.created)),
}, },
{ {
align: 'left', align: 'left',
@ -56,6 +61,10 @@ const columns = computed(() => [
url: 'suppliers', url: 'suppliers',
fields: ['id', 'name'], fields: ['id', 'name'],
}, },
columnField: {
component: null,
},
format: (row, dashIfEmpty) => dashIfEmpty(row.supplierName),
}, },
{ {
align: 'left', align: 'left',
@ -98,8 +107,8 @@ onMounted(async () => {
<VnTable <VnTable
ref="tableRef" ref="tableRef"
data-key="EntryList" data-key="EntryList"
:url="`Entries`" url="Entries/filter"
:url-create="`Entries`" url-create="Entries"
save-url="Entries/crud" save-url="Entries/crud"
:create="{ :create="{
urlCreate: 'Entries', urlCreate: 'Entries',
@ -111,11 +120,10 @@ onMounted(async () => {
}" }"
order="id DESC" order="id DESC"
:columns="columns" :columns="columns"
redirect="entry"
default-mode="table" default-mode="table"
auto-load auto-load
:right-search="false" :right-search="false"
:is-editable="true"
:use-model="true"
/> />
</template> </template>