diff --git a/package.json b/package.json
index e2e75f253..04b75a0b0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "salix-front",
- "version": "24.44.0",
+ "version": "24.50.0",
"description": "Salix frontend",
"productName": "Salix",
"author": "Verdnatura",
@@ -64,4 +64,4 @@
"vite": "^5.1.4",
"vitest": "^0.31.1"
}
-}
+}
\ No newline at end of file
diff --git a/src/components/CreateManualInvoiceForm.vue b/src/components/CreateManualInvoiceForm.vue
deleted file mode 100644
index da006e024..000000000
--- a/src/components/CreateManualInvoiceForm.vue
+++ /dev/null
@@ -1,155 +0,0 @@
-
-
-
- (invoiceOutSerialsOptions = data)"
- auto-load
- />
- (taxAreasOptions = data)"
- auto-load
- />
-
-
-
-
- {{ t('Invoicing in progress...') }}
-
-
-
-
-
-
- #{{ scope.opt?.id }}
- {{ scope.opt?.nickname }}
-
-
-
-
- {{
- t('Or')
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-es:
- Create manual invoice: Crear factura manual
- Ticket: Ticket
- Client: Cliente
- Max date: Fecha límite
- Serial: Serie
- Area: Area
- Reference: Referencia
- Or: O
- Invoicing in progress...: Facturación en progreso...
-
diff --git a/src/components/CreateThermographForm.vue b/src/components/CreateThermographForm.vue
index 0b7e4c5c6..54844ee8f 100644
--- a/src/components/CreateThermographForm.vue
+++ b/src/components/CreateThermographForm.vue
@@ -38,7 +38,7 @@ const onDataSaved = (dataSaved) => {
@on-fetch="(data) => (warehousesOptions = data)"
auto-load
url="Warehouses"
- :filter="{ fields: ['id', 'name'], order: 'name ASC', limit: 30 }"
+ :filter="{ fields: ['id', 'name'], order: 'name ASC' }"
/>
(temperaturesOptions = data)"
diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue
index a4cb55a2c..0de5d3aa2 100644
--- a/src/components/CrudModel.vue
+++ b/src/components/CrudModel.vue
@@ -77,7 +77,7 @@ const isLoading = ref(false);
const hasChanges = ref(false);
const originalData = ref();
const vnPaginateRef = ref();
-const formData = ref();
+const formData = ref([]);
const saveButtonRef = ref(null);
const watchChanges = ref();
const formUrl = computed(() => $props.url);
diff --git a/src/components/FilterItemForm.vue b/src/components/FilterItemForm.vue
index 1cf36deeb..d1ceff4ce 100644
--- a/src/components/FilterItemForm.vue
+++ b/src/components/FilterItemForm.vue
@@ -50,25 +50,25 @@ const loading = ref(false);
const tableColumns = computed(() => [
{
- label: t('entry.buys.id'),
+ label: t('globals.id'),
name: 'id',
field: 'id',
align: 'left',
},
{
- label: t('entry.buys.name'),
+ label: t('globals.name'),
name: 'name',
field: 'name',
align: 'left',
},
{
- label: t('entry.buys.size'),
+ label: t('globals.size'),
name: 'size',
field: 'size',
align: 'left',
},
{
- label: t('entry.buys.producer'),
+ label: t('globals.producer'),
name: 'producerName',
field: 'producer',
align: 'left',
@@ -152,10 +152,10 @@ const selectItem = ({ id }) => {
{{ t('Filter item') }}
-
+
{
v-model="itemFilterParams.producerFk"
/>
[
{
- label: t('entry.basicData.id'),
+ label: t('globals.id'),
name: 'id',
field: 'id',
align: 'left',
},
{
- label: t('entry.basicData.warehouseOut'),
+ label: t('globals.warehouseOut'),
name: 'warehouseOutFk',
field: 'warehouseOutFk',
align: 'left',
@@ -62,7 +62,7 @@ const tableColumns = computed(() => [
warehousesOptions.value.find((warehouse) => warehouse.id === val).name,
},
{
- label: t('entry.basicData.warehouseIn'),
+ label: t('globals.warehouseIn'),
name: 'warehouseInFk',
field: 'warehouseInFk',
align: 'left',
@@ -70,14 +70,14 @@ const tableColumns = computed(() => [
warehousesOptions.value.find((warehouse) => warehouse.id === val).name,
},
{
- label: t('entry.basicData.shipped'),
+ label: t('globals.shipped'),
name: 'shipped',
field: 'shipped',
align: 'left',
format: (val) => toDate(val),
},
{
- label: t('entry.basicData.landed'),
+ label: t('globals.landed'),
name: 'landed',
field: 'landed',
align: 'left',
@@ -146,7 +146,7 @@ const selectTravel = ({ id }) => {
{{ t('Filter travels') }}
{
v-model="travelFilterParams.agencyModeFk"
/>
{
v-model="travelFilterParams.warehouseOutFk"
/>
{
v-model="travelFilterParams.warehouseInFk"
/>
diff --git a/src/components/ItemsFilterPanel.vue b/src/components/ItemsFilterPanel.vue
index e89d32da4..938dceb4d 100644
--- a/src/components/ItemsFilterPanel.vue
+++ b/src/components/ItemsFilterPanel.vue
@@ -248,7 +248,7 @@ const removeTag = (index, params, search) => {
>
import axios from 'axios';
-import { onMounted, watch, ref, reactive } from 'vue';
+import { onMounted, watch, ref, reactive, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { QSeparator, useQuasar } from 'quasar';
import { useRoute } from 'vue-router';
@@ -9,6 +9,7 @@ import { toLowerCamel } from 'src/filters';
import routes from 'src/router/modules';
import LeftMenuItem from './LeftMenuItem.vue';
import LeftMenuItemGroup from './LeftMenuItemGroup.vue';
+import VnInput from './common/VnInput.vue';
const { t } = useI18n();
const route = useRoute();
@@ -21,17 +22,52 @@ const props = defineProps({
default: 'main',
},
});
-
+const initialized = ref(false);
+const items = ref([]);
const expansionItemElements = reactive({});
+const pinnedModules = computed(() => {
+ const map = new Map();
+ items.value.forEach((item) => item.isPinned && map.set(item.name, item));
+ return map;
+});
+const search = ref(null);
+
+const filteredItems = computed(() => {
+ if (!search.value) return items.value;
+ const normalizedSearch = normalize(search.value);
+ return items.value.filter((item) => {
+ const locale = normalize(t(item.title));
+ return locale.includes(normalizedSearch);
+ });
+});
+
+const filteredPinnedModules = computed(() => {
+ if (!search.value) return pinnedModules.value;
+ const normalizedSearch = search.value
+ .normalize('NFD')
+ .replace(/[\u0300-\u036f]/g, '')
+ .toLowerCase();
+ const map = new Map();
+ for (const [key, pinnedModule] of pinnedModules.value) {
+ const locale = t(pinnedModule.title)
+ .normalize('NFD')
+ .replace(/[\u0300-\u036f]/g, '')
+ .toLowerCase();
+ if (locale.includes(normalizedSearch)) map.set(key, pinnedModule);
+ }
+ return map;
+});
onMounted(async () => {
await navigation.fetchPinned();
getRoutes();
+ initialized.value = true;
});
watch(
() => route.matched,
() => {
+ if (!initialized.value) return;
items.value = [];
getRoutes();
},
@@ -66,8 +102,6 @@ function addChildren(module, route, parent) {
}
}
-const items = ref([]);
-
function getRoutes() {
if (props.source === 'main') {
const modules = Object.assign([], navigation.getModules().value);
@@ -123,21 +157,57 @@ async function togglePinned(item, event) {
const handleItemExpansion = (itemName) => {
expansionItemElements[itemName].scrollToLastElement();
};
+
+function normalize(text) {
+ return text
+ .normalize('NFD')
+ .replace(/[\u0300-\u036f]/g, '')
+ .toLowerCase();
+}
-