Merge branch 'dev' into 8316-invoiceOutCardWithVnCardBeta
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
508b6f226d
|
@ -0,0 +1,63 @@
|
|||
import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest';
|
||||
import { createWrapper } from 'app/test/vitest/helper';
|
||||
import VnInputTime from 'components/common/VnInputTime.vue';
|
||||
|
||||
describe('VnInputTime', () => {
|
||||
let wrapper;
|
||||
let vm;
|
||||
|
||||
beforeAll(() => {
|
||||
wrapper = createWrapper(VnInputTime, {
|
||||
props: {
|
||||
isOutlined: true,
|
||||
timeOnly: false,
|
||||
},
|
||||
});
|
||||
vm = wrapper.vm;
|
||||
wrapper = wrapper.wrapper;
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
vi.clearAllMocks();
|
||||
});
|
||||
|
||||
it('should return the correct data if isOutlined is true', () => {
|
||||
expect(vm.isOutlined).toBe(true);
|
||||
expect(vm.styleAttrs).toEqual({ dense: true, outlined: true, rounded: true });
|
||||
});
|
||||
|
||||
it('should return the formatted data', () => {
|
||||
expect(vm.dateToTime('2022-01-01T03:23:43')).toBe('03:23');
|
||||
});
|
||||
|
||||
describe('formattedTime', () => {
|
||||
it('should return the formatted time for a valid ISO date', () => {
|
||||
vm.model = '2025-01-02T15:45:00';
|
||||
expect(vm.formattedTime).toBe('15:45');
|
||||
});
|
||||
|
||||
it('should handle null model value gracefully', () => {
|
||||
vm.model = null;
|
||||
expect(vm.formattedTime).toBe(null);
|
||||
});
|
||||
|
||||
it('should handle time-only input correctly', async () => {
|
||||
await wrapper.setProps({ timeOnly: true });
|
||||
vm.formattedTime = '14:30';
|
||||
expect(vm.model).toBe('14:30');
|
||||
});
|
||||
|
||||
it('should pad short time values correctly', async () => {
|
||||
await wrapper.setProps({ timeOnly: true });
|
||||
vm.formattedTime = '9';
|
||||
expect(vm.model).toBe('09:00');
|
||||
});
|
||||
|
||||
it('should not update the model if the value is unchanged', () => {
|
||||
vm.model = '14:30';
|
||||
const previousModel = vm.model;
|
||||
vm.formattedTime = '14:30';
|
||||
expect(vm.model).toBe(previousModel);
|
||||
});
|
||||
});
|
||||
});
|
|
@ -1,32 +1,42 @@
|
|||
<template>
|
||||
<div class="header bg-primary q-pa-sm q-mb-md">
|
||||
<QSkeleton type="rect" square />
|
||||
<QSkeleton type="rect" square />
|
||||
</div>
|
||||
<div class="row q-pa-md q-col-gutter-md q-mb-md">
|
||||
<div class="col">
|
||||
<QSkeleton type="rect" class="q-mb-md" square />
|
||||
<QSkeleton type="text" square />
|
||||
<QSkeleton type="text" square />
|
||||
<QSkeleton type="text" square />
|
||||
<QSkeleton type="text" square />
|
||||
<QSkeleton type="text" square />
|
||||
</div>
|
||||
<div class="col">
|
||||
<QSkeleton type="rect" class="q-mb-md" square />
|
||||
<QSkeleton type="text" square />
|
||||
<QSkeleton type="text" square />
|
||||
<QSkeleton type="text" square />
|
||||
<QSkeleton type="text" square />
|
||||
<QSkeleton type="text" square />
|
||||
</div>
|
||||
<div class="col">
|
||||
<QSkeleton type="rect" class="q-mb-md" square />
|
||||
<QSkeleton type="text" square />
|
||||
<QSkeleton type="text" square />
|
||||
<QSkeleton type="text" square />
|
||||
<QSkeleton type="text" square />
|
||||
<QSkeleton type="text" square />
|
||||
</div>
|
||||
<div class="col">
|
||||
<QSkeleton type="rect" class="q-mb-md" square />
|
||||
<QSkeleton type="text" square />
|
||||
<QSkeleton type="text" square />
|
||||
<QSkeleton type="text" square />
|
||||
<QSkeleton type="text" square />
|
||||
<QSkeleton type="text" square />
|
||||
</div>
|
||||
<div class="col">
|
||||
<QSkeleton type="rect" class="q-mb-md" square />
|
||||
<QSkeleton type="text" square />
|
||||
<QSkeleton type="text" square />
|
||||
|
@ -34,6 +44,7 @@
|
|||
<QSkeleton type="text" square />
|
||||
<QSkeleton type="text" square />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -394,80 +394,6 @@ cau:
|
|||
subtitle: By sending this ticket, all the data related to the error, the section, the user, etc., are already sent.
|
||||
inputLabel: Explain why this error should not appear
|
||||
askPrivileges: Ask for privileges
|
||||
entry:
|
||||
list:
|
||||
newEntry: New entry
|
||||
tableVisibleColumns:
|
||||
created: Creation
|
||||
supplierFk: Supplier
|
||||
isBooked: Booked
|
||||
isConfirmed: Confirmed
|
||||
isOrdered: Ordered
|
||||
companyFk: Company
|
||||
travelFk: Travel
|
||||
isExcludedFromAvailable: Inventory
|
||||
invoiceAmount: Import
|
||||
summary:
|
||||
commission: Commission
|
||||
currency: Currency
|
||||
invoiceNumber: Invoice number
|
||||
ordered: Ordered
|
||||
booked: Booked
|
||||
excludedFromAvailable: Inventory
|
||||
travelReference: Reference
|
||||
travelAgency: Agency
|
||||
travelShipped: Shipped
|
||||
travelDelivered: Delivered
|
||||
travelLanded: Landed
|
||||
travelReceived: Received
|
||||
buys: Buys
|
||||
stickers: Stickers
|
||||
package: Package
|
||||
packing: Pack.
|
||||
grouping: Group.
|
||||
buyingValue: Buying value
|
||||
import: Import
|
||||
pvp: PVP
|
||||
basicData:
|
||||
travel: Travel
|
||||
currency: Currency
|
||||
commission: Commission
|
||||
observation: Observation
|
||||
booked: Booked
|
||||
excludedFromAvailable: Inventory
|
||||
buys:
|
||||
observations: Observations
|
||||
packagingFk: Box
|
||||
color: Color
|
||||
printedStickers: Printed stickers
|
||||
notes:
|
||||
observationType: Observation type
|
||||
latestBuys:
|
||||
tableVisibleColumns:
|
||||
image: Picture
|
||||
itemFk: Item ID
|
||||
weightByPiece: Weight/Piece
|
||||
isActive: Active
|
||||
family: Family
|
||||
entryFk: Entry
|
||||
freightValue: Freight value
|
||||
comissionValue: Commission value
|
||||
packageValue: Package value
|
||||
isIgnored: Is ignored
|
||||
price2: Grouping
|
||||
price3: Packing
|
||||
minPrice: Min
|
||||
ektFk: Ekt
|
||||
packingOut: Package out
|
||||
landing: Landing
|
||||
isExcludedFromAvailable: Es inventory
|
||||
params:
|
||||
toShipped: To
|
||||
fromShipped: From
|
||||
warehouseiNFk: Warehouse
|
||||
daysOnward: Days onward
|
||||
daysAgo: Days ago
|
||||
warehouseInFk: Warehouse in
|
||||
ticket:
|
||||
params:
|
||||
ticketFk: Ticket ID
|
||||
|
@ -874,7 +800,10 @@ components:
|
|||
hasMinPrice: Minimum price
|
||||
# LatestBuysFilter
|
||||
salesPersonFk: Buyer
|
||||
supplierFk: Supplier
|
||||
from: From
|
||||
to: To
|
||||
visible: Is visible
|
||||
active: Is active
|
||||
floramondo: Is floramondo
|
||||
showBadDates: Show future items
|
||||
|
|
|
@ -390,80 +390,6 @@ cau:
|
|||
subtitle: Al enviar este cau ya se envían todos los datos relacionados con el error, la sección, el usuario, etc
|
||||
inputLabel: Explique el motivo por el que no deberia aparecer este fallo
|
||||
askPrivileges: Solicitar permisos
|
||||
entry:
|
||||
list:
|
||||
newEntry: Nueva entrada
|
||||
tableVisibleColumns:
|
||||
created: Creación
|
||||
supplierFk: Proveedor
|
||||
isBooked: Asentado
|
||||
isConfirmed: Confirmado
|
||||
isOrdered: Pedida
|
||||
companyFk: Empresa
|
||||
travelFk: Envio
|
||||
isExcludedFromAvailable: Inventario
|
||||
invoiceAmount: Importe
|
||||
summary:
|
||||
commission: Comisión
|
||||
currency: Moneda
|
||||
invoiceNumber: Núm. factura
|
||||
ordered: Pedida
|
||||
booked: Contabilizada
|
||||
excludedFromAvailable: Inventario
|
||||
travelReference: Referencia
|
||||
travelAgency: Agencia
|
||||
travelShipped: F. envio
|
||||
travelWarehouseOut: Alm. salida
|
||||
travelDelivered: Enviada
|
||||
travelLanded: F. entrega
|
||||
travelReceived: Recibida
|
||||
buys: Compras
|
||||
stickers: Etiquetas
|
||||
package: Embalaje
|
||||
packing: Pack.
|
||||
grouping: Group.
|
||||
buyingValue: Coste
|
||||
import: Importe
|
||||
pvp: PVP
|
||||
basicData:
|
||||
travel: Envío
|
||||
currency: Moneda
|
||||
observation: Observación
|
||||
commission: Comisión
|
||||
booked: Asentado
|
||||
excludedFromAvailable: Inventario
|
||||
buys:
|
||||
observations: Observaciónes
|
||||
packagingFk: Embalaje
|
||||
color: Color
|
||||
printedStickers: Etiquetas impresas
|
||||
notes:
|
||||
observationType: Tipo de observación
|
||||
latestBuys:
|
||||
tableVisibleColumns:
|
||||
image: Foto
|
||||
itemFk: Id Artículo
|
||||
weightByPiece: Peso (gramos)/tallo
|
||||
isActive: Activo
|
||||
family: Familia
|
||||
entryFk: Entrada
|
||||
freightValue: Porte
|
||||
comissionValue: Comisión
|
||||
packageValue: Embalaje
|
||||
isIgnored: Ignorado
|
||||
price2: Grouping
|
||||
price3: Packing
|
||||
minPrice: Min
|
||||
ektFk: Ekt
|
||||
packingOut: Embalaje envíos
|
||||
landing: Llegada
|
||||
isExcludedFromAvailable: Es inventario
|
||||
params:
|
||||
toShipped: Hasta
|
||||
fromShipped: Desde
|
||||
warehouseInFk: Alm. entrada
|
||||
daysOnward: Días adelante
|
||||
daysAgo: Días atras
|
||||
ticket:
|
||||
params:
|
||||
ticketFk: ID de ticket
|
||||
|
@ -849,7 +775,11 @@ components:
|
|||
wareHouseFk: Almacén
|
||||
# LatestBuysFilter
|
||||
salesPersonFk: Comprador
|
||||
supplierFk: Proveedor
|
||||
visible: Visible
|
||||
active: Activo
|
||||
from: Desde
|
||||
to: Hasta
|
||||
floramondo: Floramondo
|
||||
showBadDates: Ver items a futuro
|
||||
userPanel:
|
||||
|
|
|
@ -11,6 +11,7 @@ import VnInput from 'src/components/common/VnInput.vue';
|
|||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
|
||||
import CustomerNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCustomsAgent.vue';
|
||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
@ -150,6 +151,22 @@ function onAgentCreated({ id, fiscalName }, data) {
|
|||
</template>
|
||||
</VnSelectDialog>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnInputNumber
|
||||
:label="t('Longitude')"
|
||||
clearable
|
||||
v-model="data.longitude"
|
||||
:decimal-places="7"
|
||||
:positive="false"
|
||||
/>
|
||||
<VnInputNumber
|
||||
:label="t('Latitude')"
|
||||
clearable
|
||||
v-model="data.latitude"
|
||||
:decimal-places="7"
|
||||
:positive="false"
|
||||
/>
|
||||
</VnRow>
|
||||
</template>
|
||||
</FormModel>
|
||||
</template>
|
||||
|
@ -175,4 +192,6 @@ es:
|
|||
Mobile: Movíl
|
||||
Incoterms: Incoterms
|
||||
Customs agent: Agente de aduanas
|
||||
Longitude: Longitud
|
||||
Latitude: Latitud
|
||||
</i18n>
|
||||
|
|
|
@ -1,21 +1,13 @@
|
|||
<script setup>
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
||||
import EntryDescriptor from './EntryDescriptor.vue';
|
||||
import EntryFilter from '../EntryFilter.vue';
|
||||
import filter from './EntryFilter.js';
|
||||
import filter from './EntryFilter.js'
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
<VnCardBeta
|
||||
data-key="Entry"
|
||||
base-url="Entries"
|
||||
:filter="filter"
|
||||
:descriptor="EntryDescriptor"
|
||||
:filter-panel="EntryFilter"
|
||||
search-data-key="EntryList"
|
||||
:searchbar-props="{
|
||||
url: 'Entries/filter',
|
||||
label: 'Search entries',
|
||||
info: 'You can search by entry reference',
|
||||
}"
|
||||
:user-filter="filter"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -40,7 +40,7 @@ const companiesOptions = ref([]);
|
|||
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||
<strong>{{ t(`entryFilter.params.${tag.label}`) }}: </strong>
|
||||
<span>{{ formatFn(tag.value) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -49,7 +49,7 @@ const companiesOptions = ref([]);
|
|||
<QItemSection>
|
||||
<VnInput
|
||||
v-model="params.search"
|
||||
:label="t('entryFilter.filter.search')"
|
||||
:label="t('entryFilter.params.search')"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
|
@ -58,7 +58,7 @@ const companiesOptions = ref([]);
|
|||
<QItemSection>
|
||||
<VnInput
|
||||
v-model="params.reference"
|
||||
:label="t('entryFilter.filter.reference')"
|
||||
:label="t('entryFilter.params.reference')"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
|
@ -67,7 +67,7 @@ const companiesOptions = ref([]);
|
|||
<QItemSection>
|
||||
<VnInput
|
||||
v-model="params.invoiceNumber"
|
||||
:label="t('params.invoiceNumber')"
|
||||
:label="t('entryFilter.params.invoiceNumber')"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
|
@ -76,7 +76,7 @@ const companiesOptions = ref([]);
|
|||
<QItemSection>
|
||||
<VnInput
|
||||
v-model="params.travelFk"
|
||||
:label="t('params.travelFk')"
|
||||
:label="t('entryFilter.params.travelFk')"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
|
@ -84,7 +84,7 @@ const companiesOptions = ref([]);
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
:label="t('params.companyFk')"
|
||||
:label="t('entryFilter.params.companyFk')"
|
||||
v-model="params.companyFk"
|
||||
@update:model-value="searchFn()"
|
||||
:options="companiesOptions"
|
||||
|
@ -100,7 +100,7 @@ const companiesOptions = ref([]);
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
:label="t('params.currencyFk')"
|
||||
:label="t('entryFilter.params.currencyFk')"
|
||||
v-model="params.currencyFk"
|
||||
@update:model-value="searchFn()"
|
||||
:options="currenciesOptions"
|
||||
|
@ -116,7 +116,7 @@ const companiesOptions = ref([]);
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
:label="t('params.supplierFk')"
|
||||
:label="t('entryFilter.params.supplierFk')"
|
||||
v-model="params.supplierFk"
|
||||
@update:model-value="searchFn()"
|
||||
url="Suppliers"
|
||||
|
@ -148,7 +148,7 @@ const companiesOptions = ref([]);
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInputDate
|
||||
:label="t('params.created')"
|
||||
:label="t('entryFilter.params.created')"
|
||||
v-model="params.created"
|
||||
@update:model-value="searchFn()"
|
||||
is-outlined
|
||||
|
@ -158,7 +158,7 @@ const companiesOptions = ref([]);
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInputDate
|
||||
:label="t('params.from')"
|
||||
:label="t('entryFilter.params.from')"
|
||||
v-model="params.from"
|
||||
@update:model-value="searchFn()"
|
||||
is-outlined
|
||||
|
@ -168,7 +168,7 @@ const companiesOptions = ref([]);
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInputDate
|
||||
:label="t('params.to')"
|
||||
:label="t('entryFilter.params.to')"
|
||||
v-model="params.to"
|
||||
@update:model-value="searchFn()"
|
||||
is-outlined
|
||||
|
@ -178,14 +178,14 @@ const companiesOptions = ref([]);
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<QCheckbox
|
||||
:label="t('params.isBooked')"
|
||||
:label="t('entryFilter.params.isBooked')"
|
||||
v-model="params.isBooked"
|
||||
toggle-indeterminate
|
||||
/>
|
||||
</QItemSection>
|
||||
<QItemSection>
|
||||
<QCheckbox
|
||||
:label="t('params.isConfirmed')"
|
||||
:label="t('entryFilter.params.isConfirmed')"
|
||||
v-model="params.isConfirmed"
|
||||
toggle-indeterminate
|
||||
/>
|
||||
|
@ -194,7 +194,7 @@ const companiesOptions = ref([]);
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<QCheckbox
|
||||
:label="t('params.isOrdered')"
|
||||
:label="t('entryFilter.params.isOrdered')"
|
||||
v-model="params.isOrdered"
|
||||
toggle-indeterminate
|
||||
/>
|
||||
|
@ -203,34 +203,3 @@ const companiesOptions = ref([]);
|
|||
</template>
|
||||
</VnFilterPanel>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
en:
|
||||
params:
|
||||
|
||||
invoiceNumber: Invoice number
|
||||
travelFk: Travel
|
||||
companyFk: Company
|
||||
currencyFk: Currency
|
||||
supplierFk: Supplier
|
||||
from: From
|
||||
to: To
|
||||
created: Created
|
||||
isBooked: Booked
|
||||
isConfirmed: Confirmed
|
||||
isOrdered: Ordered
|
||||
es:
|
||||
params:
|
||||
|
||||
invoiceNumber: Núm. factura
|
||||
travelFk: Envío
|
||||
companyFk: Empresa
|
||||
currencyFk: Moneda
|
||||
supplierFk: Proveedor
|
||||
from: Desde
|
||||
to: Hasta
|
||||
created: Fecha creación
|
||||
isBooked: Asentado
|
||||
isConfirmed: Confirmado
|
||||
isOrdered: Pedida
|
||||
</i18n>
|
||||
|
|
|
@ -102,7 +102,7 @@ const columns = [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('globals.weightByPiece'),
|
||||
label: t('entry.latestBuys.tableVisibleColumns.weightByPiece'),
|
||||
name: 'weightByPiece',
|
||||
columnFilter: {
|
||||
component: 'number',
|
||||
|
@ -157,7 +157,7 @@ const columns = [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('entry.buys.packageValue'),
|
||||
label: t('entry.latestBuys.tableVisibleColumns.packageValue'),
|
||||
name: 'packageValue',
|
||||
columnFilter: {
|
||||
component: 'number',
|
||||
|
@ -262,8 +262,3 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
|||
:right-search="false"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Edit buy(s): Editar compra(s)
|
||||
</i18n>
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
import { ref, computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import EntryFilter from './EntryFilter.vue';
|
||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import { toDate } from 'src/filters';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import EntrySummary from './Card/EntrySummary.vue';
|
||||
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||
import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const tableRef = ref();
|
||||
const dataKey = 'EntryList';
|
||||
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const entryFilter = {
|
||||
|
@ -178,30 +178,32 @@ const columns = computed(() => [
|
|||
},
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnSearchbar
|
||||
data-key="EntryList"
|
||||
<VnSection
|
||||
:data-key="dataKey"
|
||||
:columns="columns"
|
||||
prefix="entry"
|
||||
url="Entries/filter"
|
||||
:label="t('Search entries')"
|
||||
:info="t('You can search by entry reference')"
|
||||
/>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
:array-data-props="{
|
||||
url: 'Entries/filter',
|
||||
order: 'id DESC',
|
||||
userFilter: 'entryFilter',
|
||||
}"
|
||||
>
|
||||
<template #rightMenu>
|
||||
<EntryFilter data-key="EntryList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<template #body>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="EntryList"
|
||||
url="Entries/filter"
|
||||
:filter="entryFilter"
|
||||
:data-key="dataKey"
|
||||
:create="{
|
||||
urlCreate: 'Entries',
|
||||
title: t('Create entry'),
|
||||
title: t('entry.list.newEntry'),
|
||||
onDataSaved: ({ id }) => tableRef.redirect(id),
|
||||
formInitialData: {},
|
||||
}"
|
||||
order="id DESC"
|
||||
:columns="columns"
|
||||
redirect="entry"
|
||||
:right-search="false"
|
||||
|
@ -214,13 +216,17 @@ const columns = computed(() => [
|
|||
color="primary"
|
||||
>
|
||||
<QTooltip>{{
|
||||
t('entry.list.tableVisibleColumns.isExcludedFromAvailable')
|
||||
t(
|
||||
'entry.list.tableVisibleColumns.isExcludedFromAvailable'
|
||||
)
|
||||
}}</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon v-if="!!row.isRaid" name="vn:net" color="primary">
|
||||
<QTooltip>
|
||||
{{
|
||||
t('globals.raid', { daysInForward: row.daysInForward })
|
||||
t('globals.raid', {
|
||||
daysInForward: row.daysInForward,
|
||||
})
|
||||
}}</QTooltip
|
||||
>
|
||||
</QIcon>
|
||||
|
@ -239,12 +245,6 @@ const columns = computed(() => [
|
|||
</span>
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Virtual entry: Es una redada
|
||||
Search entries: Buscar entradas
|
||||
You can search by entry reference: Puedes buscar por referencia de la entrada
|
||||
Create entry: Crear entrada
|
||||
</i18n>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { ref, computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useState } from 'src/composables/useState';
|
||||
import { useQuasar } from 'quasar';
|
||||
|
@ -19,7 +19,7 @@ const { t } = useI18n();
|
|||
const quasar = useQuasar();
|
||||
const state = useState();
|
||||
const user = state.getUser();
|
||||
const columns = [
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
label: 'Id',
|
||||
|
@ -31,7 +31,7 @@ const columns = [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'workerFk',
|
||||
label: t('Buyer'),
|
||||
label: t('entryStockBought.buyer'),
|
||||
isTitle: true,
|
||||
component: 'select',
|
||||
cardVisible: true,
|
||||
|
@ -49,7 +49,7 @@ const columns = [
|
|||
},
|
||||
{
|
||||
align: 'center',
|
||||
label: t('Reserve'),
|
||||
label: t('entryStockBought.reserve'),
|
||||
name: 'reserve',
|
||||
columnFilter: false,
|
||||
create: true,
|
||||
|
@ -58,7 +58,7 @@ const columns = [
|
|||
},
|
||||
{
|
||||
align: 'center',
|
||||
label: t('Bought'),
|
||||
label: t('entryStockBought.bought'),
|
||||
name: 'bought',
|
||||
summation: true,
|
||||
cardVisible: true,
|
||||
|
@ -66,7 +66,7 @@ const columns = [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('Date'),
|
||||
label: t('entryStockBought.date'),
|
||||
name: 'dated',
|
||||
component: 'date',
|
||||
visible: false,
|
||||
|
@ -77,7 +77,7 @@ const columns = [
|
|||
name: 'tableActions',
|
||||
actions: [
|
||||
{
|
||||
title: t('View more details'),
|
||||
title: t('entryStockBought.viewMoreDetails'),
|
||||
icon: 'search',
|
||||
isPrimary: true,
|
||||
action: (row) => {
|
||||
|
@ -92,7 +92,7 @@ const columns = [
|
|||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
]);
|
||||
|
||||
const fetchDataRef = ref();
|
||||
const travelDialogRef = ref(false);
|
||||
|
@ -166,7 +166,7 @@ function round(value) {
|
|||
<VnRow class="travel">
|
||||
<div v-if="travel">
|
||||
<span style="color: var(--vn-label-color)">
|
||||
{{ t('Purchase Spaces') }}:
|
||||
{{ t('entryStockBought.purchaseSpaces') }}:
|
||||
</span>
|
||||
<span>
|
||||
{{ travel?.m3 }}
|
||||
|
@ -177,7 +177,7 @@ function round(value) {
|
|||
flat
|
||||
icon="edit"
|
||||
@click="openDialog()"
|
||||
:title="t('Edit travel')"
|
||||
:title="t('entryStockBought.editTravel')"
|
||||
color="primary"
|
||||
/>
|
||||
</div>
|
||||
|
@ -226,7 +226,7 @@ function round(value) {
|
|||
@on-fetch="(data) => setFooter(data)"
|
||||
:create="{
|
||||
urlCreate: 'StockBoughts',
|
||||
title: t('Reserve some space'),
|
||||
title: t('entryStockBought.reserveSomeSpace'),
|
||||
onDataSaved: () => tableRef.reload(),
|
||||
formInitialData: {
|
||||
workerFk: user.id,
|
||||
|
@ -288,16 +288,3 @@ function round(value) {
|
|||
color: $negative !important;
|
||||
}
|
||||
</style>
|
||||
<i18n>
|
||||
es:
|
||||
Edit travel: Editar envío
|
||||
Travel: Envíos
|
||||
Purchase Spaces: Espacios de compra
|
||||
Buyer: Comprador
|
||||
Reserve: Reservado
|
||||
Bought: Comprado
|
||||
Date: Fecha
|
||||
View more details: Ver más detalles
|
||||
Reserve some space: Reservar espacio
|
||||
This buyer has already made a reservation for this date: Este comprador ya ha hecho una reserva para esta fecha
|
||||
</i18n>
|
||||
|
|
|
@ -123,8 +123,8 @@ const printBuys = (rowId) => {
|
|||
<VnSearchbar
|
||||
data-key="myEntriesList"
|
||||
url="Entries/filter"
|
||||
:label="t('Search entries')"
|
||||
:info="t('You can search by entry reference')"
|
||||
:label="t('myEntries.search')"
|
||||
:info="t('myEntries.searchInfo')"
|
||||
/>
|
||||
<VnTable
|
||||
data-key="myEntriesList"
|
||||
|
@ -137,7 +137,3 @@ const printBuys = (rowId) => {
|
|||
chip-locale="myEntries"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
You can search by entry reference: Puedes buscar por referencia de la entrada
|
||||
</i18n>
|
||||
|
|
|
@ -1,9 +1,92 @@
|
|||
entryList:
|
||||
entry:
|
||||
list:
|
||||
newEntry: New entry
|
||||
tableVisibleColumns:
|
||||
created: Creation
|
||||
supplierFk: Supplier
|
||||
isBooked: Booked
|
||||
isConfirmed: Confirmed
|
||||
isOrdered: Ordered
|
||||
companyFk: Company
|
||||
travelFk: Travel
|
||||
isExcludedFromAvailable: Inventory
|
||||
invoiceAmount: Import
|
||||
inventoryEntry: Inventory entry
|
||||
showEntryReport: Show entry report
|
||||
summary:
|
||||
commission: Commission
|
||||
currency: Currency
|
||||
invoiceNumber: Invoice number
|
||||
ordered: Ordered
|
||||
booked: Booked
|
||||
excludedFromAvailable: Inventory
|
||||
travelReference: Reference
|
||||
travelAgency: Agency
|
||||
travelShipped: Shipped
|
||||
travelDelivered: Delivered
|
||||
travelLanded: Landed
|
||||
travelReceived: Received
|
||||
buys: Buys
|
||||
stickers: Stickers
|
||||
package: Package
|
||||
packing: Pack.
|
||||
grouping: Group.
|
||||
buyingValue: Buying value
|
||||
import: Import
|
||||
pvp: PVP
|
||||
basicData:
|
||||
travel: Travel
|
||||
currency: Currency
|
||||
commission: Commission
|
||||
observation: Observation
|
||||
booked: Booked
|
||||
excludedFromAvailable: Inventory
|
||||
buys:
|
||||
observations: Observations
|
||||
packagingFk: Box
|
||||
color: Color
|
||||
printedStickers: Printed stickers
|
||||
notes:
|
||||
observationType: Observation type
|
||||
latestBuys:
|
||||
tableVisibleColumns:
|
||||
image: Picture
|
||||
itemFk: Item ID
|
||||
weightByPiece: Weight/Piece
|
||||
isActive: Active
|
||||
family: Family
|
||||
entryFk: Entry
|
||||
freightValue: Freight value
|
||||
comissionValue: Commission value
|
||||
packageValue: Package value
|
||||
isIgnored: Is ignored
|
||||
price2: Grouping
|
||||
price3: Packing
|
||||
minPrice: Min
|
||||
ektFk: Ekt
|
||||
packingOut: Package out
|
||||
landing: Landing
|
||||
isExcludedFromAvailable: Es inventory
|
||||
params:
|
||||
toShipped: To
|
||||
fromShipped: From
|
||||
daysOnward: Days onward
|
||||
daysAgo: Days ago
|
||||
warehouseInFk: Warehouse in
|
||||
search: Search entries
|
||||
searchInfo: You can search by entry reference
|
||||
entryFilter:
|
||||
filter:
|
||||
params:
|
||||
invoiceNumber: Invoice number
|
||||
travelFk: Travel
|
||||
companyFk: Company
|
||||
currencyFk: Currency
|
||||
supplierFk: Supplier
|
||||
from: From
|
||||
to: To
|
||||
created: Created
|
||||
isBooked: Booked
|
||||
isConfirmed: Confirmed
|
||||
isOrdered: Ordered
|
||||
search: General search
|
||||
reference: Reference
|
||||
myEntries:
|
||||
|
@ -19,5 +102,18 @@ myEntries:
|
|||
daysOnward: Days onward
|
||||
daysAgo: Days ago
|
||||
downloadCsv: Download CSV
|
||||
search: Search entries
|
||||
searchInfo: You can search by entry reference
|
||||
entryStockBought:
|
||||
travel: Travel
|
||||
editTravel: Edit travel
|
||||
purchaseSpaces: Purchase spaces
|
||||
buyer: Buyer
|
||||
reserve: Reserve
|
||||
bought: Bought
|
||||
date: Date
|
||||
viewMoreDetails: View more details
|
||||
reserveSomeSpace: Reserve some space
|
||||
thisBuyerHasReservationThisDate: This buyer has already made a reservation for this date
|
||||
wasteRecalc:
|
||||
recalcOk: The wastes were successfully recalculated
|
||||
|
|
|
@ -1,12 +1,93 @@
|
|||
Search entries: Buscar entradas
|
||||
You can search by entry reference: Puedes buscar por referencia de la entrada
|
||||
|
||||
entryList:
|
||||
entry:
|
||||
list:
|
||||
newEntry: Nueva entrada
|
||||
tableVisibleColumns:
|
||||
created: Creación
|
||||
supplierFk: Proveedor
|
||||
isBooked: Asentado
|
||||
isConfirmed: Confirmado
|
||||
isOrdered: Pedida
|
||||
companyFk: Empresa
|
||||
travelFk: Envio
|
||||
isExcludedFromAvailable: Inventario
|
||||
invoiceAmount: Importe
|
||||
inventoryEntry: Es inventario
|
||||
showEntryReport: Ver informe del pedido
|
||||
summary:
|
||||
commission: Comisión
|
||||
currency: Moneda
|
||||
invoiceNumber: Núm. factura
|
||||
ordered: Pedida
|
||||
booked: Contabilizada
|
||||
excludedFromAvailable: Inventario
|
||||
travelReference: Referencia
|
||||
travelAgency: Agencia
|
||||
travelShipped: F. envio
|
||||
travelWarehouseOut: Alm. salida
|
||||
travelDelivered: Enviada
|
||||
travelLanded: F. entrega
|
||||
travelReceived: Recibida
|
||||
buys: Compras
|
||||
stickers: Etiquetas
|
||||
package: Embalaje
|
||||
packing: Pack.
|
||||
grouping: Group.
|
||||
buyingValue: Coste
|
||||
import: Importe
|
||||
pvp: PVP
|
||||
basicData:
|
||||
travel: Envío
|
||||
currency: Moneda
|
||||
observation: Observación
|
||||
commission: Comisión
|
||||
booked: Asentado
|
||||
excludedFromAvailable: Inventario
|
||||
buys:
|
||||
observations: Observaciónes
|
||||
packagingFk: Embalaje
|
||||
color: Color
|
||||
printedStickers: Etiquetas impresas
|
||||
notes:
|
||||
observationType: Tipo de observación
|
||||
latestBuys:
|
||||
tableVisibleColumns:
|
||||
image: Foto
|
||||
itemFk: Id Artículo
|
||||
weightByPiece: Peso (gramos)/tallo
|
||||
isActive: Activo
|
||||
family: Familia
|
||||
entryFk: Entrada
|
||||
freightValue: Porte
|
||||
comissionValue: Comisión
|
||||
packageValue: Embalaje
|
||||
isIgnored: Ignorado
|
||||
price2: Grouping
|
||||
price3: Packing
|
||||
minPrice: Min
|
||||
ektFk: Ekt
|
||||
packingOut: Embalaje envíos
|
||||
landing: Llegada
|
||||
isExcludedFromAvailable: Es inventario
|
||||
params:
|
||||
toShipped: Hasta
|
||||
fromShipped: Desde
|
||||
warehouseInFk: Alm. entrada
|
||||
daysOnward: Días adelante
|
||||
daysAgo: Días atras
|
||||
search: Buscar entradas
|
||||
searchInfo: Puedes buscar por referencia de entrada
|
||||
entryFilter:
|
||||
filter:
|
||||
params:
|
||||
invoiceNumber: Núm. factura
|
||||
travelFk: Envío
|
||||
companyFk: Empresa
|
||||
currencyFk: Moneda
|
||||
supplierFk: Proveedor
|
||||
from: Desde
|
||||
to: Hasta
|
||||
created: Fecha creación
|
||||
isBooked: Asentado
|
||||
isConfirmed: Confirmado
|
||||
isOrdered: Pedida
|
||||
search: Búsqueda general
|
||||
reference: Referencia
|
||||
myEntries:
|
||||
|
@ -22,5 +103,18 @@ myEntries:
|
|||
daysOnward: Días adelante
|
||||
daysAgo: Días atras
|
||||
downloadCsv: Descargar CSV
|
||||
search: Buscar entradas
|
||||
searchInfo: Puedes buscar por referencia de la entrada
|
||||
entryStockBought:
|
||||
travel: Envío
|
||||
editTravel: Editar envío
|
||||
purchaseSpaces: Espacios de compra
|
||||
buyer: Comprador
|
||||
reserve: Reservado
|
||||
bought: Comprado
|
||||
date: Fecha
|
||||
viewMoreDetails: Ver más detalles
|
||||
reserveSomeSpace: Reservar espacio
|
||||
thisBuyerHasReservationThisDate: Este comprador ya ha hecho una reserva para esta fecha
|
||||
wasteRecalc:
|
||||
recalcOk: Se han recalculado las mermas correctamente
|
||||
|
|
|
@ -208,6 +208,20 @@ async function remove(item) {
|
|||
async function handleConfirm() {
|
||||
const result = await confirm(route.params.id);
|
||||
if (result) {
|
||||
const sale = await axios.get(`OrderRows`, {
|
||||
params: {
|
||||
filter: JSON.stringify({
|
||||
where: { orderFk: route.params.id },
|
||||
}),
|
||||
},
|
||||
});
|
||||
const ticket = await axios.get(`Sales`, {
|
||||
params: {
|
||||
filter: JSON.stringify({
|
||||
where: { id: sale.data[0].saleFk },
|
||||
}),
|
||||
},
|
||||
});
|
||||
quasar.notify({
|
||||
message: t('globals.dataSaved'),
|
||||
type: 'positive',
|
||||
|
@ -215,7 +229,7 @@ async function handleConfirm() {
|
|||
router.push({
|
||||
name: 'TicketSale',
|
||||
query: {
|
||||
table: JSON.stringify({ id: route.params.id }),
|
||||
table: JSON.stringify({ id: ticket.data[0].ticketFk }),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,98 +1,23 @@
|
|||
import { RouterView } from 'vue-router';
|
||||
|
||||
export default {
|
||||
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'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
const entryCard = {
|
||||
name: 'EntryCard',
|
||||
path: ':id',
|
||||
component: () => import('src/pages/Entry/Card/EntryCard.vue'),
|
||||
redirect: { name: 'EntrySummary' },
|
||||
meta: {
|
||||
menu: [
|
||||
'EntryBasicData',
|
||||
'EntryBuys',
|
||||
'EntryNotes',
|
||||
'EntryDms',
|
||||
'EntryLog',
|
||||
],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'EntrySummary',
|
||||
path: 'summary',
|
||||
name: 'EntrySummary',
|
||||
meta: {
|
||||
title: 'summary',
|
||||
icon: 'launch',
|
||||
|
@ -150,6 +75,96 @@ export default {
|
|||
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'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
Loading…
Reference in New Issue