@@ -544,6 +601,10 @@ es:
color: var(--vn-text-color);
}
+.color-vn-text {
+ color: var(--vn-text-color);
+}
+
.q-table--dark .q-table__bottom,
.q-table--dark thead,
.q-table--dark tr,
diff --git a/src/components/VnTable/VnVisibleColumn.vue b/src/components/VnTable/VnVisibleColumn.vue
index 0f979acd3..e3bb52637 100644
--- a/src/components/VnTable/VnVisibleColumn.vue
+++ b/src/components/VnTable/VnVisibleColumn.vue
@@ -12,6 +12,10 @@ const $props = defineProps({
type: String,
default: '',
},
+ skip: {
+ type: Array,
+ default: () => [],
+ },
});
const { notify } = useNotify();
@@ -30,8 +34,12 @@ function setUserConfigViewData(data, isLocal) {
if (!data) return;
// Importante: El name de las columnas de la tabla debe conincidir con el name de las variables que devuelve la view config
if (!isLocal) localColumns.value = [];
+ // Array to Object
+ const skippeds = $props.skip.reduce((a, v) => ({ ...a, [v]: v }), {});
+
for (let column of columns.value) {
const { label, name } = column;
+ if (skippeds[name]) continue;
column.visible = data[name] ?? true;
if (!isLocal) localColumns.value.push({ name, label, visible: column.visible });
}
@@ -127,7 +135,7 @@ onMounted(async () => {
});
-
+
diff --git a/src/components/common/VnBreadcrumbs.vue b/src/components/common/VnBreadcrumbs.vue
index 337507233..02226e497 100644
--- a/src/components/common/VnBreadcrumbs.vue
+++ b/src/components/common/VnBreadcrumbs.vue
@@ -18,7 +18,7 @@ watchEffect(() => {
(matched) => Object.keys(matched.meta).length
);
breadcrumbs.value.length = 0;
-
+ if (!matched.value[0]) return;
if (matched.value[0].name != 'Dashboard') {
root.value = useCamelCase(matched.value[0].path.substring(1).toLowerCase());
diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue
index 3e5cd4216..e3bda6c8e 100644
--- a/src/components/common/VnSelect.vue
+++ b/src/components/common/VnSelect.vue
@@ -75,6 +75,7 @@ const myOptions = ref([]);
const myOptionsOriginal = ref([]);
const vnSelectRef = ref();
const dataRef = ref();
+const lastVal = ref();
const value = computed({
get() {
@@ -85,14 +86,31 @@ const value = computed({
},
});
+watch(options, (newValue) => {
+ setOptions(newValue);
+});
+
+watch(modelValue, (newValue) => {
+ if (!myOptions.value.some((option) => option[optionValue.value] == newValue))
+ fetchFilter(newValue);
+});
+
+onMounted(() => {
+ setOptions(options.value);
+ if ($props.url && $props.modelValue && !findKeyInOptions())
+ fetchFilter($props.modelValue);
+ if ($props.focusOnMount) setTimeout(() => vnSelectRef.value.showPopup(), 300);
+});
+
+function findKeyInOptions() {
+ if (!$props.options) return;
+ return filter($props.modelValue, $props.options)?.length;
+}
+
function setOptions(data) {
myOptions.value = JSON.parse(JSON.stringify(data));
myOptionsOriginal.value = JSON.parse(JSON.stringify(data));
}
-onMounted(() => {
- setOptions(options.value);
- if ($props.url && $props.modelValue) fetchFilter($props.modelValue);
-});
function filter(val, options) {
const search = val.toString().toLowerCase();
@@ -125,15 +143,21 @@ async function fetchFilter(val) {
const defaultWhere = $props.useLike
? { [key]: { like: `%${val}%` } }
: { [key]: val };
- const where = { ...defaultWhere, ...$props.where };
+ const where = { ...(val ? defaultWhere : {}), ...$props.where };
const fetchOptions = { where, order: sortBy, limit };
if (fields) fetchOptions.fields = fields;
return dataRef.value.fetch(fetchOptions);
}
async function filterHandler(val, update) {
- if (!$props.defaultFilter) return update();
+ if (!val && lastVal.value === val) {
+ lastVal.value = val;
+ return update();
+ }
+ lastVal.value = val;
let newOptions;
+
+ if (!$props.defaultFilter) return update();
if ($props.url) {
newOptions = await fetchFilter(val);
} else newOptions = filter(val, myOptionsOriginal.value);
@@ -149,19 +173,6 @@ async function filterHandler(val, update) {
}
);
}
-
-watch(options, (newValue) => {
- setOptions(newValue);
-});
-
-watch(modelValue, (newValue) => {
- if (!myOptions.value.some((option) => option[optionValue.value] == newValue))
- fetchFilter(newValue);
-});
-
-onMounted(async () => {
- if ($props.focusOnMount) setTimeout(() => vnSelectRef.value.showPopup(), 300);
-});
diff --git a/src/components/common/VnSelectCache.vue b/src/components/common/VnSelectCache.vue
new file mode 100644
index 000000000..51873ef6e
--- /dev/null
+++ b/src/components/common/VnSelectCache.vue
@@ -0,0 +1,25 @@
+
+
+
+
+
diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue
index 4981a163f..7792ed2cd 100644
--- a/src/components/ui/CardDescriptor.vue
+++ b/src/components/ui/CardDescriptor.vue
@@ -56,7 +56,12 @@ onBeforeMount(async () => {
skip: 0,
});
store = arrayData.store;
- entity = computed(() => (Array.isArray(store.data) ? store.data[0] : store.data));
+ entity = computed(() => {
+ const data = (Array.isArray(store.data) ? store.data[0] : store.data) ?? {};
+ if (data) emit('onFetch', data);
+ return data;
+ });
+
// It enables to load data only once if the module is the same as the dataKey
if (!isSameDataKey.value || !route.params.id) await getData();
watch(
@@ -85,9 +90,9 @@ function getValueFromPath(path) {
const keys = path.toString().split('.');
let current = entity.value;
- for (let i = 0; i < keys.length; i++) {
- if (current[keys[i]] === undefined) return undefined;
- else current = current[keys[i]];
+ for (const key of keys) {
+ if (current[key] === undefined) return undefined;
+ else current = current[key];
}
return current;
}
diff --git a/src/components/ui/CatalogItem.vue b/src/components/ui/CatalogItem.vue
index 2b4724e35..5c5d71018 100644
--- a/src/components/ui/CatalogItem.vue
+++ b/src/components/ui/CatalogItem.vue
@@ -52,6 +52,10 @@ const dialog = ref(null);
:value="item?.[`value${index + 4}`]"
/>
+
+
+ {{ item.minQuantity }}
+
-
+
{{ t('confirm') }}
diff --git a/src/pages/Order/OrderList.vue b/src/pages/Order/OrderList.vue
index 0598fc6b5..68c4e57a7 100644
--- a/src/pages/Order/OrderList.vue
+++ b/src/pages/Order/OrderList.vue
@@ -154,7 +154,6 @@ async function fetchClientAddress(id, data) {
},
}"
:columns="columns"
- default-mode="table"
redirect="order"
auto-load
>
diff --git a/src/pages/Route/Agency/AgencyList.vue b/src/pages/Route/Agency/AgencyList.vue
index eb301c9ba..32e538172 100644
--- a/src/pages/Route/Agency/AgencyList.vue
+++ b/src/pages/Route/Agency/AgencyList.vue
@@ -78,10 +78,11 @@ const columns = computed(() => [
:columns="columns"
:right-search="false"
:use-model="true"
+ default-mode="card"
/>
- es:
+ es:
isOwn: Tiene propietario
isAnyVolumeAllowed: Permite cualquier volumen
Search agency: Buscar agencia
diff --git a/src/pages/Route/Cmr/CmrList.vue b/src/pages/Route/Cmr/CmrList.vue
index 74a070cbf..dd9e2a75a 100644
--- a/src/pages/Route/Cmr/CmrList.vue
+++ b/src/pages/Route/Cmr/CmrList.vue
@@ -117,6 +117,7 @@ function downloadPdfs() {
:columns="columns"
:right-search="true"
:use-model="true"
+ default-mode="card"
/>
diff --git a/src/pages/Ticket/TicketFilter.vue b/src/pages/Ticket/TicketFilter.vue
index 53fe46dfc..3570cfc03 100644
--- a/src/pages/Ticket/TicketFilter.vue
+++ b/src/pages/Ticket/TicketFilter.vue
@@ -5,7 +5,6 @@ import { useI18n } from 'vue-i18n';
import FetchData from 'components/FetchData.vue';
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
import VnInput from 'src/components/common/VnInput.vue';
-
import VnInputDate from 'components/common/VnInputDate.vue';
const { t } = useI18n();
diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue
index ae635fb4e..6090bdbef 100644
--- a/src/pages/Ticket/TicketList.vue
+++ b/src/pages/Ticket/TicketList.vue
@@ -3,6 +3,7 @@ import { onMounted, onUnmounted } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
import { useStateStore } from 'stores/useStateStore';
+import { toDate, toCurrency } from 'src/filters/index';
import VnPaginate from 'src/components/ui/VnPaginate.vue';
import TicketSummary from './Card/TicketSummary.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
diff --git a/src/pages/Ticket/locale/en.yml b/src/pages/Ticket/locale/en.yml
index ede5480ff..d5530926f 100644
--- a/src/pages/Ticket/locale/en.yml
+++ b/src/pages/Ticket/locale/en.yml
@@ -168,6 +168,24 @@ weeklyTickets:
salesperson: Salesperson
search: Search weekly tickets
searchInfo: Search weekly tickets by id or client id
+ticketSaleTracking:
+ isChecked: Is checked
+ item: Item
+ description: Description
+ quantity: Quantity
+ parking: Parking
+ historyAction: Log states
+ shelvingAction: Shelvings sale
+ original: Original
+ worker: Worker
+ state: State
+ created: Created
+ shelving: Shelving
+ saleGroupDetail: sale group detail
+ previousSelected: previous selected
+ previous: previous
+ prepared: prepared
+ checked: checked
service:
pay: Pay
description: Description
@@ -178,7 +196,7 @@ service:
addService: Add service
quantityInfo: To create services with negative amounts mark the service on the source ticket and press the pay button.
createRefundSuccess: 'The following refund ticket have been created: { ticketId }'
-components:
+ticketComponents:
item: Item
description: Description
quantity: Quantity
diff --git a/src/pages/Ticket/locale/es.yml b/src/pages/Ticket/locale/es.yml
index 1b97cd66f..132c61928 100644
--- a/src/pages/Ticket/locale/es.yml
+++ b/src/pages/Ticket/locale/es.yml
@@ -164,7 +164,7 @@ ticketSale:
shipped: F. Envío
agency: Agencia
address: Consignatario
-components:
+ticketComponents:
item: Artículo
description: Descripción
quantity: Cantidad
@@ -207,6 +207,24 @@ package:
added: Añadido
addPackage: Añadir embalaje
removePackage: Quitar embalaje
+ticketSaleTracking:
+ isChecked: Comprobado
+ item: Artículo
+ description: Descripción
+ quantity: Cantidad
+ parking: Parking
+ historyAction: Historial estados
+ shelvingAction: Carros línea
+ original: Original
+ worker: Trabajador
+ state: Estado
+ created: Fecha creación
+ shelving: Matrícula
+ saleGroupDetail: detalle grupo líneas
+ previousSelected: previa seleccionado
+ previous: previa
+ prepared: preparado
+ checked: revisado
Search ticket: Buscar tickets
You can search by ticket id or alias: Puedes buscar por id o alias del ticket
Select lines to see the options: Selecciona líneas para ver las opciones
diff --git a/src/pages/Travel/TravelFilter.vue b/src/pages/Travel/TravelFilter.vue
deleted file mode 100644
index 77f7ec112..000000000
--- a/src/pages/Travel/TravelFilter.vue
+++ /dev/null
@@ -1,225 +0,0 @@
-
-
-
- (warehousesOptions = data)"
- auto-load
- />
- (continentsOptions = data)"
- auto-load
- />
- (agenciesOptions = data)"
- auto-load
- />
-
-
-
-
- {{ t(`params.${tag.label}`) }}:
- {{ formatFn(tag.value) }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-en:
- params:
- search: Id/Reference
- landedFrom: Landed from
- landedTo: Landed to
- continent: Continent out
- totalEntries: Total entries
-es:
- params:
- search: Id/Referencia
- landedFrom: Llegada desde
- landedTo: Llegada hasta
- continent: Cont. Salida
- totalEntries: Ent. totales
-
-
diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue
index 200ef817b..dbb8949a7 100644
--- a/src/pages/Travel/TravelList.vue
+++ b/src/pages/Travel/TravelList.vue
@@ -198,7 +198,6 @@ const columns = computed(() => [
}"
order="landed DESC"
:columns="columns"
- default-mode="table"
auto-load
redirect="travel"
:is-editable="false"
diff --git a/src/pages/Travel/locale/en.yml b/src/pages/Travel/locale/en.yml
deleted file mode 100644
index c67eddce0..000000000
--- a/src/pages/Travel/locale/en.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-travelFilter:
- filter:
- warehouseOutFk: Warehouse Out
- warehouseInFk: Warehouse In
- agencyModeFk: Agency
- scopeDays: Days onward
diff --git a/src/pages/Travel/locale/es.yml b/src/pages/Travel/locale/es.yml
deleted file mode 100644
index 8e958c074..000000000
--- a/src/pages/Travel/locale/es.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-travelFilter:
- filter:
- warehouseInFk: Alm. entrada
- warehouseOutFk: Alm. salida
- agencyModeFk: Agencia
- scopeDays: Días adelante
diff --git a/src/pages/Worker/Card/WorkerBalance.vue b/src/pages/Worker/Card/WorkerBalance.vue
index ad18d61e0..037a65eaf 100644
--- a/src/pages/Worker/Card/WorkerBalance.vue
+++ b/src/pages/Worker/Card/WorkerBalance.vue
@@ -77,7 +77,6 @@ const columns = computed(() => [
}"
order="paymentDate DESC"
:columns="columns"
- default-mode="table"
auto-load
:right-search="false"
:is-editable="true"
diff --git a/src/pages/Worker/Card/WorkerDescriptor.vue b/src/pages/Worker/Card/WorkerDescriptor.vue
index 82a698878..951c8511e 100644
--- a/src/pages/Worker/Card/WorkerDescriptor.vue
+++ b/src/pages/Worker/Card/WorkerDescriptor.vue
@@ -71,7 +71,7 @@ watch(
const data = ref(useCardDescription());
const setData = (entity) => {
if (!entity) return;
- data.value = useCardDescription(entity.user.nickname, entity.id);
+ data.value = useCardDescription(entity.user?.nickname, entity.id);
};
const openChangePasswordForm = () => changePasswordFormDialog.value.show();
diff --git a/src/pages/Worker/Card/WorkerFormation.vue b/src/pages/Worker/Card/WorkerFormation.vue
index 0ac97d9ef..829326898 100644
--- a/src/pages/Worker/Card/WorkerFormation.vue
+++ b/src/pages/Worker/Card/WorkerFormation.vue
@@ -116,7 +116,6 @@ const columns = computed(() => [
}"
order="id DESC"
:columns="columns"
- default-mode="table"
auto-load
:right-search="false"
:is-editable="true"
diff --git a/src/router/modules/ticket.js b/src/router/modules/ticket.js
index 0a8fed551..c6121e836 100644
--- a/src/router/modules/ticket.js
+++ b/src/router/modules/ticket.js
@@ -14,20 +14,18 @@ export default {
main: ['TicketList', 'TicketAdvance', 'TicketWeekly', 'TicketFuture'],
card: [
'TicketBasicData',
- 'TicketPurchaseRequest',
'TicketSale',
'TicketLog',
'TicketExpedition',
'TicketDms',
- 'TicketService',
- 'TicketVolume',
- 'TicketNotes',
+ 'TicketPurchaseRequest',
'TicketTracking',
+ 'TicketNotes',
+ 'TicketVolume',
+ 'TicketService',
+ 'TicketSaleTracking',
'TicketBoxing',
'TicketSms',
- 'TicketPicture',
- 'TicketComponents',
- 'TicketPackage',
],
},
children: [
@@ -148,22 +146,22 @@ export default {
component: () => import('src/pages/Ticket/Card/TicketLog.vue'),
},
{
- path: 'observation',
- name: 'TicketNotes',
+ path: 'boxing',
+ name: 'TicketBoxing',
meta: {
- title: 'notes',
- icon: 'vn:notes',
+ title: 'boxing',
+ icon: 'vn:package',
},
- component: () => import('src/pages/Ticket/Card/TicketNotes.vue'),
+ component: () => import('src/pages/Ticket/Card/TicketBoxing.vue'),
},
{
- path: 'picture',
- name: 'TicketPicture',
+ path: 'service',
+ name: 'TicketService',
meta: {
- title: 'pictures',
- icon: 'vn:photo',
+ title: 'services',
+ icon: 'vn:services',
},
- component: () => import('src/pages/Ticket/Card/TicketPicture.vue'),
+ component: () => import('src/pages/Ticket/Card/TicketService.vue'),
},
{
path: 'volume',
@@ -176,41 +174,13 @@ export default {
},
{
- path: 'expedition',
- name: 'TicketExpedition',
+ path: 'observation',
+ name: 'TicketNotes',
meta: {
- title: 'expedition',
- icon: 'vn:package',
+ title: 'notes',
+ icon: 'vn:notes',
},
- component: () => import('src/pages/Ticket/Card/TicketExpedition.vue'),
- },
- {
- path: 'service',
- name: 'TicketService',
- meta: {
- title: 'services',
- icon: 'vn:services',
- },
- component: () => import('src/pages/Ticket/Card/TicketService.vue'),
- },
- {
- path: 'package',
- name: 'TicketPackage',
- meta: {
- title: 'packages',
- icon: 'vn:bucket',
- },
- component: () => import('src/pages/Ticket/Card/TicketPackage.vue'),
- },
-
- {
- path: 'components',
- name: 'TicketComponents',
- meta: {
- title: 'components',
- icon: 'vn:components',
- },
- component: () => import('src/pages/Ticket/Card/TicketComponents.vue'),
+ component: () => import('src/pages/Ticket/Card/TicketNotes.vue'),
},
{
path: 'dms',
@@ -222,13 +192,14 @@ export default {
component: () => import('src/pages/Ticket/Card/TicketDms.vue'),
},
{
- path: 'boxing',
- name: 'TicketBoxing',
+ path: 'sale-tracking',
+ name: 'TicketSaleTracking',
meta: {
- title: 'boxing',
- icon: 'science',
+ title: 'saleTracking',
+ icon: 'vn:buyrequest',
},
- component: () => import('src/pages/Ticket/Card/TicketBoxing.vue'),
+ component: () =>
+ import('src/pages/Ticket/Card/TicketSaleTracking.vue'),
},
{
path: 'sms',
diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js
index 51f266800..961e80377 100644
--- a/src/stores/useNavigationStore.js
+++ b/src/stores/useNavigationStore.js
@@ -21,9 +21,9 @@ export const useNavigationStore = defineStore('navigationStore', () => {
'route',
'ticket',
'worker',
+ 'account',
'wagon',
'zone',
- 'account',
];
const pinnedModules = ref([]);
const role = useRole();
diff --git a/test/cypress/integration/invoiceIn/invoiceInCorrective.spec.js b/test/cypress/integration/invoiceIn/invoiceInCorrective.spec.js
index 7863d6bfa..efe5550c3 100644
--- a/test/cypress/integration/invoiceIn/invoiceInCorrective.spec.js
+++ b/test/cypress/integration/invoiceIn/invoiceInCorrective.spec.js
@@ -8,7 +8,8 @@ describe('InvoiceInCorrective', () => {
it('should create a correcting invoice', () => {
cy.viewport(1280, 720);
cy.login('developer');
- cy.visit(`/#/invoice-in/1/summary?limit=10`);
+ cy.visit(`/#/invoice-in/1/summary`);
+ cy.waitForElement('.q-page');
cy.openActionsDescriptor();
diff --git a/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js b/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js
index a2e9998bb..4b5b993df 100644
--- a/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js
+++ b/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js
@@ -7,6 +7,7 @@ describe('InvoiceInDescriptor', () => {
cy.viewport(1280, 720);
cy.login('developer');
cy.visit('/#/invoice-in/1/summary');
+ cy.waitForElement('.q-page');
cy.openActionsDescriptor();
cy.get(firstDescritorOpt).click();
diff --git a/test/vitest/__tests__/composables/useArrayData.spec.js b/test/vitest/__tests__/composables/useArrayData.spec.js
index 5e4d12560..21323395b 100644
--- a/test/vitest/__tests__/composables/useArrayData.spec.js
+++ b/test/vitest/__tests__/composables/useArrayData.spec.js
@@ -5,7 +5,7 @@ import { useRouter } from 'vue-router';
import * as vueRouter from 'vue-router';
describe('useArrayData', () => {
- const filter = '{"order":"","limit":10,"skip":0}';
+ const filter = '{"limit":10,"skip":0}';
const params = { supplierFk: 2 };
beforeEach(() => {
vi.spyOn(useRouter(), 'replace');