@@ -64,6 +68,7 @@ const onDataSaved = (data) => {
{},
+ },
autoLoad: {
type: Boolean,
default: false,
@@ -61,6 +66,10 @@ const $props = defineProps({
type: Function,
default: null,
},
+ clearStoreOnUnmount: {
+ type: Boolean,
+ default: true,
+ },
saveFn: {
type: Function,
default: null,
@@ -110,7 +119,12 @@ onBeforeRouteLeave((to, from, next) => {
});
onUnmounted(() => {
- state.unset($props.model);
+ // Restauramos los datos originales en el store si se realizaron cambios en el formulario pero no se guardaron, evitando modificaciones erróneas.
+ if (hasChanges.value) {
+ state.set($props.model, originalData.value);
+ return;
+ }
+ if ($props.clearStoreOnUnmount) state.unset($props.model);
});
const isLoading = ref(false);
@@ -120,7 +134,19 @@ const hasChanges = ref(!$props.observeFormChanges);
const originalData = ref({});
const formData = computed(() => state.get($props.model));
const formUrl = computed(() => $props.url);
-
+const defaultButtons = computed(() => ({
+ save: {
+ color: 'primary',
+ icon: 'restart_alt',
+ label: 'globals.save',
+ },
+ reset: {
+ color: 'primary',
+ icon: 'save',
+ label: 'globals.reset',
+ },
+ ...$props.defaultButtons,
+}));
const startFormWatcher = () => {
watch(
() => formData.value,
@@ -132,10 +158,6 @@ const startFormWatcher = () => {
);
};
-function tMobile(...args) {
- if (!quasar.platform.is.mobile) return t(...args);
-}
-
async function fetch() {
try {
const { data } = await axios.get($props.url, {
@@ -238,21 +260,21 @@ watch(formUrl, async () => {
diff --git a/src/components/FormModelPopup.vue b/src/components/FormModelPopup.vue
index 04322a3c8..cc22c77db 100644
--- a/src/components/FormModelPopup.vue
+++ b/src/components/FormModelPopup.vue
@@ -42,8 +42,8 @@ const { t } = useI18n();
const closeButton = ref(null);
const isLoading = ref(false);
-const onDataSaved = (dataSaved) => {
- emit('onDataSaved', dataSaved);
+const onDataSaved = (formData, requestResponse) => {
+ emit('onDataSaved', formData, requestResponse);
closeForm();
};
@@ -59,7 +59,7 @@ const closeForm = () => {
:default-actions="false"
:url-create="urlCreate"
:model="model"
- @on-data-saved="onDataSaved($event)"
+ @on-data-saved="onDataSaved"
>
diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue
index 8a01e0bee..ec836f2cd 100644
--- a/src/components/common/VnInput.vue
+++ b/src/components/common/VnInput.vue
@@ -1,5 +1,5 @@
diff --git a/src/components/common/VnSelectDialog.vue b/src/components/common/VnSelectDialog.vue
index 355a25109..bca014a19 100644
--- a/src/components/common/VnSelectDialog.vue
+++ b/src/components/common/VnSelectDialog.vue
@@ -59,6 +59,9 @@ const toggleForm = () => {
:name="actionIcon"
:size="actionIcon === 'add' ? 'xs' : 'sm'"
:class="['default-icon', { '--add-icon': actionIcon === 'add' }]"
+ :style="{
+ 'font-variation-settings': `'FILL' ${1}`,
+ }"
>
{{ tooltip }}
diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue
index c53193e6f..01048c6de 100644
--- a/src/components/ui/CardDescriptor.vue
+++ b/src/components/ui/CardDescriptor.vue
@@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n';
import SkeletonDescriptor from 'components/ui/SkeletonDescriptor.vue';
import { useArrayData } from 'composables/useArrayData';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
+import { useState } from 'src/composables/useState';
const $props = defineProps({
url: {
@@ -35,6 +36,8 @@ const $props = defineProps({
default: null,
},
});
+
+const state = useState();
const slots = useSlots();
const { t } = useI18n();
const { viewSummary } = useSummaryDialog();
@@ -64,6 +67,7 @@ async function getData() {
isLoading.value = true;
try {
const { data } = await arrayData.fetch({ append: false, updateRouter: false });
+ state.set($props.dataKey, data);
emit('onFetch', data);
} finally {
isLoading.value = false;
diff --git a/src/components/ui/CardSummary.vue b/src/components/ui/CardSummary.vue
index aeca84c80..f7780670f 100644
--- a/src/components/ui/CardSummary.vue
+++ b/src/components/ui/CardSummary.vue
@@ -1,11 +1,10 @@
@@ -126,17 +134,17 @@ const showEntryReport = () => {
:value="entity.travel?.warehouseOut?.name"
/>
-
+
{{ t('Inventory entry') }}
-
+
{{ t('Virtual entry') }}
diff --git a/src/pages/Entry/Card/EntrySummary.vue b/src/pages/Entry/Card/EntrySummary.vue
index b6863f8f7..1cd2a6cd9 100644
--- a/src/pages/Entry/Card/EntrySummary.vue
+++ b/src/pages/Entry/Card/EntrySummary.vue
@@ -165,20 +165,27 @@ const fetchEntryBuys = async () => {
@on-fetch="(data) => setEntryData(data)"
>
-
+
{{ entry.id }} - {{ entry.supplier.nickname }}
-
-
+
@@ -192,37 +199,15 @@ const fetchEntryBuys = async () => {
:label="t('entry.summary.invoiceNumber')"
:value="entry.invoiceNumber"
/>
-
-
-
-
-
-
+
@@ -250,7 +235,7 @@ const fetchEntryBuys = async () => {
{
+
+
+
+
+
+
+
+
@@ -277,9 +296,9 @@ const fetchEntryBuys = async () => {
@@ -325,11 +344,8 @@ const fetchEntryBuys = async () => {
-
-
+
+
@@ -338,13 +354,7 @@ const fetchEntryBuys = async () => {
-
-
es:
- Travel data: 'Datos envío'
+ Travel data: Datos envío
diff --git a/src/pages/Entry/EntryList.vue b/src/pages/Entry/EntryList.vue
index e8eff584b..6f146e21a 100644
--- a/src/pages/Entry/EntryList.vue
+++ b/src/pages/Entry/EntryList.vue
@@ -74,7 +74,7 @@ onMounted(async () => {
diff --git a/src/pages/InvoiceOut/Card/InvoiceOutSummary.vue b/src/pages/InvoiceOut/Card/InvoiceOutSummary.vue
index 73acc0ad1..c5c17fa87 100644
--- a/src/pages/InvoiceOut/Card/InvoiceOutSummary.vue
+++ b/src/pages/InvoiceOut/Card/InvoiceOutSummary.vue
@@ -95,7 +95,11 @@ const ticketsColumns = ref([
-
+
{{ invoiceOut.ref }} - {{ invoiceOut.client?.socialName }}
diff --git a/src/pages/Route/Card/RouteSummary.vue b/src/pages/Route/Card/RouteSummary.vue
index df4495d3a..9801f3d28 100644
--- a/src/pages/Route/Card/RouteSummary.vue
+++ b/src/pages/Route/Card/RouteSummary.vue
@@ -132,12 +132,11 @@ const openBuscaman = async (route, ticket) => {
-
-
-
-
-
-
+
{{ `${entity?.route.id} - ${entity?.route?.description}` }}
diff --git a/src/pages/Route/Cmr/CmrList.vue b/src/pages/Route/Cmr/CmrList.vue
index dc5602c1c..eb1901ab8 100644
--- a/src/pages/Route/Cmr/CmrList.vue
+++ b/src/pages/Route/Cmr/CmrList.vue
@@ -91,6 +91,24 @@ function downloadPdfs() {
}
+
+
+
+
+
+
+ {{ t('globals.collapseMenu') }}
+
+
+
+
+
{
- bankEntitiesOptions.value.push(data);
+const onBankEntityCreated = async (dataSaved, rowData) => {
+ await bankEntitiesRef.value.fetch();
+ rowData.bankEntityFk = dataSaved.id;
};
const onChangesSaved = () => {
@@ -63,6 +66,7 @@ onMounted(() => {
(bankEntitiesOptions = data)"
auto-load
@@ -114,13 +118,16 @@ onMounted(() => {
:label="t('worker.create.bankEntity')"
v-model="row.bankEntityFk"
:options="bankEntitiesOptions"
- option-label="name"
+ option-label="bic"
option-value="id"
hide-selected
>
+ onBankEntityCreated(requestResponse, row)
+ "
:show-entity-field="false"
/>
diff --git a/src/pages/Supplier/Card/SupplierAddresses.vue b/src/pages/Supplier/Card/SupplierAddresses.vue
index c6b08075f..735b50625 100644
--- a/src/pages/Supplier/Card/SupplierAddresses.vue
+++ b/src/pages/Supplier/Card/SupplierAddresses.vue
@@ -83,8 +83,13 @@ const redirectToUpdateView = (addressData) => {
- {{ t('supplier.list.newSupplier') }}
+ {{ t('New address') }}
+
+
+es:
+ New address: Nueva dirección
+
diff --git a/src/pages/Supplier/Card/SupplierBasicData.vue b/src/pages/Supplier/Card/SupplierBasicData.vue
index bc50deb9b..01741dd77 100644
--- a/src/pages/Supplier/Card/SupplierBasicData.vue
+++ b/src/pages/Supplier/Card/SupplierBasicData.vue
@@ -26,6 +26,7 @@ const workersOptions = ref([]);
:url-update="`Suppliers/${route.params.id}`"
model="supplier"
auto-load
+ :clear-store-on-unmount="false"
>
diff --git a/src/pages/Supplier/Card/SupplierBillingData.vue b/src/pages/Supplier/Card/SupplierBillingData.vue
index bf5ccb115..26b6e5461 100644
--- a/src/pages/Supplier/Card/SupplierBillingData.vue
+++ b/src/pages/Supplier/Card/SupplierBillingData.vue
@@ -33,6 +33,7 @@ const formatPayDems = (data) => {
:url-update="`Suppliers/${route.params.id}`"
model="supplier"
auto-load
+ :clear-store-on-unmount="false"
>
diff --git a/src/pages/Supplier/Card/SupplierContacts.vue b/src/pages/Supplier/Card/SupplierContacts.vue
index d69b74a4c..3abe5a9cc 100644
--- a/src/pages/Supplier/Card/SupplierContacts.vue
+++ b/src/pages/Supplier/Card/SupplierContacts.vue
@@ -1,5 +1,5 @@
+
+
+ (deviceProductionsOptions = data)"
+ />
+ setCurrentPDA(data[0])"
+ />
+
+ setCurrentPDA(data)"
+ >
+
+
+
+
+ {{ currentPDA.description }}
+
+
+
+
+
+ {{ t('worker.pda.removePDA') }}
+
+
+
+
+
+
+
+
+
+ ID: {{ scope.opt?.id }}
+
+ {{ scope.opt?.modelFk }},
+ {{ scope.opt?.serialNumber }}
+
+
+
+
+
+
+
+
+
+
+
+es:
+ PDA deallocated: PDA desasignada
+
diff --git a/src/router/modules/Supplier.js b/src/router/modules/Supplier.js
index d341ddc25..379a2c2c2 100644
--- a/src/router/modules/Supplier.js
+++ b/src/router/modules/Supplier.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'suppliers',
icon: 'vn:supplier',
+ moduleName: 'Supplier',
},
component: RouterView,
redirect: { name: 'SupplierMain' },
diff --git a/src/router/modules/claim.js b/src/router/modules/claim.js
index 0aa26cadf..65c714418 100644
--- a/src/router/modules/claim.js
+++ b/src/router/modules/claim.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'claims',
icon: 'vn:claims',
+ moduleName: 'Claim',
},
component: RouterView,
redirect: { name: 'ClaimMain' },
diff --git a/src/router/modules/customer.js b/src/router/modules/customer.js
index 6bc4f8392..a64bc9e0f 100644
--- a/src/router/modules/customer.js
+++ b/src/router/modules/customer.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'customers',
icon: 'vn:client',
+ moduleName: 'Customer',
},
component: RouterView,
redirect: { name: 'CustomerMain' },
diff --git a/src/router/modules/entry.js b/src/router/modules/entry.js
index 2f6c8cb4c..50a651af5 100644
--- a/src/router/modules/entry.js
+++ b/src/router/modules/entry.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'entries',
icon: 'vn:entry',
+ moduleName: 'Entry',
},
component: RouterView,
redirect: { name: 'EntryMain' },
diff --git a/src/router/modules/invoiceIn.js b/src/router/modules/invoiceIn.js
index 01ed37036..869a3555a 100644
--- a/src/router/modules/invoiceIn.js
+++ b/src/router/modules/invoiceIn.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'invoiceIns',
icon: 'vn:invoice-in',
+ moduleName: 'InvoiceIn',
},
component: RouterView,
redirect: { name: 'InvoiceInMain' },
diff --git a/src/router/modules/invoiceOut.js b/src/router/modules/invoiceOut.js
index 084cf6ac3..386e04ed8 100644
--- a/src/router/modules/invoiceOut.js
+++ b/src/router/modules/invoiceOut.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'invoiceOuts',
icon: 'vn:invoice-out',
+ moduleName: 'InvoiceOut',
},
component: RouterView,
redirect: { name: 'InvoiceOutMain' },
diff --git a/src/router/modules/order.js b/src/router/modules/order.js
index 4599394cd..16d73281b 100644
--- a/src/router/modules/order.js
+++ b/src/router/modules/order.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'order',
icon: 'vn:basket',
+ moduleName: 'Order',
},
component: RouterView,
redirect: { name: 'OrderMain' },
diff --git a/src/router/modules/route.js b/src/router/modules/route.js
index 614345913..fad991fc6 100644
--- a/src/router/modules/route.js
+++ b/src/router/modules/route.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'routes',
icon: 'vn:delivery',
+ moduleName: 'Route',
},
component: RouterView,
redirect: { name: 'RouteMain' },
diff --git a/src/router/modules/shelving.js b/src/router/modules/shelving.js
index 494f286c3..d32c7d9f3 100644
--- a/src/router/modules/shelving.js
+++ b/src/router/modules/shelving.js
@@ -1,17 +1,18 @@
-import {RouterView} from "vue-router";
+import { RouterView } from 'vue-router';
export default {
path: '/shelving',
name: 'Shelving',
meta: {
title: 'shelving',
- icon: 'vn:inventory'
+ icon: 'vn:inventory',
+ moduleName: 'Shelving',
},
component: RouterView,
redirect: { name: 'ShelvingMain' },
menus: {
main: ['ShelvingList'],
- card: ['ShelvingBasicData', 'ShelvingLog']
+ card: ['ShelvingBasicData', 'ShelvingLog'],
},
children: [
{
@@ -51,8 +52,7 @@ export default {
meta: {
title: 'summary',
},
- component: () =>
- import('pages/Shelving/Card/ShelvingSummary.vue'),
+ component: () => import('pages/Shelving/Card/ShelvingSummary.vue'),
},
{
name: 'ShelvingBasicData',
@@ -75,6 +75,5 @@ export default {
},
],
},
- ]
+ ],
};
-
diff --git a/src/router/modules/ticket.js b/src/router/modules/ticket.js
index 214c69e18..eb6c1b6d2 100644
--- a/src/router/modules/ticket.js
+++ b/src/router/modules/ticket.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'tickets',
icon: 'vn:ticket',
+ moduleName: 'Ticket',
},
component: RouterView,
redirect: { name: 'TicketMain' },
diff --git a/src/router/modules/travel.js b/src/router/modules/travel.js
index 792b393e4..2f1e2150e 100644
--- a/src/router/modules/travel.js
+++ b/src/router/modules/travel.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'travel',
icon: 'local_airport',
+ moduleName: 'Travel',
},
component: RouterView,
redirect: { name: 'TravelMain' },
diff --git a/src/router/modules/wagon.js b/src/router/modules/wagon.js
index 238e482dd..6f9a4c819 100644
--- a/src/router/modules/wagon.js
+++ b/src/router/modules/wagon.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'wagons',
icon: 'vn:trolley',
+ moduleName: 'Wagon',
},
component: RouterView,
redirect: { name: 'WagonMain' },
diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js
index 27a6f19a9..1c722afe8 100644
--- a/src/router/modules/worker.js
+++ b/src/router/modules/worker.js
@@ -6,12 +6,13 @@ export default {
meta: {
title: 'workers',
icon: 'vn:worker',
+ moduleName: 'Worker',
},
component: RouterView,
redirect: { name: 'WorkerMain' },
menus: {
main: ['WorkerList', 'WorkerDepartment'],
- card: ['WorkerNotificationsManager'],
+ card: ['WorkerNotificationsManager', 'WorkerPda'],
departmentCard: ['BasicData'],
},
children: [
@@ -75,6 +76,15 @@ export default {
component: () =>
import('src/pages/Worker/Card/WorkerNotificationsManager.vue'),
},
+ {
+ name: 'WorkerPda',
+ path: 'pda',
+ meta: {
+ title: 'pda',
+ icon: 'phone_android',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerPda.vue'),
+ },
],
},
],