Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into test
gitea/salix-front/pipeline/pr-dev This commit looks good Details
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2025-02-04 13:01:50 +01:00
commit a3177f126e
6 changed files with 10 additions and 11 deletions

View File

@ -75,6 +75,7 @@ const focus = () => {
defineExpose({
focus,
vnInputRef,
});
const mixinRules = [

View File

@ -119,7 +119,7 @@ watch(
() => props.data,
() => {
store.data = props.data;
}
},
);
watch(
@ -128,12 +128,12 @@ watch(
if (!mounted.value) return;
emit('onChange', data);
},
{ immediate: true }
{ immediate: true },
);
watch(
() => [props.url, props.filter],
([url, filter]) => mounted.value && fetch({ url, filter })
([url, filter]) => mounted.value && fetch({ url, filter }),
);
const addFilter = async (filter, params) => {
await arrayData.addFilter({ filter, params });
@ -194,7 +194,7 @@ function endPagination() {
async function onLoad(index, done) {
if (!store.data || !mounted.value) return done();
if (store.data.length === 0 || !props.url) return done(false);
if (store.data.length === 0 || !arrayData.store.url) return done(false);
pagination.value.page = pagination.value.page + 1;

View File

@ -125,7 +125,7 @@ onMounted(async () => {
inventoriedDate.value =
(await axios.get('Configs/findOne')).data?.inventoried || today;
if (query.warehouseFk) ref.warehouseFk = query.warehouseFk;
if (query.warehouseFk) ref.warehouseFk = +query.warehouseFk;
else if (!ref.warehouseFk && user.value) ref.warehouseFk = user.value.warehouseFk;
if (ref.date) showWhatsBeforeInventory.value = true;
ref.itemFk = route.params.id;
@ -143,7 +143,7 @@ onMounted(async () => {
const fetchItemBalances = async () => await arrayDataItemBalances.fetch({});
const getBadgeAttrs = (_date) => {
const isSameDate = date.isSameDate(today.value, _date);
const isSameDate = date.isSameDate(today, _date);
const attrs = {
'text-color': isSameDate ? 'black' : 'white',
color: isSameDate ? 'warning' : 'transparent',
@ -153,8 +153,6 @@ const getBadgeAttrs = (_date) => {
const scrollToToday = async () => {
await nextTick();
const today = Date.vnNew();
today.setHours(0, 0, 0, 0);
const todayCell = document.querySelector(`td[data-date="${today.toISOString()}"]`);
if (todayCell) {
todayCell.scrollIntoView({ behavior: 'smooth', block: 'center' });

View File

@ -272,11 +272,12 @@ const onDenyAccept = (_, responseData) => {
<template #column-achieved="{ row }">
<span>
<VnInput
ref="achievedRef"
type="number"
v-model.number="row.saleQuantity"
:disable="!row.itemFk || row.isOk != null"
@blur="changeQuantity(row)"
@keyup.enter="changeQuantity(row)"
@keyup.enter="$refs.achievedRef.vnInputRef.blur()"
dense
/>
</span>

View File

@ -21,7 +21,6 @@ const catalogParams = {
};
const arrayData = useArrayData(dataKey, {
url: 'Orders/CatalogFilter',
limit: 50,
userParams: catalogParams,
});
const store = arrayData.store;

View File

@ -81,7 +81,7 @@ const columns = computed(() => [
label: t('module.created'),
component: 'date',
cardVisible: true,
format: (row) => toDateTimeFormat(row?.landed),
format: (row) => toDateTimeFormat(row?.created),
columnField: {
component: null,
},